From 4c6f331bd95de528b543f13454650f9fbfd6d12c Mon Sep 17 00:00:00 2001 From: zhouxiang <zhouxiang> Date: 星期五, 10 十二月 2021 17:32:38 +0800 Subject: [PATCH] 兼容导医创建订单操作人 --- phi_platform_user/src/main/java/com/hx/phip/order/controller/OrderController.java | 37 ++++++++++++++++++++----------------- 1 files changed, 20 insertions(+), 17 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 caf7a6f..a6ada90 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 @@ -15,6 +15,7 @@ import com.hx.phip.order.service.OrderService; import com.hx.phip.service.SysAdminService; import com.hx.phip.tool.CreateNo; +import com.hx.resultTool.Result; import com.hx.util.StringUtils; import com.platform.constants.LoginConstant; import com.platform.entity.ThirtApplication; @@ -46,7 +47,7 @@ * 鍒涘缓璁㈠崟 */ @RequestMapping(value = "/add",method = RequestMethod.POST) - public void orderAdd(HttpServletRequest request, @RequestBody String param) { + public Result orderAdd(HttpServletRequest request, @RequestBody String param) { if(StringUtils.isEmpty(param)){ throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"璇蜂紶璁㈠崟鍙傛暟"); @@ -74,6 +75,7 @@ String shopId = object.getString("shopId");//鎿嶄綔浜虹殑闂ㄥ簵id orderService.add(orderTotal,orderItem,type,orderDeveloperList,operatorId,shopId); + return Result.success(); } /** @@ -81,7 +83,7 @@ * @param param */ @RequestMapping(value = "/pay",method = RequestMethod.POST) - public void orderPay(@RequestBody String param) throws Exception { + public Result orderPay(@RequestBody String param) throws Exception { if(StringUtils.isEmpty(param)){ throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"璇蜂紶璁㈠崟鍙傛暟"); } @@ -107,6 +109,7 @@ throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"璇蜂紶鐢ㄦ埛鎿嶄綔浜烘爣璇�"); } orderService.orderPay(type,orderId,total,amountList,operatorId); + return Result.success(); } /** * 娴嬭瘯鍏呭�煎偍鍊奸噾 @@ -144,9 +147,9 @@ throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"璁㈠崟绫诲瀷涓虹┖"); } - if(StringUtils.isEmpty(orderTotal.getAppId())){ - throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"鏉ユ簮搴旂敤appId涓虹┖"); - } +// if(StringUtils.isEmpty(orderTotal.getAppId())){ +// throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"鏉ユ簮搴旂敤appId涓虹┖"); +// } if(StringUtils.isEmpty(orderTotal.getSourceName())){ throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"璁㈠崟鏉ユ簮鍚嶇О涓虹┖"); } @@ -156,18 +159,18 @@ // if(StringUtils.isEmpty(orderTotal.getChannelType())){ // throwParamException("娓犻亾绫诲瀷涓嶈兘涓虹┖"); // } - if(StringUtils.isEmpty(orderTotal.getCommonId())){ - throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"娓犻亾鏍囪瘑涓嶈兘涓虹┖"); - } - if(StringUtils.isEmpty(orderTotal.getCommonName())){ - throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"娓犻亾鍚嶇О涓嶈兘涓虹┖"); - } - if(StringUtils.isEmpty(orderTotal.getDepartmentCode())){ - throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"绉戝缂栫爜涓嶈兘涓虹┖"); - } - if(StringUtils.isEmpty(orderTotal.getDepartmentName())){ - throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"绉戝鍚嶇О涓嶈兘涓虹┖"); - } +// if(StringUtils.isEmpty(orderTotal.getCommonId())){ +// throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"娓犻亾鏍囪瘑涓嶈兘涓虹┖"); +// } +// if(StringUtils.isEmpty(orderTotal.getCommonName())){ +// throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"娓犻亾鍚嶇О涓嶈兘涓虹┖"); +// } +// if(StringUtils.isEmpty(orderTotal.getDepartmentCode())){ +// throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"绉戝缂栫爜涓嶈兘涓虹┖"); +// } +// if(StringUtils.isEmpty(orderTotal.getDepartmentName())){ +// throw new PlatTipsException(PlatformCode.ERROR_PARAMETER_NULL,"绉戝鍚嶇О涓嶈兘涓虹┖"); +// } return orderTotal; } -- Gitblit v1.8.0