SearchDao.java
1.59 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.example.dahua.dao;
import com.example.dahua.bean.CheckIn;
import com.example.dahua.bean.Message;
import com.example.dahua.bean.User;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;
import java.util.List;
@Repository
public interface SearchDao {
/**
* 考勤推送存储过程
* @param checkIn
* @return
*/
int checkIn(CheckIn checkIn);
/**
* 获取学生信息
* @param cardNum
* @return
*/
List<User> selectUserByCardNum(String cardNum);
/**
* 获取卡号
* @param cardNo
* @return
*/
@Select("select Top(1) StudentNum from HS_LeaveExaminePassList where StudentNum= #{cardNo} and GETDATE() <![CDATA[ > ]]> LeaveTime and GETDATE() <![CDATA[ < ]]> ReturnTime")
String checkLeave(@Param("cardNo") String cardNo);
/**
* 获取学生父母电话
* @param cardNo
* @return
*/
@Select("select school_id , ParentMobile , name from SZ_V_School_Student where student_num = #{cardNo}")
Message selectByParentMobile(@Param("cardNo") String cardNo);
/**
* 插入短信发送表
* @param tableName
* @param schoolId
* @param mobile
* @param msg
*/
@Select("insert into ${tableName} (SchoolID,Mobile,Msg,tdtype,Status,IsNeedSend,SendTime,intime) values (#{schoolId},#{mobile},#{msg},1,0,1,GETDATE(),GETDATE())")
void insertMessage(@Param("tableName") String tableName,@Param("schoolId") String schoolId,@Param("mobile") String mobile,@Param("msg") String msg);
}