修复客户管理系统前台客户经理问题...

master
river 4 years ago
parent 889bb023e6
commit 1fbd7d6213
  1. 12
      dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerControllerApi.java
  2. 12
      dq-financial-api/src/main/java/com/daqing/financial/crms/CustomerWorkbenchControllerApi.java
  3. 9
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerController.java
  4. 16
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerWorkbenchController.java
  5. 4
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerService.java
  6. 4
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/CustomerWorkbenchService.java
  7. 12
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  8. 16
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java
  9. 2
      dq-framework-common/src/main/java/com/daqing/framework/model/response/ResponseResult.java

@ -43,24 +43,12 @@ public interface CustomerControllerApi {
@ApiOperation(value = "新增个人类型客户信息", notes = "新增个人类型客户信息")
ResponseResult savePersonal(CustomerPersonalTOI customerPersonalTOI);
/**
* 新增企业类型客户信息
*/
@ApiOperation(value = "新增企业类型客户信息", notes = "新增企业类型客户信息")
ResponseResult saveCompany(CustomerCompanyTOI customerCompanyTOI);
/**
* 更新个人类型客户信息
*/
@ApiOperation(value = "更新个人类型客户信息", notes = "更新个人类型客户信息")
ResponseResult updatePersonal(CustomerPersonalTOU customerPersonalTOU);
/**
* 更新企业类型客户信息
*/
@ApiOperation(value = "更新企业类型客户信息", notes = "更新企业类型客户信息")
ResponseResult updateCompany(CustomerCompanyTOU customerCompanyTOU);
/**
* 导入excel数据
*/

@ -43,24 +43,12 @@ public interface CustomerWorkbenchControllerApi {
@ApiOperation(value = "新增个人类型客户信息", notes = "新增个人类型客户信息")
ResponseResult savePersonal(CustomerPersonalTOI customerPersonalTOI);
/**
* 新增企业
*/
@ApiOperation(value = "新增企业类型客户信息", notes = "新增企业类型客户信息")
ResponseResult saveCompany(CustomerCompanyTOI customerCompanyTOI);
/**
* 更新个人类型客户信息
*/
@ApiOperation(value = "更新个人类型客户信息", notes = "更新个人类型客户信息")
ResponseResult updatePersonal(CustomerPersonalTOU customerPersonalTOU);
/**
* 更新企业类型客户信息
*/
@ApiOperation(value = "更新企业类型客户信息", notes = "更新企业类型客户信息")
ResponseResult updateCompany(CustomerCompanyTOU customerCompanyTOU);
/**
* 通过审核
*/

@ -1,6 +1,7 @@
package com.daqing.financial.crms.controller;
import com.daqing.financial.crms.CustomerControllerApi;
import com.daqing.financial.crms.model.request.CompanyCustomerRequest;
import com.daqing.financial.crms.service.CustomerService;
import com.daqing.framework.domain.crms.CompanyCustomerEntity;
import com.daqing.framework.domain.crms.CustomerEntity;
@ -100,8 +101,8 @@ public class CustomerController implements CustomerControllerApi {
* 保存企业类型客户信息
*/
@PostMapping("/saveCompany")
public ResponseResult saveCompany(@RequestBody @Valid CustomerCompanyTOI customerCompanyTOI) {
boolean result = customerService.saveCustomerCompany(customerCompanyTOI);
public ResponseResult saveCompany(@RequestBody @Valid CompanyCustomerRequest companyCustomerRequest) {
boolean result = customerService.insertCompany(companyCustomerRequest);
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL);
}
@ -118,8 +119,8 @@ public class CustomerController implements CustomerControllerApi {
* 更新企业类型客户信息
*/
@PostMapping("/updateCompany")
public ResponseResult updateCompany(@RequestBody @Valid CustomerCompanyTOU customerCompanyTOU) {
boolean result = customerService.updateCustomerCompany(customerCompanyTOU);
public ResponseResult updateCompany(@RequestBody @Valid CompanyCustomerRequest companyCustomerRequest) {
boolean result = customerService.updateCompanyNew(companyCustomerRequest);
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.UPDATE_FAIL);
}

@ -79,7 +79,7 @@ public class CustomerWorkbenchController implements CustomerWorkbenchControllerA
/**
* 新增个人
*/
@PostMapping("/savePersonal")
@PostMapping("/savePersonal") // ..................................
@Override
public ResponseResult savePersonal(@RequestBody CustomerPersonalTOI customerPersonalTOI) {
@ -91,19 +91,19 @@ public class CustomerWorkbenchController implements CustomerWorkbenchControllerA
/**
* 新增企业
*/
@PostMapping("/saveCompany")
/*@PostMapping("/saveCompany")
@Override
public ResponseResult saveCompany(@RequestBody CustomerCompanyTOI customerCompanyTOI) {
boolean result = customerWorkbenchService.saveCompany(customerCompanyTOI);
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.SAVE_FAIL);
}
}*/
/**
* 修改个人
*/
@PostMapping("/updatePersonal")
@PostMapping("/updatePersonal") // ..............................
@Override
public ResponseResult updatePersonal(@RequestBody CustomerPersonalTOU customerPersonalTOU) {
@ -115,14 +115,14 @@ public class CustomerWorkbenchController implements CustomerWorkbenchControllerA
/**
* 修改企业
*/
@PostMapping("/updateCompany")
/*@PostMapping("/updateCompany")
@Override
public ResponseResult updateCompany(@RequestBody CustomerCompanyTOU customerCompanyTOU) {
Boolean result = customerWorkbenchService.updateCompany(customerCompanyTOU);
return result ? ResponseResult.SUCCESS() : new ResponseResult(CommonCode.UPDATE_FAIL);
}
}*/
/**
* 通过审核
@ -161,7 +161,7 @@ public class CustomerWorkbenchController implements CustomerWorkbenchControllerA
/**
* 新增企业()
*/
@ApiOperation(value = "新增企业(新)")
@ApiOperation(value = "新增企业(新)") // .............................
@PostMapping("/insertCompany")
public ResponseResult insertCompany(@RequestBody CompanyCustomerRequest companyCustomerReq) {
@ -173,7 +173,7 @@ public class CustomerWorkbenchController implements CustomerWorkbenchControllerA
/**
* 修改企业()
*/
@ApiOperation(value = "修改企业(新)")
@ApiOperation(value = "修改企业(新)")// ......................................
@PostMapping("/updateCompanyNew")
public ResponseResult updateCompanyNew(@RequestBody CompanyCustomerRequest companyCustomerReq) {

@ -33,11 +33,11 @@ public interface CustomerService extends IService<CustomerEntity> {
boolean saveCustomerPersonal(CustomerPersonalTOI customerPersonalTOI);
boolean saveCustomerCompany(CustomerCompanyTOI customerCompanyTOI);
/*boolean saveCustomerCompany(CustomerCompanyTOI customerCompanyTOI);*/
boolean updateCustomerPersonal(CustomerPersonalTOU customerPersonalTOU);
boolean updateCustomerCompany(CustomerCompanyTOU customerCompanyTOU);
/*boolean updateCustomerCompany(CustomerCompanyTOU customerCompanyTOU);*/
void excelExportCustomer(HttpServletResponse response);

@ -29,11 +29,11 @@ public interface CustomerWorkbenchService extends IService<CustomerEntity> {
Boolean savePersonal(CustomerPersonalTOI customerPersonalTOI);
Boolean saveCompany(CustomerCompanyTOI customerCompanyTOI);
/*Boolean saveCompany(CustomerCompanyTOI customerCompanyTOI);*/
Boolean updatePersonal(CustomerPersonalTOU customerPersonalTOU);
Boolean updateCompany(CustomerCompanyTOU customerCompanyTOU);
/*Boolean updateCompany(CustomerCompanyTOU customerCompanyTOU);*/
Boolean pass(Long id,Long manager);

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

@ -143,7 +143,7 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
/**
* 新增企业
*/
@Transactional
/* @Transactional
@Override
public Boolean saveCompany(CustomerCompanyTOI customerCompanyTOI) {
@ -155,7 +155,7 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
// status = 2;
// Boolean result = save(customerId,status);
return result;
}
}*/
/**
* 修改个人
@ -172,14 +172,14 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
/**
* 修改企业
*/
@Transactional
/*@Transactional
@Override
public Boolean updateCompany(CustomerCompanyTOU customerCompanyTOU) {
Long userId = Long.parseLong(this.getUserId());
customerCompanyTOU.setManager(userId);
return customerService.updateCustomerCompany(customerCompanyTOU);
}
}*/
/**
* 通过审核
@ -289,8 +289,8 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
@Transactional
public Boolean insertCompany(CompanyCustomerRequest companyCustomerReq) {
// Long userId = Long.parseLong(this.getUserId());
// companyCustomerReq.setManager(userId); // 从redis获取当前登录用户
Long userId = Long.parseLong(this.getUserId());
companyCustomerReq.setManager(userId); // 从redis获取当前登录用户
boolean result = customerService.insertCompany(companyCustomerReq);
return result;
}
@ -301,8 +301,8 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
@Transactional
public Boolean updateCompanyNew(CompanyCustomerRequest companyCustomerReq) {
// Long userId = Long.parseLong(this.getUserId());
// companyCustomerReq.setManager(userId);
Long userId = Long.parseLong(this.getUserId());
companyCustomerReq.setManager(userId);
return customerService.updateCompanyNew(companyCustomerReq);
}
}

@ -57,7 +57,7 @@ public class ResponseResult<T> {
}
public static ResponseResult FAIL(Object t) {
return new ResponseResult<>(false, 99999, t, "操作失败!");
return new ResponseResult<>(false, 99999, t, "操作失败,请检查客户经理是否为公司已存在员工或者文件和数据格式!");
}
public ResponseResult SUCCESS_DATA(T t){

Loading…
Cancel
Save