| | |
| | | @Override |
| | | public AjaxResult deleteCoalPayByIds(Long[] ids) { |
| | | for (Long id : ids) { |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayIdAndPayStatus(id, 1); |
| | | List<CoalPayStudent> coalPayStudents = coalPayStudentService.selectByCoalPayId(id); |
| | | if (!CollectionUtils.isEmpty(coalPayStudents)) { |
| | | throw new BusinessException(this.getClass(), ResultConstants.BUSINESS_ERROR, "已有学员完成缴费,请勿删除"); |
| | | } |
| | |
| | | CoalPayStudent coalPayStudent = new CoalPayStudent(); |
| | | coalPayStudent.setCoalPayId(coalPayTypeReq.getCoalPayId()); |
| | | coalPayStudent.setPayType(2); |
| | | coalPayStudent.setGovPayStatus(0); |
| | | coalPayStudentService.updateByCoalPayId(coalPayStudent); |
| | | } |
| | | return i; |