|
|
@@ -562,6 +562,15 @@ public class CrmCustomerServiceImpl extends ServiceImpl<CrmCustomerMapper, CrmCu
|
|
|
{
|
|
|
CrmCustomer crmCustomer = new CrmCustomer();
|
|
|
BeanUtils.copyProperties(customer, crmCustomer);
|
|
|
+ // 如果没有客户名称,默认为"客户"+手机号后四位
|
|
|
+ if (StringUtils.isEmpty(crmCustomer.getCustomerName())) {
|
|
|
+ String mobile = crmCustomer.getMobile();
|
|
|
+ if (StringUtils.isNotEmpty(mobile) && mobile.length() >= 4) {
|
|
|
+ crmCustomer.setCustomerName("客户" + mobile.substring(mobile.length() - 4));
|
|
|
+ } else {
|
|
|
+ crmCustomer.setCustomerName("客户");
|
|
|
+ }
|
|
|
+ }
|
|
|
crmCustomer.setIsDel(0);
|
|
|
crmCustomer.setIsLine(1);
|
|
|
crmCustomer.setCompanyId(companyId);
|