lyhzzz 2 éve
szülő
commit
54ac32838c

+ 1 - 0
src/main/java/com/fdkankan/ucenter/service/impl/IncrementOrderServiceImpl.java

@@ -103,6 +103,7 @@ public class IncrementOrderServiceImpl extends ServiceImpl<IIncrementOrderMapper
                 break;
             case 6: incrementType = incrementTypeService.getByType(environment).get(0);
                 goodsSkuVo.setPrice(incrementType.getDownloadPrice());
+                goodsSkuVo.setSkuSn(incrementType.getId().toString());
                 break;
             case 7 : incrementType = incrementTypeService.getByType(environment).get(1);
                 goodsSkuVo.setPrice(incrementType.getPrice());

+ 8 - 4
src/main/java/com/fdkankan/ucenter/service/impl/OrderServiceImpl.java

@@ -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