教育训练处考试制证系统后端
“djh”
2025-03-24 631ead73058002bafa9a5a47f092e85d87c9a5d8
exam-system/src/main/java/com/gkhy/exam/pay/controller/PaymentApiController.java
@@ -6,10 +6,7 @@
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.Base64;
@@ -39,7 +36,8 @@
                paymentService.paySuccess(orderNo, jsonObject.getDate("payTime"));
            }
            jsonObject1.put("orderNo", orderNo);
            jsonObject1.put("status", Boolean.TRUE);
            jsonObject1.put("status", "success");
            log.info("返回财政参数:"+jsonObject1);
            return jsonObject1;
        } catch (Exception e) {
            log.info("财政回调处理订单发生错误");
@@ -54,4 +52,15 @@
        String decodedString = new String(byteArray);
        return decodedString;
    }
    @GetMapping({"/confirm"})
    @ApiOperation("回调确认")
    public void notifyConfirm(String orderNo) {
        try {
            paymentService.notifyConfirm(orderNo);
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}