|
@@ -137,6 +137,29 @@
|
|
|
<if test="visitDesignatedAdminId != null">
|
|
|
and v.designated_admin_id = #{visitDesignatedAdminId}
|
|
|
</if>
|
|
|
+ <if test="sendLogisticsNo != null and sendLogisticsNo != ''">
|
|
|
+ and c.customer_id in (
|
|
|
+ SELECT customer_id
|
|
|
+ FROM tb_rst_renewed trr
|
|
|
+ WHERE renewed_send_logistics_no = #{sendLogisticsNo} OR renewed_back_logistics_no = #{sendLogisticsNo}
|
|
|
+ UNION ALL
|
|
|
+ SELECT customer_id
|
|
|
+ FROM tb_rst_repair
|
|
|
+ WHERE repair_send_logistics_no =#{sendLogisticsNo} OR repair_back_logistics_no = #{sendLogisticsNo}
|
|
|
+ UNION ALL
|
|
|
+ SELECT customer_id
|
|
|
+ FROM tb_rst_reissue
|
|
|
+ WHERE reissue_send_logistics_no = #{sendLogisticsNo}
|
|
|
+ UNION ALL
|
|
|
+ SELECT customer_id
|
|
|
+ FROM tb_rst_back_goods
|
|
|
+ WHERE back_goods_back_logistics_no = #{sendLogisticsNo}
|
|
|
+ UNION ALL
|
|
|
+ SELECT customer_id
|
|
|
+ FROM tb_rst_noreason_back
|
|
|
+ WHERE noreason_back_back_logistics_no = #{sendLogisticsNo}
|
|
|
+ )
|
|
|
+ </if>
|
|
|
</where>
|
|
|
ORDER BY FIELD(c.customer_is_solve, 5, 3, 4, 6, 7, 2, 1),c.customer_id desc
|
|
|
</select>
|