Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cust-api
Project
Project
Details
Activity
Releases
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
李伟
cust-api
Commits
9b84270b
Commit
9b84270b
authored
Feb 27, 2025
by
liwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
互换微信前,增加了微信号的校验
parent
7fe81417
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
MemInfoServiceImpl.java
...oft/business/memInfo/service/impl/MemInfoServiceImpl.java
+6
-4
No files found.
src/main/java/org/rcisoft/business/memInfo/service/impl/MemInfoServiceImpl.java
View file @
9b84270b
...
@@ -875,10 +875,14 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
...
@@ -875,10 +875,14 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
public
CyPersistModel
weChatTask
(
MemUserTaskDTO
memUserTaskDTO
)
{
public
CyPersistModel
weChatTask
(
MemUserTaskDTO
memUserTaskDTO
)
{
//校验对方是不是已经填了微信号
//校验对方是不是已经填了微信号
Integer
targetId
=
memUserTaskDTO
.
getTargetId
();
Integer
targetId
=
memUserTaskDTO
.
getTargetId
();
UserInfoVO
userInfo
=
memInfoRepository
.
getUserInfo
(
String
.
valueOf
(
targetId
));
UserInfoVO
targetInfo
=
memInfoRepository
.
getUserInfo
(
String
.
valueOf
(
targetId
));
if
(
StringUtils
.
isNotEmpty
(
userInfo
.
getMemWxCode
())){
MemInfo
memInfo
=
memInfoRepository
.
selectByOpenId
(
memUserTaskDTO
.
getWxOpenid
());
if
(
StringUtils
.
isNotEmpty
(
targetInfo
.
getMemWxCode
())){
throw
new
CyServiceException
(
1005
,
"对方还未填写微信号,不能交换"
);
throw
new
CyServiceException
(
1005
,
"对方还未填写微信号,不能交换"
);
}
}
if
(
StringUtils
.
isNotEmpty
(
memInfo
.
getMemWxCode
())){
throw
new
CyServiceException
(
1006
,
"还未完善个人微信号,不能交换"
);
}
Integer
createBy
=
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
());
Integer
createBy
=
Integer
.
valueOf
(
CyUserUtil
.
getAuthenBusinessId
());
memUserTaskDTO
.
setCreateBy
(
createBy
);
memUserTaskDTO
.
setCreateBy
(
createBy
);
memUserTaskDTO
.
setCreateDate
(
new
Date
());
memUserTaskDTO
.
setCreateDate
(
new
Date
());
...
@@ -899,7 +903,6 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
...
@@ -899,7 +903,6 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
Long
.
parseLong
(
MemberInfoRedisBean
.
USER_WECHAT_LOCK_LEASE_TIME
),
TimeUnit
.
SECONDS
);
Long
.
parseLong
(
MemberInfoRedisBean
.
USER_WECHAT_LOCK_LEASE_TIME
),
TimeUnit
.
SECONDS
);
if
(
isGetLock
)
{
if
(
isGetLock
)
{
//查询用户信息
//查询用户信息
MemInfo
memInfo
=
memInfoRepository
.
selectByOpenId
(
memUserTaskDTO
.
getWxOpenid
());
if
(
memInfo
.
getGoldCoinsCount
()
-
acceptGoldCoinCount
<
0
){
if
(
memInfo
.
getGoldCoinsCount
()
-
acceptGoldCoinCount
<
0
){
throw
new
CyServiceException
(
1003
,
"金币余额不足,请先充值"
);
throw
new
CyServiceException
(
1003
,
"金币余额不足,请先充值"
);
}
}
...
@@ -942,7 +945,6 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
...
@@ -942,7 +945,6 @@ public class MemInfoServiceImpl extends ServiceImpl<MemInfoRepository,MemInfo>
Long
.
parseLong
(
MemberInfoRedisBean
.
USER_WECHAT_LOCK_LEASE_TIME
),
TimeUnit
.
SECONDS
);
Long
.
parseLong
(
MemberInfoRedisBean
.
USER_WECHAT_LOCK_LEASE_TIME
),
TimeUnit
.
SECONDS
);
if
(
isGetLock
)
{
if
(
isGetLock
)
{
//查询用户信息
//查询用户信息
MemInfo
memInfo
=
memInfoRepository
.
selectByOpenId
(
memUserTaskDTO
.
getWxOpenid
());
if
(
memInfo
.
getGoldCoinsCount
()
-
requestGoldCoinCount
<
0
){
if
(
memInfo
.
getGoldCoinsCount
()
-
requestGoldCoinCount
<
0
){
throw
new
CyServiceException
(
1003
,
"金币余额不足,请先充值"
);
throw
new
CyServiceException
(
1003
,
"金币余额不足,请先充值"
);
}
}
...
...
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