zqy
2024-07-25 c8a96c5e4ce5d5013a5ec508e2422f40ecdc311e
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java
@@ -1,7 +1,11 @@
package com.ruoyi.web.controller.zhang;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.text.Convert;
import com.ruoyi.common.utils.MapUtils;
import com.ruoyi.common.utils.ServletUtils;
import com.ruoyi.domain.ShareMore;
import com.ruoyi.domain.ZfDoctor;
import com.ruoyi.domain.ZfDoctorDownload;
@@ -13,7 +17,11 @@
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.stream.Collectors;
import static com.ruoyi.common.core.page.TableSupport.*;
@RestController
@RequestMapping("/ZfDoctorShare")
@@ -42,8 +50,9 @@
     */
    @PostMapping("/getInfoByUserId")
    public AjaxResult empowerGetInfo(@RequestBody ShareMore zfDoctor){
        return zfDoctorShareService.listByFidAid(zfDoctor);
        Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1);
        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
        return  zfDoctorShareService.listByFidAid(zfDoctor,pageNo,pageSize) ;
    }
    /**
@@ -51,7 +60,9 @@
     */
    @GetMapping("/getInfoByShareId")
    public AjaxResult empowerGetInfo2(){
        return zfDoctorShareService.listByUserId();
        Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1);
        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
        return zfDoctorShareService.listUserId(pageNo ,pageSize);
    }
    /**
     * 根据userId和shareId收回已经授权给那些人
@@ -73,17 +84,10 @@
     * 展示下载分享的数据
     */
    @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;
    public AjaxResult data(ZfDoctorDownload zfDoctorDownload){
        Integer pageNo = Convert.toInt(ServletUtils.getParameter(PAGE_NO), 1);
        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
      return zfDoctorDownloadService.selectDoctorList(zfDoctorDownload,pageNo ,pageSize);
    }
}