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/ZPropertyController.java |   11 +++++
 zhang-content/src/main/java/com/ruoyi/service/impl/MemoBookServiceImpl.java       |    8 ++++
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java          |    8 +++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java |    2 
 zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java               |    3 +
 zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java     |    3 +
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java    |    7 +++
 zhang-content/src/main/java/com/ruoyi/service/MemoBookService.java                |    5 ++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java   |   10 +++++
 zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java    |   16 ++++----
 zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java      |   14 ++++++-
 11 files changed, 73 insertions(+), 14 deletions(-)

diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
index 940110d..f22f5ad 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java
@@ -46,4 +46,4 @@
         ExcelUtil<MarryInfoDto> util = new ExcelUtil<>(MarryInfoDto.class);
         util.exportExcel(response, marryInfoDtos, "涓汉濠氬Щ鏁版嵁");
     }
-}
+}
\ No newline at end of file
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZPropertyController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZPropertyController.java
index f8f393f..bb80f76 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZPropertyController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZPropertyController.java
@@ -8,8 +8,10 @@
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.MemoBook;
 import com.ruoyi.domain.ZProperty;
 import com.ruoyi.domain.ZfEconomy;
+import com.ruoyi.service.MemoBookService;
 import com.ruoyi.service.ZPropertyDownloadService;
 import com.ruoyi.service.ZPropertyService;
 import com.ruoyi.service.ZPropertyShareService;
@@ -46,6 +48,9 @@
 
     @Autowired
     private ZPropertyShareService zPropertyShareService;
