diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java b/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java index cd4c1c40..f3253659 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighAgentController.java @@ -170,10 +170,18 @@ public class HighAgentController { @RequestParam(value = "agentPhone", required = false) String agentPhone, @RequestParam(value = "status", required = false) Integer status, @RequestParam(name = "pageNum", required = true) Integer pageNum, - @RequestParam(name = "pageSize", required = true) Integer pageSize + @RequestParam(name = "pageSize", required = true) Integer pageSize, HttpServletRequest request ) { 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 map = new HashMap<>(); if (StringUtils.isNotBlank(agentName)) { @@ -186,6 +194,7 @@ public class HighAgentController { map.put("status", Integer.toString(status)); } + map.put("operatorId" , Long.toString(userInfoModel.getSecUser().getId())); PageHelper.startPage(pageNum, pageSize); diff --git a/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java b/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java index 2367db64..6569221f 100644 --- a/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java +++ b/hai-service/src/main/java/com/hai/service/impl/HighAgentServiceImpl.java @@ -45,6 +45,9 @@ public class HighAgentServiceImpl implements HighAgentService { if (StringUtils.isNotBlank(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); }