|
|
@ -13,6 +13,7 @@ import com.hfkj.model.ResponseData; |
|
|
|
import com.hfkj.model.UserSessionObject; |
|
|
|
import com.hfkj.model.UserSessionObject; |
|
|
|
import com.hfkj.model.order.OrderChildModel; |
|
|
|
import com.hfkj.model.order.OrderChildModel; |
|
|
|
import com.hfkj.model.order.OrderModel; |
|
|
|
import com.hfkj.model.order.OrderModel; |
|
|
|
|
|
|
|
import com.hfkj.service.order.BsOrderChildService; |
|
|
|
import com.hfkj.service.order.BsOrderRefundService; |
|
|
|
import com.hfkj.service.order.BsOrderRefundService; |
|
|
|
import com.hfkj.service.order.BsOrderService; |
|
|
|
import com.hfkj.service.order.BsOrderService; |
|
|
|
import com.hfkj.sysenum.UserStatusEnum; |
|
|
|
import com.hfkj.sysenum.UserStatusEnum; |
|
|
@ -27,6 +28,7 @@ import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource; |
|
|
|
import javax.annotation.Resource; |
|
|
|
import java.util.HashMap; |
|
|
|
import java.util.HashMap; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Map; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -44,7 +46,8 @@ public class OrderRefundController { |
|
|
|
private UserCenter userCenter; |
|
|
|
private UserCenter userCenter; |
|
|
|
@Resource |
|
|
|
@Resource |
|
|
|
private BsOrderRefundService orderRefundService; |
|
|
|
private BsOrderRefundService orderRefundService; |
|
|
|
|
|
|
|
@Resource |
|
|
|
|
|
|
|
private BsOrderChildService orderChildService; |
|
|
|
@RequestMapping(value="/tradeOrder",method = RequestMethod.POST) |
|
|
|
@RequestMapping(value="/tradeOrder",method = RequestMethod.POST) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "退款交易订单") |
|
|
|
@ApiOperation(value = "退款交易订单") |
|
|
@ -98,24 +101,24 @@ public class OrderRefundController { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value="/queryOrderRefund",method = RequestMethod.GET) |
|
|
|
@RequestMapping(value="/queryRefund",method = RequestMethod.GET) |
|
|
|
@ResponseBody |
|
|
|
@ResponseBody |
|
|
|
@ApiOperation(value = "查询退款订单") |
|
|
|
@ApiOperation(value = "查询退款订单") |
|
|
|
public ResponseData queryOrderRefund(@RequestParam(value = "orderNo" , required = false) String orderNo, |
|
|
|
public ResponseData queryRefund(@RequestParam(value = "refundOrderNo" , required = false) String refundOrderNo) { |
|
|
|
@RequestParam(value = "orderChildNo" , required = false) String orderChildNo, |
|
|
|
|
|
|
|
@RequestParam(value = "refundOrderNo" , required = false) String refundOrderNo) { |
|
|
|
|
|
|
|
try { |
|
|
|
try { |
|
|
|
if (StringUtils.isBlank(orderNo) |
|
|
|
if (StringUtils.isBlank(refundOrderNo)) { |
|
|
|
&& StringUtils.isBlank(orderChildNo) |
|
|
|
|
|
|
|
&& StringUtils.isBlank(refundOrderNo)) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// 查询退款
|
|
|
|
|
|
|
|
BsOrderRefund refund = orderRefundService.getRefund(refundOrderNo); |
|
|
|
|
|
|
|
if (refund == null) { |
|
|
|
|
|
|
|
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知的退款"); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Map<String,Object> param = new HashMap<>(); |
|
|
|
Map<String,Object> map = new HashMap<>(); |
|
|
|
param.put("orderNo", orderNo); |
|
|
|
map.put("refund", refund); |
|
|
|
param.put("orderChildNo", orderChildNo); |
|
|
|
map.put("orderChild", orderChildService.getDetail(refund.getOrderChildNo())); |
|
|
|
param.put("refundOrderNo", refundOrderNo); |
|
|
|
return ResponseMsgUtil.success(map); |
|
|
|
return ResponseMsgUtil.success(orderRefundService.getRefundList(param)); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("error!",e); |
|
|
|
log.error("error!",e); |
|
|
|