zhangmei
2025-02-21 c460ee1e8adb9a31d39fbea14f720dc21d56400e
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package com.ruoyi.web.controller.api;
 
import com.ruoyi.system.service.TBillService;
import com.taxi591.bankapi.dto.CovertPayBackResult;
import com.taxi591.bankapi.service.BankService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;
 
import javax.servlet.http.HttpServletRequest;
 
@RestController
@RequestMapping("open/bank")
public class BankOutController {
 
    @Autowired
    BankService bankService;
 
    @Autowired
    TBillService tBillService;
    @PostMapping(value = "payCallback")
    public @ResponseBody String payCallback(HttpServletRequest request){
        CovertPayBackResult result = bankService.covertPayCallBack(request, (billRequest) -> {
            tBillService.completePay(billRequest);
            return true;
        });
        return result.getBack();
    }
 
 
 
 
}