From 35057d7fb7a19a2e1b934f5c1b7f692cb7e5bcf0 Mon Sep 17 00:00:00 2001
From: feige <791364011@qq.com>
Date: 星期二, 09 七月 2024 21:46:19 +0800
Subject: [PATCH] get请求修改为了post请求
---
zhang-content/src/main/java/com/ruoyi/service/impl/ZfDoctorServiceImpl.java | 51 ++++++++++++++++++++++++++++++++++++---------------
1 files changed, 36 insertions(+), 15 deletions(-)
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 9f1d5ab..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
@@ -86,11 +86,7 @@
//鍔犱笂鑷繁瀹跺涵鐨刬d
idList.add(familyId);
// String familyIds = listFamilyIds();
-// String secondFamilyAuthority = listSecondFamilyIds();
-
- //鏌ョ湅鍒汉鍒嗕韩
- List<ZfDoctor> bs = zfDoctorShareService.listUserId(myself.getUserId());
-
+// String secondFamilyAuthority = listSecondFamilyIds()
LambdaQueryWrapper<ZfDoctor> lqw = buildCondition(zfDoctor, idList);
Page<ZfDoctor> zfDoctorPage = new Page<>(pageNum, pageSize);
@@ -99,7 +95,6 @@
List<ZfDoctor> beanRecords = pageResult.getRecords();//寰楀埌鏌ヨ鍑烘潵鐨勬暟鎹�
List<ZfDoctor> dtoResult = markOwnData(familyId, beanRecords);
- dtoResult.addAll(bs);
HashMap<String, Object> data = MapUtils.getResult(pageResult, dtoResult);
return AjaxResult.success(data);
}
@@ -121,12 +116,9 @@
//鍔犱笂鑷繁瀹跺涵鐨刬d
idList.add(familyId);
- //鏌ョ湅鍒汉鍒嗕韩
- List<ZfDoctor> bs = zfDoctorShareService.listUserId(myself.getUserId());
LambdaQueryWrapper<ZfDoctor> lambdaQueryWrapper = buildCondition(zfDoctor, idList);
List<ZfDoctor> beanRecords = list(lambdaQueryWrapper);
- beanRecords.addAll(bs);
log.info("浠庢暟鎹簱涓煡鍒扮殑涓�:{}", beanRecords);
return markOwnData(familyId, beanRecords);
}
@@ -166,10 +158,13 @@
for (ZfDoctor zfDoctor : dataList) {
- if (zfDoctor.getSymptom().length() == 0 || zfDoctor.getSymptom() == null) {
- throw new RuntimeException("鐥囩姸涓虹┖锛屽鍏ユ暟鎹け璐�");
- } else {
- zfDoctorService.addData(zfDoctor);
+ if (zfDoctor.getSuitable().length() != 0 || zfDoctor.getType().length() != 0 || zfDoctor.getEffect().length() != 0 ) {
+ if(zfDoctor.getSymptom().length() == 0 || zfDoctor.getSymptom() == null){
+ throw new RuntimeException("鐥囩姸涓虹┖锛屽鍏ユ暟鎹け璐�");
+ }
+ else {
+ zfDoctorService.addData(zfDoctor);
+ }
}
}
return AjaxResult.success("瀵煎叆鏁版嵁鎴愬姛");
@@ -191,7 +186,7 @@
// List<ZfDoctorShare> authority1 = zfDoctorShareService.getAuthority();
// List<Long> idList1 = authority1.stream().filter(auth -> auth.getShareContent().toString().equals(DOCTOR_LIST)).map(ZfDoctorShare::getShareId).collect(Collectors.toList());
- zfDoctorService.addData(zfDoctor);
+// zfDoctorService.addData(zfDoctor);
if (zfDoctor.getFamilyId() != null && !familyIdList.contains(zfDoctor.getFamilyId())) {
throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
@@ -444,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());
@@ -460,4 +481,4 @@
// }
-}
\ No newline at end of file
+}}
\ No newline at end of file
--
Gitblit v1.9.1