| | |
| | | |
| | | 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 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 |
| | |
| | | // } |
| | | // } |
| | | // } |
| | | 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()) { |
| | |
| | | |
| | | @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 -> { |
| | |
| | | } |
| | | } |
| | | }); |
| | | 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); |
| | | } |
| | | |
| | |
| | | |
| | | @Override |
| | | public R detailNeighborByAdmin(Long id) { |
| | | ComActNeighborCircleDetailAppVO comActNeighborCircleDO = |
| | | this.baseMapper.neighborDetailByApp(id); |
| | | ComActNeighborCircleDetailAppVO comActNeighborCircleDO = baseMapper.neighborDetailByApp(id); |
| | | if (comActNeighborCircleDO == null) { |
| | | return R.fail("id有误"); |
| | | } |
| | |
| | | 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); |
| | | } |
| | |
| | | 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){ |