From b2fd10cc3d19e4d877bef57abf684a19100b6512 Mon Sep 17 00:00:00 2001
From: lidongdong <1459917685@qq.com>
Date: 星期一, 28 八月 2023 16:55:06 +0800
Subject: [PATCH] 修改获取用户积分为0
---
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java | 145 ++++++++++++++++++------------------------------
1 files changed, 55 insertions(+), 90 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..5d8bfc6 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,43 @@
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.time.LocalDateTime;
+import java.util.*;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
+
+import static com.panzhihua.common.utlis.PayUtil.makeUUID;
/**
* @auther lyq
@@ -169,6 +106,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 +205,7 @@
if (StringUtils.isNotEmpty(addNeighborCircleAppDTO.getPhone())) {
neighborCircleDO.setReleasePhone(addNeighborCircleAppDTO.getPhone());
}
+
//判断当前邻里圈是否需要审核
if(addNeighborCircleAppDTO.getIsExamine().equals(AddComActNeighborCircleAppDTO.isExamine.no)){
//当邻里圈不需要审核才进入自动审核
@@ -402,6 +349,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 -> {
@@ -411,6 +367,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);
}
@@ -803,8 +765,7 @@
@Override
public R detailNeighborByAdmin(Long id) {
- ComActNeighborCircleDetailAppVO comActNeighborCircleDO =
- this.baseMapper.neighborDetailByApp(id);
+ ComActNeighborCircleDetailAppVO comActNeighborCircleDO = baseMapper.neighborDetailByApp(id);
if (comActNeighborCircleDO == null) {
return R.fail("id有误");
}
@@ -832,7 +793,11 @@
if (comActNeighborCircleDO.getTopicId() != null) {
ComActNeighborCircleTopicDO circleTopicDO =
comActNeighborCircleTopicMapper.selectById(comActNeighborCircleDO.getTopicId());
- vo.setTopicName(circleTopicDO.getName());
+ if(circleTopicDO!=null && !StringUtils.isEmpty(circleTopicDO.getName()))
+ {
+ vo.setTopicName(circleTopicDO.getName());
+ }
+
}
return R.ok(vo);
}
@@ -1092,7 +1057,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){
--
Gitblit v1.7.1