LG88888888 3 년 전
부모
커밋
751b78bf05
1개의 변경된 파일10개의 추가작업 그리고 2개의 파일을 삭제
  1. 10 2
      src/main/java/net/chenlin/dp/modules/api/controller/CustomerController.java

+ 10 - 2
src/main/java/net/chenlin/dp/modules/api/controller/CustomerController.java

@@ -39,15 +39,23 @@ public class CustomerController {
     }
 
 
-    public List<ICustomerEdit> ls() throws OpenAPIException {
+    /**
+     * 客户档案修改接口
+     * @throws OpenAPIException
+     */
+    public void ICustomerEdit() throws OpenAPIException {
         DynamicDataSource.setDataSource("last-data-source");
         List<ICustomerEdit> iCustomerEdits = customerMapper.ICustomerEditList();
         DynamicDataSource.setDataSource("");
         if (iCustomerEdits!=null&&iCustomerEdits.size()>0){
             for (ICustomerEdit i:iCustomerEdits){
                 String s = customerService.editCustomer(i);
+                if (s.equals("0")){
+                    DynamicDataSource.setDataSource("last-data-source");
+                    customerMapper.UpdateCustomer(i.getCode());
+                    DynamicDataSource.setDataSource("");
+                }
             }
         }
-        return iCustomerEdits;
     }
 }