|
@@ -273,10 +273,17 @@ public class TaContactController extends BaseController {
|
273
|
273
|
try {
|
274
|
274
|
TaContact taContact = new TaContact();
|
275
|
275
|
taContact.setContactId(id);
|
276
|
|
- taContact.setContactType(contactType);
|
|
276
|
+ taContact.setContactType(contact.getContactType() + "," + contactType);
|
277
|
277
|
if (!StringUtils.isEmpty(contact.getOrderNo())){
|
278
|
278
|
taContact.setOrderNo(contact.getOrderNo());
|
279
|
279
|
}
|
|
280
|
+ QueryWrapper<TaContact> queryWrapper = new QueryWrapper<>();
|
|
281
|
+ queryWrapper.like("contact_type", contactType);
|
|
282
|
+ queryWrapper.ne("status", CommConstant.STATUS_DELETE);
|
|
283
|
+ List<TaContact> list = iTaContactService.list(queryWrapper);
|
|
284
|
+ if (contactType.equals(CommConstant.SELL) && list.size() >= 9){
|
|
285
|
+ return ResponseBean.error("最多维护9个人", ResponseBean.ERROR_UNAVAILABLE);
|
|
286
|
+ }
|
280
|
287
|
if (iTaContactService.updateById(taContact)) {
|
281
|
288
|
responseBean.addSuccess(taContact);
|
282
|
289
|
} else {
|
|
@@ -300,6 +307,8 @@ public class TaContactController extends BaseController {
|
300
|
307
|
String replaceType = CommConstant.CONCAT_TYPE_PROMOTE;
|
301
|
308
|
if (contactType.equals(CommConstant.FINANCE)){
|
302
|
309
|
replaceType = CommConstant.CONCAT_TYPE_FINANCE;
|
|
310
|
+ }else if (contactType.equals(CommConstant.SELL)){
|
|
311
|
+ replaceType = CommConstant.SELL;
|
303
|
312
|
}
|
304
|
313
|
String finalReplaceType = replaceType;
|
305
|
314
|
taContacts.forEach(e -> {
|