Browse Source

供应链2。2

zhaoxian 2 năm trước cách đây
mục cha
commit
e95ca5f525

+ 3 - 5
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouPromoterServiceImpl.java

@@ -165,11 +165,9 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
                 data.put("result", result);
                 //跟进记录
                 JSONObject followUpRecord = kuaishouPromoterMapper.getFollowUpRecordsByUserId(promoter.getPromoterId(), promoter.getUserId());
-                if (Check.isNotNull(followUpRecord)) {
-                    List<JSONObject> followUpRecordList = kuaishouPromoterMapper.getFollowUpRecordListByPromoterId(promoter.getPromoterId(), followUpRecord.getLong("id"));
-                    data.put("followUpRecord", followUpRecord);
-                    data.put("historyFollowUpRecord", followUpRecordList);
-                }
+                data.put("followUpRecord", followUpRecord);
+                List<JSONObject> followUpRecordList = kuaishouPromoterMapper.getFollowUpRecordListByPromoterId(promoter.getPromoterId(), followUpRecord.getLong("id"));
+                data.put("historyFollowUpRecord", followUpRecordList);
                 //标签
                 List<JSONObject> promoterLabelList = kuaishouPromoterMapper.getPromoterLabel(promoter.getPromoterId(), promoter.getUserId());
                 data.put("promoterLabelList", promoterLabelList);

+ 7 - 5
ruixuan-live/src/main/resources/mapper/isc/KuaishouPromoterMapper.xml

@@ -445,13 +445,15 @@
 
     <select id="getFollowUpRecordListByPromoterId" resultType="com.alibaba.fastjson.JSONObject">
         SELECT t1.id,
-               txt,
-               t2.nick_name as 'userName',
-               t1.update_time as 'updateTime'
+        txt,
+        t2.nick_name as 'userName',
+        t1.update_time as 'updateTime'
         FROM kuaishou_promoter_follow_up_record t1
-                 LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id
+        LEFT JOIN sys_user t2 ON t1.user_id = t2.user_id
         Where t1.promoter_id = #{promoterId}
-          AND t1.id != #{id}
+        <if test="id != null">
+            AND t1.id != #{id}
+        </if>
         ORDER BY t1.update_time DESC
     </select>