Commit 4f687412 authored by shiyu's avatar shiyu

黑名单用户待处理交换订单不能超过3个

parent bf19100b
......@@ -44,6 +44,8 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
private static final Logger logger = LoggerFactory.getLogger(ExchangeApplyOrderServiceImpl.class);
private static final List<Long> BLACK_USER_LIST = Arrays.asList(40151043L, 39965054L);
@Autowired
ExchangeApplyOrderDetailDao exchangeApplyOrderDetailDao;
......@@ -82,6 +84,11 @@ public class ExchangeApplyOrderServiceImpl implements ExchangeApplyOrderService
if (CollectionUtils.isEmpty(supplierItemList)) {
return Result.failed("请先上传藏品");
}
if (BLACK_USER_LIST.contains(dto.getUserId())) {
if (exchangeApplyOrderDao.countPreHandleOrderOfCommit(dto.getUserId()) >= 3) {
return Result.failed("待处理交换订单不能超过3个");
}
}
SupplierItem targetSupplierItem = supplierItemDao.findById(dto.getTargetItemId());
dto.setTargetUserId(targetSupplierItem.getCreatorId());
Date now = new Date();
......
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