| | |
| | | package com.gkhy.exam.pay.service.impl; |
| | | |
| | | import com.alibaba.fastjson2.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | |
| | | if (nonCoalStuRep.getPayStatus() == 1) { |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "已缴费请勿重复缴费"); |
| | | } |
| | | if (nonCoalStuRep.getGovPayStatus() == 2 && nonCoalStuRep.getPayStatus() == 0) { |
| | | try { |
| | | JSONObject result = payUtils.query(nonCoalStuRep.getOrderNo()); |
| | | String status = result.getString("status"); |
| | | if (("1").equals(status)) { |
| | | |
| | | nonCoalPayStudentMapper.update(null, Wrappers.<NonCoalPayStudent>lambdaUpdate() |
| | | .set(NonCoalPayStudent::getPayStatus, 1) |
| | | .set(NonCoalPayStudent::getPayTime, result.getDate("payTime")) |
| | | .eq(NonCoalPayStudent::getOrderNo, nonCoalStuRep.getOrderNo()).eq(NonCoalPayStudent::getDelFlag, 0) |
| | | .eq(NonCoalPayStudent::getPayStatus, 0)); |
| | | } else if (status == null) { |
| | | log.error("查询财政订单失败:" + result.getString("respmsg") + ",错误编码:" + result.getString("respcode")); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("查询财政订单失败:" + e.getMessage()); |
| | | |
| | | } |
| | | } |
| | | |
| | | return nonCoalStuRep; |
| | | } |