Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dsk-cr20g
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
dsk-cr20g
Commits
439e3a4c
Commit
439e3a4c
authored
Sep 04, 2023
by
施翔轲
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复批量更新用户bug
parent
7cf13bec
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
50 additions
and
42 deletions
+50
-42
SysProfileController.java
...a/com/dsk/web/controller/system/SysProfileController.java
+3
-0
SysUserImportListener.java
...n/java/com/dsk/system/listener/SysUserImportListener.java
+5
-0
SysUserServiceImpl.java
.../java/com/dsk/system/service/impl/SysUserServiceImpl.java
+42
-42
No files found.
dsk-admin/src/main/java/com/dsk/web/controller/system/SysProfileController.java
View file @
439e3a4c
...
...
@@ -20,6 +20,7 @@ import org.springframework.web.bind.annotation.*;
import
org.springframework.web.multipart.MultipartFile
;
import
java.util.Arrays
;
import
java.util.Base64
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -82,6 +83,8 @@ public class SysProfileController extends BaseController {
@Log
(
title
=
"个人信息"
,
businessType
=
BusinessType
.
UPDATE
)
@PutMapping
(
"/updatePwd"
)
public
R
<
Void
>
updatePwd
(
String
oldPassword
,
String
newPassword
)
{
oldPassword
=
new
String
(
Base64
.
getDecoder
().
decode
(
oldPassword
));
newPassword
=
new
String
(
Base64
.
getDecoder
().
decode
(
newPassword
));
SysUser
user
=
userService
.
selectUserById
(
LoginHelper
.
getUserId
());
String
userName
=
user
.
getUserName
();
String
password
=
user
.
getPassword
();
...
...
dsk-system/src/main/java/com/dsk/system/listener/SysUserImportListener.java
View file @
439e3a4c
...
...
@@ -86,6 +86,11 @@ public class SysUserImportListener extends AnalysisEventListener<SysUserImportVo
Long
userId
=
user
.
getUserId
();
user
=
BeanUtil
.
toBean
(
userVo
,
SysUser
.
class
);
user
.
setUserId
(
userId
);
user
.
setUserName
(
userVo
.
getPhonenumber
());
user
.
setDeptId
(
dept
.
getDeptId
());
user
.
setDept
(
dept
);
user
.
setRoleId
(
role
.
getRoleId
());
user
.
setRoleIds
(
new
Long
[]{
role
.
getRoleId
()});
ValidatorUtils
.
validate
(
user
);
userService
.
checkUserAllowed
(
user
);
userService
.
checkUserDataScope
(
user
.
getUserId
());
...
...
dsk-system/src/main/java/com/dsk/system/service/impl/SysUserServiceImpl.java
View file @
439e3a4c
...
...
@@ -18,6 +18,7 @@ import com.dsk.common.core.service.UserService;
import
com.dsk.common.exception.ServiceException
;
import
com.dsk.common.helper.DataBaseHelper
;
import
com.dsk.common.helper.LoginHelper
;
import
com.dsk.common.utils.DingTalkUtil
;
import
com.dsk.common.utils.PasswordUtils
;
import
com.dsk.common.utils.StreamUtils
;
import
com.dsk.common.utils.StringUtils
;
...
...
@@ -271,15 +272,14 @@ public class SysUserServiceImpl implements ISysUserService, UserService {
user
.
setPassword
(
BCrypt
.
hashpw
(
password
));
// 新增用户信息
int
rows
=
baseMapper
.
insert
(
user
);
if
(
rows
>
0
)
{
if
(
rows
>
0
)
{
//租户新增成功,发送短信通知租户
//此处暂用钉钉机器人模拟发送短信
String
content
=
"【央企数字经营管理系统通知】:"
+
user
.
getNickName
()
+
"您好,您已经成功注册央企数字经营管理系统,请使用手机号码登录,初始密码为"
String
content
=
user
.
getNickName
()
+
"您好,您已经成功开通数字化经营管理系统,请使用手机号码登录,初始密码为"
+
password
+
"。友情提示:为了您的账号安全,请
立即前往【个人中心】修改
密码。"
;
//
DingTalkUtil.sendDingTalkMsg(content);
+
"。友情提示:为了您的账号安全,请
勿泄露
密码。"
;
DingTalkUtil
.
sendDingTalkMsg
(
content
);
}
// 新增用户岗位关联
insertUserPost
(
user
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment