Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
xiaofang li
MeterSphere
Commits
d6a494c8
Commit
d6a494c8
authored
2 years ago
by
CaptainB
Committed by
刘瑞斌
2 years ago
Browse files
Options
Download
Email Patches
Plain Diff
refactor: 增加初始密码提示修改功能
parent
c7bb1916
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
backend/src/main/java/io/metersphere/service/UserService.java
+4
-7
...end/src/main/java/io/metersphere/service/UserService.java
with
4 additions
and
7 deletions
+4
-7
backend/src/main/java/io/metersphere/service/UserService.java
+
4
-
7
View file @
d6a494c8
...
...
@@ -33,12 +33,9 @@ import io.metersphere.excel.listener.EasyExcelListener;
import
io.metersphere.excel.listener.UserDataListener
;
import
io.metersphere.excel.utils.EasyExcelExporter
;
import
io.metersphere.i18n.Translator
;
import
io.metersphere.log.service.OperatingLogService
;
import
io.metersphere.log.utils.ReflexObjectUtil
;
import
io.metersphere.log.vo.DetailColumn
;
import
io.metersphere.log.vo.OperatingLogDTO
;
import
io.metersphere.log.vo.OperatingLogDetails
;
import
io.metersphere.log.vo.OperatingLogRequest
;
import
io.metersphere.log.vo.system.SystemReference
;
import
io.metersphere.notice.domain.UserDetail
;
import
io.metersphere.security.MsUserToken
;
...
...
@@ -98,7 +95,7 @@ public class UserService {
@Resource
private
ExtWorkspaceMapper
extWorkspaceMapper
;
@Resource
private
OperatingLog
Service
operatingLog
Service
;
private
OperatingLog
Mapper
operatingLog
Mapper
;
public
List
<
UserDetail
>
queryTypeByIds
(
List
<
String
>
userIds
)
{
return
extUserMapper
.
queryTypeByIds
(
userIds
);
...
...
@@ -530,7 +527,7 @@ public class UserService {
String
oldPassword
=
CodingUtil
.
md5
(
request
.
getPassword
(),
"utf-8"
);
String
newPassword
=
request
.
getNewpassword
();
String
newPasswordMd5
=
CodingUtil
.
md5
(
newPassword
);
if
(
StringUtils
.
equals
(
oldPassword
,
newPasswordMd5
)){
if
(
StringUtils
.
equals
(
oldPassword
,
newPasswordMd5
))
{
return
null
;
}
UserExample
userExample
=
new
UserExample
();
...
...
@@ -1290,6 +1287,7 @@ public class UserService {
/**
* 根据userId 获取 user 所属工作空间和所属工作项目
*
* @param userId
*/
public
Map
<
Object
,
Object
>
getWSAndProjectByUserId
(
String
userId
)
{
...
...
@@ -1302,9 +1300,8 @@ public class UserService {
}
public
boolean
checkWhetherChangePasswordOrNot
(
LoginRequest
request
)
{
List
<
OperatingLogDTO
>
list
=
operatingLogService
.
list
(
new
OperatingLogRequest
());
// 首次登录需要提示
if
(
CollectionUtils
.
isEmpty
(
list
)
)
{
if
(
operatingLogMapper
.
countByExample
(
new
OperatingLogExample
())
==
0
)
{
return
true
;
}
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
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
Menu
Projects
Groups
Snippets
Help