From b579ff7d8e3b082b0598a65a7a84201637e67b78 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 21 May 2024 11:45:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/controller/OrderRefundController.java | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/order/src/main/java/com/order/controller/OrderRefundController.java b/order/src/main/java/com/order/controller/OrderRefundController.java index cd00b90..33490ac 100644 --- a/order/src/main/java/com/order/controller/OrderRefundController.java +++ b/order/src/main/java/com/order/controller/OrderRefundController.java @@ -10,12 +10,14 @@ import com.hfkj.common.security.UserCenter; import com.hfkj.common.utils.ResponseMsgUtil; import com.hfkj.entity.BsOrderRefund; import com.hfkj.model.ResponseData; +import com.hfkj.model.SecUserSessionObject; import com.hfkj.model.UserSessionObject; import com.hfkj.model.order.OrderChildModel; import com.hfkj.model.order.OrderModel; import com.hfkj.service.order.BsOrderChildService; import com.hfkj.service.order.BsOrderRefundService; import com.hfkj.service.order.BsOrderService; +import com.hfkj.sysenum.SecUserObjectTypeEnum; import com.hfkj.sysenum.UserStatusEnum; import com.hfkj.sysenum.order.OrderChildProductTypeEnum; import io.swagger.annotations.Api; @@ -129,7 +131,8 @@ public class OrderRefundController { @RequestMapping(value="/queryList",method = RequestMethod.GET) @ResponseBody @ApiOperation(value = "查询退款订单列表") - public ResponseData queryList(@RequestParam(value = "userPhone" , required = false) String userPhone, + public ResponseData queryList(@RequestParam(value = "merId" , required = false) Long merId, + @RequestParam(value = "userPhone" , required = false) String userPhone, @RequestParam(value = "orderNo" , required = false) String orderNo, @RequestParam(value = "orderChildNo" , required = false) String orderChildNo, @RequestParam(value = "refundOrderNo" , required = false) String refundOrderNo, @@ -139,8 +142,20 @@ public class OrderRefundController { @RequestParam(value = "pageNum" , required = true) Integer pageNum, @RequestParam(value = "pageSize" , required = true) Integer pageSize) { try { + // 用户session + SecUserSessionObject userSession = userCenter.getSessionModel(SecUserSessionObject.class); + if (userSession == null) { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ACCOUNT_LOGIN_NOT, ""); + } Map param = new HashMap<>(); + if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type1.getCode())) { + param.put("merId", merId); + } else if (userSession.getAccount().getObjectType().equals(SecUserObjectTypeEnum.type2.getCode())) { + param.put("merId", userSession.getAccount().getObjectId()); + }else { + throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, ""); + } param.put("userPhone", userPhone); param.put("orderNo", orderNo); param.put("orderChildNo", orderChildNo);