|
@@ -288,16 +288,20 @@ public class OrderServiceImpl extends ServiceImpl<IOrderMapper, Order> implement
|
|
|
if(param.getAbroad() == 1 && param.getPayType() != 2){
|
|
|
throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
}
|
|
|
- GoodsSku goodsSku = goodsSkuService.getBySku(param.getSkuSn());
|
|
|
- if(goodsSku == null){
|
|
|
- throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
+ IncrementType incrementType = incrementTypeService.getById(param.getSkuSn());
|
|
|
+ if(incrementType == null){
|
|
|
+ throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
}
|
|
|
+// GoodsSku goodsSku = goodsSkuService.getBySku(param.getSkuSn());
|
|
|
+// if(goodsSku == null){
|
|
|
+// throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
+// }
|
|
|
User user = userService.getByUserName(param.getUserName());
|
|
|
if(user == null){
|
|
|
throw new BusinessException(OrderConstant.FAILURE_CODE_8004, OrderConstant.FAILURE_MSG_8004);
|
|
|
}
|
|
|
|
|
|
- return downloadOrderService.insertDownloadOrder(user.getId(),param,param.getAbroad() == 0 ? goodsSku.getPrice() : goodsSku.getDollarPrice());
|
|
|
+ return downloadOrderService.insertDownloadOrder(user.getId(),param,incrementType.getDownloadPrice());
|
|
|
}
|
|
|
|
|
|
@Override
|