AwardsMapper.java 763 B

1234567891011121314151617181920212223242526
  1. package com.example.mapper;
  2. import com.example.entity.Awards;
  3. import org.apache.ibatis.annotations.Insert;
  4. import org.apache.ibatis.annotations.Mapper;
  5. import org.apache.ibatis.annotations.Param;
  6. import org.apache.ibatis.annotations.Update;
  7. @Mapper
  8. public interface AwardsMapper {
  9. /**
  10. * 老师获奖信息上传
  11. * @param awards
  12. */
  13. @Insert("insert into teacherteam_system.awards (teacher_id, name, date, image) " +
  14. "values (#{teacherId},#{name},#{date},#{image});")
  15. void uploadAwards(Awards awards);
  16. /**
  17. * 修改教师获奖数量
  18. * @param id
  19. * @param
  20. */
  21. @Update("update teacherteam_system.teacher set awards_num = awards_num+1 where id = #{id}")
  22. void addAwardsNum(@Param("id") Long id);
  23. }