|
|
|
@ -639,17 +639,19 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
|
List<CrmsCustomerRelated> relatedList = new ArrayList<>(); |
|
|
|
|
List<Integer> intList = companyCustomerReq.getRelatedId(); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < intList.size(); i++) { |
|
|
|
|
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); |
|
|
|
|
Integer integer = intList.get(i); |
|
|
|
|
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
|
|
|
|
|
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
|
|
|
|
|
relatedList.add(crmsCustomerRelated); |
|
|
|
|
if (null != intList && intList.size() != 0) { |
|
|
|
|
for (int i = 0; i < intList.size(); i++) { |
|
|
|
|
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); |
|
|
|
|
Integer integer = intList.get(i); |
|
|
|
|
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getId().intValue());//企业id
|
|
|
|
|
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
|
|
|
|
|
relatedList.add(crmsCustomerRelated); |
|
|
|
|
} |
|
|
|
|
crmsCustomerRelatedService.insertCustomerRelated(relatedList); |
|
|
|
|
} |
|
|
|
|
crmsCustomerRelatedService.insertCustomerRelated(relatedList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (customer == true && company > 0) { |
|
|
|
|
if (customer && company > 0) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
@ -696,17 +698,18 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
|
List<CrmsCustomerRelated> relatedList = new ArrayList<>(); |
|
|
|
|
List<Integer> intList = companyCustomerReq.getRelatedId(); |
|
|
|
|
|
|
|
|
|
for (int i = 0; i < intList.size(); i++) { |
|
|
|
|
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); |
|
|
|
|
Integer integer = intList.get(i); |
|
|
|
|
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getCustomerId().intValue());//企业id companyCustomerEntity.getId().intValue()
|
|
|
|
|
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
|
|
|
|
|
relatedList.add(crmsCustomerRelated); |
|
|
|
|
if (null != intList && intList.size() != 0) { |
|
|
|
|
for (int i = 0; i < intList.size(); i++) { |
|
|
|
|
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); |
|
|
|
|
Integer integer = intList.get(i); |
|
|
|
|
crmsCustomerRelated.setCustomerId(companyCustomerEntity.getCustomerId().intValue());//企业id companyCustomerEntity.getId().intValue()
|
|
|
|
|
crmsCustomerRelated.setRelatedId(integer);//关联人/企业id
|
|
|
|
|
relatedList.add(crmsCustomerRelated); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (relatedList.size() > 0) { |
|
|
|
|
crmsCustomerRelatedService.insertCustomerRelated(relatedList); |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |