package com.ruoyi.web;

import com.ruoyi.RuoYiApplication;
import com.ruoyi.system.controller.BusDeviceHistoryController;
import com.ruoyi.system.domain.BusDeviceHistory;
import com.ruoyi.system.domain.BusPatient;
import com.ruoyi.system.mapper.BusDeviceHistoryMapper;
import com.ruoyi.system.mapper.BusPatientMapper;
import com.ruoyi.system.service.IBusDeviceHistoryService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author zsl
 * @version 1.0.0
 * @ClassName Mytest.java
 * @Description TODO
 * @createTime 2022/6/1614:15
 */

@SpringBootTest(classes = RuoYiApplication.class)
@RunWith(SpringRunner.class)
public class Mytest {
    @Autowired
    private BusPatientMapper patientMapper;
    @Autowired
    private BusDeviceHistoryMapper deviceHistoryMapper;
    @Autowired
    private BusDeviceHistoryController deviceHistoryController;
    @Autowired
    private IBusDeviceHistoryService busDeviceHistoryService;

    @Test
    public void test0001(){

        Long[] l1 = new Long[2];
        l1[0]= 5L;
        l1[1]=6L;

        System.out.println(deviceHistoryMapper.updateStatusByIds(l1,1));
    }
    @Test
    public void test0002(){

        Long[] l1 = new Long[5];
        l1[0]= 5L;
        l1[1]=6L;

        System.out.println(busDeviceHistoryService.cure(l1,l1));
    }
}
