|
|
@ -289,17 +289,19 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust |
|
|
|
|
|
|
|
/** |
|
|
|
* @param formDTO |
|
|
|
* @param source 服务端类型 dev:开发 test:体验 prod:生产 |
|
|
|
* @return |
|
|
|
* @Author sun |
|
|
|
* @Description 公众号-创建组织 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
|
public CreateAgencyResultDTO createAgency(TokenDto tokenDTO, CreateAgencyFormDTO formDTO) { |
|
|
|
public CreateAgencyResultDTO createAgency(TokenDto tokenDTO, CreateAgencyFormDTO formDTO,String source) { |
|
|
|
//1.客户表初始化数据
|
|
|
|
PaCustomerEntity entity = new PaCustomerEntity(); |
|
|
|
entity.setIsInitialize(NumConstant.ZERO); |
|
|
|
entity.setCustomerName(formDTO.getAgencyName()); |
|
|
|
entity.setSource(source); |
|
|
|
baseDao.insert(entity); |
|
|
|
|
|
|
|
//2.客户组织表初始化数据
|
|
|
@ -356,15 +358,16 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust |
|
|
|
|
|
|
|
/** |
|
|
|
* @param tokenDTO |
|
|
|
* @param source 服务端类型 dev:开发 test:体验 prod:生产 |
|
|
|
* @return |
|
|
|
* @Author sun |
|
|
|
* @Description 公众号-查询我的信息 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public MyInfoResultDTO myInfo(TokenDto tokenDTO) { |
|
|
|
public MyInfoResultDTO myInfo(TokenDto tokenDTO,String source) { |
|
|
|
|
|
|
|
//0.根据token中userId查询对应的客户Id,客户Id没有则表示用户没有填写过组织信息,需要继续完善信息
|
|
|
|
PaCustomerUserAgencyDTO dto = paCustomerUserAgencyDao.selectByUserId(tokenDTO.getUserId()); |
|
|
|
PaCustomerUserAgencyDTO dto = paCustomerUserAgencyDao.selectByUserId(tokenDTO.getUserId(),source); |
|
|
|
if (null == dto || null == dto.getCustomerId()) { |
|
|
|
return new MyInfoResultDTO(); |
|
|
|
} |
|
|
|