From 2fea45bd7a6aecb44fd2a7282a4f5488787f302d Mon Sep 17 00:00:00 2001 From: zhouxiang <zhouxiang> Date: 星期三, 08 十二月 2021 09:50:44 +0800 Subject: [PATCH] 添加创建订单接口 --- phi_platform_user/src/main/java/com/hx/phip/order/controller/OrderController.java | 8 ++++---- 1 files changed, 4 insertions(+), 4 deletions(-) diff --git a/phi_platform_user/src/main/java/com/hx/phip/order/controller/OrderController.java b/phi_platform_user/src/main/java/com/hx/phip/order/controller/OrderController.java index adc4ff0..57db6af 100644 --- a/phi_platform_user/src/main/java/com/hx/phip/order/controller/OrderController.java +++ b/phi_platform_user/src/main/java/com/hx/phip/order/controller/OrderController.java @@ -14,6 +14,8 @@ import com.hx.phip.service.SysAdminService; import com.hx.phip.tool.CreateNo; import com.hx.util.StringUtils; +import com.platform.constants.LoginConstant; +import com.platform.entity.ThirtApplication; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMethod; @@ -44,16 +46,14 @@ if(StringUtils.isEmpty(param)){ throwParamException("璇蜂紶璁㈠崟鍙傛暟"); } -// SysAdmin sysAdmin = (SysAdmin) getRequestAttribute(Constants.LOGIN_ADMIN); -// if(sysAdmin==null){ -// throw new TipsException("鏈壘鍒板綋鍓嶇櫥褰曚汉鐨勪俊鎭�"); -// } + ThirtApplication thirtApplication= (ThirtApplication) getRequestAttribute(LoginConstant.LOGIN_APPLY); JSONObject object = JSONObject.parseObject(param); //鑾峰彇鎬昏鍗曞璞� OrdersTotal orderTotal = JSONObject.parseObject(object.getString("orderTotal"), OrdersTotal.class); //鏍¢獙鍙傛暟鎴愬姛鐨勮鍗� orderTotal = checkOrderTotalParam(orderTotal); + orderTotal.setAppId(thirtApplication.getAppId()); //鑾峰彇璁㈠崟鐨勫瓙璁㈠崟 List<OrderItem> orderItem = JSONObject.parseArray(object.getString("orderItem"), OrderItem.class); if(orderItem==null || orderItem.size()==0){ -- Gitblit v1.8.0