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
2fdf4328
Commit
2fdf4328
authored
Aug 09, 2024
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
实缴查询优化-fxj
parent
0dff6e7b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
7 deletions
+25
-7
TPaymentInfoController.java
...lus/v1/yifu/social/controller/TPaymentInfoController.java
+25
-7
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/controller/TPaymentInfoController.java
View file @
2fdf4328
...
@@ -83,8 +83,12 @@ public class TPaymentInfoController {
...
@@ -83,8 +83,12 @@ public class TPaymentInfoController {
@Operation
(
description
=
"简单分页查询"
)
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
<
IPage
<
TPaymentInfo
>>
getTPaymentInfoPage
(
Page
<
TPaymentInfo
>
page
,
TPaymentInfoSearchVo
tPaymentInfo
)
{
public
R
<
IPage
<
TPaymentInfo
>>
getTPaymentInfoPage
(
Page
<
TPaymentInfo
>
page
,
TPaymentInfoSearchVo
tPaymentInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_SEARCH_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
;
String
key
=
CacheConstants
.
PAYMENT_SEARCH_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
String
requestId
;
String
requestId
;
try
{
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
...
@@ -115,8 +119,12 @@ public class TPaymentInfoController {
...
@@ -115,8 +119,12 @@ public class TPaymentInfoController {
@Operation
(
description
=
"简单分页查询"
)
@Operation
(
description
=
"简单分页查询"
)
@GetMapping
(
"/newPage"
)
@GetMapping
(
"/newPage"
)
public
R
<
IPage
<
TPaymentInfoNewVo
>>
getTPaymentInfoNewPage
(
Page
<
TPaymentInfo
>
page
,
TPaymentInfoSearchVo
tPaymentInfo
)
{
public
R
<
IPage
<
TPaymentInfoNewVo
>>
getTPaymentInfoNewPage
(
Page
<
TPaymentInfo
>
page
,
TPaymentInfoSearchVo
tPaymentInfo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_SEARCH_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
;
String
key
=
CacheConstants
.
PAYMENT_SEARCH_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
String
requestId
;
String
requestId
;
try
{
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
...
@@ -126,7 +134,6 @@ public class TPaymentInfoController {
...
@@ -126,7 +134,6 @@ public class TPaymentInfoController {
try
{
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
if
(
Common
.
isNotNull
(
requestId
))
{
//查询数据
//查询数据
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
tPaymentInfo
);
menuUtil
.
setAuthSql
(
user
,
tPaymentInfo
);
if
(
Common
.
isNotNull
(
tPaymentInfo
.
getAuthSql
()))
{
if
(
Common
.
isNotNull
(
tPaymentInfo
.
getAuthSql
()))
{
if
(
tPaymentInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
if
(
tPaymentInfo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
...
@@ -367,8 +374,12 @@ public class TPaymentInfoController {
...
@@ -367,8 +374,12 @@ public class TPaymentInfoController {
@Operation
(
description
=
"导出缴费库检测 "
)
@Operation
(
description
=
"导出缴费库检测 "
)
@PostMapping
(
"/exportCheck"
)
@PostMapping
(
"/exportCheck"
)
public
R
<
Integer
>
exportCheck
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
public
R
<
Integer
>
exportCheck
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_EXPORT_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
;
String
key
=
CacheConstants
.
PAYMENT_EXPORT_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
String
requestId
;
String
requestId
;
try
{
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
...
@@ -414,8 +425,12 @@ public class TPaymentInfoController {
...
@@ -414,8 +425,12 @@ public class TPaymentInfoController {
@Operation
(
description
=
"合并导出缴费库检测"
)
@Operation
(
description
=
"合并导出缴费库检测"
)
@PostMapping
(
"/sumExportCheck"
)
@PostMapping
(
"/sumExportCheck"
)
public
R
<
Integer
>
sumExportCheck
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
public
R
<
Integer
>
sumExportCheck
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_EXPORT_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
;
String
key
=
CacheConstants
.
PAYMENT_EXPORT_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
String
requestId
;
String
requestId
;
try
{
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
...
@@ -471,8 +486,12 @@ public class TPaymentInfoController {
...
@@ -471,8 +486,12 @@ public class TPaymentInfoController {
@PostMapping
(
"/sumSearchExportCheck"
)
@PostMapping
(
"/sumSearchExportCheck"
)
@SysLog
(
"实缴查询列表合并导出检测"
)
@SysLog
(
"实缴查询列表合并导出检测"
)
public
R
<
Integer
>
sumSearchExportCheck
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
public
R
<
Integer
>
sumSearchExportCheck
(
HttpServletResponse
response
,
@RequestBody
TPaymentInfoSearchVo
searchVo
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
if
(
Common
.
isEmpty
(
user
)){
return
R
.
failed
(
CommonConstants
.
USER_FAIL
);
}
// 获取redis分布式事务锁
// 获取redis分布式事务锁
String
key
=
CacheConstants
.
PAYMENT_EXPORT_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
;
String
key
=
CacheConstants
.
PAYMENT_EXPORT_REPEAT
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
String
requestId
;
String
requestId
;
try
{
try
{
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
requestId
=
RedisDistributedLock
.
getLock
(
key
,
"10"
);
...
@@ -482,7 +501,6 @@ public class TPaymentInfoController {
...
@@ -482,7 +501,6 @@ public class TPaymentInfoController {
try
{
try
{
if
(
Common
.
isNotNull
(
requestId
))
{
if
(
Common
.
isNotNull
(
requestId
))
{
//查询数据
//查询数据
YifuUser
user
=
SecurityUtils
.
getUser
();
menuUtil
.
setAuthSql
(
user
,
searchVo
);
menuUtil
.
setAuthSql
(
user
,
searchVo
);
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
if
(
Common
.
isNotNull
(
searchVo
.
getAuthSql
()))
{
if
(
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
if
(
searchVo
.
getAuthSql
().
contains
(
CommonConstants
.
A_DEPT_ID
))
{
...
...
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