From a69aafe60ce001834b981778f12fd74d4af77e23 Mon Sep 17 00:00:00 2001 From: zqy <2522236926@qq.com> Date: 星期日, 23 六月 2024 22:04:42 +0800 Subject: [PATCH] 小医生修改&下载分享数据 --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java | 39 +++++++++++++++++++++++++++++++++++++++ 1 files changed, 39 insertions(+), 0 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java index 1cb8036..554f9ee 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java @@ -3,10 +3,17 @@ import com.ruoyi.common.core.controller.BaseController; import com.ruoyi.common.core.domain.AjaxResult; import com.ruoyi.domain.ShareMore; +import com.ruoyi.domain.ZfDoctor; +import com.ruoyi.domain.ZfDoctorDownload; +import com.ruoyi.service.ZInfoUserService; +import com.ruoyi.service.ZfDoctorDownloadService; +import com.ruoyi.service.ZfDoctorService; import com.ruoyi.service.ZfDoctorShareService; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; +import java.util.ArrayList; +import java.util.List; @RestController @RequestMapping("/ZfDoctorShare") @@ -14,6 +21,14 @@ @Resource ZfDoctorShareService zfDoctorShareService; + @Resource + ZfDoctorService zfDoctorService; + + @Resource + ZInfoUserService zInfoUserService; + + @Resource + ZfDoctorDownloadService zfDoctorDownloadService; /** * 鍒嗕韩鏁版嵁 */ @@ -46,5 +61,29 @@ return zfDoctorShareService.deleteZa(zfDoctor); } + /** + * 涓嬭浇鍒嗕韩鐨勬暟鎹� + */ + @PostMapping("/downloadDate") + public AjaxResult ifDownLoad(@RequestBody ZfDoctorDownload zfDoctorDownload){ + return zfDoctorDownloadService.addData(zfDoctorDownload); + } + + /** + * 灞曠ず涓嬭浇鍒嗕韩鐨勬暟鎹� + */ + @GetMapping("/all") + public List<ZfDoctor> data(ZfDoctorDownload zfDoctorDownload){ + List<ZfDoctorDownload> as = zfDoctorDownloadService.selectDoctorList(zfDoctorDownload); + List<ZfDoctor> bs = new ArrayList<>(); + for (ZfDoctorDownload a: as) { + if (zfDoctorService.getById(a.getDownloadContent()) != null) { + ZfDoctor ds = zfDoctorService.getById(a.getDownloadContent()); + ds.setShareId(a.getShareId()); + bs.add(ds); + } + } + return bs; + } } -- Gitblit v1.9.1