huanghongfa
2021-07-09 b7a06b6e93c0df03ed84c40385cbe88d27459d4f
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -133,10 +133,13 @@
        Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format);
        List<ComActEasyPhotoActivityDO> photoActivityDOS = comActEasyPhotoActivityMapper.selectList(
                new QueryWrapper<ComActEasyPhotoActivityDO>().lambda().eq(ComActEasyPhotoActivityDO::getCommunityId,comActEasyPhotoVO.getCommunityId())
                        .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate));
                        .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate)
                        .eq(ComActEasyPhotoActivityDO::getStatus,ComActEasyPhotoActivityDO.status.jxz));
        if(!photoActivityDOS.isEmpty()){
            ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0);
            photoActivityDO.setCount(photoActivityDO.getCount() + 1);
            comActEasyPhotoDO.setActivityId(photoActivityDO.getId());
            comActEasyPhotoActivityMapper.updateById(photoActivityDO);
        }
        int insert = comActEasyPhotoDAO.insert(comActEasyPhotoDO);
        if (insert>0) {
@@ -382,7 +385,15 @@
        return R.fail();
    }
    /**
     * 社区随手拍列表统计
     * @param communityId   社区id
     * @return  统计结果
     */
    @Override
    public R easyPhotoStatistics(Long communityId){
        return R.ok(this.baseMapper.getEasyPhotoStatistics(communityId));
    }
}