|
|
@@ -3045,8 +3045,10 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
throw BusinessRuntimeException.getInstance("商品价格异常..");
|
|
|
}
|
|
|
//是否购买过该规格
|
|
|
+ List<Long> userIdList = userBindRelationService.getRelationUserIdList(user.getId(), user);
|
|
|
Integer selectCount = orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
.eq(OrderDon::getSkuId, skuId)
|
|
|
+ .in(OrderDon::getUserId, userIdList)
|
|
|
.ne(OrderDon::getStatus, OrderDon.Status.close));
|
|
|
if (selectCount > 0) {
|
|
|
throw BusinessRuntimeException.getInstance("只可购买一次该补贴规格");
|