Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
6ee27f1d
Commit
6ee27f1d
authored
Jan 06, 2023
by
王亮
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add some constrains.
parent
f4aa78ac
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
InnerController.java
...tgroup/xyqb/controller/internal/user/InnerController.java
+3
-2
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/InnerController.java
View file @
6ee27f1d
...
...
@@ -39,6 +39,7 @@ import org.apache.commons.codec.binary.Base64;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.math.NumberUtils
;
import
org.apache.http.HttpStatus
;
import
org.hibernate.validator.constraints.Length
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.ApplicationEventPublisher
;
import
org.springframework.data.domain.PageRequest
;
...
...
@@ -1395,7 +1396,7 @@ public class InnerController implements IBaseController {
* @return
*/
@RequestMapping
(
path
=
"/user/disable"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
forbiddenUser
(
Long
userId
,
String
reason
,
@RequestHeader
(
value
=
"Access-Token"
,
required
=
false
)
String
accessToken
)
{
public
JsonResult
forbiddenUser
(
Long
userId
,
@Length
(
max
=
10
,
message
=
"原因不能大于10个字符"
)
String
reason
,
@RequestHeader
(
value
=
"Access-Token"
,
required
=
false
)
String
accessToken
)
{
boolean
flushed
=
flushUserStatus
(
userId
,
false
);
UserDisableRecord
userDisableRecord
=
new
UserDisableRecord
();
userDisableRecord
.
setUserId
(
userId
);
...
...
@@ -1417,7 +1418,7 @@ public class InnerController implements IBaseController {
* @return List<UserDisableRecord>
*/
@RequestMapping
(
path
=
"/user/records/{userId}"
,
method
=
RequestMethod
.
POST
)
public
JsonResult
disableRecordList
(
@PathVariable
(
"userId"
)
Long
userId
,
@RequestParam
(
"page"
)
int
page
,
@RequestParam
(
"size"
)
int
size
){
public
JsonResult
disableRecordList
(
@PathVariable
(
"userId"
)
Long
userId
,
@RequestParam
(
value
=
"page"
,
defaultValue
=
"0"
)
Integer
page
,
@RequestParam
(
value
=
"size"
,
defaultValue
=
"20"
)
Integer
size
){
Pageable
pageable
=
new
PageRequest
(
page
,
size
);
return
JsonResult
.
buildSuccessResultGeneric
(
iUserDisableRecordRepository
.
findByUserIdOrderByCreatedAtDesc
(
userId
,
pageable
));
}
...
...
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