1234567891011121314151617181920212223242526 |
- package com.example.mapper;
- import com.example.entity.Awards;
- import org.apache.ibatis.annotations.Insert;
- import org.apache.ibatis.annotations.Mapper;
- import org.apache.ibatis.annotations.Param;
- import org.apache.ibatis.annotations.Update;
- @Mapper
- public interface AwardsMapper {
- /**
- * 老师获奖信息上传
- * @param awards
- */
- @Insert("insert into teacherteam_system.awards (teacher_id, name, date, image) " +
- "values (#{teacherId},#{name},#{date},#{image});")
- void uploadAwards(Awards awards);
- /**
- * 修改教师获奖数量
- * @param id
- * @param
- */
- @Update("update teacherteam_system.teacher set awards_num = awards_num+1 where id = #{id}")
- void addAwardsNum(@Param("id") Long id);
- }
|