+
+    @Autowired
+    private MemoBookService memoBookService;
 
     /**
      * 鏌ヨ鎵�鏈夎褰�
@@ -145,6 +150,12 @@
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
+        for (Long id: ids) {
+            List<MemoBook> memoBookService1 =  memoBookService.selectByIdAFid(id,2026L);
+            if (!memoBookService.removeByIds(memoBookService1))
+                return AjaxResult.error();
+        }
+
         if (! (zPropertyDownloadService.deleteData(ids) && zPropertyShareService.deleteByContentId(ids)  ) ){
             return AjaxResult.error();
         }
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java
index c75e147..9b965a2 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java
@@ -8,7 +8,9 @@
 import com.ruoyi.common.enums.BusinessType;
 import com.ruoyi.common.utils.ServletUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
+import com.ruoyi.domain.MemoBook;
 import com.ruoyi.domain.ZSecret;
+import com.ruoyi.service.MemoBookService;
 import com.ruoyi.service.ZSecretDownloadService;
 import com.ruoyi.service.ZSecretService;
 import com.ruoyi.service.ZSecretShareService;
@@ -45,6 +47,9 @@
 
     @Autowired
     private ZSecretDownloadService zSecretDownloadService;
+
+    @Autowired
+    private MemoBookService memoBookService;
 
     /**
      * 鏌ヨ鎵�鏈夎褰�
@@ -144,6 +149,11 @@
     @DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)
     {
+        for (Long id: ids) {
+            List<MemoBook> memoBookService1 =  memoBookService.selectByIdAFid(id,2031L);
+            if (!memoBookService.removeByIds(memoBookService1))
+                return AjaxResult.error();
+        }
         if (! (zSecretDownloadService.deleteData(ids) && zSecretShareService.deleteByContentId(ids)  ) ){
             return AjaxResult.error();
         }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/MemoBookService.java b/zhang-content/src/main/java/com/ruoyi/service/MemoBookService.java
index 19713f7..4cd4677 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/MemoBookService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/MemoBookService.java
@@ -4,6 +4,8 @@
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.domain.MemoBook;
 
+import java.util.List;
+
 /**
  * @Author Jinquan_Ou
  * @Description
@@ -13,6 +15,7 @@
 public interface MemoBookService extends IService<MemoBook> {
     AjaxResult mySave(MemoBook memoBook);
 
-
     AjaxResult selectDataList(Long fid, Long cid);
+
+    List<MemoBook> selectByIdAFid(Long cid, Long fid);
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java b/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
index 9edaa01..be1f75f 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.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.ZfPetNote;
@@ -23,6 +24,8 @@
 
     AjaxResult getAllPetNoteByPetId(Integer pageNum,Integer pageSize,String pid,ZfPetNote zfPetNote);
 
+    List<ZfPetNote> getPetNoteByPetId(String pid);
+
     AjaxResult mySave(ZfPetNote zfPetNote);
 
     List<ZfPetNote> selectByIds(Long[] ids);
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
index 05ceaf2..c4cfcf4 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java
@@ -6,18 +6,13 @@
 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;
 import com.ruoyi.common.utils.StringUtils;
-import com.ruoyi.common.utils.bean.BeanUtils;
 import com.ruoyi.common.utils.poi.ExcelUtil;
-import com.ruoyi.constant.MenuAuthority;
 import com.ruoyi.domain.*;
 import com.ruoyi.mapper.ZfPropertyMapper;
 import com.ruoyi.service.*;
-import com.ruoyi.util.ArraysUtil;
 import lombok.extern.slf4j.Slf4j;
 import org.elasticsearch.action.delete.DeleteRequest;
 import org.elasticsearch.action.update.UpdateRequest;
@@ -29,8 +24,6 @@
 
 import javax.annotation.Resource;
 import java.io.IOException;
-import java.text.ParseException;
-import java.text.SimpleDateFormat;
 import java.time.LocalDateTime;
 import java.util.*;
 import java.util.stream.Collectors;
@@ -70,6 +63,9 @@
 
     @Resource
     private IZfPropertyShareService iZfPropertyShareService;
+
+    @Resource
+    private MemoBookService memoBookService;
 
 
 //    private LambdaQueryWrapper<ZfProperty> buildCondition(ZfProperty zfProperty) {
@@ -569,11 +565,15 @@
             if (!familyIdList.contains(data.getFamilyId())){
                 throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
             }
+            List<MemoBook> memoBookService1 =  memoBookService.selectByIdAFid(data.getId().longValue(),2007L);
+            if (!memoBookService.removeByIds(memoBookService1))
+                return AjaxResult.error();
+
         }
 
         List<ZfProperty> zfPropertys = listByIds(Arrays.asList(ids));
 
-        if (! (zfPropertyDownloadService.deleteData(ids) && iZfPropertyShareService.deleteByContentId(ids)  ) ){
+        if (! (zfPropertyDownloadService.deleteData(ids) && iZfPropertyShareService.deleteByContentId(ids))){
             return AjaxResult.error();
         }
         if (zfPropertyService.removeByIds(Arrays.asList(ids))) {
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/MemoBookServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/MemoBookServiceImpl.java
index fbc86f6..b38bd53 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/MemoBookServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/MemoBookServiceImpl.java
@@ -62,4 +62,12 @@
 
     }
 
+    @Override
+    public List<MemoBook> selectByIdAFid(Long cid, Long fid) {
+        LambdaQueryWrapper<MemoBook> lqw = new LambdaQueryWrapper<>();
+        lqw.eq(cid!=null,MemoBook::getCid,cid)
+                .eq(fid!=null,MemoBook::getFid,fid);
+        return list(lqw);
+    }
+
 }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java
index b7f90d1..e28ff97 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java
@@ -308,6 +308,7 @@
                 za.setFid(zAuthority.getFid());
                 za.setUid(uid);
                 addData(za);
+                System.out.println(za);
             }
       //  Long []
      //  if(bl)
@@ -329,7 +330,7 @@
                 lqw.eq(ZAuthority::getFid,empowerDto.getFid())
                         .eq(ZAuthority::getAuthority, auri)
                         .eq(ZAuthority::getUid, uid);
-
+                System.out.println("11111111111111111111"+list(lqw));
                 zAuthorityService.remove(lqw);
              //   addData(za);
             }
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
index 0a246d1..7adbf2e 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java
@@ -62,6 +62,9 @@
     @Resource
     private ZfEquipDownloadService zfEquipDownloadService;
 
+    @Resource
+    private MemoBookService memoBookService;
+
     private LambdaQueryWrapper<ZfEquipment> buildCondition(ZfEquipment zfEquipment,List<Long> familyIdList) {
         LambdaQueryWrapper<ZfEquipment> lqw = new LambdaQueryWrapper<>();
         lqw.orderByDesc(ZfEquipment::getCreateTime);
@@ -592,6 +595,10 @@
             if (!familyIdList.contains(data.getFamilyId())){
                 throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
             }
+
+            List<MemoBook> memoBookService1 =  memoBookService.selectByIdAFid(data.getId(),2017L);
+            if (!memoBookService.removeByIds(memoBookService1))
+                return AjaxResult.error();
         }
 
         List<ZfEquipment> zfEquipments = listByIds(Arrays.asList(ids));
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java
index 8066de9..85a87de 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java
@@ -51,20 +51,30 @@
         return list;
     }
 
+
+
     @Override
     public AjaxResult getAllPetNoteByPetId(Integer pageNum,Integer pageSize,String pid,ZfPetNote zfPetNote) {
         LambdaQueryWrapper<ZfPetNote> lqw = buildCondition(zfPetNote);
         lqw.eq(ZfPetNote::getPid,pid);
         lqw.orderByDesc(ZfPetNote::getCreateTime);
-
         Page<ZfPetNote> zfPetNotePage = new Page<>(pageNum, pageSize);
         Page<ZfPetNote> pageResult = page(zfPetNotePage, lqw);
-
         HashMap<String, Object> result = MapUtils.getResult(pageResult);
         return AjaxResult.success(result);
     }
 
     @Override
+    public List<ZfPetNote> getPetNoteByPetId(String pid ) {
+        ZfPetNote zfPetNote = new ZfPetNote();
+        zfPetNote.setPid(pid);
+        LambdaQueryWrapper<ZfPetNote> lqw = buildCondition(zfPetNote);
+        lqw.eq(ZfPetNote::getPid,pid);
+        lqw.orderByDesc(ZfPetNote::getCreateTime);
+        return list(lqw);
+    }
+
+    @Override
     public AjaxResult mySave(ZfPetNote zfPetNote) {
 
         //鍒ゆ柇鏄惁鏈夐噸澶嶆暟鎹�
diff --git a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
index df53fa7..f36cac4 100644
--- a/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
+++ b/zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java
@@ -51,10 +51,14 @@
     ZAuthorityService zAuthorityService;
 
     @Resource
+    ZfPetNoteService zfPetNoteService;
+
+    @Resource
     ZfPetSharService zfPetSharService;
 
     @Resource
     ZfPetDownlService zfPetDownlService;
+
     @Override
     public AjaxResult selectDataList(ZfPet zfPet, Integer pageNum, Integer pageSize) {
 //        LambdaQueryWrapper<ZfPet> lqw = buildCondition(zfPet);
@@ -79,7 +83,7 @@
             fatherFaId = zInfoUserService.getInfoById(myself.getFatherId()).getFamilyId();
         Long motherFaId = 0L;
         if(myself.getMomId()!=null)
-            motherFaId = zInfoUserService.getInfoById(myself.getMomId()).getFamilyId();
+            motherFaId = zInfoUserService.getInfoBysysId(myself.getMomId()).getFamilyId();
 
         //涔熻鏌ュ埆浜烘巿鏉冪殑
         List<ZAuthority> authority = zAuthorityService.getAuthority();
@@ -271,6 +275,8 @@
             if (!familyIdList.contains(data.getFamilyId())){
                 throw new RuntimeException("浣犳病鏈夋潈闄愭搷浣滄瀹跺涵鐨勬暟鎹�");
             }
+            if (!zfPetNoteService.removeBatchByIds(zfPetNoteService.getPetNoteByPetId(data.getId())))
+                return AjaxResult.error();
         }
         if (! (zfPetDownlService.deleteData(ids) && zfPetSharService.deleteByContentId(ids)  ) ){
             return AjaxResult.error();

--
Gitblit v1.9.1