From 780fa6d4016c6e616bbb4b3d29d33dbf3a40cbd6 Mon Sep 17 00:00:00 2001
From: zqy <2522236926@qq.com>
Date: 星期日, 07 七月 2024 10:22:12 +0800
Subject: [PATCH] 修改bug&新加配偶接口

---
 zhang-content/src/main/java/com/ruoyi/domain/Meeting.java                             |    3 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZfDoctorShareController.java |   15 ++++-
 zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java                    |    3 +
 zhang-content/src/main/java/com/ruoyi/service/ZfDoctorDownloadService.java            |    2 
 zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java          |   20 ++++--
 zhang-content/src/main/java/com/ruoyi/service/ZfDoctorShareService.java               |    4 
 zhang-content/src/main/java/com/ruoyi/service/impl/LiveStreamingServiceImpl.java      |    4 +
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorDownloadServiceImpl.java   |    2 
 zhang-content/src/main/java/com/ruoyi/domain/LiveStreaming.java                       |    6 ++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorShareServiceImpl.java      |   26 +++++---
 zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java                           |    4 
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java     |   41 +++++++++++--
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java      |    1 
 zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java                           |    7 ++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java           |   28 +++++++++
 15 files changed, 128 insertions(+), 38 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
index b712b72..50fef41 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/system/SysUserController.java
@@ -148,6 +148,7 @@
         us.setRoleId(user.getRoleId());
         us.setSex(user.getSex());
         us.setStatus(user.getStatus());
+        us.setRemark(user.getRemark());
         userService.updateUser(us);
 
   //      System.out.println(user.getFamilyId());
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
index d8a85b6..e4e2075 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZInfoUserController.java
@@ -2,6 +2,7 @@
 
 
 import com.fasterxml.jackson.annotation.JsonFormat;
+import com.mysql.cj.x.protobuf.MysqlxDatatypes;
 import com.ruoyi.common.annotation.Log;
 import com.ruoyi.common.core.controller.BaseController;
 import com.ruoyi.common.core.domain.AjaxResult;
@@ -12,6 +13,7 @@
 import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.ZInfoUser;
+import com.ruoyi.domain.ZfDoctor;
 import com.ruoyi.domain.ZfRelation;
 
 import com.ruoyi.domain.dto.Genealogy;
@@ -28,10 +30,7 @@
 import javax.annotation.Resource;
 import javax.servlet.http.HttpServletResponse;
 import javax.websocket.server.PathParam;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Date;
-import java.util.List;
+import java.util.*;
 import java.util.regex.Pattern;
 
 import static com.ruoyi.common.core.page.TableSupport.PAGE_NUM;
@@ -218,15 +217,41 @@
                 sex = 1;
             }
             List<ZInfoUser> zInfoUsers = zInfoUserService.getDataBySex(sex);
-            List<Long> satisfyIds = new ArrayList<>();
+            List<HashMap<Long,String>> satisfyIds = new ArrayList<>();
+            HashMap<Long,String> bs = new HashMap<>();
             for (ZInfoUser zInfoUser:zInfoUsers) {
-                if (zInfoUser.getIsMyFamily() == 1)
-                    if (!zInfoUserService.findByuid(zInfoUser.getUserId(), tpfid)){
-                        satisfyIds.add(zInfoUser.getUserId());
+                    if (!zInfoUserService.findByuid(zInfoUser.getUserId(), tpfid) && (zInfoUser.getMaritalStatus() == null || zInfoUser.getMaritalStatus() != 1)){
+                        bs.put(zInfoUser.getUserId(),zInfoUser.getNickName());
+
                     }
+
             }
+            satisfyIds.add(bs);
             return AjaxResult.success(satisfyIds);
         }
