feige
2024-11-05 b4895bdc5d9268e55c0023b92cc7c2d68ba33e46
Merge remote-tracking branch 'origin/master'
11个文件已修改
87 ■■■■ 已修改文件
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/MarrySelfController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZPropertyController.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-admin/src/main/java/com/ruoyi/web/controller/zhang/ZSecretController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/MemoBookService.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/ZfPetNoteService.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/IZfPropertyServiceImpl.java 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/MemoBookServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZAuthorityServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfEquipmentServiceImpl.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetNoteServiceImpl.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
zhang-content/src/main/java/com/ruoyi/service/impl/ZfPetServiceImpl.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
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, "个人婚姻数据");
    }
}
}
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();
        }
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();
        }
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);
}
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);
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))) {
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);
    }
}
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);
            }
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));
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) {
        //判断是否有重复数据
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();