Mytest.java 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. package com.ruoyi.web;
  2. import com.ruoyi.RuoYiApplication;
  3. import com.ruoyi.system.controller.BusDeviceHistoryController;
  4. import com.ruoyi.system.domain.BusDeviceHistory;
  5. import com.ruoyi.system.domain.BusPatient;
  6. import com.ruoyi.system.mapper.BusDeviceHistoryMapper;
  7. import com.ruoyi.system.mapper.BusPatientMapper;
  8. import com.ruoyi.system.service.IBusDeviceHistoryService;
  9. import org.junit.Test;
  10. import org.junit.runner.RunWith;
  11. import org.springframework.beans.factory.annotation.Autowired;
  12. import org.springframework.boot.test.context.SpringBootTest;
  13. import org.springframework.test.context.junit4.SpringRunner;
  14. /**
  15. * @author zsl
  16. * @version 1.0.0
  17. * @ClassName Mytest.java
  18. * @Description TODO
  19. * @createTime 2022/6/1614:15
  20. */
  21. @SpringBootTest(classes = RuoYiApplication.class)
  22. @RunWith(SpringRunner.class)
  23. public class Mytest {
  24. @Autowired
  25. private BusPatientMapper patientMapper;
  26. @Autowired
  27. private BusDeviceHistoryMapper deviceHistoryMapper;
  28. @Autowired
  29. private BusDeviceHistoryController deviceHistoryController;
  30. @Autowired
  31. private IBusDeviceHistoryService busDeviceHistoryService;
  32. @Test
  33. public void test0001(){
  34. Long[] l1 = new Long[2];
  35. l1[0]= 5L;
  36. l1[1]=6L;
  37. System.out.println(deviceHistoryMapper.updateStatusByIds(l1,1));
  38. }
  39. @Test
  40. public void test0002(){
  41. Long[] l1 = new Long[5];
  42. l1[0]= 5L;
  43. l1[1]=6L;
  44. System.out.println(busDeviceHistoryService.cure(l1,l1));
  45. }
  46. }