BaseStudentScholarshipReleaseServiceImpl.java 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. package com.xjrsoft.module.student.service.impl;
  2. import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
  3. import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
  4. import com.github.yulichang.base.MPJBaseServiceImpl;
  5. import com.xjrsoft.module.room.entity.RoomBed;
  6. import com.xjrsoft.module.student.dto.BaseStudentScholarshipReleasePageDto;
  7. import com.xjrsoft.module.student.entity.BaseStudentScholarshipApplicant;
  8. import com.xjrsoft.module.student.entity.BaseStudentScholarshipRelease;
  9. import com.xjrsoft.module.student.mapper.BaseStudentScholarshipApplicantMapper;
  10. import com.xjrsoft.module.student.mapper.BaseStudentScholarshipReleaseMapper;
  11. import com.xjrsoft.module.student.service.IBaseStudentScholarshipReleaseService;
  12. import com.xjrsoft.module.student.vo.BaseStudentScholarshipReleasePageVo;
  13. import lombok.AllArgsConstructor;
  14. import org.springframework.stereotype.Service;
  15. import java.util.List;
  16. /**
  17. * @title: 奖学金发放记录表
  18. * @Author dzx
  19. * @Date: 2024-07-25
  20. * @Version 1.0
  21. */
  22. @Service
  23. @AllArgsConstructor
  24. public class BaseStudentScholarshipReleaseServiceImpl extends MPJBaseServiceImpl<BaseStudentScholarshipReleaseMapper, BaseStudentScholarshipRelease> implements IBaseStudentScholarshipReleaseService {
  25. private BaseStudentScholarshipApplicantMapper applicantMapper;
  26. @Override
  27. public Page<BaseStudentScholarshipReleasePageVo> getPage(Page<BaseStudentScholarshipReleasePageVo> page, BaseStudentScholarshipReleasePageDto dto) {
  28. return this.baseMapper.getPage(page, dto);
  29. }
  30. @Override
  31. public Boolean remove(List<Long> ids) {
  32. List<BaseStudentScholarshipApplicant> applicantList = applicantMapper.selectBatchIds(ids);
  33. for (BaseStudentScholarshipApplicant applicant : applicantList) {
  34. UpdateWrapper<BaseStudentScholarshipApplicant> updateWrapper = new UpdateWrapper<>();
  35. updateWrapper.eq("id", applicant.getId());
  36. updateWrapper.setSql("review_status = null");
  37. applicantMapper.update(applicant, updateWrapper);
  38. }
  39. return this.removeBatchByIds(ids);
  40. }
  41. }