| | |
| | | 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; |
| | |
| | | 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){ |