xiaoyong931011
2022-08-26 f33a410f4d65b200083c3a4b97d51c10ac38bbd9
src/main/java/cc/mrbird/febs/pay/controller/UnipayController.java
@@ -27,7 +27,9 @@
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONObject;
import cn.hutool.json.JSONUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -43,6 +45,8 @@
@Slf4j
@RestController
@RequestMapping(value = "/api/unipay")
@RequiredArgsConstructor
@Api(value = "ApiMallMemberController", tags = "支付接口类")
public class UnipayController {
    @Autowired
@@ -154,10 +158,10 @@
    @PostMapping(value = "getAgreeMentPaySms")
    public FebsResponse getAgreeMentPaySms(@RequestBody AgreeMentPaySmsDto agreeMentPaySmsDto) {
        String agreeMentPaySms = unipayService.getAgreeMentPaySms(agreeMentPaySmsDto);
        if("fail".equals(agreeMentPaySms)){
            return new FebsResponse().fail().message("获取失败");
        }else{
        if("JS000000".equals(agreeMentPaySms)){
            return new FebsResponse().success().message("获取成功");
        }else{
            return new FebsResponse().fail().message(agreeMentPaySms);
        }
    }
@@ -170,15 +174,14 @@
//    }
    @PostMapping(value = "/agreeMentPayCallBack")
    public String agreeMentPayCallBack(@RequestBody JSONObject jsonObjectStr){
        log.info("进入汇聚支付协议支付回调"+ JSONUtil.parseObj(jsonObjectStr));
        JSONObject agreeMentPayCallBackDto = JSONUtil.parseObj(jsonObjectStr);
        String data = agreeMentPayCallBackDto.get("data").toString();
    public String agreeMentPayCallBack(@RequestBody AgreeMentPayCallBackDto agreeMentPayCallBackDto){
        log.info("进入汇聚支付协议支付回调"+ JSONUtil.parseObj(agreeMentPayCallBackDto));
        String data = agreeMentPayCallBackDto.getData();
        JSONObject jsonObject = JSONUtil.parseObj(data);
        String orderNo = jsonObject.get("mch_order_no").toString();
        String pay_success_time = jsonObject.get("pay_success_time").toString();
        String jp_order_no = jsonObject.get("jp_order_no").toString();
        String biz_code = agreeMentPayCallBackDto.get("biz_code").toString();
        String biz_code = agreeMentPayCallBackDto.getBiz_code();
        log.info("进入汇聚支付协议支付回调"+orderNo+";"+pay_success_time+";"+biz_code+";"+jp_order_no);
        if("JS000000".equals(biz_code) && StrUtil.isNotBlank(orderNo)){