Browse Source

积分申请审核列表修改

master
zhaoqifeng 3 years ago
parent
commit
79c90e0450
  1. 2
      epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointApplyPageFormDTO.java
  2. 4
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointApplyController.java
  3. 9
      epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java

2
epmet-module/epmet-point/epmet-point-client/src/main/java/com/epmet/dto/form/PointApplyPageFormDTO.java

@ -41,4 +41,6 @@ public class PointApplyPageFormDTO extends PageFormDTO implements Serializable {
private String categoryCode; private String categoryCode;
private String agencyId; private String agencyId;
private String customerId;
private String userId;
} }

4
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/controller/PointApplyController.java

@ -33,7 +33,9 @@ public class PointApplyController {
private PointApplyService pointApplyService; private PointApplyService pointApplyService;
@RequestMapping("listall") @RequestMapping("listall")
public Result<PageData<PointApplyDTO>> page(@RequestBody PointApplyPageFormDTO formDTO){ public Result<PageData<PointApplyDTO>> page(@LoginUser TokenDto tokenDto, @RequestBody PointApplyPageFormDTO formDTO){
formDTO.setCustomerId(tokenDto.getCustomerId());
formDTO.setUserId(tokenDto.getUserId());
PageData<PointApplyDTO> page = pointApplyService.page(formDTO); PageData<PointApplyDTO> page = pointApplyService.page(formDTO);
return new Result<PageData<PointApplyDTO>>().ok(page); return new Result<PageData<PointApplyDTO>>().ok(page);
} }

9
epmet-module/epmet-point/epmet-point-server/src/main/java/com/epmet/service/impl/PointApplyServiceImpl.java

@ -7,12 +7,14 @@ import com.epmet.common.enu.ApplyStatusEnum;
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl;
import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.FieldConstant;
import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.enums.GenderEnum; import com.epmet.commons.tools.enums.GenderEnum;
import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.exception.EpmetErrorCode;
import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.EpmetException;
import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.page.PageData;
import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerOrgRedis;
import com.epmet.commons.tools.redis.common.CustomerResiUserRedis; import com.epmet.commons.tools.redis.common.CustomerResiUserRedis;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.redis.common.bean.GridInfoCache; import com.epmet.commons.tools.redis.common.bean.GridInfoCache;
import com.epmet.commons.tools.redis.common.bean.ResiUserInfoCache; import com.epmet.commons.tools.redis.common.bean.ResiUserInfoCache;
import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.security.dto.TokenDto;
@ -67,6 +69,13 @@ public class PointApplyServiceImpl extends BaseServiceImpl<PointApplyDao, PointA
@Override @Override
public PageData<PointApplyDTO> page(PointApplyPageFormDTO formDTO) { public PageData<PointApplyDTO> page(PointApplyPageFormDTO formDTO) {
CustomerStaffInfoCacheResult staffInfo = CustomerStaffRedis.getStaffInfo(formDTO.getCustomerId(), formDTO.getUserId());
if (null == staffInfo) {
throw new EpmetException(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), "获取工作人员信息失败", "获取工作人员信息失败");
}
if (StringUtils.isBlank(formDTO.getAgencyId())) {
formDTO.setAgencyId(staffInfo.getAgencyId());
}
PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize()); PageHelper.startPage(formDTO.getPageNo(), formDTO.getPageSize());
List<PointApplyDTO> list = baseDao.getList(formDTO); List<PointApplyDTO> list = baseDao.getList(formDTO);
PageInfo<PointApplyDTO> pageInfo = new PageInfo<>(list); PageInfo<PointApplyDTO> pageInfo = new PageInfo<>(list);

Loading…
Cancel
Save