Commit 64c6b1e5 authored by shiyu's avatar shiyu

玩物得志商家不能拍卖出价

parent ee83303e
package com.wwdz.ch.wx.impl.distribution;
import com.alibaba.dubbo.config.annotation.Reference;
import com.github.pagehelper.PageInfo;
import com.wwdz.ch.core.api.OfficialAccountApi;
import com.wwdz.ch.core.api.wxpay.WxPayServiceApi;
......@@ -22,6 +23,10 @@ import com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordRowVo;
import com.wwdz.ch.wx.entity.vo.distribution.AuctionRecordVo;
import com.wwdz.ch.wx.service.distribution.AuctionRecordService;
import com.wwdz.ch.core.service.SendMsgService;
import com.wwdz.mall.common.vo.response.CloudServerResponse;
import com.wwdz.shop.api.DTO.ShopDTO;
import com.wwdz.shop.api.query.ShopQueryOption;
import com.wwdz.shop.api.service.ShopReadService;
import com.xxdxxs.utils.DateUtils;
import com.xxdxxs.utils.EntityMapper;
import com.xxdxxs.utils.StringUtils;
......@@ -35,6 +40,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.transaction.interceptor.TransactionAspectSupport;
import org.springframework.util.CollectionUtils;
import org.springframework.util.ObjectUtils;
import java.time.Duration;
import java.time.Instant;
import java.util.ArrayList;
......@@ -93,7 +100,8 @@ public class AuctionRecordServiceImpl implements AuctionRecordService {
@Autowired
SpecialPerformanceConfigDao specialPerformanceConfigDao;
@Reference
ShopReadService shopReadService;
@Override
@Transactional
......@@ -103,6 +111,14 @@ 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("被风控系统识别不能出价");
}
}
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