Browse Source

微调参数

master
zxc 3 years ago
parent
commit
bca00f8027
  1. 6
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPolicyController.java
  2. 2
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyService.java
  3. 7
      epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java

6
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcPolicyController.java

@ -151,10 +151,8 @@ public class IcPolicyController {
* @date 2022/7/21 09:48
*/
@PostMapping("policyListSelect")
public Result<List<IcPolicyDTO>> policyListSelect(@LoginUser TokenDto tokenDto, @RequestBody IcPolicyPageFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setStaffId(tokenDto.getUserId());
return new Result<List<IcPolicyDTO>>().ok(icPolicyService.policyListSelect(formDTO));
public Result<List<IcPolicyDTO>> policyListSelect(@LoginUser TokenDto tokenDto){
return new Result<List<IcPolicyDTO>>().ok(icPolicyService.policyListSelect(tokenDto.getUserId(),tokenDto.getCustomerId()));
}
/**

2
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/IcPolicyService.java

@ -51,7 +51,7 @@ public interface IcPolicyService extends BaseService<IcPolicyEntity> {
* @author zxc
* @date 2022/7/21 09:48
*/
List<IcPolicyDTO> policyListSelect(IcPolicyPageFormDTO formDTO);
List<IcPolicyDTO> policyListSelect(String userId,String customerId);
List<IcPolicyRuleDTO> ruleList(String customerId,String policyId);

7
epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPolicyServiceImpl.java

@ -247,13 +247,12 @@ public class IcPolicyServiceImpl extends BaseServiceImpl<IcPolicyDao, IcPolicyEn
}
@Override
public List<IcPolicyDTO> policyListSelect(IcPolicyPageFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getStaffId());
public List<IcPolicyDTO> policyListSelect(String userId,String customerId) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(customerId, userId);
if (null == staffInfo || StringUtils.isBlank(staffInfo.getAgencyId())) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "工作人员缓存信息异常", "工作人员信息异常");
}
formDTO.setAgencyId(staffInfo.getAgencyId());
return baseDao.policyList(formDTO.getCustomerId(), formDTO.getAgencyId(), null,null,null);
return baseDao.policyList(customerId, staffInfo.getAgencyId(), null,null,null);
}
@Override

Loading…
Cancel
Save