Преглед на файлове

Merge branch 'master' into test

zhaoxian преди 2 години
родител
ревизия
59a72c2bc0

+ 11 - 0
ruixuan-live/src/main/java/com/ruixuan/isc/entity/KuaishouItemCollectSamples.java

@@ -166,6 +166,8 @@ public class KuaishouItemCollectSamples extends BaseEntity {
     private Long validAmount;
     @Transient
     private Long validOrderNum;
+    @Transient
+    private Long promoterOrderNum;
 
 
     public static long getSerialVersionUID() {
@@ -412,6 +414,14 @@ public class KuaishouItemCollectSamples extends BaseEntity {
         this.validOrderNum = validOrderNum;
     }
 
+    public Long getPromoterOrderNum() {
+        return promoterOrderNum;
+    }
+
+    public void setPromoterOrderNum(Long promoterOrderNum) {
+        this.promoterOrderNum = promoterOrderNum;
+    }
+
     @Override
     public String toString() {
         return "KuaishouItemCollectSamples{" +
@@ -445,6 +455,7 @@ public class KuaishouItemCollectSamples extends BaseEntity {
                 ", userName='" + userName + '\'' +
                 ", validAmount=" + validAmount +
                 ", validOrderNum=" + validOrderNum +
+                ", promoterOrderNum=" + promoterOrderNum +
                 '}';
     }
 }

+ 45 - 15
ruixuan-live/src/main/resources/mapper/isc/KuaishouItemCollectSamplesMapper.xml

@@ -67,51 +67,81 @@
 
     <select id="selectKuaishouItemCollectSamplesList" parameterType="com.ruixuan.isc.entity.KuaishouItemCollectSamples"
             resultMap="KuaishouItemCollectSamplesResult">
-        <include refid="selectKuaishouItemCollectSamplesVo"/>
+        select t1.id,
+        t1.item_id,
+        t1.item_title,
+        t1.item_price,
+        t1.item_img_url,
+        t1.item_desc,
+        t1.commission_rate,
+        t1.regimental_promotion,
+        t1.sample_count,
+        t1.sample_requirement,
+        t1.item_create_id,
+        t1.item_create_name,
+        t1.collect_sample_id,
+        t1.collect_sample_name,
+        t1.partner_recommend_text,
+        t1.promoter_id,
+        t1.promoter_nick_name,
+        t1.promoter_url,
+        t1.promoter_phone,
+        t1.promoter_address,
+        t1.consignee,
+        t1.courier_number,
+        t1.task_file_url,
+        t1.collect_sample_status,
+        t1.collect_sample_desc,
+        t1.create_time,
+        t1.update_time,
+        t2.valid_order_num as 'promoterOrderNum'
+        from kuaishou_item_collect_samples t1 left join promoter_iterm_oerder_amount t2
+        on t1.item_id = t2.item_id
+        and t1.promoter_id = t2.promoter_id
         <where>
-            <if test="itemId != null ">and item_id = #{itemId}</if>
-            <if test="promoterId != null ">and promoter_id = #{promoterId}</if>
-            <if test="collectSampleStatus != null ">and collect_sample_status = #{collectSampleStatus}</if>
+            <if test="itemId != null ">and t1.item_id = #{itemId}</if>
+            <if test="promoterId != null ">and t1.promoter_id = #{promoterId}</if>
+            <if test="collectSampleStatus != null ">and t1.collect_sample_status = #{collectSampleStatus}</if>
             <if test="itemCreateId != null and itemCreateId != ''">
-                and item_create_id = #{itemCreateId}
+                and t1.item_create_id = #{itemCreateId}
             </if>
             <if test='itemCreateIds != null and itemCreateIds.size() > 0'>
-                AND item_create_id in
+                AND t1.item_create_id in
                 <foreach collection="itemCreateIds" item="item" separator=","
                          open="(" close=")">
                     #{item}
                 </foreach>
             </if>
             <if test="collectSampleId != null and collectSampleId != ''">
-                and collect_sample_id = #{collectSampleId}
+                and t1.collect_sample_id = #{collectSampleId}
             </if>
             <if test='collectSampleIds != null and collectSampleIds.size() > 0'>
-                AND collect_sample_id in
+                AND t1.collect_sample_id in
                 <foreach collection="collectSampleIds" item="item" separator=","
                          open="(" close=")">
                     #{item}
                 </foreach>
             </if>
             <if test="itemTitle != null and itemTitle != ''">
-                and item_title like concat('%', #{itemTitle}, '%')
+                and t1.item_title like concat('%', #{itemTitle}, '%')
             </if>
             <if test="promoterNickName != null and promoterNickName != ''">
-                and promoter_nick_name like concat('%', #{promoterNickName}, '%')
+                and t1.promoter_nick_name like concat('%', #{promoterNickName}, '%')
             </if>
             <if test="promoterPhone != null and promoterPhone != ''">
-                and promoter_phone = #{promoterPhone}
+                and t1.promoter_phone = #{promoterPhone}
             </if>
             <if test="consignee != null and consignee != ''">
-                and consignee like concat('%', #{consignee}, '%')
+                and t1.consignee like concat('%', #{consignee}, '%')
             </if>
             <if test="itemCreateId != null and itemCreateId != ''">
-                and item_create_id = #{itemCreateId}
+                and t1.item_create_id = #{itemCreateId}
             </if>
             <if test="collectSampleId != null and collectSampleId != ''">
-                and collect_sample_id = #{collectSampleId}
+                and t1.collect_sample_id = #{collectSampleId}
             </if>
         </where>
-        order by create_time desc
+        order by t1.create_time desc
     </select>
 
     <select id="selectKuaishouItemCollectSamplesById" parameterType="java.lang.Long"