|
@@ -1,5 +1,13 @@
|
|
|
package com.chelvc.cloud.maintain.controller;
|
|
|
|
|
|
+import java.io.IOException;
|
|
|
+import java.util.Map;
|
|
|
+import javax.servlet.http.HttpServletRequest;
|
|
|
+import javax.servlet.http.HttpServletResponse;
|
|
|
+import javax.validation.Valid;
|
|
|
+import javax.validation.constraints.Min;
|
|
|
+import javax.validation.constraints.NotNull;
|
|
|
+
|
|
|
import com.chelvc.cloud.vehicle.client.OmsOrderClient;
|
|
|
import com.chelvc.cloud.vehicle.client.OmsOrderReturnApplyClient;
|
|
|
import com.chelvc.cloud.vehicle.client.dto.ConfirmOrderResultDTO;
|
|
@@ -12,23 +20,17 @@ import com.chelvc.cloud.vehicle.client.param.OrderRefundParam;
|
|
|
import com.chelvc.cloud.vehicle.client.param.SxyNotifyParam;
|
|
|
import com.chelvc.framework.base.annotation.ResponseWrapping;
|
|
|
import com.chelvc.framework.common.model.Pagination;
|
|
|
-import com.chelvc.framework.security.annotation.Authorize;
|
|
|
+import com.chelvc.framework.security.annotation.Security;
|
|
|
import com.chelvc.framework.wechat.WechatUnifiedOrder;
|
|
|
import lombok.RequiredArgsConstructor;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.validation.annotation.Validated;
|
|
|
-import org.springframework.web.bind.annotation.*;
|
|
|
-
|
|
|
-import javax.servlet.http.HttpServletRequest;
|
|
|
-import javax.servlet.http.HttpServletResponse;
|
|
|
-import javax.validation.Valid;
|
|
|
-import javax.validation.constraints.Min;
|
|
|
-import javax.validation.constraints.NotNull;
|
|
|
-import java.io.IOException;
|
|
|
-import java.io.OutputStream;
|
|
|
-import java.util.Map;
|
|
|
-import java.util.Objects;
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
+import org.springframework.web.bind.annotation.PathVariable;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestBody;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
|
|
/**
|
|
|
* 订单接口
|
|
@@ -186,6 +188,7 @@ public class OmsOrderController {
|
|
|
|
|
|
/**
|
|
|
* 查询订单详情
|
|
|
+ *
|
|
|
* @param id 查询参数
|
|
|
* @return
|
|
|
*/
|
|
@@ -200,16 +203,16 @@ public class OmsOrderController {
|
|
|
*/
|
|
|
@GetMapping("/omsOrder/{orderSn}/{merchantId}")
|
|
|
public OmsOrderDetailDTO getOrderDetailBySn(@PathVariable("orderSn") @Min(value = 1, message = "核销码不能小于1") Long orderSn,
|
|
|
- @PathVariable("merchantId") @Min(value = 1, message = "商家ID不能小于1") Long merchantId) {
|
|
|
- return this.omsOrderClient.getOrderDetail(orderSn,merchantId);
|
|
|
+ @PathVariable("merchantId") @Min(value = 1, message = "商家ID不能小于1") Long merchantId) {
|
|
|
+ return this.omsOrderClient.getOrderDetail(orderSn, merchantId);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 订单支付回调
|
|
|
*/
|
|
|
- @Authorize(enabled = false)
|
|
|
+ @Security(enabled = false)
|
|
|
@PostMapping("/order/notify")
|
|
|
- public void orderNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param){
|
|
|
+ public void orderNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
|
|
|
String merchantId = request.getHeader("merchantId");
|
|
|
String encryptKey = request.getHeader("encryptKey");
|
|
|
param.setMerchantId(merchantId);
|
|
@@ -219,20 +222,22 @@ public class OmsOrderController {
|
|
|
|
|
|
/**
|
|
|
* 退款申请
|
|
|
+ *
|
|
|
* @param param 参数
|
|
|
* @return
|
|
|
*/
|
|
|
@PostMapping("/order/refund")
|
|
|
public void orderRefund(@RequestBody OrderRefundParam param) {
|
|
|
- this.omsOrderClient.orderRefund(param);
|
|
|
+ this.omsOrderClient.orderRefund(param);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 退款申请回调
|
|
|
+ *
|
|
|
* @return
|
|
|
*/
|
|
|
+ @Security(enabled = false)
|
|
|
@PostMapping("/order/refund/notify")
|
|
|
- @Authorize(enabled = false)
|
|
|
public void orderRefundNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param) {
|
|
|
String merchantId = request.getHeader("merchantId");
|
|
|
String encryptKey = request.getHeader("encryptKey");
|