SysUser新增权限字段,和需改增加和修改和查询列表接口
This commit is contained in:
@@ -141,6 +141,9 @@ public class SysUserController extends BaseController {
|
|||||||
user.setCreateBy(getUsername());
|
user.setCreateBy(getUsername());
|
||||||
user.setAiChatNum(-1);
|
user.setAiChatNum(-1);
|
||||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||||
|
//扩充那个字段
|
||||||
|
user.setDeviceOperatePerm(user.getDeviceOperatePerm());
|
||||||
|
|
||||||
user.setDisplayPassword(user.getPassword());
|
user.setDisplayPassword(user.getPassword());
|
||||||
return toAjax(userService.insertUser(user));
|
return toAjax(userService.insertUser(user));
|
||||||
}
|
}
|
||||||
@@ -169,6 +172,9 @@ public class SysUserController extends BaseController {
|
|||||||
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
user.setPassword(SecurityUtils.encryptPassword(user.getPassword()));
|
||||||
}
|
}
|
||||||
user.setDisplayPassword(user.getPassword());
|
user.setDisplayPassword(user.getPassword());
|
||||||
|
//扩充那个字段
|
||||||
|
user.setDeviceOperatePerm(user.getDeviceOperatePerm());
|
||||||
|
|
||||||
return toAjax(userService.updateUser(user));
|
return toAjax(userService.updateUser(user));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -169,6 +169,12 @@ public class SysUser extends BaseDO {
|
|||||||
* ai助手问答使用条数
|
* ai助手问答使用条数
|
||||||
*/
|
*/
|
||||||
private Integer aiChatNum;
|
private Integer aiChatNum;
|
||||||
|
/**
|
||||||
|
* 是否有设备操作权限
|
||||||
|
*/
|
||||||
|
private Boolean deviceOperatePerm;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public SysUser(Long userId) {
|
public SysUser(Long userId) {
|
||||||
this.userId = userId;
|
this.userId = userId;
|
||||||
|
|||||||
@@ -18,6 +18,7 @@
|
|||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
<result property="delFlag" column="del_flag" />
|
<result property="delFlag" column="del_flag" />
|
||||||
|
<result property="isAlarm" column="is_alarm" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
|
|||||||
@@ -31,6 +31,7 @@
|
|||||||
<result property="openId" column="open_id"/>
|
<result property="openId" column="open_id"/>
|
||||||
<result property="displayPassword" column="display_password"/>
|
<result property="displayPassword" column="display_password"/>
|
||||||
<result property="aiChatNum" column="ai_chat_num"/>
|
<result property="aiChatNum" column="ai_chat_num"/>
|
||||||
|
<result property="deviceOperatePerm" column="device_operate_perm"/>
|
||||||
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
<collection property="roles" javaType="java.util.List" resultMap="RoleResult"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
@@ -44,7 +45,7 @@
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectUserVo">
|
<sql id="selectUserVo">
|
||||||
select u.ai_chat_num,u.display_password,u.open_id,u.session_id,u.user_id, u.dept_id,u.org_id,u.site_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber,
|
select u.ai_chat_num,u.display_password,u.open_id,u.session_id,u.user_id, u.dept_id,u.org_id,u.site_id, u.user_name, u.nick_name, u.email, u.avatar, u.phonenumber,
|
||||||
u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
u.password, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
||||||
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
|
r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
|
||||||
ap.language,ap.time_zone
|
ap.language,ap.time_zone
|
||||||
@@ -56,7 +57,7 @@
|
|||||||
|
|
||||||
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
select u.user_id, u.dept_id,u.org_id,u.site_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status,
|
select u.user_id, u.dept_id,u.org_id,u.site_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status,
|
||||||
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,
|
u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark,u.device_operate_perm,
|
||||||
r.role_id, r.role_key
|
r.role_id, r.role_key
|
||||||
from sys_user u
|
from sys_user u
|
||||||
left join sys_user_role ur on u.user_id = ur.user_id
|
left join sys_user_role ur on u.user_id = ur.user_id
|
||||||
@@ -80,7 +81,7 @@
|
|||||||
<if test="siteId != null and siteId != 0">
|
<if test="siteId != null and siteId != 0">
|
||||||
AND u.site_id = #{siteId}
|
AND u.site_id = #{siteId}
|
||||||
</if>
|
</if>
|
||||||
<!-- 数据范围过滤 -->
|
order by u.org_id, u.site_id
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
<select id="selectAllocatedList" parameterType="SysUser" resultMap="SysUserResult">
|
||||||
@@ -167,6 +168,7 @@
|
|||||||
<if test="openId != null and openId != ''">open_id,</if>
|
<if test="openId != null and openId != ''">open_id,</if>
|
||||||
<if test="aiChatNum != null and aiChatNum != ''">ai_chat_num,</if>
|
<if test="aiChatNum != null and aiChatNum != ''">ai_chat_num,</if>
|
||||||
<if test="displayPassword != null and displayPassword != ''">display_password,</if>
|
<if test="displayPassword != null and displayPassword != ''">display_password,</if>
|
||||||
|
<if test="deviceOperatePerm != null and deviceOperatePerm != ''">device_operate_perm,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="userId != null and userId != ''">#{userId},</if>
|
<if test="userId != null and userId != ''">#{userId},</if>
|
||||||
@@ -187,6 +189,7 @@
|
|||||||
<if test="openId != null and openId != ''">#{openId},</if>
|
<if test="openId != null and openId != ''">#{openId},</if>
|
||||||
<if test="aiChatNum != null and aiChatNum != ''">#{aiChatNum},</if>
|
<if test="aiChatNum != null and aiChatNum != ''">#{aiChatNum},</if>
|
||||||
<if test="displayPassword != null and displayPassword != ''">#{displayPassword},</if>
|
<if test="displayPassword != null and displayPassword != ''">#{displayPassword},</if>
|
||||||
|
<if test="deviceOperatePerm != null and deviceOperatePerm != ''">#{deviceOperatePerm},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@@ -213,6 +216,7 @@
|
|||||||
<if test="openId != null">open_id = #{openId},</if>
|
<if test="openId != null">open_id = #{openId},</if>
|
||||||
<if test="aiChatNum != null">ai_chat_num = #{aiChatNum},</if>
|
<if test="aiChatNum != null">ai_chat_num = #{aiChatNum},</if>
|
||||||
<if test="displayPassword != null">display_password = #{displayPassword},</if>
|
<if test="displayPassword != null">display_password = #{displayPassword},</if>
|
||||||
|
<if test="deviceOperatePerm != null">device_operate_perm = #{deviceOperatePerm},</if>
|
||||||
update_time = sysdate()
|
update_time = sysdate()
|
||||||
</set>
|
</set>
|
||||||
where user_id = #{userId}
|
where user_id = #{userId}
|
||||||
|
|||||||
Reference in New Issue
Block a user