ct 5 days ago
parent
commit
3a201f539e

+ 2 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreOrderCreateParam.java

@@ -48,4 +48,6 @@ public class FsStoreOrderCreateParam implements Serializable
     //订单创建类型 1普通订单 2套餐订单 3制单
     private Integer orderCreateType;
 
+    private Long customerId;
+
 }

+ 1 - 0
fs-service-system/src/main/java/com/fs/store/param/FsStoreOrderCreateUserParam.java

@@ -28,5 +28,6 @@ public class FsStoreOrderCreateUserParam implements Serializable
     private Integer payType;
     private Long paymentId;
     private BigDecimal payPrice;
+    private Long customerId;
 
 }

+ 4 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsStoreOrderServiceImpl.java

@@ -575,6 +575,9 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             } else {
                 storeOrder.setIsPrescribe(0);
             }
+            if (storeOrder.getCustomerId() == null){
+                storeOrder.setCustomerId(param.getCustomerId());//6.13 添加客户id
+            }
             Integer flag=fsStoreOrderMapper.insertFsStoreOrder(storeOrder);
             if (flag==0) {
                 return R.error("订单创建失败");
@@ -977,6 +980,7 @@ public class FsStoreOrderServiceImpl implements IFsStoreOrderService
             createParam.setCompanyUserId(param.getCompanyUserId());
             createParam.setPaymentId(param.getPaymentId());
             createParam.setPayPrice(param.getPayPrice());
+            createParam.setCustomerId(param.getCustomerId());
             return this.createOrder(param.getUserId(),createParam);
         }
         else{

+ 4 - 1
fs-user-app/src/main/java/com/fs/app/controller/CompanyOrderController.java

@@ -80,13 +80,16 @@ public class CompanyOrderController extends  AppBaseController {
     @GetMapping("/updateSalseOrderMoney")
     public R updateSalseOrderMoney(@RequestParam("token")String token,
                                    @RequestParam("createOrderKey")String createOrderKey,
-                                   @RequestParam("money") BigDecimal money,
+                                   @RequestParam(value = "money",required = false) BigDecimal money,
                                    @RequestParam(value = "payAmount",required = false) BigDecimal payAmount,
                                    HttpServletRequest request){
         Long userId=redisCache.getCacheObject("company-user-token:"+token);
         if(userId==null){
             return R.error(403,"用户失效");
         }
+        if (money == null){
+            money = BigDecimal.ZERO;
+        }
         return orderService.updateSalseOrderMoney(createOrderKey,money,payAmount);
     }