SearchMapperTest.java
2.01 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
package com.example.dahua.mapper;
import com.alibaba.fastjson.JSON;
import com.example.dahua.Tester;
import com.example.dahua.bean.CheckIn;
import com.example.dahua.bean.ShortMsg;
import com.example.dahua.dao.UserDao;
import com.example.dahua.service.UserService;
import com.example.dahua.utils.DateUtils;
import com.example.dahua.xiananDao.SearchMapper;
import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import java.util.Date;
/**
* TODO
*
* @author xuquan
* @date 2020/11/11 12:13
*/
public class SearchMapperTest extends Tester {
@Autowired
private SearchMapper searchMapper;
@Autowired
private UserDao userDao;
@Autowired
private UserService userService;
@Test
public void test(){
//有效刷卡调考勤存储过程
CheckIn checkIn = new CheckIn();
checkIn.setDeviceId("1212");
checkIn.setCardNo("24234");
checkIn.setFunNo(8);
checkIn.setFlag(1);
checkIn.setCheckTime("2020-11-11 12:19:12");
searchMapper.checkIn(checkIn);
System.out.println(JSON.toJSON(checkIn));
}
@Test
public void test2(){
userDao.checkLeave("234232");
System.out.println(JSON.toJSON(userDao.checkLeave("234232")));
userDao.selectByParentMobile("234232");
System.out.println(JSON.toJSON(userDao.selectByParentMobile("234232")));
// userDao.checkLeave("234232");
// System.out.println(JSON.toJSON(userDao.checkLeave("234232")));
}
@Test
public void test3(){
ShortMsg shortMsg = new ShortMsg();
String tableSuffix = DateUtils.date2String(new Date(), DateUtils.format);
shortMsg.setTableName("smsNew" + tableSuffix);
shortMsg.setSchoolId(23);
shortMsg.setMobile("124124242");
// userDao.insertMessage();
// System.out.println(JSON.toJSON(userDao.checkLeave("234232")));
}
// boolean uploadImgAndUserInfo(String file, String schoolId, String studentCode, String clint_type, int userType, String devid);
}