import com.supwisdom.dlpay.api.bean.*;
import org.springframework.cloud.openfeign.FeignClient;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.*;
@FeignClient(value = "userProxy", url = "${payapi.url}")
public interface UserProxy {
@PostMapping("/api/user/biz_refund")
CardBizResponse bizRefund(String refno);
- @GetMapping("/api/user/biz_query")
- CardBizResponse bizQuery(String refno);
+ @RequestMapping(value = "/api/user/biz_query", method = RequestMethod.GET)
+ CardBizResponse bizQuery(@RequestParam("refno") String refno);
}
}
@PostMapping("/biz_refund")
- fun userBizRefund(@RequestBody refno: String): ResponseEntity<Any> {
+ fun userBizRefund(refno: String): ResponseEntity<Any> {
val result = CardBizResponse()
val transaction = transactionService.success(refno)
result.apply {
}
@GetMapping("/biz_query")
- fun userBizQuery(@RequestBody refno: String): ResponseEntity<Any> {
+ fun userBizQuery(refno: String): ResponseEntity<Any> {
val transaction = transactionService.findTransactionByRefno(refno)
?: throw TransactionCheckException(TradeErrorCode.TRANSACTION_NOT_EXISTS
, "交易不存在")