UserDao.java
1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.sincere.haikang.dao;
import com.sincere.haikang.bean.StudentBean;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Repository;
import java.util.List;
@Mapper
@Repository
public interface UserDao {
/**
* 没有记录取最新十条下发
* @return
*/
@Select("select top (10) * from HS_StudentUpdateCard order by AddTime desc")
List<StudentBean> getStudents();
/**
* 获取所有的学生
* @return
*/
@Select("select * from HS_StudentUpdateCard where ID > #{id} order by AddTime desc")
List<StudentBean> getAllStudents(@Param("id")long id);
@Select("select * from SZ_V_School_Student where school_id = #{school_id}")
List<StudentBean> getAllStudentsWithSchoolId(@Param("school_id")String school_id);
@Update("update SZ_V_School_Student set name = #{name} where student_id = #{student_id}")
void updateTest(@Param("student_id")String student_id,@Param("name")String name);
}