Commit 6121436c by zhouhaibao

[+]修改业务场景的映射

1 parent 96d332fe
......@@ -4,7 +4,7 @@
<!-- 根据手机号查询业务场景标签 -->
<select id="getBusinessSceneByPhoneNumber" parameterType="java.lang.String" resultType="java.lang.String">
SELECT COALESCE(GROUP_CONCAT(DISTINCT CASE WHEN go.scene_type = 1 THEN '1' WHEN go.scene_type = 0 THEN CASE WHEN go.business_type = 1 THEN '2' WHEN go.business_type = 2 THEN '3' END END ORDER BY CASE WHEN go.scene_type = 1 THEN '1' WHEN go.scene_type = 0 AND go.business_type = 1 THEN '2' WHEN go.scene_type = 0 AND go.business_type = 2 THEN '3' END SEPARATOR ', '), '') AS staff_scene_label
SELECT COALESCE(GROUP_CONCAT(DISTINCT CASE WHEN go.scene_type = 1 THEN '2' WHEN go.scene_type = 0 THEN CASE WHEN go.business_type = 1 THEN '3' WHEN go.business_type = 2 THEN '1' END END ORDER BY CASE WHEN go.scene_type = 1 THEN '2' WHEN go.scene_type = 0 AND go.business_type = 1 THEN '3' WHEN go.scene_type = 0 AND go.business_type = 2 THEN '1' END SEPARATOR ', '), '') AS staff_scene_label
FROM dj_car_life_staff_info si
LEFT JOIN dj_car_life_goods_order go ON si.staff_uuid = go.seller_user_id AND go.install_upgrade_time &gt;= DATE_SUB(CURDATE(), INTERVAL 30 DAY)
WHERE si.phone_number = #{phoneNumber}
......@@ -117,7 +117,7 @@
left join excellent_case_review t7 on t2.id = t7.recording_id
left join dj_car_life_staff_info t8 on t1.staff_uuid =t8.staff_uuid
WHERE t8.phone_number = #{phoneNumber}
AND t1.bussiness_type = #{biz}
AND t2.check_type = #{biz}
AND DATE(T1.reception_start_time) &gt;= #{startDate}
AND DATE(T1.reception_start_time) &lt;= #{endDate}
</select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!