fix:基础模块修改
This commit is contained in:
@@ -44,7 +44,7 @@ public class SysDictItem {
|
|||||||
* 字典项文本
|
* 字典项文本
|
||||||
*/
|
*/
|
||||||
@TableField(value = "item_text")
|
@TableField(value = "item_text")
|
||||||
@Excel(name = "字典项文本", width = 20)
|
@Excel(name = "名称", width = 20)
|
||||||
@ApiModelProperty(value = "字典项文本")
|
@ApiModelProperty(value = "字典项文本")
|
||||||
private String itemText;
|
private String itemText;
|
||||||
|
|
||||||
@@ -52,7 +52,7 @@ public class SysDictItem {
|
|||||||
* 字典英文名称
|
* 字典英文名称
|
||||||
*/
|
*/
|
||||||
@TableField(value = "en_name")
|
@TableField(value = "en_name")
|
||||||
@Excel(name = "字典英文名称", width = 15)
|
@Excel(name = "英文名称", width = 15)
|
||||||
@ApiModelProperty(value = "字典英文名称")
|
@ApiModelProperty(value = "字典英文名称")
|
||||||
private String enName;
|
private String enName;
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ public class SysDictItem {
|
|||||||
* 字典项值
|
* 字典项值
|
||||||
*/
|
*/
|
||||||
@TableField(value = "item_value")
|
@TableField(value = "item_value")
|
||||||
@Excel(name = "字典项值", width = 30)
|
@Excel(name = "数据值", width = 30)
|
||||||
@ApiModelProperty(value = "字典项值")
|
@ApiModelProperty(value = "字典项值")
|
||||||
private String itemValue;
|
private String itemValue;
|
||||||
|
|
||||||
@@ -86,6 +86,7 @@ public class SysDictItem {
|
|||||||
@TableField(value = "`status`")
|
@TableField(value = "`status`")
|
||||||
@Dict(dicCode = "dict_item_status")
|
@Dict(dicCode = "dict_item_status")
|
||||||
@ApiModelProperty(value = "状态(1启用 0不启用)")
|
@ApiModelProperty(value = "状态(1启用 0不启用)")
|
||||||
|
@Excel(name = "是否启用", width = 15, dicCode = "dict_item_status")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -120,7 +121,7 @@ public class SysDictItem {
|
|||||||
* 是否为标签内容-数据字典(1是 0否)
|
* 是否为标签内容-数据字典(1是 0否)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "is_tag_dict")
|
@TableField(value = "is_tag_dict")
|
||||||
@Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
// @Excel(name = "是否为标签内容-数据字典(1是 0否)", width = 15)
|
||||||
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
@ApiModelProperty(value = "是否为标签内容-数据字典(1是 0否)")
|
||||||
private Integer isTagDict;
|
private Integer isTagDict;
|
||||||
|
|
||||||
@@ -128,7 +129,7 @@ public class SysDictItem {
|
|||||||
* 是否是只读(2字段固定,内部可配1固定字段 0非固定字段)
|
* 是否是只读(2字段固定,内部可配1固定字段 0非固定字段)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "is_read_only")
|
@TableField(value = "is_read_only")
|
||||||
@Excel(name = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)", width = 15, dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
// @Excel(name = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)", width = 15, dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
||||||
@Dict(dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
@Dict(dictTable = "onl_cgform_field", dicText = "is_read_only", dicCode = "is_read_only")
|
||||||
@ApiModelProperty(value = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)")
|
@ApiModelProperty(value = "是否是只读(2字段固定,内部可配1固定字段 0非固定字段)")
|
||||||
private Integer isReadOnly;
|
private Integer isReadOnly;
|
||||||
@@ -137,7 +138,7 @@ public class SysDictItem {
|
|||||||
* 表单控件类型
|
* 表单控件类型
|
||||||
*/
|
*/
|
||||||
@TableField(value = "attribute_type")
|
@TableField(value = "attribute_type")
|
||||||
@Excel(name = "标签类型 1下拉选择 2树形结构", width = 15)
|
// @Excel(name = "标签类型 1下拉选择 2树形结构", width = 15)
|
||||||
@ApiModelProperty(value = "标签类型 1下拉选择 2树形结构")
|
@ApiModelProperty(value = "标签类型 1下拉选择 2树形结构")
|
||||||
@Dict(dicCode = "attribute_type")
|
@Dict(dicCode = "attribute_type")
|
||||||
private String attributeType;
|
private String attributeType;
|
||||||
@@ -154,7 +155,7 @@ public class SysDictItem {
|
|||||||
* 统计节点(主要为责任领域)
|
* 统计节点(主要为责任领域)
|
||||||
*/
|
*/
|
||||||
@TableField(value = "stat_node")
|
@TableField(value = "stat_node")
|
||||||
@Excel(name = "统计节点", width = 15)
|
// @Excel(name = "统计节点", width = 15)
|
||||||
@ApiModelProperty(value = "统计节点(主要为责任领域)")
|
@ApiModelProperty(value = "统计节点(主要为责任领域)")
|
||||||
private String statNode;
|
private String statNode;
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ public class SysUser implements Serializable {
|
|||||||
* 工号(也是登录账号)
|
* 工号(也是登录账号)
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = ")")
|
@ApiModelProperty(value = ")")
|
||||||
@Excel(name = "账号", width = 15)
|
@Excel(name = "用户账号", width = 15)
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -86,6 +86,7 @@
|
|||||||
<if test="username!=null and username!=''">
|
<if test="username!=null and username!=''">
|
||||||
and username LIKE concat(concat('%',#{username}),'%')
|
and username LIKE concat(concat('%',#{username}),'%')
|
||||||
</if>
|
</if>
|
||||||
|
order by create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<!-- 修改用户部门code -->
|
<!-- 修改用户部门code -->
|
||||||
|
|||||||
+21
-5
@@ -769,7 +769,23 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
//step.1 修改用户基础信息
|
//step.1 修改用户基础信息
|
||||||
// 对手机号、邮箱进行加密处理
|
// 对手机号、邮箱进行加密处理
|
||||||
this.proceedUserInfoEncrypt(user);
|
this.proceedUserInfoEncrypt(user);
|
||||||
this.updateById(user);
|
// 不更新手机号和邮箱,不使用updateById,改用update方法
|
||||||
|
LambdaUpdateWrapper<SysUser> lambdaUpdateWrapper = new LambdaUpdateWrapper<>();
|
||||||
|
lambdaUpdateWrapper.eq(SysUser::getId,user.getId());
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getUsername,user.getUsername()); // 用户账号
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getRealname,user.getRealname()); // 用户姓名
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getPost,user.getPost()); // 岗位
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getAvatar,user.getAvatar()); // 手写章
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getSex,user.getSex()); // 性别
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getUserIdentity,user.getUserIdentity()); // 身份
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getDepartIds,user.getDepartIds()); // 部门ids
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getCreateTime,user.getCreateTime());
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getCreateBy,user.getCreateBy());
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getUpdateTime,user.getUpdateTime());
|
||||||
|
lambdaUpdateWrapper.set(SysUser::getUpdateBy,user.getUpdateBy());
|
||||||
|
update(lambdaUpdateWrapper);
|
||||||
|
|
||||||
|
// this.updateById(user);
|
||||||
//step.2 修改角色
|
//step.2 修改角色
|
||||||
//处理用户角色 先删后加
|
//处理用户角色 先删后加
|
||||||
if (StrUtil.isNotEmpty(roles)){
|
if (StrUtil.isNotEmpty(roles)){
|
||||||
@@ -800,10 +816,10 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//step.4 修改手机号和邮箱
|
// //step.4 修改手机号和邮箱
|
||||||
// 更新手机号、邮箱空字符串为 null
|
// // 更新手机号、邮箱空字符串为 null
|
||||||
userMapper.updateNullByEmptyString("email");
|
// userMapper.updateNullByEmptyString("email");
|
||||||
userMapper.updateNullByEmptyString("phone");
|
// userMapper.updateNullByEmptyString("phone");
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user