瀏覽代碼

增加客户资料关注状态修改

koul 5 年之前
父節點
當前提交
0cf1f250c4

+ 2 - 0
src/main/java/com/uas/service/CustomerService.java

@@ -18,4 +18,6 @@ public interface CustomerService {
 
     void updateGZStatus(List<String> list);
 
+    void updateCUGZStatus(List<String> list);
+
 }

+ 12 - 1
src/main/java/com/uas/service/Impl/CustomerServiceImpl.java

@@ -193,7 +193,6 @@ public class CustomerServiceImpl implements CustomerService {
         saveSfxz(company_id,fb_id);
         saveSsgg(company_id,fb_id);
         saveDanbao(company_id,fb_id);
-        baseDao.execute("update customer set cu_gzstatus='正在关注' where cu_name in (select fb_name from fbbusiness where fb_tyshxycode='"+company_id+"')");
         }
     }
 
@@ -612,6 +611,18 @@ public class CustomerServiceImpl implements CustomerService {
         }
     }
 
+    /**
+     * 更新客户关注状态为正在关注
+     */
+    @Override
+    public void updateCUGZStatus(List<String> list){
+        if (list!=null&&list.size()>0) {
+            baseDao.execute(
+                    "update customer set cu_gzstatus='正在关注' where cu_name in (select fb_name from fbbusiness where fb_tyshxycode in (" + list2String(list) + ")");
+        }
+    }
+
+
 
     /**
      * 清除所有相关表中数据

+ 2 - 1
src/main/java/com/uas/task/ScheduleTask.java

@@ -29,11 +29,12 @@ public class ScheduleTask {
             logger.info("保存客户资料开始");
             Date date = new Date();
             List<String> following = customerService.getFollowingByGroup();
-            customerService.updateGZStatus(following);
             if (following != null) {
+                customerService.updateGZStatus(following);
                 for (String s : following) {
                     customerService.saveBusiness(s);
                 }
+                customerService.updateCUGZStatus(following);
             }
             logger.info("保存客户资料结束:用时" + ((System.currentTimeMillis() - date.getTime()) / 1000));
         } catch (Exception e) {