Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
haoban-manage3.0
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
haoban3.0
haoban-manage3.0
Commits
b3fe528c
Commit
b3fe528c
authored
Jul 02, 2020
by
huangZW
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
审核同意,锁一下
parent
07431c92
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletions
+10
-1
AuditController.java
...com/gic/haoban/manage/web/controller/AuditController.java
+10
-1
No files found.
haoban-manage3-web/src/main/java/com/gic/haoban/manage/web/controller/AuditController.java
View file @
b3fe528c
...
...
@@ -19,6 +19,7 @@ import com.gic.haoban.manage.web.anno.HttpLimit;
import
com.gic.haoban.manage.web.auth.AuthRequestUtil
;
import
com.gic.haoban.manage.web.vo.BatchApproveVO
;
import
com.gic.haoban.manage.web.vo.LoginVO
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
...
...
@@ -28,6 +29,7 @@ import org.springframework.web.bind.annotation.RestController;
import
com.gic.haoban.common.utils.HaobanResponse
;
import
com.gic.haoban.manage.web.errCode.HaoBanErrCode
;
import
com.gic.redis.data.util.RedisUtil
;
@RestController
@RequestMapping
(
"/audit"
)
...
...
@@ -205,9 +207,16 @@ public class AuditController extends WebBaseController{
public
HaobanResponse
audit
(
String
auditId
,
String
auditName
)
{
LoginVO
login
=
(
LoginVO
)
AuthRequestUtil
.
getLoginUser
();
StaffDTO
loginStaffDTO
=
login
.
getStaffDTO
();
if
(
null
==
login
)
{
if
(
null
==
login
StaffDTO
)
{
return
resultResponse
(
HaoBanErrCode
.
ERR_4
);
}
Object
o
=
RedisUtil
.
getCache
(
"audit-"
+
auditId
);
if
(
o
!=
null
){
log
.
info
(
"请不要过于频繁点击"
);
return
resultResponse
(
HaoBanErrCode
.
ERR_10008
);
}
//设置缓存10秒
RedisUtil
.
setCache
(
"audit-"
+
auditId
,
"1"
,
10L
);
String
staffId
=
login
.
getStaffDTO
().
getStaffId
();
String
staffName
=
login
.
getStaffDTO
().
getStaffName
();
if
(
StringUtils
.
isAnyBlank
(
auditId
)){
...
...
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