From 3da01b2a6cf247f90aed86fc37d8cb0ab51a4b4c Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期二, 29 十一月 2022 15:58:02 +0800 Subject: [PATCH] #feat . --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 123 ++++++++++++---------------------------- 1 files changed, 37 insertions(+), 86 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java index a8752c1..59c943d 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java @@ -1,106 +1,38 @@ package com.panzhihua.service_community.service.impl; -import java.util.ArrayList; -import java.util.Date; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.annotation.Resource; - -import com.panzhihua.common.utlis.*; -import com.panzhihua.service_community.dao.*; -import com.panzhihua.service_community.entity.SysUser; -import org.apache.commons.lang3.ObjectUtils; -import org.springframework.beans.BeanUtils; -import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; - +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.util.PageUtil; +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.util.PageUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.panzhihua.common.constants.NeighborCircleConstants; -import com.panzhihua.common.model.dtos.neighbor.AddComActNeighborCircleAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborAddBrowseAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleDetailAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCommentReplyAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborFabulousAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborForwardAppDTO; -import com.panzhihua.common.model.dtos.neighbor.ComActNeighborReplyAppDTO; -import com.panzhihua.common.model.dtos.neighbor.DeleteNeighborCircleAppDTO; -import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; -import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO; -import com.panzhihua.common.model.dtos.neighbor.ServiceStaticBackstageDTO; -import com.panzhihua.common.model.dtos.neighbor.ServiceStaticDTO; +import com.panzhihua.common.model.dtos.neighbor.*; import com.panzhihua.common.model.vos.PageVO; import com.panzhihua.common.model.vos.R; -import com.panzhihua.common.model.vos.neighbor.ActivityAnalysisVO; -import com.panzhihua.common.model.vos.neighbor.AddNeighborCircleAdminVO; -import com.panzhihua.common.model.vos.neighbor.ChangeCommentReplyStatusByAdminVO; -import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleCommentAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleCommentReplyAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentByAdminVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentReplyAppVO; -import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentReplyByAdminVO; -import com.panzhihua.common.model.vos.neighbor.DetailNeighborCircleAdminVO; -import com.panzhihua.common.model.vos.neighbor.EditNeighborCircleAdminVO; -import com.panzhihua.common.model.vos.neighbor.PartyMemberAnalysisVO; -import com.panzhihua.common.model.vos.neighbor.ServiceStaticsVO; -import com.panzhihua.common.model.vos.neighbor.UnitActivityAnalysisVO; +import com.panzhihua.common.model.vos.neighbor.*; import com.panzhihua.common.model.vos.user.AdministratorsUserVO; import com.panzhihua.common.service.user.UserService; +import com.panzhihua.common.utlis.*; +import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.entity.ComPbCheckUnit; -import com.panzhihua.service_community.model.dos.ComActActivityDO; -import com.panzhihua.service_community.model.dos.ComActDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleBrowseDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleCommentDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleCommentReplyDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleFabulousDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO; -import com.panzhihua.service_community.model.dos.ComPbMemberDO; -import com.panzhihua.common.service.user.UserService; -import com.panzhihua.common.utlis.DateUtils; -import com.panzhihua.common.utlis.SensitiveUtil; -import com.panzhihua.common.utlis.StringUtils; -import com.panzhihua.service_community.dao.ComActActivityDAO; -import com.panzhihua.service_community.dao.ComActDAO; -import com.panzhihua.service_community.dao.ComActNeighborCircleBrowseDAO; -import com.panzhihua.service_community.dao.ComActNeighborCircleCommentDAO; -import com.panzhihua.service_community.dao.ComActNeighborCircleCommentReplyDAO; -import com.panzhihua.service_community.dao.ComActNeighborCircleDAO; -import com.panzhihua.service_community.dao.ComActNeighborCircleFabulousDAO; -import com.panzhihua.service_community.dao.ComActNeighborCircleTopicMapper; -import com.panzhihua.service_community.dao.ComPbCheckUnitDao; -import com.panzhihua.service_community.dao.ComPbMemberDAO; -import com.panzhihua.service_community.entity.ComPbCheckUnit; -import com.panzhihua.service_community.model.dos.ComActActivityDO; -import com.panzhihua.service_community.model.dos.ComActDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleBrowseDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleCommentDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleCommentReplyDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleFabulousDO; -import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO; -import com.panzhihua.service_community.model.dos.ComPbMemberDO; +import com.panzhihua.service_community.entity.SysUser; +import com.panzhihua.service_community.model.dos.*; import com.panzhihua.service_community.service.ComActNeighborCircleBrowseService; import com.panzhihua.service_community.service.ComActNeighborCircleService; import com.panzhihua.service_community.service.ComActNeighborCircleTopicService; - -import cn.hutool.core.collection.ListUtil; -import cn.hutool.core.util.PageUtil; import lombok.extern.slf4j.Slf4j; -import org.springframework.util.CollectionUtils; -import org.springframework.web.bind.annotation.RequestParam; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.annotation.Resource; +import java.util.*; /** * @auther lyq @@ -169,6 +101,15 @@ // } // } // } + Long communityId = neighborCircleAppDTO.getCommunityId(); + if(null != communityId){ + List<Long> communityIds = comActDAO.selectIds(communityId); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + neighborCircleAppDTO.setCommunityIds(communityIds); + } Page userPage = new Page(neighborCircleAppDTO.getPageNum(), neighborCircleAppDTO.getPageSize()); IPage<ComActNeighborCircleAppVO> doPager = this.baseMapper.pageNeighborByApp(userPage, neighborCircleAppDTO); if (!doPager.getRecords().isEmpty()) { @@ -259,6 +200,7 @@ if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) { neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone()); } + //判断当前邻里圈是否需要审核 if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){ //当邻里圈不需要审核才进入自动审核 @@ -402,6 +344,15 @@ @Override public R pageNeighborByAdmin(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { + Long communityId = neighborCircleAdminDTO.getCommunityId(); + if(null != communityId){ + List<Long> communityIds = comActDAO.selectIds(communityId); + if (CollUtil.isEmpty(communityIds)) { + communityIds = new ArrayList<>(); + communityIds.add(communityId); + } + neighborCircleAdminDTO.setCommunityIds(communityIds); + } Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByAdmin(page, neighborCircleAdminDTO); doPager.getRecords().forEach(data -> { -- Gitblit v1.7.1