Commit dfaabfeb authored by shiyu's avatar shiyu

出价,正式环境需要判断是否是商家

parent ead6730f
......@@ -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,6 +117,8 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
RLock lock = redissonClient.getLock(itemIdKey);
try {
if (lock.tryLock(0, 10, TimeUnit.SECONDS)) {
//正式环境需要判断是否是商家
if (!"dev".equals(env)) {
//玩物得志商家不能出价
CloudServerResponse<ShopDTO> cloudServerResponse = shopReadService.getShopByUserId(dto.getUserId(), new ShopQueryOption());
if (cloudServerResponse.isSuccess()) {
......@@ -122,6 +127,7 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
return Result.failed("被风控系统识别不能出价");
}
}
}
Date now = new Date();
//查询竞拍配置信息
AuctionConfig auctionConfig = auctionConfigDao.findByItemId(itemId);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment