From 0d6a921519bc3310babf526698b0aba4f60559d9 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Tue, 29 Jan 2019 17:22:36 +0800 Subject: [PATCH] =?UTF-8?q?[=E7=A0=8D=E4=BB=B7][=E4=BF=AE=E6=94=B9]:?= =?UTF-8?q?=E7=A0=8D=E4=BB=B7=E7=8A=B6=E6=80=81=E8=8E=B7=E5=8F=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxPressOrderController.java | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/mallinkCApi/src/main/java/com/iformall/controller/WxPressOrderController.java b/mallinkCApi/src/main/java/com/iformall/controller/WxPressOrderController.java index 4cb57673c..a564f4ed8 100644 --- a/mallinkCApi/src/main/java/com/iformall/controller/WxPressOrderController.java +++ b/mallinkCApi/src/main/java/com/iformall/controller/WxPressOrderController.java @@ -12,6 +12,7 @@ import com.iformall.service.WxCouponService; import com.iformall.service.WxOrderPressService; import com.iformall.service.WxOrderService; import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -108,23 +109,23 @@ public class WxPressOrderController extends BaseController { return new ResultData(); } - @ApiOperation(value = "砍价状态(1:我发起的砍价,2:未参与的砍价, 3:已参与的砍价)", notes = "{\"orderId\":\"String\"}") + @ApiOperation(value = "砍价状态(1:我发起的砍价,2:未参与的砍价, 3:已参与的砍价)", notes = "") @GetMapping("getPressOrderStatus") - public ResultData getPressOrderStatus(@RequestBody Map paramMap) { + @ApiImplicitParam(name = "orderId", value = "orderId", dataType = "String", paramType = "query", required = true) + public ResultData getPressOrderStatus(String orderId) { Map ret = new HashMap(); - String orderIdStr = paramMap.get("orderId"); - if (StringUtils.isBlank(orderIdStr)) { + if (StringUtils.isBlank(orderId)) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "orderId不能为空"); } - Long orderId = 0L; + Long orderIdL = 0L; try { - orderId = Long.valueOf(orderIdStr); + orderIdL = Long.valueOf(orderId); } catch (NumberFormatException e) { - logger.error("orderId convert error, " + orderIdStr + ", e:" + e.getMessage()); - return new ResultData(ErrorCode.SYS_PARAMETER_CAST_ERROR.getCode(), "orderId: " + orderIdStr + ", e:" + e.getMessage()); + logger.error("orderId convert error, " + orderId + ", e:" + e.getMessage()); + return new ResultData(ErrorCode.SYS_PARAMETER_CAST_ERROR.getCode(), "orderId: " + orderId + ", e:" + e.getMessage()); } WxCUser user = getUser(); - WxOrder order = wxOrderService.getById(orderId); + WxOrder order = wxOrderService.getById(orderIdL); if(order == null) { logger.error("订单不存在:" + orderId); return new ResultData(ErrorCode.ORDER_IS_NOT_FIND);