Commit a15d5e12 authored by yanghao's avatar yanghao

chore: 客户添加 创建入口

parent 1a6c98c4
......@@ -7,6 +7,7 @@ import cn.iocoder.yudao.module.customer.vo.customer.customerContacts.CustomerCon
import cn.iocoder.yudao.module.customer.vo.customer.vo.CustomerCreateReqVO;
import cn.iocoder.yudao.module.ecw.api.customer.CustomerApi;
import cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO;
import cn.iocoder.yudao.module.ecw.enums.CustomerCreateFromEnum;
import cn.iocoder.yudao.module.ecw.enums.CustomerStatusEnum;
import cn.iocoder.yudao.module.ecw.service.country.CountryService;
import org.springframework.stereotype.Service;
......@@ -84,6 +85,9 @@ public class CustomerApiImpl implements CustomerApi {
customerCreateReqVO.setCustomerOperateLogRemark("会员注册关联创建客户. 会员id:" + memberUserId + "; 电话:" + phone);
// app创建
customerCreateReqVO.setCreateFrom(CustomerCreateFromEnum.APP_REGISTER.getValue());
customerService.createCustomer(customerCreateReqVO);
}
......
......@@ -64,6 +64,7 @@ import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankUpdateReqVO;
import cn.iocoder.yudao.module.customer.vo.customerDetail.CustomerOrderBackPageVO;
import cn.iocoder.yudao.module.customer.vo.customerOperateLog.CustomerOperateLogCreateReqVO;
import cn.iocoder.yudao.module.ecw.dal.dataobject.country.CountryDO;
import cn.iocoder.yudao.module.ecw.enums.CustomerCreateFromEnum;
import cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum;
import cn.iocoder.yudao.module.ecw.enums.CustomerStatusEnum;
import cn.iocoder.yudao.module.ecw.enums.ErrorCodeConstants;
......@@ -262,6 +263,8 @@ public class CustomerServiceImpl extends AbstractService<CustomerMapper,
customerCreateReqVO.setCustomerOperateLogRemark("管理端创建收货人时关联创建客户,进待分配列表");
customerCreateReqVO.setCustomerOperateLogOrderNo(orderNo);
customerCreateReqVO.setCreateFrom(CustomerCreateFromEnum.APP_CONSIGNOR.getValue());
Long customerId = this.createCustomer(customerCreateReqVO);
List<CustomerContactsDO> customerContactsDOS =
......
......@@ -173,6 +173,10 @@ public class CustomerCreateReqVO extends CustomerBaseVO {
private String customerOperateLogOrderNo;
@JsonIgnore
private Integer createFrom;
/**
* 是否被订单收货人同步的
......
......@@ -50,6 +50,7 @@ import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankBackVO;
import cn.iocoder.yudao.module.customer.vo.customerBank.CustomerBankQueryVO;
import cn.iocoder.yudao.module.ecw.api.paramValid.ParamValidatorApi;
import cn.iocoder.yudao.module.ecw.enums.CustomerContactsDefaultEnum;
import cn.iocoder.yudao.module.ecw.enums.CustomerCreateFromEnum;
import cn.iocoder.yudao.module.ecw.enums.CustomerOperateTypeEnum;
import cn.iocoder.yudao.module.ecw.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.ecw.service.busiPwd.BusiPwdService;
......@@ -239,6 +240,9 @@ public class CustomerController {
}
}
// 后台创建
createReqVO.setCreateFrom(CustomerCreateFromEnum.BACKEND.getValue());
return success(customerService.createCustomer(createReqVO));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment