|
@@ -245,6 +245,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
/* 生成订单 */
|
|
/* 生成订单 */
|
|
|
String donNo = SEQUENCE.nextId().toString();
|
|
String donNo = SEQUENCE.nextId().toString();
|
|
|
OrderDon orderDon = new OrderDon();
|
|
OrderDon orderDon = new OrderDon();
|
|
|
|
|
+ orderDon.setIsDp(false);
|
|
|
if (isNoLogin != null && isNoLogin) {
|
|
if (isNoLogin != null && isNoLogin) {
|
|
|
orderDon.setIsNoLogin(true);
|
|
orderDon.setIsNoLogin(true);
|
|
|
}
|
|
}
|
|
@@ -258,15 +259,14 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
payRequest.setDonMoney(sku.getPrice());
|
|
payRequest.setDonMoney(sku.getPrice());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- List<Long> dpSkuIds = payRequest.getDpSkuIds();
|
|
|
|
|
- if (dpSkuIds.size() > 1) {
|
|
|
|
|
- throw BusinessRuntimeException.getInstance("暂只支持优惠加购一件商品");
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
orderDon.setMoney(payRequest.getDonMoney());
|
|
orderDon.setMoney(payRequest.getDonMoney());
|
|
|
orderDon.setRealMoney(payRequest.getDonMoney());
|
|
orderDon.setRealMoney(payRequest.getDonMoney());
|
|
|
|
|
|
|
|
|
|
+ List<Long> dpSkuIds = payRequest.getDpSkuIds();
|
|
|
if (CollUtil.isNotEmpty(dpSkuIds)) {
|
|
if (CollUtil.isNotEmpty(dpSkuIds)) {
|
|
|
|
|
+ if (dpSkuIds.size() > 1) {
|
|
|
|
|
+ throw BusinessRuntimeException.getInstance("暂只支持优惠加购一件商品");
|
|
|
|
|
+ }
|
|
|
//是否满足关联
|
|
//是否满足关联
|
|
|
List<GoodsDiscountPlusPurchaseRelation> ds_relations = discountPlusPurchaseRelationMapper.selectList(Wrappers.lambdaQuery(GoodsDiscountPlusPurchaseRelation.class)
|
|
List<GoodsDiscountPlusPurchaseRelation> ds_relations = discountPlusPurchaseRelationMapper.selectList(Wrappers.lambdaQuery(GoodsDiscountPlusPurchaseRelation.class)
|
|
|
.eq(GoodsDiscountPlusPurchaseRelation::getSkuId, sku.getId())
|
|
.eq(GoodsDiscountPlusPurchaseRelation::getSkuId, sku.getId())
|