From a33898c2a0374c249862a2b996e33352e30c8caf Mon Sep 17 00:00:00 2001 From: KonBAI <1527468660@qq.com> Date: 星期六, 02 四月 2022 13:02:56 +0800 Subject: [PATCH] !167 update 修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型 * fix 修改 postgres sql脚本,处理角色表字段类型错误问题。 * fix 修复postgreSQL新增或更新角色信息报错。修改角色"菜单树选择项"和"部门树选择项"是否关联显示字段为Boolean类型。 --- ruoyi-system/src/main/java/com/ruoyi/system/listener/SysUserImportListener.java | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/listener/SysUserImportListener.java b/ruoyi-system/src/main/java/com/ruoyi/system/listener/SysUserImportListener.java index 9bd21d3..58f2f31 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/listener/SysUserImportListener.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/listener/SysUserImportListener.java @@ -1,15 +1,15 @@ package com.ruoyi.system.listener; +import cn.dev33.satoken.secure.BCrypt; import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.ObjectUtil; import com.alibaba.excel.context.AnalysisContext; import com.alibaba.excel.event.AnalysisEventListener; import com.ruoyi.common.core.domain.entity.SysUser; import com.ruoyi.common.excel.ExcelListener; import com.ruoyi.common.excel.ExcelResult; import com.ruoyi.common.exception.ServiceException; -import com.ruoyi.common.utils.LoginUtils; -import com.ruoyi.common.utils.SecurityUtils; -import com.ruoyi.common.utils.StringUtils; +import com.ruoyi.common.helper.LoginHelper; import com.ruoyi.common.utils.ValidatorUtils; import com.ruoyi.common.utils.spring.SpringUtils; import com.ruoyi.system.domain.vo.SysUserImportVo; @@ -43,9 +43,9 @@ public SysUserImportListener(Boolean isUpdateSupport) { String initPassword = SpringUtils.getBean(ISysConfigService.class).selectConfigByKey("sys.user.initPassword"); this.userService = SpringUtils.getBean(ISysUserService.class); - this.password = SecurityUtils.encryptPassword(initPassword); + this.password = BCrypt.hashpw(initPassword); this.isUpdateSupport = isUpdateSupport; - this.operName = LoginUtils.getUsername(); + this.operName = LoginHelper.getUsername(); } @Override @@ -53,7 +53,7 @@ SysUser user = this.userService.selectUserByUserName(userVo.getUserName()); try { // 楠岃瘉鏄惁瀛樺湪杩欎釜鐢ㄦ埛 - if (StringUtils.isNull(user)) { + if (ObjectUtil.isNull(user)) { user = BeanUtil.toBean(userVo, SysUser.class); ValidatorUtils.validate(user); user.setPassword(password); -- Gitblit v1.9.3