提交代码

dev-discount
袁野 4 years ago
parent ea1850a0a2
commit ce12a32bfc
  1. 11
      hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java
  2. 3
      hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java

@ -170,10 +170,18 @@ public class HighAgentController {
@RequestParam(value = "agentPhone", required = false) String agentPhone, @RequestParam(value = "agentPhone", required = false) String agentPhone,
@RequestParam(value = "status", required = false) Integer status, @RequestParam(value = "status", required = false) Integer status,
@RequestParam(name = "pageNum", required = true) Integer pageNum, @RequestParam(name = "pageNum", required = true) Integer pageNum,
@RequestParam(name = "pageSize", required = true) Integer pageSize @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request
) { ) {
try { try {
//发布人员
SessionObject sessionObject = userCenter.getSessionObject(request);
UserInfoModel userInfoModel = (UserInfoModel) sessionObject.getObject();
if (userInfoModel.getBsCompany() == null) {
log.error("HighAgentController -> insertAgent() error!","该主角色没有权限");
throw ErrorHelp.genException(SysCode.System, ErrorCode.MENU_TREE_HAS_NOT_ERROR, "");
}
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
if (StringUtils.isNotBlank(agentName)) { if (StringUtils.isNotBlank(agentName)) {
@ -186,6 +194,7 @@ public class HighAgentController {
map.put("status", Integer.toString(status)); map.put("status", Integer.toString(status));
} }
map.put("operatorId" , Long.toString(userInfoModel.getSecUser().getId()));
PageHelper.startPage(pageNum, pageSize); PageHelper.startPage(pageNum, pageSize);

@ -45,6 +45,9 @@ public class HighAgentServiceImpl implements HighAgentService {
if (StringUtils.isNotBlank(map.get("status"))) { if (StringUtils.isNotBlank(map.get("status"))) {
criteria.andStatusEqualTo(Integer.valueOf(map.get("status"))); criteria.andStatusEqualTo(Integer.valueOf(map.get("status")));
} }
if (StringUtils.isNotBlank(map.get("operatorId"))) {
criteria.andOperatorIdEqualTo(Long.valueOf(map.get("operatorId")));
}
return highAgentMapper.selectByExample(example); return highAgentMapper.selectByExample(example);
} }

Loading…
Cancel
Save