StuCollegeServiceImpl.java 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  1. package com.ruoyi.system.service.impl;
  2. import java.util.List;
  3. import com.ruoyi.common.utils.DateUtils;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Service;
  6. import com.ruoyi.system.mapper.StuCollegeMapper;
  7. import com.ruoyi.system.domain.StuCollege;
  8. import com.ruoyi.system.service.IStuCollegeService;
  9. /**
  10. * 学院Service业务层处理
  11. *
  12. * @author liql
  13. * @date 2021-03-23
  14. */
  15. @Service
  16. public class StuCollegeServiceImpl implements IStuCollegeService
  17. {
  18. @Autowired
  19. private StuCollegeMapper stuCollegeMapper;
  20. /**
  21. * 查询学院
  22. *
  23. * @param id 学院ID
  24. * @return 学院
  25. */
  26. @Override
  27. public StuCollege selectStuCollegeById(Long id)
  28. {
  29. return stuCollegeMapper.selectStuCollegeById(id);
  30. }
  31. /**
  32. * 查询学院列表
  33. *
  34. * @param stuCollege 学院
  35. * @return 学院
  36. */
  37. @Override
  38. public List<StuCollege> selectStuCollegeList(StuCollege stuCollege)
  39. {
  40. return stuCollegeMapper.selectStuCollegeList(stuCollege);
  41. }
  42. /**
  43. * 新增学院
  44. *
  45. * @param stuCollege 学院
  46. * @return 结果
  47. */
  48. @Override
  49. public int insertStuCollege(StuCollege stuCollege)
  50. {
  51. stuCollege.setCreateTime(DateUtils.getNowDate());
  52. return stuCollegeMapper.insertStuCollege(stuCollege);
  53. }
  54. /**
  55. * 修改学院
  56. *
  57. * @param stuCollege 学院
  58. * @return 结果
  59. */
  60. @Override
  61. public int updateStuCollege(StuCollege stuCollege)
  62. {
  63. stuCollege.setUpdateTime(DateUtils.getNowDate());
  64. return stuCollegeMapper.updateStuCollege(stuCollege);
  65. }
  66. /**
  67. * 批量删除学院
  68. *
  69. * @param ids 需要删除的学院ID
  70. * @return 结果
  71. */
  72. @Override
  73. public int deleteStuCollegeByIds(Long[] ids)
  74. {
  75. return stuCollegeMapper.deleteStuCollegeByIds(ids);
  76. }
  77. /**
  78. * 删除学院信息
  79. *
  80. * @param id 学院ID
  81. * @return 结果
  82. */
  83. @Override
  84. public int deleteStuCollegeById(Long id)
  85. {
  86. return stuCollegeMapper.deleteStuCollegeById(id);
  87. }
  88. }