+
+    @GetMapping("/sex/{sex}")
+    public AjaxResult findBySex(@PathVariable("sex")  Integer sex)
+    {
+//            Integer sex = zInfoUserService.getInfoById(tpfid).getSex();
+        //sex == 0 -> 鐢�
+        if (sex == 1){
+            sex = 0;
+        }
+        else if (sex == 0){
+            sex = 1;
+        }
+        List<ZInfoUser> zInfoUsers = zInfoUserService.getDataBySex(sex);
+        List<HashMap<Long,String>> satisfyIds = new ArrayList<>();
+        HashMap<Long,String> bs = new HashMap<>();
+        for (ZInfoUser zInfoUser:zInfoUsers) {
+            if (zInfoUser.getMaritalStatus() ==null || zInfoUser.getMaritalStatus() != 1 )
+                bs.put(zInfoUser.getUserId(),zInfoUser.getNickName());
+
+        }
+        satisfyIds.add(bs);
+        return AjaxResult.success(satisfyIds);
+    }
     /**
      * 鏍规嵁鐢ㄦ埛id鍒ゆ柇鏄惁鏄紓鎬�
      */
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 554f9ee..cab2981 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
@@ -2,6 +2,8 @@
 
 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.ServletUtils;
 import com.ruoyi.domain.ShareMore;
 import com.ruoyi.domain.ZfDoctor;
 import com.ruoyi.domain.ZfDoctorDownload;
@@ -14,6 +16,9 @@
 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;
 
 @RestController
 @RequestMapping("/ZfDoctorShare")
@@ -42,8 +47,10 @@
      */
     @PostMapping("/getInfoByUserId")
     public AjaxResult empowerGetInfo(@RequestBody ShareMore zfDoctor){
+        Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 1);
+        Integer pageSize = Convert.toInt(ServletUtils.getParameter(PAGE_SIZE), 10);
 
