浏览代码

实现定时同步客户信息表用户真实下单数据的功能

cgp 4 天之前
父节点
当前提交
cc478483ec

+ 7 - 6
fs-service/src/main/resources/mapper/hisStore/FsStoreOrderScrmMapper.xml

@@ -1191,15 +1191,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </select>
 
     <select id="selectIdListByHandleCollectionIds" resultType="com.fs.qw.vo.FsStoreOrderScrmIdVo">
-    select id,handle_collection_id from fs_store_order_scrm where handle_collection_id in
-    <foreach collection="handwriteCollectionIds" index="index" item="item" open="(" separator="," close=")">
-        #{item}
-    </foreach>
-</select>
+        select id,handle_collection_id from fs_store_order_scrm where handle_collection_id in
+        <foreach collection="handwriteCollectionIds" index="index" item="item" open="(" separator="," close=")">
+            #{item}
+        </foreach>
+    </select>
 
     <select id="fetchPharmacyPrescribeOrderPhoneCountList"
             resultType="com.fs.hisStore.vo.FsStoreOrderScrmPhoneAndOrderNumVO">
-        SELECT user_phone, COUNT(*) AS valid_order_num
+        SELECT user_phone AS phone,
+        COUNT(*) AS orderNum
         FROM fs_store_order_scrm
         WHERE paid = 1
           AND status IN (1, 2, 3)

+ 2 - 2
fs-service/src/main/resources/mapper/qw/FsCompanyCustomerMapper.xml

@@ -413,12 +413,12 @@
         UPDATE fs_company_customer
         SET buy_count = CASE phone
         <foreach collection="phoneList" item="item" separator=" ">
-            WHEN #{item.userPhone} THEN #{item.orderNum}
+            WHEN #{item.phone} THEN #{item.orderNum}
         </foreach>
         END
         WHERE phone IN
         <foreach collection="phoneList" item="item" open="(" close=")" separator=",">
-            #{item.userPhone}
+            #{item.phone}
         </foreach>
     </update>