fix
parent
82e3eab857
commit
a2487e1d6a
|
|
@ -44,6 +44,18 @@ public class RoleInfoVO {
|
|||
@ApiModelProperty("档口ID")
|
||||
private Long storeId;
|
||||
|
||||
/**
|
||||
* 角色状态(0正常 1停用)
|
||||
*/
|
||||
@ApiModelProperty("角色状态(0正常 1停用)")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
@ApiModelProperty("备注")
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 创建者
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ import com.ruoyi.common.constant.UserConstants;
|
|||
import com.ruoyi.common.core.domain.entity.SysMenu;
|
||||
import com.ruoyi.common.core.domain.model.*;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.system.domain.SysRoleMenu;
|
||||
import com.ruoyi.system.domain.vo.menu.SysMenuDTO;
|
||||
|
|
@ -170,6 +171,9 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||
menu.setStatus(Constants.SYS_NORMAL_STATUS);
|
||||
menu.setDelFlag(Constants.UNDELETED);
|
||||
menu.setVersion(0L);
|
||||
String currentUser = SecurityUtils.getUsernameSafe();
|
||||
menu.setCreateBy(currentUser);
|
||||
menu.setUpdateBy(currentUser);
|
||||
menuMapper.insert(menu);
|
||||
}
|
||||
|
||||
|
|
@ -182,6 +186,9 @@ public class SysMenuServiceImpl implements ISysMenuService {
|
|||
private void updateMenuBase(SysMenu menu) {
|
||||
checkMenuBase(menu);
|
||||
Assert.notNull(menu.getMenuId());
|
||||
String currentUser = SecurityUtils.getUsernameSafe();
|
||||
menu.setUpdateBy(currentUser);
|
||||
menu.setUpdateTime(new Date());
|
||||
int c = menuMapper.updateById(menu);
|
||||
if (c == 0) {
|
||||
throw new ServiceException(Constants.VERSION_LOCK_ERROR_COMMON_MSG);
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import com.ruoyi.common.constant.Constants;
|
|||
import com.ruoyi.common.core.domain.entity.SysRole;
|
||||
import com.ruoyi.common.core.domain.model.*;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.domain.SysRoleMenu;
|
||||
import com.ruoyi.system.mapper.SysRoleMapper;
|
||||
|
|
@ -198,6 +199,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
|||
role.setStatus(Constants.SYS_NORMAL_STATUS);
|
||||
role.setDelFlag(Constants.UNDELETED);
|
||||
role.setVersion(0L);
|
||||
String currentUser = SecurityUtils.getUsernameSafe();
|
||||
role.setCreateBy(currentUser);
|
||||
role.setUpdateBy(currentUser);
|
||||
roleMapper.insert(role);
|
||||
}
|
||||
|
||||
|
|
@ -210,6 +214,9 @@ public class SysRoleServiceImpl implements ISysRoleService {
|
|||
private void updateRoleBase(SysRole role) {
|
||||
checkRoleBase(role);
|
||||
Assert.notNull(role.getRoleId());
|
||||
String currentUser = SecurityUtils.getUsernameSafe();
|
||||
role.setUpdateBy(currentUser);
|
||||
role.setUpdateTime(new Date());
|
||||
int c = roleMapper.updateById(role);
|
||||
if (c == 0) {
|
||||
throw new ServiceException(Constants.VERSION_LOCK_ERROR_COMMON_MSG);
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="getRoleInfoById" resultType="com.ruoyi.common.core.domain.model.RoleInfo">
|
||||
<select id="getRoleInfoById" resultMap="RoleInfo">
|
||||
SELECT
|
||||
sr.*,
|
||||
srm.role_id AS rel_role_id,
|
||||
|
|
|
|||
Loading…
Reference in New Issue