1.审计用户消息和邮件推送
2.国网上送母线,变电站,主配网监测点统计,典型源荷统计等算法调整 3.国网上送定时任务调整
This commit is contained in:
@@ -490,7 +490,7 @@ public class DeptController extends BaseController {
|
||||
@OperateInfo(info = LogEnum.SYSTEM_COMMON)
|
||||
@PostMapping("/getDeptInfoListByIds")
|
||||
@ApiOperation("根据部门ids获取部门集合")
|
||||
@ApiImplicitParam(name = "list", value = "code集合", required = true)
|
||||
@ApiImplicitParam(name = "deptIds", value = "code集合", required = true)
|
||||
public HttpResult<List<Dept>> getDeptInfoListByIds(@RequestBody List<String> deptIds) {
|
||||
String methodDescribe = getMethodDescribe("getDeptInfoListByIds");
|
||||
List<Dept> result = deptService.getDeptInfoListByIds(deptIds);
|
||||
|
||||
@@ -483,5 +483,20 @@ public class UserController extends BaseController {
|
||||
);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, users, methodDescribe);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取同级部门用户,以及下级部门所有用户
|
||||
* @author cdf
|
||||
* @date 2023/7/31
|
||||
*/
|
||||
@OperateInfo(info = LogEnum.SYSTEM_SERIOUS)
|
||||
@GetMapping("/getUserListByRoleCode")
|
||||
@ApiOperation("根据角色Code集合查询用户信息")
|
||||
@ApiImplicitParam(name = "roleCode", value = "角色Code", required = true)
|
||||
public HttpResult<List<User>> getUserListByRoleCode(@RequestParam("roleCode") String roleCode) {
|
||||
String methodDescribe = getMethodDescribe("getUserListByRoleCode");
|
||||
List<User> users = userService.getUserListByRoleCode(roleCode);
|
||||
return HttpResultUtil.assembleCommonResponseResult(CommonResponseEnum.SUCCESS, users, methodDescribe);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,6 +2,7 @@ package com.njcn.user.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.njcn.user.pojo.po.Role;
|
||||
import com.njcn.user.pojo.po.User;
|
||||
import com.njcn.user.pojo.po.UserRole;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@@ -32,4 +33,12 @@ public interface UserRoleMapper extends BaseMapper<UserRole> {
|
||||
* @return 角色结果集
|
||||
*/
|
||||
List<Role> getRoleListByUserId(String userId);
|
||||
|
||||
/**
|
||||
* 根据角色Code获取角色信息
|
||||
* @param roleCode
|
||||
* @return
|
||||
*/
|
||||
List<User> selectUserRoleCode(@Param("roleCode")String roleCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -18,4 +18,14 @@
|
||||
where a.user_id = #{userId}
|
||||
and b.state = 1
|
||||
</select>
|
||||
<select id="selectUserRoleCode" resultType="com.njcn.user.pojo.po.User">
|
||||
SELECT
|
||||
usr.*
|
||||
FROM
|
||||
sys_user usr
|
||||
INNER JOIN sys_user_role usrRole ON usrRole.User_Id = usr.Id
|
||||
INNER JOIN sys_role role ON role.Id = usrRole.Role_Id
|
||||
WHERE
|
||||
role.`Code` = #{roleCode}
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -185,4 +185,7 @@ public interface IUserService extends IService<User> {
|
||||
String uploadImage(MultipartFile issuesFile);
|
||||
|
||||
String getUrl(String headSculpture);
|
||||
|
||||
List<User> getUserListByRoleCode(String roleCode);
|
||||
|
||||
}
|
||||
|
||||
@@ -518,6 +518,11 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User> implements IU
|
||||
return fileStorageUtil.getFileUrl(headSculpture);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<User> getUserListByRoleCode(String roleCode) {
|
||||
return userRoleMapper.selectUserRoleCode(roleCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据登录名查询用户
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user