教育训练处考试制证系统后端
“djh”
2025-02-20 4bfab467a5645b9b0595ed4e2ee5970f0a449446
煤矿缴费修改
已修改5个文件
53 ■■■■ 文件已修改
exam-system/src/main/java/com/gkhy/exam/pay/mapper/CoalPayStudentMapper.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/CoalPayStudentService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayServiceImpl.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayStudentServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml 19 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
exam-system/src/main/java/com/gkhy/exam/pay/mapper/CoalPayStudentMapper.java
@@ -26,4 +26,7 @@
    void updateByCoalPayId(CoalPayStudent coalPayStudent);
    void updateByCoalPayIdAndStatus(CoalPayStudent payStudent);
    void updateByIdAndPayType(CoalPayStudent payStudent);
}
exam-system/src/main/java/com/gkhy/exam/pay/service/CoalPayStudentService.java
@@ -32,4 +32,6 @@
    void updateByCoalPayId(CoalPayStudent coalPayStudent);
    void updateByCoalPayIdAndStatus(CoalPayStudent payStudent);
    void updateByIdAndPayType(CoalPayStudent payStudent);
}
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayServiceImpl.java
@@ -250,10 +250,13 @@
            if (student.getPayStatus() == 1) {
                throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "请勿重新缴费");
            }
            if (student.getGovPayStatus() == 2){
                return student.getOrderId();
            }
            PayReqData payReqData = fillData(coalPayStudent, coalPay, coalCategories, coalTicket, 1, null);
            ResultVo resultVo = payUtils.sendApiPost(payReqData);
            ResultVo resultVo = payUtils.faqiV2(payReqData);
            if (resultVo.getRespcode().equals("BUS0000")) {
                //进行票据签名并校验
//                ResultVo resultVo1 = payUtils.uploadXml(resultVo.getRespdata().getOrderNo(), resultVo.getRespdata().getFileData());
@@ -261,17 +264,16 @@
//                  throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "签名验证错误");
//              }
                payStudent.setId(studentId);
                payStudent.setOrderId(resultVo.getRespdata().getOrderNo());
                payStudent.setGovPayStatus(1);
                payStudent.setOrderNo(resultVo.getRespdata().getOrderNo());
                payStudent.setOrderId(resultVo.getRespdata().getOrderId());
                payStudent.setGovPayStatus(2);
                payStudent.setPayCode(resultVo.getRespdata().getBillNo());
                coalPayStudentService.updateByCoalPayStudent(payStudent);
                coalPayStudentService.updateByIdAndPayType(payStudent);
                return resultVo.getRespdata().getOrderId();
            } else {
                throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, resultVo.getRespmsg());
            }
        } catch (BusinessException e) {
            throw new RuntimeException(e);
        } catch (IOException e) {
            throw new RuntimeException(e);
        } finally {
            if (lock.isLocked()) {
@@ -295,14 +297,18 @@
            if (coalPay == null) {
                throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "未找到相关缴费信息");
            }
            if (coalPayStudents.get(0).getGovPayStatus() == 2){
                return coalPayStudents.get(0).getOrderId();
            }
            CoalPayStudent payStudent = new CoalPayStudent();
            PayReqData payReqData = fillData(coalPayStudents, coalPay, coalCategories, coalTicket, 2, coalTeamPayReq);
            ResultVo resultVo = payUtils.sendApiPost(payReqData);
            ResultVo resultVo = payUtils.faqiV2(payReqData);
            if (resultVo.getRespcode().equals("BUS0000")) {
                payStudent.setCoalPayId(coalPay.getId());
                payStudent.setOrderId(resultVo.getRespdata().getOrderNo());
                payStudent.setGovPayStatus(1);
                payStudent.setOrderId(resultVo.getRespdata().getOrderId());
                payStudent.setOrderNo(resultVo.getRespdata().getOrderNo());
                payStudent.setGovPayStatus(2);
                payStudent.setPayCode(resultVo.getRespdata().getBillNo());
                coalPayStudentService.updateByCoalPayIdAndStatus(payStudent);
                return resultVo.getRespdata().getOrderId();
exam-system/src/main/java/com/gkhy/exam/pay/service/impl/CoalPayStudentServiceImpl.java
@@ -158,4 +158,9 @@
    public void updateByCoalPayIdAndStatus(CoalPayStudent payStudent) {
        coalPayStudentMapper.updateByCoalPayIdAndStatus(payStudent);
    }
    @Override
    public void updateByIdAndPayType(CoalPayStudent payStudent) {
        coalPayStudentMapper.updateByIdAndPayType(payStudent);
    }
}
exam-system/src/main/resources/mapper/pay/CoalPayStudentMapper.xml
@@ -106,9 +106,24 @@
    <update id="updateByCoalPayIdAndStatus">
        update coal_pay_student
        <trim prefix="SET" suffixOverrides=",">
            <if test="payType != null">pay_type = #{payType},</if>
            <if test="payCode != null">pay_code = #{payCode},</if>
            <if test="orderId!=null">order_id=#{orderId},</if>
            <if test="orderNo!=null">order_no = #{orderNo},</if>
            <if test="fileData!=null">file_data=#{fileData},</if>
            <if test="govPayStatus!=null">gov_pay_status=#{govPayStatus},</if>
        </trim>
        where coal_pay_id = #{coalPayId} and pay_status = 0
        where coal_pay_id = #{coalPayId} and pay_status = 0 and pay_type = 2
    </update>
    <update id="updateByIdAndPayType">
        update coal_pay_student
        <trim prefix="SET" suffixOverrides=",">
            <if test="payCode != null">pay_code = #{payCode},</if>
            <if test="orderId!=null">order_id=#{orderId},</if>
            <if test="orderNo!=null">order_no = #{orderNo},</if>
            <if test="fileData!=null">file_data=#{fileData},</if>
            <if test="govPayStatus!=null">gov_pay_status=#{govPayStatus},</if>
        </trim>
        where id = #{id} and pay_status = 0 and pay_type = 1
    </update>
    <select id="selectByCoalPayId" resultType="com.gkhy.exam.pay.entity.CoalPayStudent">