Explorar o código

修复crm同步错误

shenjingwei hai 5 meses
pai
achega
41e7489f11
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  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);
     }
 }