|
|
@ -5,12 +5,16 @@ import com.github.pagehelper.PageInfo; |
|
|
|
import com.hfkj.common.exception.ErrorCode; |
|
|
|
import com.hfkj.common.exception.ErrorCode; |
|
|
|
import com.hfkj.common.exception.ErrorHelp; |
|
|
|
import com.hfkj.common.exception.ErrorHelp; |
|
|
|
import com.hfkj.common.exception.SysCode; |
|
|
|
import com.hfkj.common.exception.SysCode; |
|
|
|
|
|
|
|
import com.hfkj.common.security.SessionObject; |
|
|
|
|
|
|
|
import com.hfkj.common.security.UserCenter; |
|
|
|
import com.hfkj.common.utils.ResponseMsgUtil; |
|
|
|
import com.hfkj.common.utils.ResponseMsgUtil; |
|
|
|
import com.hfkj.entity.BsOrderCoupon; |
|
|
|
import com.hfkj.entity.BsOrderCoupon; |
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
import com.hfkj.model.ResponseData; |
|
|
|
|
|
|
|
import com.hfkj.model.SecUserSessionObject; |
|
|
|
import com.hfkj.model.order.OrderCouponModel; |
|
|
|
import com.hfkj.model.order.OrderCouponModel; |
|
|
|
import com.hfkj.service.coupon.BsOrderCouponNoService; |
|
|
|
import com.hfkj.service.coupon.BsOrderCouponNoService; |
|
|
|
import com.hfkj.service.coupon.BsOrderCouponService; |
|
|
|
import com.hfkj.service.coupon.BsOrderCouponService; |
|
|
|
|
|
|
|
import com.hfkj.sysenum.SecUserObjectTypeEnum; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
import org.slf4j.Logger; |
|
|
|
import org.slf4j.Logger; |
|
|
@ -41,6 +45,8 @@ public class OrderCouponController { |
|
|
|
private BsOrderCouponService orderCouponService; |
|
|
|
private BsOrderCouponService orderCouponService; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private BsOrderCouponNoService orderCouponNoService; |
|
|
|
private BsOrderCouponNoService orderCouponNoService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private UserCenter userCenter; |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/queryCouNo",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/queryCouNo",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
@ -98,6 +104,12 @@ public class OrderCouponController { |
|
|
|
@RequestParam(value = "pageSize" , required = true) Integer pageSize) { |
|
|
|
@RequestParam(value = "pageSize" , required = true) Integer pageSize) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
|
|
|
|
SecUserSessionObject userSessionObject = userCenter.getSessionModel(SecUserSessionObject.class); |
|
|
|
|
|
|
|
if (SecUserObjectTypeEnum.type1.getCode() == userSessionObject.getAccount().getObjectType()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (SecUserObjectTypeEnum.type2.getCode() == userSessionObject.getAccount().getObjectType()) { |
|
|
|
|
|
|
|
param.put("merId", userSessionObject.getAccount().getObjectId()); |
|
|
|
|
|
|
|
} |
|
|
|
param.put("orderNo", orderNo); |
|
|
|
param.put("orderNo", orderNo); |
|
|
|
param.put("userPhone", userPhone); |
|
|
|
param.put("userPhone", userPhone); |
|
|
|
param.put("tradeStatus", tradeStatus); |
|
|
|
param.put("tradeStatus", tradeStatus); |
|
|
@ -120,7 +132,7 @@ public class OrderCouponController { |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/export",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/export",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询交易订单列表") |
|
|
|
@ApiOperation(value = "导出订单") |
|
|
|
public ResponseData export(@RequestParam(value = "orderNo" , required = false) String orderNo, |
|
|
|
public ResponseData export(@RequestParam(value = "orderNo" , required = false) String orderNo, |
|
|
|
@RequestParam(value = "userPhone" , required = false) String userPhone, |
|
|
|
@RequestParam(value = "userPhone" , required = false) String userPhone, |
|
|
|
@RequestParam(value = "tradeStatus" , required = false) Integer tradeStatus, |
|
|
|
@RequestParam(value = "tradeStatus" , required = false) Integer tradeStatus, |
|
|
@ -133,6 +145,12 @@ public class OrderCouponController { |
|
|
|
@RequestParam(value = "createTimeE" , required = false) Long createTimeE) { |
|
|
|
@RequestParam(value = "createTimeE" , required = false) Long createTimeE) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
|
|
|
|
SecUserSessionObject userSessionObject = userCenter.getSessionModel(SecUserSessionObject.class); |
|
|
|
|
|
|
|
if (SecUserObjectTypeEnum.type1.getCode() == userSessionObject.getAccount().getObjectType()) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else if (SecUserObjectTypeEnum.type2.getCode() == userSessionObject.getAccount().getObjectType()) { |
|
|
|
|
|
|
|
param.put("merId", userSessionObject.getAccount().getObjectId()); |
|
|
|
|
|
|
|
} |
|
|
|
param.put("orderNo", orderNo); |
|
|
|
param.put("orderNo", orderNo); |
|
|
|
param.put("userPhone", userPhone); |
|
|
|
param.put("userPhone", userPhone); |
|
|
|
param.put("tradeStatus", tradeStatus); |
|
|
|
param.put("tradeStatus", tradeStatus); |
|
|
@ -145,7 +163,6 @@ public class OrderCouponController { |
|
|
|
param.put("createTimeE", createTimeE); |
|
|
|
param.put("createTimeE", createTimeE); |
|
|
|
List<OrderCouponModel> orderList = orderCouponService.getOrderList(param); |
|
|
|
List<OrderCouponModel> orderList = orderCouponService.getOrderList(param); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return ResponseMsgUtil.success(orderList); |
|
|
|
return ResponseMsgUtil.success(orderList); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|