Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
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
fangxinjiang
yifu-mvp
Commits
86c3c9dd
Commit
86c3c9dd
authored
Aug 20, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实缴查询-fxj
parent
7142d384
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
54 deletions
+3
-54
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+3
-54
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
86c3c9dd
...
@@ -92,26 +92,8 @@ public class TPaymentInfoController {
...
@@ -92,26 +92,8 @@ public class TPaymentInfoController {
if
(
null
!=
res
){
if
(
null
!=
res
){
return
res
;
return
res
;
}
}
// 获取redis分布式事务锁
//查询数据
String
key
=
CacheConstants
.
PAYMENT_SEARCH_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
();
return
new
R
<>(
tPaymentInfoService
.
getTPaymentInfoPage
(
page
,
tPaymentInfo
));
String
requestId
;
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
ResultConstants
.
NO_GETLOCK_DATA
+
CommonConstants
.
DOWN_LINE_STRING
+
e
.
getMessage
());
}
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//查询数据
return
new
R
<>(
tPaymentInfoService
.
getTPaymentInfoPage
(
page
,
tPaymentInfo
));
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
}
finally
{
//主动释放锁
RedisDistributedLock
.
unlock
(
key
,
requestId
);
}
}
}
/**
/**
...
@@ -129,40 +111,7 @@ public class TPaymentInfoController {
...
@@ -129,40 +111,7 @@ public class TPaymentInfoController {
if
(
null
!=
res
){
if
(
null
!=
res
){
return
res
;
return
res
;
}
}
return
new
R
<>(
tPaymentInfoService
.
getTPaymentInfoNewPage
(
page
,
tPaymentInfo
));
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_SEARCH_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
();
String
requestId
;
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
ResultConstants
.
NO_GETLOCK_DATA
+
CommonConstants
.
DOWN_LINE_STRING
+
e
.
getMessage
());
}
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
//查询数据
menuUtil
.
setAuthSql
(
user
,
tPaymentInfo
);
if
(
Common
.
isNotNull
(
tPaymentInfo
.
getAuthSql
()))
{
if
(
tPaymentInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
tPaymentInfo
.
setAuthSql
(
tPaymentInfo
.
getAuthSql
().
replace
(
CommonConstants
.
A_DEPT_ID
,
"a.SETTLE_DOMAIN_ID"
));
}
if
(
tPaymentInfo
.
getAuthSql
().
contains
(
"1=2 EXISTS"
))
{
tPaymentInfo
.
setAuthSql
(
tPaymentInfo
.
getAuthSql
().
replace
(
"1=2 EXISTS"
,
"EXISTS"
));
}
}
return
new
R
<>(
tPaymentInfoService
.
getTPaymentInfoNewPage
(
page
,
tPaymentInfo
));
}
else
{
return
R
.
failed
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
}
finally
{
//主动释放锁
RedisDistributedLock
.
unlock
(
key
,
requestId
);
}
}
}
/**
/**
* 实缴查询详情
* 实缴查询详情
...
...
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