Переглянути джерело

修改添加修改客诉的电话号码去空格处理

wangxiaoming 6 роки тому
батько
коміт
5e18be062f

+ 18 - 6
watero-rst-web/src/main/java/com/iamberry/rst/controllers/cm/AdminCustomerController.java

@@ -745,9 +745,15 @@ public class AdminCustomerController {
             return rjx;
         }
 
-        customerInfo.setCustomerTel(customerInfo.getCustomerTel().trim());
-        cmRelation.setRelationBackTel(cmRelation.getRelationBackTel().trim());
-        cmRelation.setRelationSendTel(cmRelation.getRelationSendTel().trim());
+        if(customerInfo.getCustomerTel() != null && !"".equals(customerInfo.getCustomerTel())){
+            customerInfo.setCustomerTel(customerInfo.getCustomerTel().trim());
+        }
+        if(cmRelation.getRelationBackTel() != null && !"".equals(cmRelation.getRelationBackTel())){
+            cmRelation.setRelationBackTel(cmRelation.getRelationBackTel().trim());
+        }
+        if(cmRelation.getRelationSendTel() != null && !"".equals(cmRelation.getRelationSendTel())){
+            cmRelation.setRelationSendTel(cmRelation.getRelationSendTel().trim());
+        }
 
         Integer customerIsSolve = customerInfo.getCustomerIsSolve();    //处理类型
         String phone = customerInfo.getCustomerTel();       //手机号码
@@ -865,9 +871,15 @@ public class AdminCustomerController {
         }
         Integer flag = 0;
 
-        customerInfo.setCustomerTel(customerInfo.getCustomerTel().trim());
-        cmRelation.setRelationBackTel(cmRelation.getRelationBackTel().trim());
-        cmRelation.setRelationSendTel(cmRelation.getRelationSendTel().trim());
+        if(customerInfo.getCustomerTel() != null && !"".equals(customerInfo.getCustomerTel())){
+            customerInfo.setCustomerTel(customerInfo.getCustomerTel().trim());
+        }
+        if(cmRelation.getRelationBackTel() != null && !"".equals(cmRelation.getRelationBackTel())){
+            cmRelation.setRelationBackTel(cmRelation.getRelationBackTel().trim());
+        }
+        if(cmRelation.getRelationSendTel() != null && !"".equals(cmRelation.getRelationSendTel())){
+            cmRelation.setRelationSendTel(cmRelation.getRelationSendTel().trim());
+        }
 
         Integer customerIsSolve = customerInfo.getCustomerIsSolve();    //处理类型
         String phone = customerInfo.getCustomerTel();       //手机号码