From b4895bdc5d9268e55c0023b92cc7c2d68ba33e46 Mon Sep 17 00:00:00 2001 From: feige <791364011@qq.com> Date: 星期二, 05 十一月 2024 10:07:37 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java | 42 +++++++++++++++++------------------------- 1 files changed, 17 insertions(+), 25 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 cab2981..cd26d0c 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 @@ -5,8 +5,7 @@ import com.ruoyi.common.core.text.Convert; import com.ruoyi.common.utils.ServletUtils; import com.ruoyi.domain.ShareMore; -import com.ruoyi.domain.ZfDoctor; -import com.ruoyi.domain.ZfDoctorDownload; +import com.ruoyi.domain.ZfDownload; import com.ruoyi.service.ZInfoUserService; import com.ruoyi.service.ZfDoctorDownloadService; import com.ruoyi.service.ZfDoctorService; @@ -14,11 +13,8 @@ import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; -import java.util.ArrayList; -import java.util.List; -import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM; -import static com.ruoyi.common.core.page.TableSupport.PAGE_SIZE; +import static com.ruoyi.common.core.page.TableSupport.*; @RestController @RequestMapping("/ZfDoctorShare") @@ -39,18 +35,18 @@ */ @PostMapping("/share") public AjaxResult share(@RequestBody ShareMore zfDoctor){ + zfDoctor.setSysMenuId(2019L); return zfDoctorShareService.saveZa(zfDoctor); } - /** * 鏍规嵁UserId鍜屽垎浜汉shareId鏌ョ湅宸茬粡鎺堟潈缁欓偅浜涗汉閭d簺鏁版嵁 */ @PostMapping("/getInfoByUserId") public AjaxResult empowerGetInfo(@RequestBody ShareMore zfDoctor){ - Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); + zfDoctor.setSysMenuId(2019L); + Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1); Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); - - return zfDoctorService.selectListById(zfDoctorShareService.listByFidAid(zfDoctor),pageNum,pageSize); + return zfDoctorShareService.listByFidAid(zfDoctor,pageNo,pageSize) ; } /** @@ -58,13 +54,16 @@ */ @GetMapping("/getInfoByShareId") public AjaxResult empowerGetInfo2(){ - return zfDoctorShareService.listUserId(); + Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1); + Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); + return zfDoctorShareService.listUserId(pageNo ,pageSize); } /** * 鏍规嵁userId鍜宻hareId鏀跺洖宸茬粡鎺堟潈缁欓偅浜涗汉 */ @PostMapping("/deleteInfoByUserId") public AjaxResult deleteEmpower(@RequestBody ShareMore zfDoctor){ + zfDoctor.setSysMenuId(2019L); return zfDoctorShareService.deleteZa(zfDoctor); } @@ -72,27 +71,20 @@ * 涓嬭浇鍒嗕韩鐨勬暟鎹� */ @PostMapping("/downloadDate") - public AjaxResult ifDownLoad(@RequestBody ZfDoctorDownload zfDoctorDownload){ - return zfDoctorDownloadService.addData(zfDoctorDownload); + public AjaxResult ifDownLoad(@RequestBody ZfDownload zfDownload){ + zfDownload.setSysMenuId(2019L); + return zfDoctorDownloadService.addData(zfDownload); } /** * 灞曠ず涓嬭浇鍒嗕韩鐨勬暟鎹� */ @GetMapping("/all") - public List<ZfDoctor> data(ZfDoctorDownload zfDoctorDownload){ - Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1); + public AjaxResult data(ZfDownload zfDownload){ + zfDownload.setSysMenuId(2019L); + Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1); Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10); - List<ZfDoctorDownload> as = zfDoctorDownloadService.selectDoctorList(zfDoctorDownload,pageNum,pageSize); - 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; + return zfDoctorDownloadService.selectDoctorList(zfDownload,pageNo ,pageSize); } } -- Gitblit v1.9.1