-        return zfDoctorShareService.listByFidAid(zfDoctor);
+        return zfDoctorService.selectListById(zfDoctorShareService.listByFidAid(zfDoctor),pageNum,pageSize);
     }
 
     /**
@@ -51,7 +58,7 @@
      */
     @GetMapping("/getInfoByShareId")
     public AjaxResult empowerGetInfo2(){
-        return zfDoctorShareService.listByUserId();
+        return zfDoctorShareService.listUserId();
     }
     /**
      * 鏍规嵁userId鍜宻hareId鏀跺洖宸茬粡鎺堟潈缁欓偅浜涗汉
@@ -74,7 +81,9 @@
      */
     @GetMapping("/all")
     public List<ZfDoctor> data(ZfDoctorDownload zfDoctorDownload){
-        List<ZfDoctorDownload> as = zfDoctorDownloadService.selectDoctorList(zfDoctorDownload);
+        Integer pageNum = Convert.toInt(ServletUtils.getParameter(PAGE_NUM), 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) {
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/LiveStreaming.java b/zhang-content/src/main/java/com/ruoyi/domain/LiveStreaming.java
index 24ceaca..f9b2846 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/LiveStreaming.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/LiveStreaming.java
@@ -89,4 +89,10 @@
     @JsonFormat(pattern = "HH:mm:ss")
     private Date time2;
 
+    /**
+     * 鍙绾崇殑鏈�澶т汉鏁�
+     */
+    private Integer maxPerson;
+
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/Meeting.java b/zhang-content/src/main/java/com/ruoyi/domain/Meeting.java
index 7a5f4ce..706fc24 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/Meeting.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/Meeting.java
@@ -76,7 +76,7 @@
     /**
      * 鏄惁鎽嗘斁姘寸墝
      */
-    @Excel(name = "鏄惁鎽嗘斁姘寸墝")
+    @Excel(name = "鏄惁鎽嗘斁姘寸墝(1:鏄� 0:鍚�)")
     private Integer isPlacebrand;
     /**
      * 鑱旂郴浜�
@@ -91,7 +91,6 @@
     /**
      * 鐘舵��
      */
-    @Excel(name = "鐘舵��")
     private Integer statu;
     /**
      * 鐢熸垚鏃堕棿
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java b/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java
index ecef979..90d792f 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZSelfNote.java
@@ -37,21 +37,25 @@
     /**
      * 鍦扮偣
      */
+    @Excel(name = "鍦扮偣")
     private String address;
 
     /**
      * 鏍囬
      */
+    @Excel(name = "浜嬩欢鏍囬")
     private String title;
 
     /**
      * 澶囨敞
      */
+    @Excel(name = "澶囨敞")
     private String remark;
 
     /**
      * 浜虹墿
      */
+    @Excel(name = "浜虹墿")
     private String people;
 
     /**
@@ -63,13 +67,14 @@
     /**
      * 鍙戠敓鏃堕棿
      */
-    @Excel(name = "鍙戠敓鏃堕棿",dateFormat = "yyyy-MM-dd")
+    @Excel(name = "鏃堕棿",dateFormat = "yyyy-MM-dd")
     @JsonFormat(pattern = "yyyy-MM-dd")
     private Date happenTime;
 
     /**
      * 鐢靛瓙鏂囦欢璺緞
      */
+    @Excel(name = "鐢靛瓙鏂囦欢璺緞")
     private String url;
 
     @TableField(exist = false)
diff --git a/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java b/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
index 17d4bfb..4ea9d8b 100644
--- a/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
+++ b/zhang-content/src/main/java/com/ruoyi/domain/ZfContact.java
@@ -31,9 +31,9 @@
     private Long id;
 
     /**
-     * 鎴愬憳濮撳悕
+     * 瀹朵汉濮撳悕
      */
-    @Excel(name = "鎴愬憳濮撳悕")
+    @Excel(name = "瀹朵汉濮撳悕")
     private String myName;
 
     /**
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorDownloadService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorDownloadService.java
index 95203ea..c60dd4d 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorDownloadService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorDownloadService.java
@@ -12,7 +12,7 @@
 
     AjaxResult deleteData(Long[] ids);
 
-    List<ZfDoctorDownload> selectDoctorList(ZfDoctorDownload zfDoctorDownload);
+    List<ZfDoctorDownload> selectDoctorList(ZfDoctorDownload zfDoctorDownload , Integer pageNum, Integer pageSize);
 
 
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
index 3f6e2ea..354e469 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorService.java
@@ -1,6 +1,7 @@
 package com.ruoyi.service;
 
 
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.extension.service.IService;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.domain.ZfDoctor;
@@ -36,4 +37,6 @@
     AjaxResult deleteData(Long[] ids);
 
     AjaxResult listType();
+
+    AjaxResult selectListById(List<Long> ids, Integer pageNum, Integer pageSize);
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorShareService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorShareService.java
index 9f4d1d3..b10445d 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorShareService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfDoctorShareService.java
@@ -15,13 +15,13 @@
 
     AjaxResult saveZa(ShareMore zfDoctor);
 
-    AjaxResult listByFidAid(ShareMore zfDoctor);
+    List<Long> listByFidAid(ShareMore zfDoctorInteger);
 
     AjaxResult deleteZa(ShareMore zfDoctor);
 
     AjaxResult listByUserId();
 
-    List<ZfDoctor> listUserId(Long shareId);
+    AjaxResult listUserId();
 
     Long getShareId(ZfDoctorDownload zfDoctorDownload);
 
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/LiveStreamingServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/LiveStreamingServiceImpl.java
index 0d52f65..972349f 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/LiveStreamingServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/LiveStreamingServiceImpl.java
@@ -100,6 +100,9 @@
         if(list.size()>0){
             throw new RuntimeException("璇峰嬁鏂板閲嶅鏁版嵁");
         }
+        if (liveStreaming.getMaxPerson() > 120){
+            throw new RuntimeException("鍙绾充汉鏁版殏鏃舵渶澶氫负120浜�");
+        }
 
         if (save(liveStreaming)) {
             EsModel esModel = new EsModel();
@@ -111,6 +114,7 @@
             esModel.setBy1(liveStreaming.getTitle());
             esModel.setBy2(liveStreaming.getApplyPerson());
             esModel.setBy3(liveStreaming.getRoomId());
+
             //杩欓噷瀛樺偍鏌ヨ璇︽儏鐨勮矾寰�
             esModel.setBy5("/zLiveStreaming");
 //            esModel.setFid(familyId);
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java
index 1c589ab..102385f 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZSelfNoteServiceImpl.java
@@ -5,6 +5,7 @@
 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
+import com.ruoyi.common.core.domain.entity.EsModel;
 import com.ruoyi.common.core.domain.entity.SysUser;
 import com.ruoyi.common.utils.MapUtils;
 import com.ruoyi.common.utils.SecurityUtils;
@@ -12,16 +13,15 @@
 import com.ruoyi.common.utils.poi.ExcelUtil;
 import com.ruoyi.domain.ZSelfNote;
 import com.ruoyi.mapper.ZSelfNoteMapper;
+import com.ruoyi.service.EsService;
 import com.ruoyi.service.ZSelfNoteService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.HashMap;
-import java.util.List;
+import javax.annotation.Resource;
+import java.util.*;
 
 /**
  * <p>
@@ -35,7 +35,10 @@
 public class ZSelfNoteServiceImpl extends ServiceImpl<ZSelfNoteMapper, ZSelfNote> implements ZSelfNoteService {
 
     @Autowired
-    ZSelfNoteServiceImpl zSelfNoteService;
+    ZSelfNoteService zSelfNoteService;
+
+    @Resource
+    private EsService esSer;
 
     private LambdaQueryWrapper<ZSelfNote> uniqueCondition(ZSelfNote zSelfNote) {
         LambdaQueryWrapper<ZSelfNote> lqw = new LambdaQueryWrapper<>();
@@ -137,7 +140,12 @@
         assert dataList != null;
 
         for (ZSelfNote zSelfNote : dataList) {
-            zSelfNoteService.mySave(zSelfNote);
+
+            if (zSelfNote.getTitle().length() != 0 && zSelfNote.getPeople().length() !=0){
+                mySave(zSelfNote);}
+            else {
+                throw new RuntimeException("鏈夋暟鎹殑鏍囬鎴栦汉鐗╀负绌�");
+            }
         }
 
         return AjaxResult.success();
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorDownloadServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorDownloadServiceImpl.java
index 2e9a92c..b542da7 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorDownloadServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorDownloadServiceImpl.java
@@ -51,7 +51,7 @@
         return lqw;
     }
     @Override
-    public List<ZfDoctorDownload> selectDoctorList(ZfDoctorDownload zfDoctorDownload) {
+    public List<ZfDoctorDownload> selectDoctorList(ZfDoctorDownload zfDoctorDownload , Integer pageNum, Integer pageSize) {
         ZInfoUser myself = zInfoUserService.getMyself();
         LambdaQueryWrapper<ZfDoctorDownload> lqw = buildCondition(zfDoctorDownload,myself.getUserId());
         List<ZfDoctorDownload> beanRecords = list(lqw);
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
index 9868b9b..eeb1f45 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java
@@ -439,6 +439,32 @@
         return lqw;
     }
 
+    public LambdaQueryWrapper<ZfDoctor> buildCondition2(List<Long> ids) {
+        LambdaQueryWrapper<ZfDoctor> lqw = new LambdaQueryWrapper<>();
+
+            lqw.eq(ZfDoctor::getId, ids);
+
+        return lqw;
+    }
+    @Override
+    public AjaxResult selectListById(List<Long> ids, Integer pageNum, Integer pageSize) {
+        List<ZfDoctor> lqw2 = new ArrayList<>();
+
+        LambdaQueryWrapper<ZfDoctor> lqw = buildCondition2(ids);
+        List<ZfDoctor> bb = list(lqw);
+        System.out.println("15052222254"+bb);
+
+        Page<ZfDoctor> zfDoctorPage = new Page<>(pageNum, pageSize);
+        Page<ZfDoctor> pageResult = page(zfDoctorPage, lqw);
+        List<ZfDoctor> beanRecords = pageResult.getRecords();//寰楀埌鏌ヨ鍑烘潵鐨勬暟鎹�
+        System.out.println(beanRecords);
+
+        HashMap<String, Object> data = MapUtils.getResult(pageResult, beanRecords);
+
+
+        return AjaxResult.success(data);
+//    }
+
 //        private List<Long> buildCondition1(){
 //        List<ZfDoctorShare> authority1 = zfDoctorShareService.getAuthority();
 //        List<Long> idList1 = authority1.stream().filter(auth -> auth.getShareContent().toString().equals(DOCTOR_LIST)).map(ZfDoctorShare::getShareId).collect(Collectors.toList());
@@ -455,4 +481,4 @@
 //    }
 
 
-}
\ No newline at end of file
+}}
\ No newline at end of file
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorShareServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorShareServiceImpl.java
index b2a34d5..08c6d9a 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorShareServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorShareServiceImpl.java
@@ -1,9 +1,12 @@
 package com.ruoyi.service.impl;
 
+import com.baomidou.mybatisplus.core.conditions.Wrapper;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.domain.entity.SysUser;
+import com.ruoyi.common.utils.MapUtils;
 import com.ruoyi.common.utils.SecurityUtils;
 import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.domain.*;
@@ -89,10 +92,10 @@
      * 鏍规嵁UserId鍜屽垎浜汉shareId鏌ョ湅宸茬粡鎺堟潈缁欓偅浜涗汉閭d簺鏁版嵁
      */
     @Override
-    public AjaxResult listByFidAid(ShareMore zfDoctor) {
+    public List<Long> listByFidAid(ShareMore zfDoctor) {
         //鎵惧埌瀵瑰簲鐨勮祴浜堟暟鎹殑鐢ㄦ埛浠ュ強鏁版嵁鍐呭
         Long [] shareIds = zfDoctor.getShareIds();
-        List<ZfDoctor> beanRecord3 = new ArrayList<>();
+        List<Long> beanRecord3 = new ArrayList<>();
         for (Long shareId : shareIds) {
             {
                 LambdaQueryWrapper<ZfDoctorShare> lqw = new LambdaQueryWrapper<>();
@@ -100,13 +103,12 @@
                         .eq(ZfDoctorShare::getUserId, getUserId());
                 List<ZfDoctorShare> beanRecords = list(lqw);
                 for (ZfDoctorShare beanRecord : beanRecords ) {
-                    beanRecord3.add(zfDoctorService.getById(beanRecord.getShareContent()));
+                    beanRecord3.add(beanRecord.getShareContent());
                 }
             }
         }
-        log.info("浠庢暟鎹簱涓煡鍒扮殑涓�:{}", beanRecord3);
 
-        return AjaxResult.success(beanRecord3);
+        return beanRecord3;
     }
 
     @Override
@@ -134,26 +136,28 @@
     @Override
     public AjaxResult listByUserId() {
         //鎵惧埌瀵瑰簲鐨勮祴浜堟暟鎹殑鐢ㄦ埛浠ュ強鏁版嵁鍐呭
-        HashMap<Long,ZfDoctor>  bs = new HashMap<>();
+        HashMap<Long,List<ZfDoctor>>  bs = new HashMap<>();
         LambdaQueryWrapper<ZfDoctorShare> lqw = new LambdaQueryWrapper<>();
         lqw.eq(ZfDoctorShare::getShareId,getUserId());
         List<ZfDoctorShare> beanRecords = list(lqw);
+        List<ZfDoctor> b1 = new ArrayList<>();
         for (ZfDoctorShare beanRecord : beanRecords ) {
-            bs.put(beanRecord.getUserId(),zfDoctorService.getById(beanRecord.getShareContent()));
+                b1.add(zfDoctorService.getById(beanRecord.getShareContent()));
+                bs.put(beanRecord.getUserId(),b1);
         }
         log.info("浠庢暟鎹簱涓煡鍒扮殑涓�:{}", bs);
         return AjaxResult.success(bs);
 
     }
     /**
-     * 鐢ㄦ埛鑷繁鏌ョ湅鍒汉鍒嗕韩鐨勬暟鎹�
+     * 鐢ㄦ埛鑷繁鏌ョ湅鍒汉鍒嗕韩鐨勬暟鎹�==鐢ㄦ埛鑷繁鏌ョ湅鍒汉鍒嗕韩鐨勬暟鎹拰鍒嗕韩浜�
      */
     @Override
-    public List<ZfDoctor> listUserId(Long shareId) {
+    public AjaxResult listUserId() {
         //鎵惧埌瀵瑰簲鐨勮祴浜堟暟鎹殑鐢ㄦ埛浠ュ強鏁版嵁鍐呭
         List<ZfDoctor>  bs = new ArrayList<>();
         LambdaQueryWrapper<ZfDoctorShare> lqw = new LambdaQueryWrapper<>();
-        lqw.eq(ZfDoctorShare::getShareId,shareId);
+        lqw.eq(ZfDoctorShare::getShareId,getUserId());
         List<ZfDoctorShare> beanRecords = list(lqw);
         for (ZfDoctorShare beanRecord : beanRecords ) {
             ZfDoctor bs2 = zfDoctorService.getById(beanRecord.getShareContent());
@@ -161,7 +165,7 @@
             bs.add(bs2);
         }
         log.info("浠庢暟鎹簱涓煡鍒扮殑涓�:{}", bs);
-        return bs;
+        return AjaxResult.success(bs);
 
     }
     public Long getUserId(){

--
Gitblit v1.9.1