|
@@ -67,51 +67,81 @@
|
|
|
|
|
|
<select id="selectKuaishouItemCollectSamplesList" parameterType="com.ruixuan.isc.entity.KuaishouItemCollectSamples"
|
|
<select id="selectKuaishouItemCollectSamplesList" parameterType="com.ruixuan.isc.entity.KuaishouItemCollectSamples"
|
|
resultMap="KuaishouItemCollectSamplesResult">
|
|
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>
|
|
<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 != ''">
|
|
<if test="itemCreateId != null and itemCreateId != ''">
|
|
- and item_create_id = #{itemCreateId}
|
|
|
|
|
|
+ and t1.item_create_id = #{itemCreateId}
|
|
</if>
|
|
</if>
|
|
<if test='itemCreateIds != null and itemCreateIds.size() > 0'>
|
|
<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=","
|
|
<foreach collection="itemCreateIds" item="item" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="collectSampleId != null and collectSampleId != ''">
|
|
<if test="collectSampleId != null and collectSampleId != ''">
|
|
- and collect_sample_id = #{collectSampleId}
|
|
|
|
|
|
+ and t1.collect_sample_id = #{collectSampleId}
|
|
</if>
|
|
</if>
|
|
<if test='collectSampleIds != null and collectSampleIds.size() > 0'>
|
|
<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=","
|
|
<foreach collection="collectSampleIds" item="item" separator=","
|
|
open="(" close=")">
|
|
open="(" close=")">
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
</if>
|
|
</if>
|
|
<if test="itemTitle != null and itemTitle != ''">
|
|
<if test="itemTitle != null and itemTitle != ''">
|
|
- and item_title like concat('%', #{itemTitle}, '%')
|
|
|
|
|
|
+ and t1.item_title like concat('%', #{itemTitle}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="promoterNickName != null and promoterNickName != ''">
|
|
<if test="promoterNickName != null and promoterNickName != ''">
|
|
- and promoter_nick_name like concat('%', #{promoterNickName}, '%')
|
|
|
|
|
|
+ and t1.promoter_nick_name like concat('%', #{promoterNickName}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="promoterPhone != null and promoterPhone != ''">
|
|
<if test="promoterPhone != null and promoterPhone != ''">
|
|
- and promoter_phone = #{promoterPhone}
|
|
|
|
|
|
+ and t1.promoter_phone = #{promoterPhone}
|
|
</if>
|
|
</if>
|
|
<if test="consignee != null and consignee != ''">
|
|
<if test="consignee != null and consignee != ''">
|
|
- and consignee like concat('%', #{consignee}, '%')
|
|
|
|
|
|
+ and t1.consignee like concat('%', #{consignee}, '%')
|
|
</if>
|
|
</if>
|
|
<if test="itemCreateId != null and itemCreateId != ''">
|
|
<if test="itemCreateId != null and itemCreateId != ''">
|
|
- and item_create_id = #{itemCreateId}
|
|
|
|
|
|
+ and t1.item_create_id = #{itemCreateId}
|
|
</if>
|
|
</if>
|
|
<if test="collectSampleId != null and collectSampleId != ''">
|
|
<if test="collectSampleId != null and collectSampleId != ''">
|
|
- and collect_sample_id = #{collectSampleId}
|
|
|
|
|
|
+ and t1.collect_sample_id = #{collectSampleId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
- order by create_time desc
|
|
|
|
|
|
+ order by t1.create_time desc
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectKuaishouItemCollectSamplesById" parameterType="java.lang.Long"
|
|
<select id="selectKuaishouItemCollectSamplesById" parameterType="java.lang.Long"
|