Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
GeoFlyApi
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
GeoFly
GeoFlyApi
Commits
7672a190
Commit
7672a190
authored
Mar 14, 2026
by
tntxia
Committed by
gdj
Mar 14, 2026
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
登录历史的数据库表,去掉重置密码的时候,是否使用历史记录的判断
parent
3b74eb6a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
38 additions
and
4 deletions
+38
-4
sample/src/main/java/com/dji/sample/manage/service/impl/UserServiceImpl.java
+4
-4
sql/manage_user_password_history.sql
+34
-0
No files found.
sample/src/main/java/com/dji/sample/manage/service/impl/UserServiceImpl.java
View file @
7672a190
...
@@ -333,10 +333,10 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, UserEntity> implem
...
@@ -333,10 +333,10 @@ public class UserServiceImpl extends ServiceImpl<IUserMapper, UserEntity> implem
}
}
// Disallow reuse of last PASSWORD_HISTORY_COUNT passwords
// Disallow reuse of last PASSWORD_HISTORY_COUNT passwords
if
(
userPasswordHistoryService
.
isPasswordRecentlyUsed
(
targetUserId
,
param
.
getNewPassword
(),
PASSWORD_HISTORY_COUNT
))
{
//
if (userPasswordHistoryService.isPasswordRecentlyUsed(targetUserId, param.getNewPassword(), PASSWORD_HISTORY_COUNT)) {
return
HttpResultResponse
.
error
(
//
return HttpResultResponse.error(
"New password cannot be the same as any of the last "
+
PASSWORD_HISTORY_COUNT
+
" passwords"
);
//
"New password cannot be the same as any of the last " + PASSWORD_HISTORY_COUNT + " passwords");
}
//
}
applyNewPassword
(
userEntity
,
param
.
getNewPassword
());
applyNewPassword
(
userEntity
,
param
.
getNewPassword
());
return
HttpResultResponse
.
success
();
return
HttpResultResponse
.
success
();
...
...
sql/manage_user_password_history.sql
0 → 100644
View file @
7672a190
/*
Navicat Premium Dump SQL
Source Server : 本地mysql
Source Server Type : MySQL
Source Server Version : 80043 (8.0.43)
Source Host : localhost:3306
Source Schema : cloud_sample
Target Server Type : MySQL
Target Server Version : 80043 (8.0.43)
File Encoding : 65001
Date: 08/03/2026 22:45:38
*/
SET
NAMES
utf8mb4
;
SET
FOREIGN_KEY_CHECKS
=
0
;
-- ----------------------------
-- Table structure for manage_user_password_history
-- ----------------------------
DROP
TABLE
IF
EXISTS
`manage_user_password_history`
;
CREATE
TABLE
`manage_user_password_history`
(
`id`
int
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`user_id`
varchar
(
64
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'uuid'
,
`password`
varchar
(
255
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'history password'
,
`workspace_id`
varchar
(
64
)
CHARACTER
SET
utf8mb3
COLLATE
utf8mb3_general_ci
NOT
NULL
DEFAULT
''
COMMENT
'workspace Id'
,
`create_time`
bigint
NOT
NULL
,
`update_time`
bigint
NULL
DEFAULT
NULL
,
PRIMARY
KEY
(
`id`
)
USING
BTREE
)
ENGINE
=
InnoDB
AUTO_INCREMENT
=
6
CHARACTER
SET
=
utf8mb3
COLLATE
=
utf8mb3_general_ci
COMMENT
=
'System account.'
ROW_FORMAT
=
DYNAMIC
;
SET
FOREIGN_KEY_CHECKS
=
1
;
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