提交代码

master
胡锐 6 months ago committed by yuanye
parent 21d9ee13e8
commit b579ff7d8e
  1. 17
      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<String,Object> 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);

Loading…
Cancel
Save