|
@@ -35,9 +35,7 @@ import org.dromara.system.api.*;
|
|
|
import org.dromara.system.api.domain.bo.RemoteUserBo;
|
|
import org.dromara.system.api.domain.bo.RemoteUserBo;
|
|
|
import org.dromara.system.api.domain.dto.AddressAreaDTO;
|
|
import org.dromara.system.api.domain.dto.AddressAreaDTO;
|
|
|
import org.dromara.system.api.domain.vo.RemoteDeptVo;
|
|
import org.dromara.system.api.domain.vo.RemoteDeptVo;
|
|
|
-import org.dromara.system.api.domain.vo.RemoteComStaffVo;
|
|
|
|
|
import org.dromara.system.api.domain.vo.RemoteDictDataVo;
|
|
import org.dromara.system.api.domain.vo.RemoteDictDataVo;
|
|
|
-import org.dromara.system.api.domain.dto.AddressAreaDTO;
|
|
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
|
|
@@ -191,10 +189,10 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
|
|
|
if (businessInfo != null) {
|
|
if (businessInfo != null) {
|
|
|
vo.setCustomerBusinessInfoVo(MapstructUtils.convert(businessInfo, CustomerBusinessInfoVo.class));
|
|
vo.setCustomerBusinessInfoVo(MapstructUtils.convert(businessInfo, CustomerBusinessInfoVo.class));
|
|
|
// 补充主表缺失字段
|
|
// 补充主表缺失字段
|
|
|
- if (StringUtils.isBlank(vo.getSocialCreditCode())){
|
|
|
|
|
|
|
+ if (StringUtils.isBlank(vo.getSocialCreditCode())) {
|
|
|
vo.setSocialCreditCode(businessInfo.getSocialCreditCode());
|
|
vo.setSocialCreditCode(businessInfo.getSocialCreditCode());
|
|
|
}
|
|
}
|
|
|
- if (StringUtils.isBlank(vo.getBusinessCustomerName())){
|
|
|
|
|
|
|
+ if (StringUtils.isBlank(vo.getBusinessCustomerName())) {
|
|
|
vo.setBusinessCustomerName(businessInfo.getBusinessCustomerName());
|
|
vo.setBusinessCustomerName(businessInfo.getBusinessCustomerName());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -847,7 +845,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
|
|
|
|
|
|
|
|
/*新增客户时给每个客户创建自己的组织架构*/
|
|
/*新增客户时给每个客户创建自己的组织架构*/
|
|
|
RemoteDeptVo remoteDeptVo = new RemoteDeptVo();
|
|
RemoteDeptVo remoteDeptVo = new RemoteDeptVo();
|
|
|
- remoteDeptVo.setParentId(100L);
|
|
|
|
|
|
|
+ remoteDeptVo.setParentId(0L);
|
|
|
remoteDeptVo.setDeptName(bo.getBusinessCustomerName());
|
|
remoteDeptVo.setDeptName(bo.getBusinessCustomerName());
|
|
|
remoteDeptVo.setPlatformCode(platform);
|
|
remoteDeptVo.setPlatformCode(platform);
|
|
|
RemoteDeptVo deptVo = remoteDeptService.insertDept(remoteDeptVo);
|
|
RemoteDeptVo deptVo = remoteDeptService.insertDept(remoteDeptVo);
|
|
@@ -1194,6 +1192,21 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
|
|
|
return true;
|
|
return true;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public Boolean verifyCode(CustomerRegisterBo bo) {
|
|
|
|
|
+ //先校验验证码是否正确
|
|
|
|
|
+ String code = RedisUtils.getCacheObject(GlobalConstants.CAPTCHA_CODE_KEY + bo.getPurchasePhone());
|
|
|
|
|
+ if (code == null) {
|
|
|
|
|
+ throw new ServiceException("验证码已过期");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ if (!code.equals(bo.getCode())) {
|
|
|
|
|
+ throw new ServiceException("验证码错误");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ return true;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
* 客户注册
|
|
* 客户注册
|
|
|
*
|
|
*
|
|
@@ -1295,7 +1308,7 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
|
|
|
|
|
|
|
|
/*新增客户时给每个客户创建自己的组织架构*/
|
|
/*新增客户时给每个客户创建自己的组织架构*/
|
|
|
RemoteDeptVo remoteDeptVo = new RemoteDeptVo();
|
|
RemoteDeptVo remoteDeptVo = new RemoteDeptVo();
|
|
|
- remoteDeptVo.setParentId(100L);
|
|
|
|
|
|
|
+ remoteDeptVo.setParentId(0L);
|
|
|
remoteDeptVo.setDeptName(companyInfo.getResult().getName());
|
|
remoteDeptVo.setDeptName(companyInfo.getResult().getName());
|
|
|
RemoteDeptVo deptVo = remoteDeptService.insertDept(remoteDeptVo);
|
|
RemoteDeptVo deptVo = remoteDeptService.insertDept(remoteDeptVo);
|
|
|
|
|
|