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
feed4723
Commit
feed4723
authored
Mar 08, 2023
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分布式锁
parent
73c4bfc5
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
3 deletions
+5
-3
TPaymentInfoServiceImpl.java
.../v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
+5
-3
No files found.
yifu-social/yifu-social-biz/src/main/java/com/yifu/cloud/plus/v1/yifu/social/service/impl/TPaymentInfoServiceImpl.java
View file @
feed4723
...
...
@@ -272,7 +272,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
@Override
public
R
<
Boolean
>
removeInFoById
(
String
id
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
key
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_PUSH
;
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_PUSH
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
return
R
.
failed
(
"用户正在推送实缴数据中禁止删除!"
);
}
...
...
@@ -300,7 +300,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
return
R
.
failed
(
CommonConstants
.
NO_DATA_TO_HANDLE
);
}
String
key
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_PUSH
;
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_PUSH
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
return
R
.
failed
(
"用户正在推送实缴数据中禁止删除!"
);
}
...
...
@@ -342,7 +342,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
String
socialCreateMonth
,
String
socialPayMonth
)
{
YifuUser
user
=
SecurityUtils
.
getUser
();
String
key
=
user
.
getId
()
+
CommonConstants
.
DOWN_LINE_STRING
+
CommonConstants
.
PAYMENT_SOCIAL_PUSH
;
String
key
=
CacheConstants
.
PAYMENT_SOCIAL_PUSH
+
CommonConstants
.
DOWN_LINE_STRING
+
user
.
getId
()
;
if
(
Common
.
isNotNull
(
redisUtil
.
get
(
key
)))
{
return
R
.
failed
(
"用户正在推送实缴数据中禁止删除!"
);
}
...
...
@@ -2824,6 +2824,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
}
catch
(
Exception
e
)
{
throw
new
RuntimeException
(
ResultConstants
.
NO_GETLOCK_DATA
);
}
redisUtil
.
set
(
key
,
user
.
getId
(),
36000L
);
Map
<
String
,
TSettleDomainSelectVo
>
mapSelectVo
=
this
.
getSelectVoMap
();
//手动推送未推送的社保公积金明细数据
createPaymentSocialInfoReal
(
user
,
searchVo
,
mapSelectVo
);
...
...
@@ -2839,6 +2840,7 @@ public class TPaymentInfoServiceImpl extends ServiceImpl<TPaymentInfoMapper, TPa
doJointSocialTask
.
asynchronousEkpIncomePaymentT
(
income
);
}
redisUtil
.
remove
(
redisKey
);
redisUtil
.
remove
(
key
);
}
//主动释放锁
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