瀏覽代碼

修复crm同步错误

shenjingwei 5 月之前
父節點
當前提交
41e7489f11
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/custom/common/crm/bean/customer.java

+ 3 - 0
src/custom/common/crm/bean/customer.java

@@ -28,6 +28,7 @@ public class customer extends CrmBase {
 
         RowsMap regionsMap = dbConnect.runSqlQuery("select code,name from t_regions where countryid=1").toRowsMap("code");
 
+        int sucesscount = 0;
         for (Row row : rows) {
             try {
                 JSONObject jsonObject = row.toJsonObject();
@@ -112,9 +113,11 @@ public class customer extends CrmBase {
                     }
                 }
                 crmDBConnect.runSqlUpdate("delete from e_order_sync where ownertable='st_customer' and ownerid=" + cid + " and id<=" + syncid);
+                sucesscount++;
             } catch (Exception e) {
                 logger.error(e.getMessage(), e);
             }
         }
+        logger.info("成功处理{}个客户档案同步", sucesscount);
     }
 }