| | |
| | | package com.ruoyi; |
| | | |
| | | import com.ruoyi.domain.ZfDoctor; |
| | | import com.ruoyi.domain.ZfEvent; |
| | | import com.ruoyi.service.ZfDoctorService; |
| | | import com.ruoyi.service.ZfEventService; |
| | | import org.junit.jupiter.api.Test; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private ZfEventService zfEventService; |
| | | |
| | | @Autowired |
| | | private ZfDoctorService zfDoctorService; |
| | | |
| | | @Test |
| | | public void insert(){ |
| | |
| | | } |
| | | |
| | | } |
| | | @Test |
| | | void insertDoctor(){ |
| | | List<String> l1 = Arrays.asList("牙科", "神经科","外科"); |
| | | List<String> l2 = Arrays.asList("牙痛", "头痛", "皮肤炎"); |
| | | List<String> l3 = Arrays.asList("一个月", "半个月", "一天"); |
| | | List<String> l4 = Arrays.asList("白芷10g", "中医药1", "中医药2"); |
| | | List<String> l5 = Arrays.asList("维生素C", "布洛芬", "皮康霜"); |
| | | List<String> l6 = Arrays.asList("缓解牙痛", "缓解头痛", "缓解皮肤炎"); |
| | | List<String> l7 = Arrays.asList("张三", "李四", "王五"); |
| | | List<String> l8 = Arrays.asList("专治牙痛", "专治头痛", "专治皮肤炎"); |
| | | |
| | | ZfDoctor zfDoctor=null; |
| | | int count=0; |
| | | for (int i = 0; i < 200; i++) { |
| | | count=count%3; |
| | | zfDoctor=new ZfDoctor(); |
| | | 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.setEffect(l6.get(count)); |
| | | zfDoctor.setSuitable(l7.get(count)); |
| | | zfDoctor.setRemark(l8.get(count)); |
| | | zfDoctor.setUrl("profile/upload/2023/03/19/test7_20230319222030A007.jpg"); |
| | | count++; |
| | | zfDoctorService.save(zfDoctor); |
| | | } |
| | | } |
| | | |
| | | } |