From 5e7892cd0921111dfbaf84196f2593f8045d1c11 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 08 十二月 2022 13:16:54 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/haucheng_panzhihua' into haucheng_panzhihua --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 109 +++++++++++++++++++++++------------------------------- 1 files changed, 47 insertions(+), 62 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 d954b97..a940986 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,80 +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.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.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 @@ -143,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()) { @@ -233,6 +200,7 @@ if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) { neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone()); } + //判断当前邻里圈是否需要审核 if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){ //当邻里圈不需要审核才进入自动审核 @@ -376,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 -> { @@ -385,6 +362,12 @@ } } }); + return R.ok(doPager); + } + @Override + public R pageNeighborByBigScreen(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { + Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); + IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByBigScreen(page, neighborCircleAdminDTO); return R.ok(doPager); } @@ -1066,7 +1049,7 @@ public R orderAndSolve(EditNeighborCircleAdminVO editNeighborCircleAdminVO) { ComActNeighborCircleDO comActNeighborCircleDO=new ComActNeighborCircleDO(); BeanUtils.copyProperties(editNeighborCircleAdminVO,comActNeighborCircleDO); - if(comActNeighborCircleDO.getSolveStatus()!=null){ + if(comActNeighborCircleDO.getSolveStatus()!=null && comActNeighborCircleDO.getSolveStatus() == 3){ comActNeighborCircleDO.setSolveTime(new Date()); } if(comActNeighborCircleDO.getOrderStatus()!=null){ @@ -1078,8 +1061,8 @@ int result=this.baseMapper.updateById(comActNeighborCircleDO); if(result>0){ ComActNeighborCircleDO comActNeighborCircleDO1=this.baseMapper.selectById(comActNeighborCircleDO.getId()); - SysUser sysUser=sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId,comActNeighborCircleDO1.getReleaseId())); if(comActNeighborCircleDO.getOrderStatus()!=null){ + SysUser sysUser=sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId,comActNeighborCircleDO1.getReleaseId())); if(sysUser!=null) { try { WxXCXTempSend util = new WxXCXTempSend(); @@ -1095,6 +1078,7 @@ } } if(comActNeighborCircleDO.getSolveStatus()==3){ + SysUser sysUser=sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId,comActNeighborCircleDO1.getReleaseId())); if(sysUser!=null) { try { WxXCXTempSend util = new WxXCXTempSend(); @@ -1110,6 +1094,7 @@ } } if(comActNeighborCircleDO.getSolveStatus()==4){ + SysUser sysUser=sysUserDao.selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getUserId,comActNeighborCircleDO1.getSolveId())); if(sysUser!=null) { try { WxXCXTempSend util = new WxXCXTempSend(); -- Gitblit v1.7.1