SearchMapperTest.java 2.01 KB
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);
}