|
|
@ -219,7 +219,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
BeanUtils.copyProperties(customerPersonalTOI, customerEntity); |
|
|
|
BeanUtils.copyProperties(customerPersonalTOI, customerEntity); |
|
|
|
BeanUtils.copyProperties(customerPersonalTOI, personalCustomerEntity); |
|
|
|
BeanUtils.copyProperties(customerPersonalTOI, personalCustomerEntity); |
|
|
|
//TODO 设置客户编号
|
|
|
|
//TODO 设置客户编号
|
|
|
|
customerEntity.setCode(((int) (Math.random() * 100 + 1)) + ""); |
|
|
|
customerEntity.setCode(((int) (Math.random() * 1000000 + 1)) + ""); |
|
|
|
customerEntity.setCreateTime(new Date()); |
|
|
|
customerEntity.setCreateTime(new Date()); |
|
|
|
customerEntity.setMotifyTime(new Date()); |
|
|
|
customerEntity.setMotifyTime(new Date()); |
|
|
|
customerEntity.setType(CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType()); |
|
|
|
customerEntity.setType(CrmsConstant.CustomerType.PERSONAL_CUSTOMER.getType()); |
|
|
@ -235,14 +235,13 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
* 插入企业类型客户信息 |
|
|
|
* 插入企业类型客户信息 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional |
|
|
|
@Transactional |
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean saveCustomerCompany(CustomerCompanyTOI customerCompanyTOI) { |
|
|
|
public boolean saveCustomerCompany(CustomerCompanyTOI customerCompanyTOI) { |
|
|
|
CustomerEntity customerEntity = new CustomerEntity(); |
|
|
|
CustomerEntity customerEntity = new CustomerEntity(); |
|
|
|
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity(); |
|
|
|
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity(); |
|
|
|
BeanUtils.copyProperties(customerCompanyTOI, customerEntity); |
|
|
|
BeanUtils.copyProperties(customerCompanyTOI, customerEntity); |
|
|
|
BeanUtils.copyProperties(customerCompanyTOI, companyCustomerEntity); |
|
|
|
BeanUtils.copyProperties(customerCompanyTOI, companyCustomerEntity); |
|
|
|
//TODO 设置客户编号
|
|
|
|
//TODO 设置客户编号
|
|
|
|
customerEntity.setCode(((int) (Math.random() * 100 + 1)) + ""); |
|
|
|
customerEntity.setCode(((int) (Math.random() * 1000000 + 1)) + ""); |
|
|
|
customerEntity.setCreateTime(new Date()); |
|
|
|
customerEntity.setCreateTime(new Date()); |
|
|
|
customerEntity.setMotifyTime(new Date()); |
|
|
|
customerEntity.setMotifyTime(new Date()); |
|
|
|
customerEntity.setType(CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType()); |
|
|
|
customerEntity.setType(CrmsConstant.CustomerType.COMPANY_CUSTOMER.getType()); |
|
|
@ -276,8 +275,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
/** |
|
|
|
/** |
|
|
|
* 更新企业类型客户信息 |
|
|
|
* 更新企业类型客户信息 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Transactional |
|
|
|
/*@Transactional |
|
|
|
@Override |
|
|
|
|
|
|
|
public boolean updateCustomerCompany(CustomerCompanyTOU customerCompanyTOU) { |
|
|
|
public boolean updateCustomerCompany(CustomerCompanyTOU customerCompanyTOU) { |
|
|
|
CustomerEntity customerEntity = new CustomerEntity(); |
|
|
|
CustomerEntity customerEntity = new CustomerEntity(); |
|
|
|
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity(); |
|
|
|
CompanyCustomerEntity companyCustomerEntity = new CompanyCustomerEntity(); |
|
|
@ -288,7 +286,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
companyCustomerEntity.setCustomerId(customerEntity.getId()); |
|
|
|
companyCustomerEntity.setCustomerId(customerEntity.getId()); |
|
|
|
boolean company = companyCustomerDao.updateCompanyCustomer(companyCustomerEntity); |
|
|
|
boolean company = companyCustomerDao.updateCompanyCustomer(companyCustomerEntity); |
|
|
|
return customer && company; |
|
|
|
return customer && company; |
|
|
|
} |
|
|
|
}*/ |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 导出数据到excel |
|
|
|
* 导出数据到excel |
|
|
@ -562,7 +560,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity |
|
|
|
BeanUtils.copyProperties(companyCustomerReq, customerEntity); |
|
|
|
BeanUtils.copyProperties(companyCustomerReq, customerEntity); |
|
|
|
BeanUtils.copyProperties(companyCustomerReq, companyCustomerEntity); |
|
|
|
BeanUtils.copyProperties(companyCustomerReq, companyCustomerEntity); |
|
|
|
//TODO 设置客户编号
|
|
|
|
//TODO 设置客户编号
|
|
|
|
customerEntity.setCode(((int) (Math.random() * 100 + 1)) + ""); |
|
|
|
customerEntity.setCode(((int) (Math.random() * 1000000 + 1)) + ""); |
|
|
|
customerEntity.setMotifyTime(new Date()); |
|
|
|
customerEntity.setMotifyTime(new Date()); |
|
|
|
customerEntity.setCreateTime(new Date()); |
|
|
|
customerEntity.setCreateTime(new Date()); |
|
|
|
customerEntity.setManager(companyCustomerReq.getManager()); |
|
|
|
customerEntity.setManager(companyCustomerReq.getManager()); |
|
|
|