Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Q
qk_backend
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
quanku
qk_backend
Commits
dfaabfeb
Commit
dfaabfeb
authored
Oct 15, 2024
by
shiyu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
出价,正式环境需要判断是否是商家
parent
ead6730f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
6 deletions
+12
-6
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/AuctionRecordServiceImpl.java
...wdz/ch/wx/impl/distribution/AuctionRecordServiceImpl.java
+12
-6
No files found.
ch-wx-api/src/main/java/com/wwdz/ch/wx/impl/distribution/AuctionRecordServiceImpl.java
View file @
dfaabfeb
...
...
@@ -106,6 +106,9 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
@Reference
ShopReadService
shopReadService
;
@Value
(
"${spring.profiles.active}"
)
private
String
env
;
@Override
@Transactional
public
Result
createAuctionRecord
(
AuctionRecordRequestDto
dto
)
{
...
...
@@ -114,12 +117,15 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
RLock
lock
=
redissonClient
.
getLock
(
itemIdKey
);
try
{
if
(
lock
.
tryLock
(
0
,
10
,
TimeUnit
.
SECONDS
))
{
//玩物得志商家不能出价
CloudServerResponse
<
ShopDTO
>
cloudServerResponse
=
shopReadService
.
getShopByUserId
(
dto
.
getUserId
(),
new
ShopQueryOption
());
if
(
cloudServerResponse
.
isSuccess
())
{
ShopDTO
shopDTO
=
cloudServerResponse
.
getResult
();
if
(
shopDTO
!=
null
&&
!
ObjectUtils
.
isEmpty
(
shopDTO
.
getShopId
())
&&
shopDTO
.
getType
()
==
4
)
{
return
Result
.
failed
(
"被风控系统识别不能出价"
);
//正式环境需要判断是否是商家
if
(!
"dev"
.
equals
(
env
))
{
//玩物得志商家不能出价
CloudServerResponse
<
ShopDTO
>
cloudServerResponse
=
shopReadService
.
getShopByUserId
(
dto
.
getUserId
(),
new
ShopQueryOption
());
if
(
cloudServerResponse
.
isSuccess
())
{
ShopDTO
shopDTO
=
cloudServerResponse
.
getResult
();
if
(
shopDTO
!=
null
&&
!
ObjectUtils
.
isEmpty
(
shopDTO
.
getShopId
())
&&
shopDTO
.
getType
()
==
4
)
{
return
Result
.
failed
(
"被风控系统识别不能出价"
);
}
}
}
Date
now
=
new
Date
();
...
...
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