教育训练处考试制证系统后端
“djh”
2025-02-05 cff3c43f216c6f01f675e4821832e15f2a77c57c
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayServiceImpl.java
@@ -12,6 +12,7 @@
import com.gkhy.exam.pay.service.CoalPayStudentService;
import com.gkhy.exam.pay.utils.PayUtils;
import com.gkhy.exam.pay.utils.ResultVo;
import com.gkhy.exam.pay.utils.Sign;
import com.ruoyi.common.constant.ResultConstants;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.domain.entity.SysDept;
@@ -20,6 +21,7 @@
import com.ruoyi.common.utils.SecurityUtils;
import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.mapper.SysDeptMapper;
import org.dom4j.Element;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
@@ -80,7 +82,7 @@
            //学员数据
            List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(pay.getId());
            List<CoalPayStudent> havePay = coalPayStudents.stream()
                    .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus().equals(1))
                    .filter(stu -> stu.getPayStatus() != null && stu.getPayStatus()==1)
                    .collect(Collectors.toList());
            coalPayRepDto.setTotalNum(coalPayStudents.size());
            coalPayRepDto.setHavePayNum(havePay.size());
@@ -184,6 +186,7 @@
        for (CoalPayStudent payStudent : coalPayStudents) {
            //封装学生基础信息
            CoalPayStudentRep coalPayStudentRep = new CoalPayStudentRep();
            coalPayStudentRep.setId(payStudent.getId());
            coalPayStudentRep.setName(payStudent.getName());
            coalPayStudentRep.setIdCard(payStudent.getIdCard());
            coalPayStudentRep.setPhone(payStudent.getPhone());
@@ -249,6 +252,11 @@
            ResultVo resultVo = payUtils.sendApiPost(payReqData);
            if (resultVo.getRespcode().equals("BUS0000")) {
                //进行票据签名并校验
                ResultVo resultVo1 = payUtils.uploadXml(resultVo.getRespdata().getOrderNo(), resultVo.getRespdata().getFileData());
              if (!resultVo1.getRespcode().equals("BUS0000")){
                  throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "签名验证错误");
              }
                payStudent.setId(studentId);
                payStudent.setOrderId(resultVo.getRespdata().getOrderNo());
                payStudent.setGovPayStatus(1);