张延森 6 years ago
parent
commit
ce0bb74665

+ 9
- 1
src/main/java/com.huiju.welcome/service/impl/TaMainUsherRecordServiceImpl.java View File

107
 
107
 
108
     @Override
108
     @Override
109
     public boolean newRecordByConsultant(TaCustomer taCustomer, JSONArray follows) {
109
     public boolean newRecordByConsultant(TaCustomer taCustomer, JSONArray follows) {
110
+        if (StringUtils.isEmpty(taCustomer.getRemark()) && (null == follows || follows.size() == 0)) {
111
+            return false;
112
+        }
113
+
110
         TaMainUsherRecord taMainUsherRecord = newRecordByCust(taCustomer, null);
114
         TaMainUsherRecord taMainUsherRecord = newRecordByCust(taCustomer, null);
111
         taMainUsherRecord.setCustomerId(taCustomer.getCustomerId());
115
         taMainUsherRecord.setCustomerId(taCustomer.getCustomerId());
112
         int row = taMainUsherRecordMapper.insert(taMainUsherRecord);
116
         int row = taMainUsherRecordMapper.insert(taMainUsherRecord);
391
 
395
 
392
     @Override
396
     @Override
393
     public boolean updateByCustomer(TaCustomer taCustomer, JSONArray follows, String userId) {
397
     public boolean updateByCustomer(TaCustomer taCustomer, JSONArray follows, String userId) {
398
+        if (StringUtils.isEmpty(taCustomer.getRemark()) && (null == follows || follows.size() == 0)) {
399
+            return false;
400
+        }
401
+
394
         TaMainUsherRecord taMainUsherRecord = getTodayRecord(taCustomer.getCustomerId());
402
         TaMainUsherRecord taMainUsherRecord = getTodayRecord(taCustomer.getCustomerId());
395
 
403
 
396
         if (null == taMainUsherRecord) {
404
         if (null == taMainUsherRecord) {
407
 
415
 
408
             if (null == remark) {
416
             if (null == remark) {
409
                 remark = taCustomer.getRemark();
417
                 remark = taCustomer.getRemark();
410
-            } else {
418
+            } else if (!StringUtils.isEmpty(taCustomer.getRemark())) {
411
                 remark += "\n\n---" + DateUtils.cutSecond(LocalDateTime.now())+ "---" + "\n" + taCustomer.getRemark();
419
                 remark += "\n\n---" + DateUtils.cutSecond(LocalDateTime.now())+ "---" + "\n" + taCustomer.getRemark();
412
             }
420
             }
413
             taMainUsherRecord.setRemark(remark);
421
             taMainUsherRecord.setRemark(remark);