Commit 732545ba authored by fangxinjiang's avatar fangxinjiang

Merge remote-tracking branch 'origin/develop' into develop

parents 83b80f04 a43dbc42
...@@ -98,4 +98,23 @@ public interface ErrorCodes { ...@@ -98,4 +98,23 @@ public interface ErrorCodes {
*/ */
String SYS_DICT_DELETE_EXISTING = "sys.dict.delete.existing"; String SYS_DICT_DELETE_EXISTING = "sys.dict.delete.existing";
/**
* 系统内置角色不允许删除
*/
String SYS_ROLE_DELETE_SYSTEM = "sys.role.delete.system";
/**
* 系统内置角色不能修改
*/
String SYS_ROLE_UPDATE_SYSTEM = "sys.role.update.system";
/**
* 系统内置用户不允许删除
*/
String SYS_USER_DELETE_SYSTEM = "sys.user.delete.system";
/**
* 系统内置用户不允许修改
*/
String SYS_USER_UPDATE_SYSTEM = "sys.user.update.system";
} }
...@@ -24,3 +24,6 @@ sys.dict.delete.system=\u7CFB\u7EDF\u5185\u7F6E\u5B57\u5178\u9879\u76EE\u4E0D\u8 ...@@ -24,3 +24,6 @@ sys.dict.delete.system=\u7CFB\u7EDF\u5185\u7F6E\u5B57\u5178\u9879\u76EE\u4E0D\u8
sys.dict.update.system=\u7CFB\u7EDF\u5185\u7F6E\u5B57\u5178\u9879\u76EE\u4E0D\u80FD\u4FEE\u6539 sys.dict.update.system=\u7CFB\u7EDF\u5185\u7F6E\u5B57\u5178\u9879\u76EE\u4E0D\u80FD\u4FEE\u6539
sys.dict.delete.existing=\u5B57\u5178\u5B58\u5728\u4E0B\u7EA7\u8282\u70B9\u4E0D\u80FD\u5931\u8D25 sys.dict.delete.existing=\u5B57\u5178\u5B58\u5728\u4E0B\u7EA7\u8282\u70B9\u4E0D\u80FD\u5931\u8D25
sys.role.delete.system=\u7CFB\u7EDF\u5185\u7F6E\u89D2\u8272\u4E0D\u80FD\u5220\u9664
sys.role.update.system=\u7CFB\u7EDF\u5185\u7F6E\u89D2\u8272\u4E0D\u80FD\u4FEE\u6539
...@@ -57,9 +57,12 @@ public class SysRole extends BaseEntity { ...@@ -57,9 +57,12 @@ public class SysRole extends BaseEntity {
private String roleDesc; private String roleDesc;
/** /**
* 删除标识(0-正常,1-删除) * 是否是系统内置(0是,1否)
*/ */
@TableLogic @TableLogic
private String delFlag; private String delFlag;
@Schema(description = "是否是系统内置")
private String systemFlag;
} }
...@@ -117,6 +117,9 @@ public class SysUser extends BaseEntity { ...@@ -117,6 +117,9 @@ public class SysUser extends BaseEntity {
@Schema(description = "邮箱") @Schema(description = "邮箱")
private String email; private String email;
@Schema(description = "是否是系统内置")
private String systemFlag;
/** /**
* 0-正常,1-删除 * 0-正常,1-删除
*/ */
......
...@@ -122,4 +122,9 @@ public class UserVO implements Serializable { ...@@ -122,4 +122,9 @@ public class UserVO implements Serializable {
* 邮箱 * 邮箱
*/ */
private String email; private String email;
/**
* 是否是系统内置
*/
private String systemFlag;
} }
...@@ -167,8 +167,7 @@ public class DictController { ...@@ -167,8 +167,7 @@ public class DictController {
@SysLog("修改字典项") @SysLog("修改字典项")
@PutMapping("/item") @PutMapping("/item")
public R updateById(@RequestBody SysDictItem sysDictItem) { public R updateById(@RequestBody SysDictItem sysDictItem) {
sysDictItemService.updateDictItem(sysDictItem); return R.ok(sysDictItemService.updateDictItem(sysDictItem));
return R.ok();
} }
/** /**
...@@ -179,8 +178,7 @@ public class DictController { ...@@ -179,8 +178,7 @@ public class DictController {
@SysLog("删除字典项") @SysLog("删除字典项")
@DeleteMapping("/item/{id:\\d+}") @DeleteMapping("/item/{id:\\d+}")
public R removeDictItemById(@PathVariable Long id) { public R removeDictItemById(@PathVariable Long id) {
sysDictItemService.removeDictItem(id); return R.ok(sysDictItemService.removeDictItem(id));
return R.ok();
} }
@SysLog("清除字典缓存") @SysLog("清除字典缓存")
......
...@@ -83,8 +83,9 @@ public class RoleController { ...@@ -83,8 +83,9 @@ public class RoleController {
@SysLog("修改角色") @SysLog("修改角色")
@PutMapping @PutMapping
@PreAuthorize("@pms.hasPermission('sys_role_edit')") @PreAuthorize("@pms.hasPermission('sys_role_edit')")
public R<Boolean> update(@Valid @RequestBody SysRole sysRole) { public R update(@Valid @RequestBody SysRole sysRole) {
return R.ok(sysRoleService.updateById(sysRole)); sysRoleService.updateRoleById(sysRole);
return R.ok();
} }
/** /**
......
...@@ -34,14 +34,14 @@ public interface SysDictItemService extends IService<SysDictItem> { ...@@ -34,14 +34,14 @@ public interface SysDictItemService extends IService<SysDictItem> {
* @param id 字典项ID * @param id 字典项ID
* @return * @return
*/ */
void removeDictItem(Long id); Boolean removeDictItem(Long id);
/** /**
* 更新字典项 * 更新字典项
* @param item 字典项 * @param item 字典项
* @return * @return
*/ */
void updateDictItem(SysDictItem item); Boolean updateDictItem(SysDictItem item);
/** /**
* 构建树 * 构建树
......
...@@ -57,4 +57,11 @@ public interface SysRoleService extends IService<SysRole> { ...@@ -57,4 +57,11 @@ public interface SysRoleService extends IService<SysRole> {
List<RoleExcelVO> listRole(); List<RoleExcelVO> listRole();
Page<SysRole> getSysRoleByPage(Page page, SysRole sysRole); Page<SysRole> getSysRoleByPage(Page page, SysRole sysRole);
/**
* 更新角色信息
* @param sysRole
* @return
*/
void updateRoleById(SysRole sysRole);
} }
...@@ -62,7 +62,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi ...@@ -62,7 +62,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
*/ */
@Override @Override
@CacheEvict(value = CacheConstants.DICT_DETAILS, allEntries = true) @CacheEvict(value = CacheConstants.DICT_DETAILS, allEntries = true)
public void removeDictItem(Long id) { public Boolean removeDictItem(Long id) {
// 查询父节点为当前节点的节点 // 查询父节点为当前节点的节点
List<SysDictItem> dictList = this.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getParentId, id)); List<SysDictItem> dictList = this.list(Wrappers.<SysDictItem>query().lambda().eq(SysDictItem::getParentId, id));
Assert.isTrue(CollUtil.isEmpty(dictList), MsgUtils.getMessage(ErrorCodes.SYS_MENU_DELETE_EXISTING)); Assert.isTrue(CollUtil.isEmpty(dictList), MsgUtils.getMessage(ErrorCodes.SYS_MENU_DELETE_EXISTING));
...@@ -72,7 +72,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi ...@@ -72,7 +72,7 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
// 系统内置 // 系统内置
Assert.state(!DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag()), Assert.state(!DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_DICT_DELETE_SYSTEM)); MsgUtils.getMessage(ErrorCodes.SYS_DICT_DELETE_SYSTEM));
this.removeById(id); return this.removeById(id);
} }
/** /**
...@@ -82,13 +82,13 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi ...@@ -82,13 +82,13 @@ public class SysDictItemServiceImpl extends ServiceImpl<SysDictItemMapper, SysDi
*/ */
@Override @Override
@CacheEvict(value = CacheConstants.DICT_DETAILS, key = "#item.type") @CacheEvict(value = CacheConstants.DICT_DETAILS, key = "#item.type")
public void updateDictItem(SysDictItem item) { public Boolean updateDictItem(SysDictItem item) {
// 查询字典 // 查询字典
SysDict dict = dictService.getById(item.getDictId()); SysDict dict = dictService.getById(item.getDictId());
// 系统内置 // 系统内置
Assert.state(!DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag()), Assert.state(!DictTypeEnum.SYSTEM.getType().equals(dict.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_DICT_UPDATE_SYSTEM)); MsgUtils.getMessage(ErrorCodes.SYS_DICT_UPDATE_SYSTEM));
this.updateById(item); return this.updateById(item);
} }
/** /**
......
...@@ -19,14 +19,19 @@ package com.yifu.cloud.plus.v1.yifu.admin.service.impl; ...@@ -19,14 +19,19 @@ package com.yifu.cloud.plus.v1.yifu.admin.service.impl;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMenuMapper; import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMenuMapper;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleMenuService; import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleMenuService;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.cache.CacheManager; import org.springframework.cache.CacheManager;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
...@@ -47,6 +52,8 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo ...@@ -47,6 +52,8 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo
private final CacheManager cacheManager; private final CacheManager cacheManager;
private final SysRoleService sysRoleService;
/** /**
* @param roleId 角色 * @param roleId 角色
* @param menuIds 菜单ID拼成的字符串,每个id之间根据逗号分隔 * @param menuIds 菜单ID拼成的字符串,每个id之间根据逗号分隔
...@@ -55,6 +62,11 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo ...@@ -55,6 +62,11 @@ public class SysRoleMenuServiceImpl extends ServiceImpl<SysRoleMenuMapper, SysRo
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public Boolean saveRoleMenus(Long roleId, String menuIds) { public Boolean saveRoleMenus(Long roleId, String menuIds) {
SysRole sysRole = sysRoleService.getById(roleId);
String roleType = "0";
// 系统内置
Assert.state(!roleType.equals(sysRole.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_ROLE_UPDATE_SYSTEM));
this.remove(Wrappers.<SysRoleMenu>query().lambda().eq(SysRoleMenu::getRoleId, roleId)); this.remove(Wrappers.<SysRoleMenu>query().lambda().eq(SysRoleMenu::getRoleId, roleId));
if (StrUtil.isBlank(menuIds)) { if (StrUtil.isBlank(menuIds)) {
......
...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; ...@@ -23,6 +23,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDict;
import com.pig4cloud.plugin.excel.vo.ErrorMessage; import com.pig4cloud.plugin.excel.vo.ErrorMessage;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole;
import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu; import com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRoleMenu;
...@@ -31,13 +32,16 @@ import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMapper; ...@@ -31,13 +32,16 @@ import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMapper;
import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMenuMapper; import com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMenuMapper;
import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleService; import com.yifu.cloud.plus.v1.yifu.admin.service.SysRoleService;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants; import com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.enums.DictTypeEnum;
import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes; import com.yifu.cloud.plus.v1.yifu.common.core.exception.ErrorCodes;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils; import com.yifu.cloud.plus.v1.yifu.common.core.util.MsgUtils;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import lombok.RequiredArgsConstructor; import lombok.RequiredArgsConstructor;
import org.springframework.cache.annotation.CacheEvict; import org.springframework.cache.annotation.CacheEvict;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.Assert;
import org.springframework.validation.BindingResult; import org.springframework.validation.BindingResult;
import java.util.HashSet; import java.util.HashSet;
...@@ -68,6 +72,10 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl ...@@ -68,6 +72,10 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@CacheEvict(value = CacheConstants.MENU_DETAILS, allEntries = true) @CacheEvict(value = CacheConstants.MENU_DETAILS, allEntries = true)
public Boolean removeRoleById(Long id) { public Boolean removeRoleById(Long id) {
SysRole sysRole = this.getById(id);
String type = "0";
//系统内置
Assert.state(!type.equals(sysRole.getSystemFlag()),MsgUtils.getMessage(ErrorCodes.SYS_ROLE_DELETE_SYSTEM));
sysRoleMenuMapper.delete(Wrappers.<SysRoleMenu>update().lambda().eq(SysRoleMenu::getRoleId, id)); sysRoleMenuMapper.delete(Wrappers.<SysRoleMenu>update().lambda().eq(SysRoleMenu::getRoleId, id));
return this.removeById(id); return this.removeById(id);
} }
...@@ -157,4 +165,13 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl ...@@ -157,4 +165,13 @@ public class SysRoleServiceImpl extends ServiceImpl<SysRoleMapper, SysRole> impl
this.save(sysRole); this.save(sysRole);
} }
@Override
public void updateRoleById(SysRole sysRole) {
String type = "0";
// 系统内置
Assert.state(!type.equals(sysRole.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_ROLE_UPDATE_SYSTEM));
this.updateById(sysRole);
}
} }
...@@ -96,15 +96,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -96,15 +96,6 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
userRole.setRoleId(roleId); userRole.setRoleId(roleId);
return userRole; return userRole;
}).forEach(sysUserRoleMapper::insert); }).forEach(sysUserRoleMapper::insert);
// 保存用户岗位信息
// Optional.ofNullable(userDto.getPost()).ifPresent(posts -> {
// posts.stream().map(postId -> {
// SysUserPost userPost = new SysUserPost();
// userPost.setUserId(sysUser.getUserId());
// userPost.setPostId(postId);
// return userPost;
// }).forEach(sysUserPostMapper::insert);
// });
return Boolean.TRUE; return Boolean.TRUE;
} }
...@@ -171,6 +162,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -171,6 +162,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
if (null == user){ if (null == user){
return Boolean.FALSE; return Boolean.FALSE;
} }
String type = "0";
// 系统内置
Assert.state(!type.equals(sysUser.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_USER_DELETE_SYSTEM));
sysUserRoleMapper.deleteByUserId(sysUser.getUserId()); sysUserRoleMapper.deleteByUserId(sysUser.getUserId());
this.removeById(sysUser.getUserId()); this.removeById(sysUser.getUserId());
return Boolean.TRUE; return Boolean.TRUE;
...@@ -181,6 +176,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -181,6 +176,11 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
public Boolean updateUserInfo(UserDTO userDto) { public Boolean updateUserInfo(UserDTO userDto) {
UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername()); UserVO userVO = baseMapper.getUserVoByUsername(userDto.getUsername());
String type = "0";
// 系统内置
Assert.state(!type.equals(userDto.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_USER_UPDATE_SYSTEM));
Assert.isTrue(ENCODER.matches(userDto.getPassword(), userVO.getPassword()), Assert.isTrue(ENCODER.matches(userDto.getPassword(), userVO.getPassword()),
MsgUtils.getMessage(ErrorCodes.SYS_USER_UPDATE_PASSWORDERROR)); MsgUtils.getMessage(ErrorCodes.SYS_USER_UPDATE_PASSWORDERROR));
...@@ -198,6 +198,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl ...@@ -198,6 +198,12 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
@CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username") @CacheEvict(value = CacheConstants.USER_DETAILS, key = "#userDto.username")
public Boolean updateUser(UserDTO userDto) { public Boolean updateUser(UserDTO userDto) {
String userType = "0";
// 系统内置
Assert.state(!userType.equals(userDto.getSystemFlag()),
MsgUtils.getMessage(ErrorCodes.SYS_USER_UPDATE_SYSTEM));
SysUser sysUser = new SysUser(); SysUser sysUser = new SysUser();
BeanUtils.copyProperties(userDto, sysUser); BeanUtils.copyProperties(userDto, sysUser);
sysUser.setUpdateTime(LocalDateTime.now()); sysUser.setUpdateTime(LocalDateTime.now());
......
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
<result column="role_name" property="roleName"/> <result column="role_name" property="roleName"/>
<result column="role_code" property="roleCode"/> <result column="role_code" property="roleCode"/>
<result column="role_desc" property="roleDesc"/> <result column="role_desc" property="roleDesc"/>
<result column="system_flag" property="systemFlag"/>
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/> <result column="update_time" property="updateTime"/>
<result column="del_flag" property="delFlag"/> <result column="del_flag" property="delFlag"/>
...@@ -38,6 +39,7 @@ ...@@ -38,6 +39,7 @@
r.role_name, r.role_name,
r.role_code, r.role_code,
r.role_desc, r.role_desc,
r.system_flag,
r.del_flag, r.del_flag,
r.create_time, r.create_time,
r.update_time, r.update_time,
......
...@@ -35,6 +35,7 @@ ...@@ -35,6 +35,7 @@
<result column="user_group" property="userGroup"/> <result column="user_group" property="userGroup"/>
<result column="post" property="post"/> <result column="post" property="post"/>
<result column="email" property="email"/> <result column="email" property="email"/>
<result column="system_flag" property="systemFlag"/>
<collection property="roleList" ofType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole" <collection property="roleList" ofType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole"
select="com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMapper.listRolesByUserId" column="user_id"> select="com.yifu.cloud.plus.v1.yifu.admin.mapper.SysRoleMapper.listRolesByUserId" column="user_id">
</collection> </collection>
...@@ -58,6 +59,7 @@ ...@@ -58,6 +59,7 @@
<result column="user_group" property="userGroup"/> <result column="user_group" property="userGroup"/>
<result column="post" property="post"/> <result column="post" property="post"/>
<result column="email" property="email"/> <result column="email" property="email"/>
<result column="system_flag" property="systemFlag"/>
<collection property="roleList" ofType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole"> <collection property="roleList" ofType="com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysRole">
<id column="role_id" property="roleId"/> <id column="role_id" property="roleId"/>
<result column="role_name" property="roleName"/> <result column="role_name" property="roleName"/>
...@@ -85,6 +87,7 @@ ...@@ -85,6 +87,7 @@
sys_user.user_group AS userGroup, sys_user.user_group AS userGroup,
sys_user.post, sys_user.post,
sys_user.email, sys_user.email,
sys_user.system_flag AS systemFlag,
r.role_id, r.role_id,
r.role_name, r.role_name,
r.role_code, r.role_code,
...@@ -108,6 +111,7 @@ ...@@ -108,6 +111,7 @@
sys_user.user_group AS userGroup, sys_user.user_group AS userGroup,
sys_user.post, sys_user.post,
sys_user.email, sys_user.email,
sys_user.system_flag AS systemFlag,
r.role_id, r.role_id,
r.role_name, r.role_name,
r.role_code, r.role_code,
...@@ -153,6 +157,7 @@ ...@@ -153,6 +157,7 @@
sys_user.user_group AS userGroup, sys_user.user_group AS userGroup,
sys_user.post, sys_user.post,
sys_user.email, sys_user.email,
sys_user.system_flag AS systemFlag,
sys_dept.name AS deptName sys_dept.name AS deptName
FROM sys_user FROM sys_user
LEFT JOIN sys_dept ON sys_dept.dept_id = sys_user.dept_id LEFT JOIN sys_dept ON sys_dept.dept_id = sys_user.dept_id
...@@ -182,6 +187,7 @@ ...@@ -182,6 +187,7 @@
u.group, u.group,
u.user_group userGroup, u.user_group userGroup,
u.email, u.email,
u.system_flag systemFlag,
d.name AS deptName d.name AS deptName
FROM sys_user u FROM sys_user u
LEFT JOIN sys_dept d ON d.dept_id = u.dept_id LEFT JOIN sys_dept d ON d.dept_id = u.dept_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment