|
|
@ -85,6 +85,8 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust |
|
|
|
@Autowired |
|
|
|
private CustomerMpDao customerMpDao; |
|
|
|
@Autowired |
|
|
|
private PaCustomerUserAgencyDao paCustomerUserAgencyDao; |
|
|
|
@Autowired |
|
|
|
private RedisUtils redisUtils; |
|
|
|
@Autowired |
|
|
|
private PaCustomerAgencyService paCustomerAgencyService; |
|
|
@ -298,16 +300,23 @@ public class PaCustomerServiceImpl extends BaseServiceImpl<PaCustomerDao, PaCust |
|
|
|
* @Description 公众号-查询我的信息 |
|
|
|
**/ |
|
|
|
@Override |
|
|
|
public MyInfoResultDTO myInfo(MyInfoFormDTO formDTO) { |
|
|
|
public MyInfoResultDTO myInfo(TokenDto tokenDTO, MyInfoFormDTO formDTO) { |
|
|
|
|
|
|
|
//0.根据token中userId查询对应的客户Id,客户Id没有则表示用户没有填写过组织信息,需要继续完善信息
|
|
|
|
PaCustomerUserAgencyDTO dto = paCustomerUserAgencyDao.selectByUserId(tokenDTO.getUserId()); |
|
|
|
if(null==dto||null==dto.getCustomerId()){ |
|
|
|
return new MyInfoResultDTO(); |
|
|
|
} |
|
|
|
String customerId = dto.getCustomerId(); |
|
|
|
|
|
|
|
//1.查询客户组织信息
|
|
|
|
PaCustomerAgencyDTO agencyDTO = paCustomerAgencyDao.selectCustomerAgency(formDTO.getCustomerId()); |
|
|
|
PaCustomerAgencyDTO agencyDTO = paCustomerAgencyDao.selectCustomerAgency(customerId); |
|
|
|
if (null == agencyDTO) { |
|
|
|
throw new RenException(PaConstant.SELECT_AGENCY_EXCEPTION); |
|
|
|
} |
|
|
|
|
|
|
|
//2.查询客户小程序授权结果信息
|
|
|
|
List<CustomerMpDTO> listMpDTO = customerMpDao.selectByCustomerId(formDTO.getCustomerId()); |
|
|
|
List<CustomerMpDTO> listMpDTO = customerMpDao.selectByCustomerId(customerId); |
|
|
|
if (null == agencyDTO || listMpDTO.size() != NumConstant.TWO) { |
|
|
|
throw new RenException(PaConstant.CUSTOMER_MP_EXCEPTION); |
|
|
|
} |
|
|
|