| | |
| | | package com.ruoyi; |
| | | |
| | | import com.ruoyi.domain.ZfDoctor; |
| | | import com.ruoyi.domain.ZfEquipment; |
| | | import com.ruoyi.domain.ZfEvent; |
| | | import com.ruoyi.service.ZfDoctorService; |
| | | import com.ruoyi.service.ZfEquipmentService; |
| | | import com.ruoyi.service.ZfEventService; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private ZfDoctorService zfDoctorService; |
| | | |
| | | @Autowired |
| | | private ZfEquipmentService zfEquipmentService; |
| | | |
| | | @Test |
| | | public void insert(){ |
| | |
| | | zfDoctor.setType(l1.get(count)); |
| | | zfDoctor.setSymptom(l2.get(count)); |
| | | zfDoctor.setDuration(l3.get(count)); |
| | | zfDoctor.setCMedical(l4.get(count)); |
| | | zfDoctor.setWMedical(l5.get(count)); |
| | | zfDoctor.setCmedical(l4.get(count)); |
| | | zfDoctor.setWmedical(l5.get(count)); |
| | | zfDoctor.setEffect(l6.get(count)); |
| | | zfDoctor.setSuitable(l7.get(count)); |
| | | zfDoctor.setRemark(l8.get(count)); |
| | |
| | | } |
| | | } |
| | | |
| | | @Test |
| | | void insertEquipment(){ |
| | | List<String> l1 = Arrays.asList("电视", "电冰箱","电脑"); |
| | | List<String> l2 = Arrays.asList("2020-11-11", "2021-11-12", "2022-12-08"); |
| | | List<String> l3 = Arrays.asList("张三", "李四", "王五"); |
| | | List<String> l4 = Arrays.asList("夏普液晶电视", "西门子电冰箱", "苹果电脑"); |
| | | List<String> l5 = Arrays.asList("客厅", "厨房", "卧室"); |
| | | List<String> l6 = Arrays.asList("4k超高清", "双开门", "M2芯片"); |
| | | |
| | | |
| | | ZfEquipment zfEquipment=null; |
| | | int count=0; |
| | | for (int i = 0; i < 200; i++) { |
| | | count=count%3; |
| | | zfEquipment=new ZfEquipment(); |
| | | zfEquipment.setName(l1.get(count)); |
| | | zfEquipment.setBuyer(l3.get(count)); |
| | | zfEquipment.setContent(l4.get(count)); |
| | | zfEquipment.setLocation(l5.get(count)); |
| | | zfEquipment.setRemark(l6.get(count)); |
| | | zfEquipment.setUrl("profile/upload/2023/03/19/test7_20230319222030A007.jpg"); |
| | | count++; |
| | | zfEquipmentService.save(zfEquipment); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | } |