|
@@ -8,16 +8,18 @@ import com.chelvc.cloud.vehicle.client.dto.OmsOrderDetailDTO;
|
|
|
import com.chelvc.cloud.vehicle.client.dto.OmsOrderReturnApplyDTO;
|
|
|
import com.chelvc.cloud.vehicle.client.param.OmsOrderModifyParam;
|
|
|
import com.chelvc.cloud.vehicle.client.param.OrderPagingParam;
|
|
|
+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.wechat.WechatPaymentCallback;
|
|
|
-import com.chelvc.framework.wechat.WechatPaymentHandler;
|
|
|
+import com.chelvc.framework.security.annotation.Authorize;
|
|
|
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;
|
|
@@ -33,6 +35,7 @@ import java.util.Objects;
|
|
|
* @author liude
|
|
|
* @Date 2023/11/19
|
|
|
**/
|
|
|
+@Slf4j
|
|
|
@Validated
|
|
|
@RestController
|
|
|
@ResponseWrapping
|
|
@@ -40,7 +43,7 @@ import java.util.Objects;
|
|
|
public class OmsOrderController {
|
|
|
private final OmsOrderClient omsOrderClient;
|
|
|
private final OmsOrderReturnApplyClient omsOrderReturnApplyClient;
|
|
|
- private final WechatPaymentHandler wechatPaymentHandler;
|
|
|
+ //private final WechatPaymentHandler wechatPaymentHandler;
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -116,7 +119,7 @@ public class OmsOrderController {
|
|
|
public void paySuccess(@PathVariable("name") String name,
|
|
|
@RequestBody String body, HttpServletResponse response) throws IOException {
|
|
|
//获取支付回调信息
|
|
|
- WechatPaymentCallback callback = this.wechatPaymentHandler.callback(name, body);
|
|
|
+ /*WechatPaymentCallback callback = this.wechatPaymentHandler.callback(name, body);
|
|
|
if(callback == null){
|
|
|
return;
|
|
|
}
|
|
@@ -129,7 +132,7 @@ public class OmsOrderController {
|
|
|
try (OutputStream stream = response.getOutputStream()){
|
|
|
stream.write(callback.getResponse().getBytes());
|
|
|
}
|
|
|
- }
|
|
|
+ }*/
|
|
|
}
|
|
|
|
|
|
/**
|
|
@@ -199,4 +202,17 @@ public class OmsOrderController {
|
|
|
@PathVariable("merchantId") @Min(value = 1, message = "商家ID不能小于1") Long merchantId) {
|
|
|
return this.omsOrderClient.getOrderDetail(orderSn,merchantId);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 订单支付回调
|
|
|
+ */
|
|
|
+ @Authorize(enabled = false)
|
|
|
+ @PostMapping("/order/notify")
|
|
|
+ public void orderNotify(HttpServletRequest request, @RequestBody SxyNotifyParam param){
|
|
|
+ String merchantId = request.getHeader("merchantId");
|
|
|
+ String encryptKey = request.getHeader("encryptKey");
|
|
|
+ param.setMerchantId(merchantId);
|
|
|
+ param.setEncryptKey(encryptKey);
|
|
|
+ this.omsOrderClient.orderNotify(param);
|
|
|
+ }
|
|
|
}
|