|
|
@@ -0,0 +1,49 @@
|
|
|
+package com.coffee.admin;
|
|
|
+
|
|
|
+import com.coffee.bus.controller.BusHospitalController;
|
|
|
+import com.coffee.bus.controller.BusHospitalLogController;
|
|
|
+import com.coffee.bus.entity.BusHospitalEntity;
|
|
|
+import com.coffee.bus.entity.BusHospitalLogEntity;
|
|
|
+import com.coffee.bus.enums.HospitalLogEnum;
|
|
|
+import com.coffee.bus.service.LocalBusHospitalLogService;
|
|
|
+import com.coffee.bus.service.LocalBusHospitalService;
|
|
|
+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;
|
|
|
+
|
|
|
+import java.util.Date;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+/**
|
|
|
+ * @author lifang
|
|
|
+ * @version 1.0.0
|
|
|
+ * @ClassName BusHospitalTest.java
|
|
|
+ * @Description TODO
|
|
|
+ * @createTime 2022年03月19日 10:27:00
|
|
|
+ */
|
|
|
+@RunWith(SpringRunner.class)
|
|
|
+@SpringBootTest(classes = AdminApplication.class)
|
|
|
+public class BusHospitalLogTest {
|
|
|
+ @Autowired
|
|
|
+ private LocalBusHospitalLogService logService;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private BusHospitalLogController logController;
|
|
|
+ @Test
|
|
|
+ public void save(){
|
|
|
+ BusHospitalLogEntity logEntity = new BusHospitalLogEntity();
|
|
|
+ logEntity.setIp("192.168.100.32");
|
|
|
+ logEntity.setReceiveTime(new Date());
|
|
|
+ logEntity.setResult("success");
|
|
|
+ logEntity.setType(HospitalLogEnum.HEART);
|
|
|
+ logService.save(logEntity);
|
|
|
+ }
|
|
|
+
|
|
|
+ @Test
|
|
|
+ public void query(){
|
|
|
+ List<BusHospitalLogEntity> list = logService.list();
|
|
|
+ System.out.println(list);
|
|
|
+ }
|
|
|
+}
|