huanghongfa
2021-07-06 236325458d40ce680bc681bc995e16d8cecce21d
随手拍活动、一起议投票选项添加图片、邻里圈增加话题
44个文件已修改
27个文件已添加
2324 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussDTO.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussOptionDTO.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/AddEasyPhotoActivityDTO.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/EditEasyPhotoActivityDTO.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/PageEasyPhotoActivityDTO.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/PageEasyPhotoActivityUserDTO.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/ComActWalletSettlementAdminDTO.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletAdminDTO.java 25 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletTradeAdminDTO.java 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddNeighborCircleTopicAdminDTO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleAppDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleTopicAdminDTO.java 30 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDiscussOptionVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoActivityVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoActivityUserVO.java 42 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoActivityVO.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoStatisticsVO.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletAdminVO.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletRankingVO.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeAdminVO.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAdminVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAppVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleDetailAppVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAdminVO.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAppVO.java 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/DetailNeighborCircleAdminVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 118 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActUserWalletApi.java 56 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/DiscussApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EasyPhotoActivityApi.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/NeighborApi.java 29 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActUserWalletApi.java 51 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EasyPhotoActivityApi.java 72 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoActivityMapper.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java 293 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java 36 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletMapper.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletTradeMapper.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussOptionDO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleDO.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleTopicDO.java 65 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoActivityService.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletService.java 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletTradeService.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java 104 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java 110 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletTradeServiceImpl.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoActivityDOMapper.xml 63 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletDOMapper.xml 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletTradeDOMapper.xml 40 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/EasyPhotoActivityJobHandler.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/DiscussApi.java
@@ -48,8 +48,8 @@
        }
        Integer type = comActDiscussDTO.getType();
        String voteTitle = comActDiscussDTO.getVoteTitle();
        List<String> discussOptions = comActDiscussDTO.getDiscussOptions();
        if (type.intValue()==2 ) {
        List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions();
        if (type.equals(2)) {
            if(ObjectUtils.isEmpty(voteTitle)){
                return R.fail("投票标题不能为空");
            }
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/NeighborApi.java
@@ -6,6 +6,7 @@
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAppVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentReplyAppVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.utlis.StringUtils;
@@ -162,5 +163,15 @@
        commentReplyAppDTO.setUserId(userId);
        return communityService.neighborCommentReplyByApp(commentReplyAppDTO);
    }
    @ApiOperation(value = "查询社区邻里圈话题列表" , response = ComActNeighborCircleTopicAppVO.class)
    @GetMapping("topic/list")
    public R getNeighborTopicByApp() {
        Long communityId = this.getCommunityId();
        if(communityId == null){
            return R.fail("请先绑定社区");
        }
        return communityService.getNeighborTopicByApp(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java
@@ -146,4 +146,6 @@
    public static final String ZONG_ZHI_GRID_MEMBER_IMAGE_URL = "https://www.psciio.com//idcard/57bf4104a76741cfabfead0bb8218307.jpg";
    public static final String ZZ_APP_TAG_LIST = "{\"list\":[\"流动人口\",\"户籍人口\",\"社区矫正\",\"吸毒人员\",\"重精患者\",\"刑满释放\"]}";
    public static final String PROFIT_EXPLAIN = "<p>\\t一、简介</p><p>\\t活动期间内,居民发布随手拍内容可获得一定现金奖励,具体奖励金额以社区设置为准,最终由对应社区统一结算。</p><p>\\t二、如何使用</p><p>\\t居民获得收益后由对应社区结算,具体结算方式由社区根据实际情况进行处理。</p><p>\\t三、如何获得</p><p>\\t1.参与活动</p><p>\\t活动期间内,用户可以在西区社区通“随手拍”板块,用照片和视频记录展示社区生活;</p><p>\\t活动由所在社区添加管理,社区发布活动后居民可进行参与。</p><p>\\t2.&nbsp;社区审核</p><p>\\t社区通过对用户发布内容的质量(优质、精良、普通内容)和价值进行审核,酌情对相关用户进行奖励;</p><p>\\t3.&nbsp;获得奖励</p><p>\\t审核完成后,根据社区设置的内容质量奖励金额下发奖励。</p><p>\\t若内容被工作人员驳回将不可获得奖励。</p><p>&nbsp;</p><p><br></p>";
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussDTO.java
@@ -52,7 +52,6 @@
    private String voteTitle;
    @ApiModelProperty("选项集合")
    private List<String> discussOptions;
    private List<ComActDiscussOptionDTO> discussOptions;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/ComActDiscussOptionDTO.java
New file
@@ -0,0 +1,23 @@
package com.panzhihua.common.model.dtos.community;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @program: springcloud_k8s_panzhihuazhihuishequ
 * @description: 一起议投票选项参数
 * @author: huang.hongfa weixin hhf9596 qq 959656820
 * @create: 2021-01-22 15:34
 **/
@Data
@ApiModel("一起议投票选项参数")
public class ComActDiscussOptionDTO {
    @ApiModelProperty("选项图片url")
    private String optionUrl;
    @ApiModelProperty("选项内容")
    private String optionContent;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/AddEasyPhotoActivityDTO.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.common.model.dtos.community.easyPhoto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel("添加随手拍活动请求参数")
public class AddEasyPhotoActivityDTO {
    @ApiModelProperty(value = "社区主键",hidden = true)
    private Long communityId;
    @ApiModelProperty("活动开始时间")
    private String activityStartAt;
    @ApiModelProperty("活动结束时间")
    private String activityEndAt;
    @ApiModelProperty("活动简介")
    private String content;
    @ApiModelProperty("优质奖励金额")
    private BigDecimal goodReward;
    @ApiModelProperty("精良奖励金额")
    private BigDecimal excellentReward;
    @ApiModelProperty("普通奖励金额")
    private BigDecimal ordinaryReward;
    @ApiModelProperty("活动图片")
    private String logo;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/EditEasyPhotoActivityDTO.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.common.model.dtos.community.easyPhoto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel("编辑随手拍活动请求参数")
public class EditEasyPhotoActivityDTO {
    @ApiModelProperty("随手拍活动id")
    private Long id;
    @ApiModelProperty("活动开始时间")
    private String activityStartAt;
    @ApiModelProperty("活动结束时间")
    private String activityEndAt;
    @ApiModelProperty("活动简介")
    private String content;
    @ApiModelProperty("优质奖励金额")
    private BigDecimal goodReward;
    @ApiModelProperty("精良奖励金额")
    private BigDecimal excellentReward;
    @ApiModelProperty("普通奖励金额")
    private BigDecimal ordinaryReward;
    @ApiModelProperty("活动图片")
    private String logo;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/PageEasyPhotoActivityDTO.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.common.model.dtos.community.easyPhoto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("随手拍活动列表请求参数")
public class PageEasyPhotoActivityDTO {
    @ApiModelProperty("活动状态(1.待开始 2.进行中 3.已结束  4.已取消)")
    private Integer status;
    @ApiModelProperty("活动开始时间")
    private String startTime;
    @ApiModelProperty("活动结束时间")
    private String endTime;
    @ApiModelProperty(value = "社区主键",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/easyPhoto/PageEasyPhotoActivityUserDTO.java
New file
@@ -0,0 +1,19 @@
package com.panzhihua.common.model.dtos.community.easyPhoto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("随手拍活动列表请求参数")
public class PageEasyPhotoActivityUserDTO {
    @ApiModelProperty(value = "活动id")
    private Long activityId;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/ComActWalletSettlementAdminDTO.java
New file
@@ -0,0 +1,24 @@
package com.panzhihua.common.model.dtos.community.wallet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel("用户结算收益请求参数")
public class ComActWalletSettlementAdminDTO {
    @ApiModelProperty("钱包id")
    private Long id;
    @ApiModelProperty("结算金额")
    private BigDecimal settlementAmount;
    @ApiModelProperty("备注")
    private String remark;
    @ApiModelProperty(value = "登录用户id",hidden = true)
    private Long userId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletAdminDTO.java
New file
@@ -0,0 +1,25 @@
package com.panzhihua.common.model.dtos.community.wallet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("收益结算列表请求参数")
public class PageComActWalletAdminDTO {
    @ApiModelProperty("用户名称")
    private String name;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty(value = "社区主键",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/wallet/PageComActWalletTradeAdminDTO.java
New file
@@ -0,0 +1,34 @@
package com.panzhihua.common.model.dtos.community.wallet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("收益结算列表请求参数")
public class PageComActWalletTradeAdminDTO {
    @ApiModelProperty("用户名称")
    private String name;
    @ApiModelProperty("手机号")
    private String phone;
    @ApiModelProperty(value = "社区主键",hidden = true)
    private Long communityId;
    @ApiModelProperty("交易类型(1.发布随手拍 2.结算)")
    private Integer type;
    @ApiModelProperty("开始时间")
    private String startTime;
    @ApiModelProperty("结束时间")
    private String endTime;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddComActNeighborCircleAppDTO.java
@@ -19,6 +19,9 @@
    @ApiModelProperty("邻里圈图片url")
    private String releaseImages;
    @ApiModelProperty("邻里圈话题id")
    private Long topicId;
    @ApiModelProperty(value = "用户id",hidden = true)
    private Long userId;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/AddNeighborCircleTopicAdminDTO.java
New file
@@ -0,0 +1,30 @@
package com.panzhihua.common.model.dtos.neighbor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @auther lyq
 * @describe 邻里圈话题列表请求参数
 */
@Data
@ApiModel("邻里圈话题列表请求参数")
public class AddNeighborCircleTopicAdminDTO {
    @ApiModelProperty("话题名称")
    private String name;
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "登录用户id",hidden = true)
    private Long userId;
    @ApiModelProperty(value="发布状态(1.启用 2.禁用)")
    private Integer status;
    @ApiModelProperty("话题id")
    private Long id;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleAppDTO.java
@@ -22,6 +22,9 @@
    @ApiModelProperty("邻里圈查询类型(1.热门 2.最新 3.精品)")
    private Integer type = 1;
    @ApiModelProperty("话题id")
    private Long topicId;
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/neighbor/ComActNeighborCircleTopicAdminDTO.java
New file
@@ -0,0 +1,30 @@
package com.panzhihua.common.model.dtos.neighbor;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @auther lyq
 * @describe 邻里圈话题列表请求参数
 */
@Data
@ApiModel("邻里圈话题列表请求参数")
public class ComActNeighborCircleTopicAdminDTO {
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
    @ApiModelProperty("话题名称")
    private String name;
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value="发布状态(1.启用 2.禁用)")
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActDiscussOptionVO.java
@@ -25,6 +25,9 @@
    @ApiModelProperty("选项内容")
    private String optionContent;
    @ApiModelProperty("选项图片url")
    private String optionUrl;
    @ApiModelProperty("create_at")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComActEasyPhotoActivityVO.java
@@ -22,11 +22,11 @@
    private String content;
    @ApiModelProperty("活动开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date activityStartAt;
    @ApiModelProperty("活动结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8")
    private Date activityEndAt;
    @ApiModelProperty("优质奖励金额")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoActivityUserVO.java
New file
@@ -0,0 +1,42 @@
package com.panzhihua.common.model.vos.community.easyPhoto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel("随手拍活动居民参与列表返回参数")
public class ComActEasyPhotoActivityUserVO {
    @ApiModelProperty("随手拍id")
    private Long id;
    @ApiModelProperty("用户昵称")
    private String nickName;
    @ApiModelProperty("用户姓名")
    private String userName;
    @ApiModelProperty("用户手机号")
    private String phone;
    @ApiModelProperty("随手拍内容")
    private String detail;
    @ApiModelProperty("随手拍标签(1.优质 2.精良 3.普通)")
    private Integer activityType;
    @ApiModelProperty("随手拍活动奖励金额")
    private BigDecimal activityAmount;
    @ApiModelProperty("随手拍状态(1待审核 2进行中 3已驳回 4已完成)")
    private Integer status;
    @ApiModelProperty("参与时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoActivityVO.java
New file
@@ -0,0 +1,54 @@
package com.panzhihua.common.model.vos.community.easyPhoto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel("随手拍活动返回参数")
public class ComActEasyPhotoActivityVO {
    @ApiModelProperty("活动id")
    private Long id;
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("活动状态(1.待开始 2.进行中 3.已结束  4.已取消)")
    private Integer status;
    @ApiModelProperty("活动简介")
    private String content;
    @ApiModelProperty("活动开始时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date activityStartAt;
    @ApiModelProperty("活动结束时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date activityEndAt;
    @ApiModelProperty("活动发布时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date releaseAt;
    @ApiModelProperty("优质奖励金额")
    private BigDecimal goodReward;
    @ApiModelProperty("精良奖励金额")
    private BigDecimal excellentReward;
    @ApiModelProperty("普通奖励金额")
    private BigDecimal ordinaryReward;
    @ApiModelProperty("参与活动随手拍数量")
    private Integer count;
    @ApiModelProperty("活动图片地址")
    private String logo;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/easyPhoto/ComActEasyPhotoStatisticsVO.java
New file
@@ -0,0 +1,22 @@
package com.panzhihua.common.model.vos.community.easyPhoto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
@ApiModel("随手拍列表统计返回参数")
public class ComActEasyPhotoStatisticsVO {
    @ApiModelProperty("待审核数量")
    private Integer examineNum;
    @ApiModelProperty("待验证数量")
    private Integer verificationNum;
    @ApiModelProperty("已驳回数量")
    private Integer rejectNum;
    @ApiModelProperty("已完成数量")
    private Integer completeNum;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletAdminVO.java
New file
@@ -0,0 +1,36 @@
package com.panzhihua.common.model.vos.community.wallet;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
@Data
@ApiModel("收益结算列表返回参数")
public class ComActWalletAdminVO {
    @ApiModelProperty("钱包id")
    private Long id;
    @ApiModelProperty("用户id")
    private Long userId;
    @ApiModelProperty("收益总金额")
    private BigDecimal incomeAmount;
    @ApiModelProperty("可用金额(未结算金额)")
    private BigDecimal availableAmount;
    @ApiModelProperty("结算金额")
    private BigDecimal settlementAmount;
    @ApiModelProperty("用户昵称")
    private String nickName;
    @ApiModelProperty("用户姓名")
    private String userName;
    @ApiModelProperty("手机号")
    private String phone;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletRankingVO.java
@@ -13,9 +13,15 @@
    @ApiModelProperty("钱包id")
    private Long id;
    @ApiModelProperty("姓名")
    @ApiModelProperty("昵称")
    private String nickName;
    @ApiModelProperty("姓名")
    private String userName;
    @ApiModelProperty("用户头像")
    private String imageUrl;
    @ApiModelProperty("收益总金额")
    private BigDecimal incomeAmount;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/wallet/ComActWalletTradeAdminVO.java
New file
@@ -0,0 +1,46 @@
package com.panzhihua.common.model.vos.community.wallet;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.util.Date;
@Data
@ApiModel("交易记录列表返回参数")
public class ComActWalletTradeAdminVO {
    @ApiModelProperty("交易记录id")
    private Long id;
    @ApiModelProperty("用户id")
    private Long userId;
    @ApiModelProperty("用户昵称")
    private String nickName;
    @ApiModelProperty("用户姓名")
    private String userName;
    @ApiModelProperty("用户手机号")
    private String phone;
    @ApiModelProperty("变动类型(1.增加  2.减少)")
    private Integer changeType;
    @ApiModelProperty("交易金额")
    private BigDecimal amount;
    @ApiModelProperty("交易类型(1.发布随手拍 2.结算)")
    private Integer type;
    @ApiModelProperty("交易时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
    @ApiModelProperty("操作人")
    private String operationUserName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAdminVO.java
@@ -27,6 +27,8 @@
    @ApiModelProperty("发布人")
    private String releaseName;
    @ApiModelProperty("话题名称")
    private String topicName;
    @ApiModelProperty(value = "用户类型 1 小程序 2 运营平台 3 社区平台",hidden = true)
    private Integer userType;
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleAppVO.java
@@ -100,4 +100,7 @@
     */
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("话题名称")
    private String topicName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleDetailAppVO.java
@@ -73,4 +73,7 @@
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("邻里圈话题名字")
    private String topicName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAdminVO.java
New file
@@ -0,0 +1,37 @@
package com.panzhihua.common.model.vos.neighbor;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @auther lyq
 * @describe 邻里圈话题返回参数
 */
@Data
@ApiModel("邻里圈话题返回参数")
public class ComActNeighborCircleTopicAdminVO {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("社区id")
    private Long communityId;
    @ApiModelProperty("话题名字")
    private String name;
    @ApiModelProperty(value = "状态(1.启用  2.禁用)")
    private Integer status;
    @ApiModelProperty("发布人")
    private String createBy;
    @ApiModelProperty("创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/ComActNeighborCircleTopicAppVO.java
New file
@@ -0,0 +1,24 @@
package com.panzhihua.common.model.vos.neighbor;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
 * @auther lyq
 * @describe 邻里圈话题返回参数
 */
@Data
@ApiModel("邻里圈话题返回参数")
public class ComActNeighborCircleTopicAppVO {
    @ApiModelProperty("id")
    private Long id;
    @ApiModelProperty("话题名字")
    private String name;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/neighbor/DetailNeighborCircleAdminVO.java
@@ -54,4 +54,7 @@
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
    @ApiModelProperty("话题名称")
    private String topicName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -13,8 +13,11 @@
import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityPeopleListDTO;
import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenDiscussListDTO;
import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenMicroListDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.dtos.community.wallet.*;
import com.panzhihua.common.model.dtos.elders.ComEldersAuthGetResultDTO;
import com.panzhihua.common.model.dtos.elders.ComEldersAuthPageDTO;
import com.panzhihua.common.model.dtos.elders.ComEldersAuthUserAddAppDTO;
@@ -3475,4 +3478,115 @@
     */
    @PostMapping("/village/admin/export")
    R getGridVillageListExport(@RequestBody ComMngVillageListExportAdminDTO villageListAppDTO);
    /**
     * 社区后台-分页查询随手拍活动列表
     * @param pageEasyPhotoActivityDTO  请求参数
     * @return  随手拍活动列表
     */
    @PostMapping("/easy/photo/activity/page")
    R pageEasyPhotoActivity(@RequestBody PageEasyPhotoActivityDTO pageEasyPhotoActivityDTO);
    /**
     * 社区后台-添加随手拍活动
     * @param addEasyPhotoActivityDTO   请求参数
     * @return  添加结果
     */
    @PostMapping("/easy/photo/activity/add")
    R addEasyPhotoActivity(@RequestBody AddEasyPhotoActivityDTO addEasyPhotoActivityDTO);
    /**
     * 社区后台-编辑随手拍活动
     * @param editEasyPhotoActivityDTO  请求参数
     * @return  编辑结果
     */
    @PostMapping("/easy/photo/activity/edit")
    R editEasyPhotoActivity(@RequestBody EditEasyPhotoActivityDTO editEasyPhotoActivityDTO);
    /**
     * 社区后台-取消随手拍活动
     * @param id    随手拍活动id
     * @return  取消结果
     */
    @GetMapping("/easy/photo/activity/cancel")
    R cancelEasyPhotoActivity(@RequestParam("id") Long id);
    /**
     * 分页查询随手拍活动下居民参与记录
     * @param pageEasyPhotoActivityUserDTO  请求参数
     * @return  居民参与记录
     */
    @PostMapping("/easy/photo/activity/page/user")
    R pageEasyPhotoActivityUser(@RequestBody PageEasyPhotoActivityUserDTO pageEasyPhotoActivityUserDTO);
    /**
     * 随手拍活动定时任务
     * @return  执行结果
     */
    @PostMapping("timeTaskEasyPhotoActivity")
    R timedTaskEasyPhotoActivity();
    /**
     * 分页查询收益结算列表
     * @param pageWalletAdminDTO    请求参数
     * @return  收益结算列表
     */
    @PostMapping("/user/wallet/page")
    R pageUserWalletAdmin(@RequestBody PageComActWalletAdminDTO pageWalletAdminDTO);
    /**
     * 用户结算收益
     * @param settlementAdminDTO    请求参数
     * @return  结算结果
     */
    @PostMapping("/user/wallet/settlement")
    R userWalletSettlementAdmin(@RequestBody ComActWalletSettlementAdminDTO settlementAdminDTO);
    /**
     * 分页查询交易记录
     * @param pageTradeAdminDTO 请求参数
     * @return  交易记录列表
     */
    @PostMapping("/user/wallet/trade/page")
    R pageUserWalletTradeAdmin(@RequestBody PageComActWalletTradeAdminDTO pageTradeAdminDTO);
    /**
     * 社区随手拍列表统计
     * @param communityId   社区id
     * @return  统计结果
     */
    @GetMapping("/easyphoto/statistics")
    R easyPhotoStatistics(@RequestParam("communityId") Long communityId);
    /**
     * 分页查询邻里圈话题列表
     * @param circleTopicAdminDTO   请求参数
     * @return  邻里圈话题列表
     */
    @PostMapping("/neighbor/pageNeighborTopicByAdmin")
    R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO);
    /**
     * 添加邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  添加结果
     */
    @PostMapping("/neighbor/addNeighborTopicByAdmin")
    R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO);
    /**
     * 编辑邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  编辑结果
     */
    @PostMapping("/neighbor/editNeighborTopicByAdmin")
    R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO);
    /**
     * 小程序查询邻里圈话题列表
     * @param communityId   社区id
     * @return  邻里圈话题列表
     */
    @GetMapping("/neighbor/getNeighborTopicByApp")
    R getNeighborTopicByApp(@RequestParam("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -760,4 +760,12 @@
    @GetMapping("big/no/tip")
    R noTips(@RequestParam("userId") Long userId);
    /**
     * 查询社区的收益说明
     * @param communityId   社区id
     * @return  收益说明
     */
    @PostMapping("listagreements")
    R listAgreements(@RequestParam("communityId")Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComActUserWalletApi.java
New file
@@ -0,0 +1,56 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoActivityVO;
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoActivityUserVO;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletAdminVO;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeAdminVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@Api(tags = {"财务管理模块"})
@RestController
@RequestMapping("/user/wallet/")
public class ComActUserWalletApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @ApiOperation(value = "分页查询收益结算列表",response = ComActWalletAdminVO.class)
    @PostMapping("/page")
    public R page(@RequestBody PageComActWalletAdminDTO pageWalletAdminDTO) {
        Long communityId = this.getCommunityId();
        pageWalletAdminDTO.setCommunityId(communityId);
        return communityService.pageUserWalletAdmin(pageWalletAdminDTO);
    }
    @ApiOperation(value = "结算收益")
    @PostMapping("/settlement")
    public R settlement(@RequestBody ComActWalletSettlementAdminDTO settlementAdminDTO) {
        settlementAdminDTO.setUserId(this.getUserId());
        return communityService.userWalletSettlementAdmin(settlementAdminDTO);
    }
    @ApiOperation(value = "分页查询交易记录列表",response = ComActWalletTradeAdminVO.class)
    @PostMapping("/trade/page")
    public R tradePage(@RequestBody PageComActWalletTradeAdminDTO pageTradeAdminDTO) {
        Long communityId = this.getCommunityId();
        pageTradeAdminDTO.setCommunityId(communityId);
        return communityService.pageUserWalletTradeAdmin(pageTradeAdminDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/CommunityActivityApi.java
@@ -408,4 +408,12 @@
        return communityService.deletemicrowish(id);
    }
    @ApiOperation(value = "随手拍统计")
    @GetMapping("pageeasyphoto/statistics")
    public R easyPhotoStatistics() {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        Long communityId = loginUserInfo.getCommunityId();
        return communityService.easyPhotoStatistics(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/DiscussApi.java
@@ -1,10 +1,7 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.ComActDiscussCommentDTO;
import com.panzhihua.common.model.dtos.community.ComActDiscussDTO;
import com.panzhihua.common.model.dtos.community.PageComActDiscussCommentDTO;
import com.panzhihua.common.model.dtos.community.PageComActDiscussDTO;
import com.panzhihua.common.model.dtos.community.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActDiscussCommentVO;
@@ -40,8 +37,8 @@
    public R addDiscuss(@RequestBody @Validated(AddGroup.class) ComActDiscussDTO comActDiscussDTO) {
        Integer type = comActDiscussDTO.getType();
        String voteTitle = comActDiscussDTO.getVoteTitle();
        List<String> discussOptions = comActDiscussDTO.getDiscussOptions();
        if (type.intValue()==2 ) {
        List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions();
        if (type.equals(2) ) {
            if(ObjectUtils.isEmpty(voteTitle)){
                return R.fail("投票标题不能为空");
            }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/EasyPhotoActivityApi.java
New file
@@ -0,0 +1,64 @@
package com.panzhihua.community_backstage.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoActivityVO;
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoActivityUserVO;
import com.panzhihua.common.service.community.CommunityService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@Api(tags = {"随手拍活动模块"})
@RestController
@RequestMapping("/easy/photo/")
public class EasyPhotoActivityApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @ApiOperation(value = "分页查询随手拍活动列表",response = ComActEasyPhotoActivityVO.class)
    @PostMapping("/page")
    public R page(@RequestBody PageEasyPhotoActivityDTO pageEasyPhotoActivityDTO) {
        Long communityId = this.getCommunityId();
        pageEasyPhotoActivityDTO.setCommunityId(communityId);
        return communityService.pageEasyPhotoActivity(pageEasyPhotoActivityDTO);
    }
    @ApiOperation(value = "添加随手拍活动")
    @PostMapping("/add")
    public R add(@RequestBody AddEasyPhotoActivityDTO addEasyPhotoActivityDTO) {
        Long communityId = this.getCommunityId();
        addEasyPhotoActivityDTO.setCommunityId(communityId);
        return communityService.addEasyPhotoActivity(addEasyPhotoActivityDTO);
    }
    @ApiOperation(value = "编辑随手拍活动")
    @PostMapping("/edit")
    public R edit(@RequestBody EditEasyPhotoActivityDTO editEasyPhotoActivityDTO) {
        if(editEasyPhotoActivityDTO.getId() == null){
            return R.fail("参数错误");
        }
        return communityService.editEasyPhotoActivity(editEasyPhotoActivityDTO);
    }
    @ApiOperation(value = "取消随手拍活动")
    @GetMapping("/cancel")
    public R cancel(@RequestParam("id") Long id) {
        return communityService.cancelEasyPhotoActivity(id);
    }
    @ApiOperation(value = "分页查询随手拍活动居民参与列表",response = ComActEasyPhotoActivityUserVO.class)
    @PostMapping("/page/user")
    public R pageUser(@RequestBody PageEasyPhotoActivityUserDTO pageEasyPhotoActivityUserDTO) {
        return communityService.pageEasyPhotoActivityUser(pageEasyPhotoActivityUserDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/NeighborApi.java
@@ -2,9 +2,7 @@
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.DetailNeighborCommentReplyByAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.neighbor.*;
@@ -154,4 +152,29 @@
        return communityService.addNeighborByAdmin(addNeighborCircleAdminVO);
    }
    @ApiOperation(value = "分页查询邻里圈话题列表",response = ComActNeighborCircleTopicAdminVO.class)
    @PostMapping("pageNeighborTopicByAdmin")
    public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO){
        circleTopicAdminDTO.setCommunityId(this.getCommunityId());
        return communityService.pageNeighborTopicByAdmin(circleTopicAdminDTO);
    }
    @ApiOperation(value = "添加邻里圈话题")
    @PostMapping("addNeighborTopicByAdmin")
    public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO){
        addCircleTopicAdminDTO.setCommunityId(this.getCommunityId());
        addCircleTopicAdminDTO.setUserId(this.getUserId());
        return communityService.addNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    @ApiOperation(value = "编辑邻里圈话题")
    @PostMapping("editNeighborTopicByAdmin")
    public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO){
        if(addCircleTopicAdminDTO.getId() == null){
            return R.fail("参数错误");
        }
        addCircleTopicAdminDTO.setCommunityId(this.getCommunityId());
        return communityService.editNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java
@@ -205,5 +205,22 @@
        return r1;
    }
    @ApiOperation(value = "用户协议",response = SysUserAgreementVO.class)
    @GetMapping("listagreement")
    public R listAgreement(){
        return userService.listAgreements(this.getCommunityId());
    }
    @ApiOperation(value = "编辑用户协议")
    @PutMapping("agreement")
    @OperLog(operModul = "用户协议",operType = 2)
    public R putAgreement(@RequestBody SysUserAgreementVO sysUserAgreementVO){
        Long id = sysUserAgreementVO.getId();
        if (null==id||id==0) {
            return R.fail("协议主键不能为空");
        }
        return userService.putAgreement(sysUserAgreementVO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComActUserWalletApi.java
New file
@@ -0,0 +1,51 @@
package com.panzhihua.service_community.api;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComActUserWalletService;
import com.panzhihua.service_community.service.ComActUserWalletTradeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("/user/wallet/")
public class ComActUserWalletApi {
    @Resource
    private ComActUserWalletService comActUserWalletService;
    @Resource
    private ComActUserWalletTradeService comActUserWalletTradeService;
    /**
     * 分页查询收益结算列表
     * @param pageWalletAdminDTO    请求参数
     * @return  收益结算列表
     */
    @PostMapping("/page")
    public R page(@RequestBody PageComActWalletAdminDTO pageWalletAdminDTO){
        return comActUserWalletService.pageUserWalletAdmin(pageWalletAdminDTO);
    }
    /**
     * 用户结算收益
     * @param settlementAdminDTO    请求参数
     * @return  结算结果
     */
    @PostMapping("/settlement")
    public R settlement(@RequestBody ComActWalletSettlementAdminDTO settlementAdminDTO){
        return comActUserWalletService.userWalletSettlementAdmin(settlementAdminDTO);
    }
    @PostMapping("/trade/page")
    public R tradePage(@RequestBody PageComActWalletTradeAdminDTO pageTradeAdminDTO){
        return comActUserWalletTradeService.pageUserWalletTradeAdmin(pageTradeAdminDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/CommunityApi.java
@@ -1712,4 +1712,23 @@
    R setCommunityAuthType(@RequestParam("communityId")Long communityId,@RequestParam("type") Integer type){
        return eldersAuthService.setCommunityAuthType(communityId, type);
    }
    /**
     * 随手拍活动定时任务
     * @return  执行结果
     */
    @PostMapping("timeTaskEasyPhotoActivity")
    public R timeTaskEasyPhotoActivity(){
        return comActEasyPhotoActivityService.timeTaskEasyPhotoActivity();
    }
    /**
     * 社区随手拍列表统计
     * @param communityId   社区id
     * @return  统计结果
     */
    @GetMapping("easyphoto/statistics")
    public R easyPhotoStatistics(@RequestParam("communityId")Long communityId) {
        return comActEasyPhotoService.easyPhotoStatistics(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/EasyPhotoActivityApi.java
New file
@@ -0,0 +1,72 @@
package com.panzhihua.service_community.api;
import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.service.ComActEasyPhotoActivityService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@Slf4j
@RestController
@RequestMapping("/easy/photo/activity")
public class EasyPhotoActivityApi {
    @Resource
    private ComActEasyPhotoActivityService comActEasyPhotoActivityService;
    /**
     * 社区后台-分页查询随手拍活动列表
     * @param pageEasyPhotoActivityDTO  请求参数
     * @return  随手拍活动列表
     */
    @PostMapping("/page")
    public R page(@RequestBody PageEasyPhotoActivityDTO pageEasyPhotoActivityDTO){
        return comActEasyPhotoActivityService.pageActivity(pageEasyPhotoActivityDTO);
    }
    /**
     * 社区后台-添加随手拍活动
     * @param addEasyPhotoActivityDTO   请求参数
     * @return  添加结果
     */
    @PostMapping("/add")
    public R add(@RequestBody AddEasyPhotoActivityDTO addEasyPhotoActivityDTO){
        return comActEasyPhotoActivityService.addActivity(addEasyPhotoActivityDTO);
    }
    /**
     * 社区后台-编辑随手拍活动
     * @param editEasyPhotoActivityDTO  请求参数
     * @return  编辑结果
     */
    @PostMapping("/edit")
    public R edit(@RequestBody EditEasyPhotoActivityDTO editEasyPhotoActivityDTO){
        return comActEasyPhotoActivityService.editActivity(editEasyPhotoActivityDTO);
    }
    /**
     * 社区后台-取消随手拍活动
     * @param id    随手拍活动id
     * @return  取消结果
     */
    @GetMapping("/cancel")
    public R cancel(@RequestParam("id") Long id){
        return comActEasyPhotoActivityService.cancelActivity(id);
    }
    /**
     * 分页查询随手拍活动下居民参与记录
     * @param pageEasyPhotoActivityUserDTO  请求参数
     * @return  居民参与记录
     */
    @PostMapping("/page/user")
    public R pageUser(@RequestBody PageEasyPhotoActivityUserDTO pageEasyPhotoActivityUserDTO){
        return comActEasyPhotoActivityService.pageActivityUser(pageEasyPhotoActivityUserDTO);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/NeighborApi.java
@@ -7,6 +7,7 @@
import com.panzhihua.common.model.vos.neighbor.ChangeCommentStatusByAdminVO;
import com.panzhihua.common.model.vos.neighbor.EditNeighborCircleAdminVO;
import com.panzhihua.service_community.service.ComActNeighborCircleService;
import com.panzhihua.service_community.service.ComActNeighborCircleTopicService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
@@ -25,6 +26,8 @@
    @Resource
    private ComActNeighborCircleService comActNeighborCircleService;
    @Resource
    private ComActNeighborCircleTopicService comActNeighborCircleTopicService;
    /**
     * 分页查询邻里圈列表
@@ -72,7 +75,7 @@
     * @return 邻里圈列表
     */
    @PostMapping("addNeighborByAdmin")
    public R pageNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO) {
    public R addNeighborByAdmin(@RequestBody AddNeighborCircleAdminVO addNeighborCircleAdminVO) {
        return comActNeighborCircleService.addNeighborByAdmin(addNeighborCircleAdminVO);
    }
@@ -253,4 +256,44 @@
        return comActNeighborCircleService.neighborCommentReplyByApp(commentReplyAppDTO);
    }
    /**
     * 分页查询邻里圈话题列表
     * @param circleTopicAdminDTO   请求参数
     * @return  邻里圈话题列表
     */
    @PostMapping("pageNeighborTopicByAdmin")
    public R pageNeighborTopicByAdmin(@RequestBody ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO) {
        return comActNeighborCircleTopicService.pageNeighborTopicByAdmin(circleTopicAdminDTO);
    }
    /**
     * 添加邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  添加结果
     */
    @PostMapping("addNeighborTopicByAdmin")
    public R addNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) {
        return comActNeighborCircleTopicService.addNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    /**
     * 编辑邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  编辑结果
     */
    @PostMapping("editNeighborTopicByAdmin")
    public R editNeighborTopicByAdmin(@RequestBody AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO) {
        return comActNeighborCircleTopicService.editNeighborTopicByAdmin(addCircleTopicAdminDTO);
    }
    /**
     * 小程序查询邻里圈话题列表
     * @param communityId   社区id
     * @return  邻里圈话题列表
     */
    @GetMapping("getNeighborTopicByApp")
    public R getNeighborTopicByApp(@RequestParam("communityId") Long communityId) {
        return comActNeighborCircleTopicService.getNeighborTopicByApp(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoActivityMapper.java
@@ -1,8 +1,17 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoActivityVO;
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoActivityUserVO;
import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.Date;
/**
 * @auther lyq
@@ -12,4 +21,27 @@
@Mapper
public interface ComActEasyPhotoActivityMapper extends BaseMapper<ComActEasyPhotoActivityDO> {
    /**
     * 社区后台-分页查询随手拍活动列表
     * @param page  分页参数
     * @param pageEasyPhotoActivityDTO  请求参数
     * @return  随手拍活动列表
     */
    IPage<ComActEasyPhotoActivityVO> pageActivity(Page page, @Param("pageEasyPhotoActivityDTO") PageEasyPhotoActivityDTO pageEasyPhotoActivityDTO);
    /**
     * 判断当前活动时间是否与其他时间有冲突
     * @param startTime     活动开始时间
     * @param endTime   活动结束时间
     * @return  返回冲突的活动数量
     */
    Integer getEasyPhotoActivityTimeConflict(@Param("startTime") String startTime,@Param("endTime") String endTime,@Param("activityId") Long activityId);
    /**
     * 分页查询随手拍活动下居民参与记录
     * @param pageEasyPhotoActivityUserDTO  请求参数
     * @return  居民参与记录
     */
    IPage<ComActEasyPhotoActivityUserVO> pageActivityUser(Page page, @Param("pageEasyPhotoActivityUserDTO") PageEasyPhotoActivityUserDTO pageEasyPhotoActivityUserDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActEasyPhotoDAO.java
@@ -5,6 +5,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO;
import com.panzhihua.common.model.vos.community.TodoEventsVO;
import com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoStatisticsVO;
import com.panzhihua.common.model.vos.screen.EastPhotoTypeVO;
import com.panzhihua.common.model.vos.screen.EastPhotoVO;
import com.panzhihua.common.model.vos.screen.EasyPhotoDataVO;
@@ -27,100 +28,100 @@
public interface ComActEasyPhotoDAO extends BaseMapper<ComActEasyPhotoDO> {
    @Select("<script> " +
            "select t.* from ("+
            "SELECT\n" +
            "p.id,\n" +
            "u.`name` sponsor_name,\n" +
            "u.phone phone,\n" +
            "count(pu.id)giveThumbsUpNum,\n" +
            "u.image_url,\n" +
            "p.happen_addr,\n" +
            "su.`name` handler_name,\n" +
            "p.`status`,\n" +
            "p.`detail`,\n" +
            "p.`is_need_feed_back`,\n" +
            "p.`photo_path_list`,\n" +
            "p.create_at,\n" +
            "p.feedback_at,\n" +
            "p.is_report,\n" +
            "p.is_publicity,\n" +
            "p.examine_at \n" +
            "FROM\n" +
            "com_act_easy_photo p\n" +
            "JOIN sys_user u ON p.sponsor_id = u.user_id \n" +
            "SELECT " +
            "p.id, " +
            "u.`name` sponsor_name, " +
            "u.phone phone, " +
            "count(pu.id)giveThumbsUpNum, " +
            "u.image_url, " +
            "p.happen_addr, " +
            "su.`name` handler_name, " +
            "p.`status`, " +
            "p.`detail`, " +
            "p.`is_need_feed_back`, " +
            "p.`photo_path_list`, " +
            "p.create_at, " +
            "p.feedback_at, " +
            "p.is_report, " +
            "p.is_publicity, " +
            "p.examine_at  " +
            "FROM " +
            "com_act_easy_photo p " +
            "JOIN sys_user u ON p.sponsor_id = u.user_id  " +
            "<if test='comActEasyPhotoVO.sponsorName != null and comActEasyPhotoVO.sponsorName.trim() != &quot;&quot;'>" +
            "AND u.`name` like concat(#{comActEasyPhotoVO.sponsorName},'%')  \n" +
            "AND u.`name` like concat(#{comActEasyPhotoVO.sponsorName},'%')   " +
            " </if> " +
            "<if test='comActEasyPhotoVO.userId != null and comActEasyPhotoVO.userId != 0'>" +
            "AND u.`user_id` = #{comActEasyPhotoVO.userId} \n" +
            "AND u.`user_id` = #{comActEasyPhotoVO.userId}  " +
            " </if> " +
            "left join  com_act_easy_photo_user pu ON p.id = pu.easy_photo_id \n" +
            "left join  com_act_easy_photo_user pu ON p.id = pu.easy_photo_id  " +
            "<if test='comActEasyPhotoVO.handlerName == null or comActEasyPhotoVO.handlerName.trim() == &quot;&quot;'>" +
            "left JOIN sys_user su ON p.handler_id = su.user_id \n" +
            "left JOIN sys_user su ON p.handler_id = su.user_id  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != &quot;&quot;'>" +
            " JOIN sys_user su ON p.handler_id = su.user_id \n" +
            " JOIN sys_user su ON p.handler_id = su.user_id  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != &quot;&quot;'>" +
            "AND su.`name` like concat(#{comActEasyPhotoVO.handlerName},'%')  \n" +
            "AND su.`name` like concat(#{comActEasyPhotoVO.handlerName},'%')   " +
            " </if> " +
            "where p.del_tag = 0 and p.status !=2"+
            "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" +
            "  and p.community_id=#{comActEasyPhotoVO.communityId} " +
            " </if> " +
            "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != &quot;&quot;'>" +
            "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%')  \n" +
            "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%')   " +
            " </if> " +
            "<if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >" +
            "AND p.`status` = #{comActEasyPhotoVO.status} \n" +
            "AND p.`status` = #{comActEasyPhotoVO.status}  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.createBegin != null  '>" +
            "AND p.create_at BETWEEN #{comActEasyPhotoVO.createBegin} \n" +
            "AND p.create_at BETWEEN #{comActEasyPhotoVO.createBegin}  " +
            "AND #{comActEasyPhotoVO.createEnd}" +
            " </if> " +
            "<if test='comActEasyPhotoVO.sponsorId != null and comActEasyPhotoVO.sponsorId != 0'>" +
            "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId} \n" +
            "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId}  " +
            " </if> " +
            "group by p.id "+
            "union all "+
            "SELECT\n" +
            "p.id,\n" +
            "u.`name` sponsor_name,\n" +
            "u.phone phone,\n" +
            "count(pu.id)giveThumbsUpNum,\n" +
            "u.image_url,\n" +
            "p.happen_addr,\n" +
            "su.`name` handler_name,\n" +
            "p.`status`,\n" +
            "p.`detail`,\n" +
            "p.`is_need_feed_back`,\n" +
            "p.`photo_path_list`,\n" +
            "p.create_at,\n" +
            "p.feedback_at,\n" +
            "p.is_report,\n" +
            "p.is_publicity,\n" +
            "p.activity_type,\n" +
            "p.activity_amount,\n" +
            "p.examine_at \n" +
            "FROM\n" +
            "com_act_easy_photo p\n" +
            "JOIN sys_user u ON p.sponsor_id = u.user_id \n" +
            "SELECT " +
            "p.id, " +
            "u.`name` sponsor_name, " +
            "u.phone phone, " +
            "count(pu.id)giveThumbsUpNum, " +
            "u.image_url, " +
            "p.happen_addr, " +
            "su.`name` handler_name, " +
            "p.`status`, " +
            "p.`detail`, " +
            "p.`is_need_feed_back`, " +
            "p.`photo_path_list`, " +
            "p.create_at, " +
            "p.feedback_at, " +
            "p.is_report, " +
            "p.is_publicity, " +
            "p.activity_type, " +
            "p.activity_amount, " +
            "p.examine_at  " +
            "FROM " +
            "com_act_easy_photo p " +
            "JOIN sys_user u ON p.sponsor_id = u.user_id  " +
            "<if test='comActEasyPhotoVO.sponsorName != null and comActEasyPhotoVO.sponsorName.trim() != &quot;&quot;'>" +
            "AND u.`name` like concat(#{comActEasyPhotoVO.sponsorName},'%')  \n" +
            "AND u.`name` like concat(#{comActEasyPhotoVO.sponsorName},'%')   " +
            " </if> " +
            "<if test='comActEasyPhotoVO.userId != null and comActEasyPhotoVO.userId != 0'>" +
            "AND u.`user_id` = #{comActEasyPhotoVO.userId} \n" +
            "AND u.`user_id` = #{comActEasyPhotoVO.userId}  " +
            " </if> " +
            "left join  com_act_easy_photo_user pu ON p.id = pu.easy_photo_id \n" +
            "left join  com_act_easy_photo_user pu ON p.id = pu.easy_photo_id  " +
            "<if test='comActEasyPhotoVO.handlerName == null or comActEasyPhotoVO.handlerName.trim() == &quot;&quot;'>" +
            "left JOIN sys_user su ON p.handler_id = su.user_id \n" +
            "left JOIN sys_user su ON p.handler_id = su.user_id  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != &quot;&quot;'>" +
            " JOIN sys_user su ON p.handler_id = su.user_id \n" +
            " JOIN sys_user su ON p.handler_id = su.user_id  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.handlerName != null and comActEasyPhotoVO.handlerName.trim() != &quot;&quot;'>" +
            "AND su.`name` like concat(#{comActEasyPhotoVO.handlerName},'%') \n" +
            "AND su.`name` like concat(#{comActEasyPhotoVO.handlerName},'%')  " +
            " </if> " +
            "where  p.del_tag = 0 and  p.status=2 and p.is_need_feed_back=1 " +
            "<if test='comActEasyPhotoVO.backUserId != null and comActEasyPhotoVO.backUserId != 0'>" +
@@ -130,20 +131,20 @@
            "  and p.community_id=#{comActEasyPhotoVO.communityId} " +
            " </if> " +
            "<if test='comActEasyPhotoVO.happenAddr != null and comActEasyPhotoVO.happenAddr.trim() != &quot;&quot;'>" +
            "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%')  \n" +
            "AND p.happen_addr like concat(#{comActEasyPhotoVO.happenAddr},'%')   " +
            " </if> " +
            "<if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >" +
            "AND p.`status` = #{comActEasyPhotoVO.status} \n" +
            "AND p.`status` = #{comActEasyPhotoVO.status}  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.createBegin != null  '>" +
            "AND p.create_at BETWEEN #{comActEasyPhotoVO.createBegin} \n" +
            "AND p.create_at BETWEEN #{comActEasyPhotoVO.createBegin}  " +
            "AND #{comActEasyPhotoVO.createEnd}" +
            " </if> " +
            "<if test='comActEasyPhotoVO.sponsorId != null and comActEasyPhotoVO.sponsorId != 0'>" +
            "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId} \n" +
            "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId}  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.activityType != null'>" +
            "AND p.activity_type =#{comActEasyPhotoVO.activityType} \n" +
            "AND p.activity_type =#{comActEasyPhotoVO.activityType}  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.easyType != null and comActEasyPhotoVO.easyType == 1'>" +
            " AND (p.status = 1 or (p.status > 1 and is_need_feed_back = 0)) " +
@@ -155,99 +156,99 @@
            ")t order by t.create_at desc "+
            "</script>")
    IPage<ComActEasyPhotoVO> pageEasyPhoto(Page page, @Param("comActEasyPhotoVO") ComActEasyPhotoVO comActEasyPhotoVO);
    @Select("SELECT \n" +
            "p.id,\n" +
            "p.sponsor_id,\n" +
            "p.feedback_at,\n" +
            "p.examine_at,\n" +
            "p.create_at,\n" +
            "u.`name` sponsorName,\n" +
            "u.nick_name userNickName,\n" +
            "su.`name` handlerName,\n" +
            "u.`image_url`,\n" +
            "u.phone,\n" +
            "p.detail,\n" +
            "p.is_need_feed_back,\n" +
            "p.examine_at,\n" +
            "p.status,\n" +
            "p.reject_reason,\n" +
            "p.is_hide,\n" +
            "p.happen_addr,\n" +
            "p.addr_remark,\n" +
            "su.`name`,\n" +
            "p.handle_result,\n" +
            "p.photo_path_list,\n" +
            "p.activity_type,\n" +
            "p.activity_amount,\n" +
            "count(pu.id)giveThumbsUpNum,\n" +
            "p.handle_photo_list\n" +
            "FROM\n" +
            "com_act_easy_photo p\n" +
            "JOIN sys_user u on p.sponsor_id=u.user_id\n" +
            "LEFT JOIN sys_user su on p.handler_id=su.user_id\n" +
            "LEFT JOIN com_act_easy_photo_user pu on p.id=pu.easy_photo_id\n" +
    @Select("SELECT  " +
            "p.id, " +
            "p.sponsor_id, " +
            "p.feedback_at, " +
            "p.examine_at, " +
            "p.create_at, " +
            "u.`name` sponsorName, " +
            "u.nick_name userNickName, " +
            "su.`name` handlerName, " +
            "u.`image_url`, " +
            "u.phone, " +
            "p.detail, " +
            "p.is_need_feed_back, " +
            "p.examine_at, " +
            "p.status, " +
            "p.reject_reason, " +
            "p.is_hide, " +
            "p.happen_addr, " +
            "p.addr_remark, " +
            "su.`name`, " +
            "p.handle_result, " +
            "p.photo_path_list, " +
            "p.activity_type, " +
            "p.activity_amount, " +
            "count(pu.id)giveThumbsUpNum, " +
            "p.handle_photo_list " +
            "FROM " +
            "com_act_easy_photo p " +
            "JOIN sys_user u on p.sponsor_id=u.user_id " +
            "LEFT JOIN sys_user su on p.handler_id=su.user_id " +
            "LEFT JOIN com_act_easy_photo_user pu on p.id=pu.easy_photo_id " +
            "WHERE p.del_tag = 0 and p.id=#{id}")
    ComActEasyPhotoVO detailEasyPhoto(Long id);
    @Select("SELECT\n" +
            "'1' type\n" +
            "FROM\n" +
            " com_act_easy_photo p \n" +
            "WHERE\n" +
            " p.del_tag = 0 and p.community_id = #{communityId} \n" +
            "AND p.STATUS = 1 \n"+
            "\n" +
            "union all \n" +
            "\n" +
            "SELECT\n" +
            "'1' type\n" +
            "FROM\n" +
            "  com_act_easy_photo p \n" +
            "WHERE\n" +
            " p.del_tag = 0 and p.community_id = #{communityId} \n" +
            "AND p.`status` = 2 and p.is_need_feed_back=1 and p.handler_id=#{userId}\n"
    @Select("SELECT " +
            "'1' type " +
            "FROM " +
            " com_act_easy_photo p  " +
            "WHERE " +
            " p.del_tag = 0 and p.community_id = #{communityId}  " +
            "AND p.STATUS = 1  "+
            " " +
            "union all  " +
            " " +
            "SELECT " +
            "'1' type " +
            "FROM " +
            "  com_act_easy_photo p  " +
            "WHERE " +
            " p.del_tag = 0 and p.community_id = #{communityId}  " +
            "AND p.`status` = 2 and p.is_need_feed_back=1 and p.handler_id=#{userId} "
            )
    List<TodoEventsVO> selectNeedToDo(@Param("communityId") Long communityId, @Param("userId") Long userId);
    @Select("<script> " +
            "SELECT\n" +
            "p.id,\n" +
            "u.`name` sponsor_name,\n" +
            "u.`nick_name` userNickName,\n" +
            "u.phone sponsor_phone,\n" +
            "count(DISTINCT pu.id)giveThumbsUpNum,\n" +
            "count(DISTINCT c.id)commentNum,\n" +
            "u.image_url,\n" +
            "p.happen_addr,\n" +
            "su.`name` handler_name,\n" +
            "p.`status`,\n" +
            "p.`is_hide`,\n" +
            "p.`detail`,\n" +
            "p.`is_need_feed_back`,\n" +
            "p.`photo_path_list`,\n" +
            "p.create_at,\n" +
            "p.feedback_at,\n" +
            "p.activity_type,\n" +
            "p.activity_amount,\n" +
            "p.examine_at \n" +
            "FROM\n" +
            "com_act_easy_photo p\n" +
            "JOIN sys_user u ON p.sponsor_id = u.user_id \n" +
            "left join  com_act_easy_photo_user pu ON p.id = pu.easy_photo_id \n" +
            "left JOIN sys_user su ON p.handler_id = su.user_id \n" +
            "left JOIN com_act_easy_photo_comment c ON p.id = c.easy_photo_id \n" +
            "SELECT " +
            "p.id, " +
            "u.`name` sponsor_name, " +
            "u.`nick_name` userNickName, " +
            "u.phone sponsor_phone, " +
            "count(DISTINCT pu.id)giveThumbsUpNum, " +
            "count(DISTINCT c.id)commentNum, " +
            "u.image_url, " +
            "p.happen_addr, " +
            "su.`name` handler_name, " +
            "p.`status`, " +
            "p.`is_hide`, " +
            "p.`detail`, " +
            "p.`is_need_feed_back`, " +
            "p.`photo_path_list`, " +
            "p.create_at, " +
            "p.feedback_at, " +
            "p.activity_type, " +
            "p.activity_amount, " +
            "p.examine_at  " +
            "FROM " +
            "com_act_easy_photo p " +
            "JOIN sys_user u ON p.sponsor_id = u.user_id  " +
            "left join  com_act_easy_photo_user pu ON p.id = pu.easy_photo_id  " +
            "left JOIN sys_user su ON p.handler_id = su.user_id  " +
            "left JOIN com_act_easy_photo_comment c ON p.id = c.easy_photo_id  " +
            " <where>" +
            " p.del_tag = 0  "  +
            "<if test='comActEasyPhotoVO.communityId != null and comActEasyPhotoVO.communityId != 0'>" +
            "  and p.community_id=#{comActEasyPhotoVO.communityId} " +
            " </if> " +
            "<if test='comActEasyPhotoVO.status != null and comActEasyPhotoVO.status!=0' >" +
            "AND p.`status` = #{comActEasyPhotoVO.status} \n" +
            "AND p.`status` = #{comActEasyPhotoVO.status}  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.sponsorId != null and comActEasyPhotoVO.sponsorId != 0'>" +
            "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId} \n" +
            "AND p.sponsor_id =#{comActEasyPhotoVO.sponsorId}  " +
            " </if> " +
            "<if test='comActEasyPhotoVO.sponsorId == null or comActEasyPhotoVO.sponsorId==0'>" +
            "AND p.`status` in (2,4) \n" +
            "AND p.`status` in (2,4)  " +
            " </if> " +
            "group by p.id "+
            "order by p.create_at desc "+
@@ -287,4 +288,16 @@
            "(SELECT COUNT(id) FROM com_act_easy_photo WHERE community_id =#{communityId} AND handle_status = 2 AND #{start} < create_at and create_at < #{end}) AS deal " +
            "FROM com_act_easy_photo WHERE community_id = #{communityId} AND #{start} < create_at and create_at < #{end} ")
    EastPhotoVO countByTime(@Param("start")String start, @Param("end")String end, @Param("nowDate")String nowDate, @Param("communityId")Long communityId);
    @Select("SELECT " +
            " count( id ) AS examineNum, " +
            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 2 AND community_id = #{communityId} ) AS verificationNum, " +
            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 3 AND community_id = #{communityId} ) AS rejectNum, " +
            " ( SELECT count( id ) FROM com_act_easy_photo WHERE `status` = 4 AND community_id = #{communityId} ) AS completeNum  " +
            "FROM " +
            " com_act_easy_photo  " +
            "WHERE " +
            " `status` = 1  " +
            " AND community_id = #{communityId}")
    ComActEasyPhotoStatisticsVO getEasyPhotoStatistics(@Param("communityId")Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleDAO.java
@@ -44,11 +44,16 @@
            "canc.type," +
            "su.nick_name as name," +
            "su.community_id," +
            "canct.name as topicName," +
            "su.image_url as headUrl " +
            " FROM " +
            " com_act_neighbor_circle AS canc" +
            " left join sys_user as su on su.user_id = canc.release_id" +
            " left join sys_user as su on su.user_id = canc.release_id " +
            " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " +
            " where canc.status = 2 and canc.community_id = #{neighborCircleAppDTO.communityId} " +
            "<if test='neighborCircleAppDTO.topicId != null '>" +
            " and canc.topic_id = #{neighborCircleAppDTO.topicId}  " +
            " </if> " +
            "<if test='neighborCircleAppDTO.type != null and neighborCircleAppDTO.type == 1'>" +
            " order by (canc.last_views_num + canc.last_comment_num + canc.last_fabulous_num) desc " +
            " </if> " +
@@ -63,19 +68,21 @@
    @Select("<script> " +
            "select canc.id,su.nick_name as name,su.image_url as headUrl,canc.release_content " +
            ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num " +
            ",canc.release_images,canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canct.name as topicName " +
            ",canc.is_boutique,canc.create_at,canc.reply_at,su.community_id,canc.type from com_act_neighbor_circle as canc " +
            " left join sys_user as su on su.user_id = canc.release_id where id = #{circleId}"+
            " left join sys_user as su on su.user_id = canc.release_id where id = #{circleId} "+
            " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id" +
            " </script>")
    ComActNeighborCircleDetailAppVO neighborDetailByApp(@Param("circleId") Long circleId);
    @Select("<script> \n"+
            "SELECT\n" +
            "nc.*,\n" +
            "u.`nick_name` AS releaseName,u.image_url,u.`type` as userType\n" +
            "u.`nick_name` AS releaseName,u.image_url,canct.`name` as topicName ,u.`type` as userType\n" +
            ",u.name as communityName\n" +
            "FROM\n" +
            "com_act_neighbor_circle nc\n" +
            "LEFT JOIN sys_user u ON nc.release_id = u.user_id \n" +
            "LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id \n" +
            "<where>"+
            "nc.community_id = #{neighborCircleAdminDTO.communityId}  \n"+
            "<if test='neighborCircleAdminDTO.releaseContent != null and neighborCircleAdminDTO.releaseContent != &quot;&quot;'>" +
@@ -98,10 +105,11 @@
    AdministratorsUserVO selectUserByUserId(@Param("userId") Long userId);
    @Select("<script> " +
            "select canc.id,canc.release_content,canc.release_images,canc.status,canc.create_at" +
            "select canc.id,canc.release_content,canc.release_images,canc.status,canc.create_at,canct.name as topicName" +
            ",canc.comment_num,canc.fabulous_num,canc.forward_num,canc.views_num,canc.refuse_reason,su.nick_name as name,su.image_url as headUrl " +
            " from com_act_neighbor_circle as canc " +
            " left join sys_user as su on su.user_id = canc.release_id " +
            " left join com_act_neighbor_circle_topic as canct on canct.id = canc.topic_id " +
            " where canc.release_id = #{userId} and canc.status != 3 order by create_at desc" +
            " </script>")
    IPage<ComActNeighborCircleAppVO> neighborExamineByApp(Page page,@Param("userId") Long userId);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActNeighborCircleTopicMapper.java
New file
@@ -0,0 +1,36 @@
package com.panzhihua.service_community.dao;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAdminVO;
import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO;
import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @auther lyq
 * @create 2021-07-06 15:04:37
 * @describe 邻里圈话题表mapper类
 */
@Mapper
public interface ComActNeighborCircleTopicMapper extends BaseMapper<ComActNeighborCircleTopicDO> {
    /**
     * 分页查询邻里圈话题列表
     * @param circleTopicAdminDTO   请求参数
     * @return  邻里圈话题列表
     */
    IPage<ComActNeighborCircleTopicAdminVO> pageNeighborTopicByAdmin(Page page, @Param("circleTopicAdminDTO") ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO);
    /**
     * 小程序查询邻里圈话题列表
     * @param communityId   社区id
     * @return  邻里圈话题列表
     */
    List<ComActNeighborCircleTopicAppVO> getNeighborTopicByApp(@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletMapper.java
@@ -3,7 +3,9 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletAdminVO;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO;
import com.panzhihua.service_community.model.dos.ComActUserWalletDO;
import org.apache.ibatis.annotations.Mapper;
@@ -28,4 +30,13 @@
     */
    IPage<ComActWalletRankingVO> getWalletRanking(Page page, @Param("walletTradeDTO") PageComActWalletTradeDTO walletTradeDTO);
    /**
     * 分页查询收益结算列表
     * @param pageWalletAdminDTO    请求参数
     * @return  收益结算列表
     */
    IPage<ComActWalletAdminVO> getUserWalletList(Page page, @Param("pageWalletAdminDTO") PageComActWalletAdminDTO pageWalletAdminDTO);
    void insertSysAgreement(@Param("content") String content,@Param("communityId") Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActUserWalletTradeMapper.java
@@ -3,7 +3,9 @@
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeAdminVO;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeVO;
import com.panzhihua.service_community.model.dos.ComActUserWalletTradeDO;
import org.apache.ibatis.annotations.Mapper;
@@ -23,4 +25,6 @@
     * @return  收支记录
     */
    IPage<ComActWalletTradeVO> getUserWalletTradeList(Page page, @Param("walletTradeDTO") PageComActWalletTradeDTO walletTradeDTO);
    IPage<ComActWalletTradeAdminVO> getUserWalletTradeAdmin(Page page, @Param("walletTradeDTO") PageComActWalletTradeAdminDTO pageTradeAdminDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActDiscussOptionDO.java
@@ -34,6 +34,11 @@
    private String optionContent;
    /**
     * 选项图片url
     */
    private String optionUrl;
    /**
     * create_at
     */
    @TableField(fill = FieldFill.INSERT)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleDO.java
@@ -112,6 +112,11 @@
    private Integer lastViewsNum;
    /**
     * 话题id
     */
    private Long topicId;
    /**
     * 发布类型(1.小程序发布  2.后台发布)
     */
    private Integer type;
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComActNeighborCircleTopicDO.java
New file
@@ -0,0 +1,65 @@
package com.panzhihua.service_community.model.dos;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
 * @auther lyq
 * @create 2021-07-06 15:04:37
 * @describe 邻里圈话题表实体类
 */
@Data
@TableName("com_act_neighbor_circle_topic")
public class ComActNeighborCircleTopicDO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 社区id
     */
    private Long communityId;
    /**
     * 话题名称
     */
    private String name;
    /**
     * 状态(1.启用  2.禁用)
     */
    private Integer status;
    /**
     * 创建时间
     */
    private Date createAt;
    /**
     * 创建人
     */
    private Long createBy;
    @Override
    public String toString() {
        return "ComActNeighborCircleTopicDO{" +
                "id=" + id +
                ", name=" + name +
                ", status=" + status +
                ", createAt=" + createAt +
                ", createBy=" + createBy +
                "}";
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoActivityService.java
@@ -1,6 +1,10 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.ComActEasyPhotoActivityDO;
@@ -17,4 +21,45 @@
     */
    R getEasyPhotoActivity(Long communityId);
    /**
     * 社区后台-分页查询随手拍活动列表
     * @param pageEasyPhotoActivityDTO  请求参数
     * @return  随手拍活动列表
     */
    R pageActivity(PageEasyPhotoActivityDTO pageEasyPhotoActivityDTO);
    /**
     * 社区后台-添加随手拍活动
     * @param addEasyPhotoActivityDTO   请求参数
     * @return  添加结果
     */
    R addActivity(AddEasyPhotoActivityDTO addEasyPhotoActivityDTO);
    /**
     * 社区后台-编辑随手拍活动
     * @param editEasyPhotoActivityDTO  请求参数
     * @return  编辑结果
     */
    R editActivity(EditEasyPhotoActivityDTO editEasyPhotoActivityDTO);
    /**
     * 社区后台-取消随手拍活动
     * @param id    随手拍活动id
     * @return  取消结果
     */
    R cancelActivity(Long id);
    /**
     * 分页查询随手拍活动下居民参与记录
     * @param pageEasyPhotoActivityUserDTO  请求参数
     * @return  居民参与记录
     */
    R pageActivityUser(PageEasyPhotoActivityUserDTO pageEasyPhotoActivityUserDTO);
    /**
     * 随手拍活动定时任务
     * @return  执行结果
     */
    R timeTaskEasyPhotoActivity();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActEasyPhotoService.java
@@ -84,5 +84,12 @@
     */
    R addComActEasyPhotoComment(ComActEasyPhotoCommentDTO comActEasyPhotoCommentDTO);
    /**
     * 社区随手拍列表统计
     * @param communityId   社区id
     * @return  统计结果
     */
    R easyPhotoStatistics(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActNeighborCircleTopicService.java
New file
@@ -0,0 +1,44 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO;
/**
 * @auther lyq
 * @create 2021-07-06 15:04:37
 * @describe 邻里圈话题表服务类
 */
public interface ComActNeighborCircleTopicService extends IService<ComActNeighborCircleTopicDO> {
    /**
     * 分页查询邻里圈话题列表
     * @param circleTopicAdminDTO   请求参数
     * @return  邻里圈话题列表
     */
    R pageNeighborTopicByAdmin(ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO);
    /**
     * 添加邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  添加结果
     */
    R addNeighborTopicByAdmin(AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO);
    /**
     * 编辑邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  编辑结果
     */
    R editNeighborTopicByAdmin(AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO);
    /**
     * 小程序查询邻里圈话题列表
     * @param communityId   社区id
     * @return  邻里圈话题列表
     */
    R getNeighborTopicByApp(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletService.java
@@ -2,6 +2,8 @@
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.ComActUserWalletDO;
@@ -35,4 +37,18 @@
     */
    void examineAddMoney(Integer activityType,Long easyPhotoId,Long userId);
    /**
     * 分页查询收益结算列表
     * @param pageWalletAdminDTO    请求参数
     * @return  收益结算列表
     */
    R pageUserWalletAdmin(PageComActWalletAdminDTO pageWalletAdminDTO);
    /**
     * 用户结算收益
     * @param settlementAdminDTO    请求参数
     * @return  结算结果
     */
    R userWalletSettlementAdmin(ComActWalletSettlementAdminDTO settlementAdminDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComActUserWalletTradeService.java
@@ -1,6 +1,7 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.ComActUserWalletTradeDO;
@@ -35,4 +36,5 @@
     */
    Long addWalletTrade(Long userId, Long communityId, Long serviceId, BigDecimal amount,Integer type,String remark,Long createBy,Long walletId,Integer changeType);
    R pageUserWalletTradeAdmin(PageComActWalletTradeAdminDTO pageTradeAdminDTO);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java
@@ -24,6 +24,7 @@
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.stream.Collectors;
@@ -71,13 +72,14 @@
            ComActDiscussDO comActDiscussDO1 = comActDiscussDAO.selectOne(new QueryWrapper<ComActDiscussDO>().lambda().eq(ComActDiscussDO::getDiscussSubject, comActDiscussDTO.getDiscussSubject()).eq(ComActDiscussDO::getUserId, comActDiscussDTO.getUserId()).last(" order by create_at desc limit 1 "));
            Long comActDiscussDO1Id = comActDiscussDO1.getId();
            Integer type = comActDiscussDTO.getType();
            if (type.intValue()==2) {
                List<String> discussOptions = comActDiscussDTO.getDiscussOptions();
            if (type.equals(2)) {
                List<ComActDiscussOptionDTO> discussOptions = comActDiscussDTO.getDiscussOptions();
                List<ComActDiscussOptionDO> comActDiscussOptionDOS=new ArrayList<>();
                discussOptions.forEach(s -> {
                    ComActDiscussOptionDO comActDiscussOptionDO=new ComActDiscussOptionDO();
                    comActDiscussOptionDO.setDiscussId(comActDiscussDO1Id);
                    comActDiscussOptionDO.setOptionContent(s);
                    comActDiscussOptionDO.setOptionContent(s.getOptionContent());
                    comActDiscussOptionDO.setOptionUrl(s.getOptionUrl());
                    comActDiscussOptionDOS.add(comActDiscussOptionDO);
                });
                comActDiscussOptionService.saveBatch(comActDiscussOptionDOS);
@@ -106,7 +108,7 @@
        Integer integer1 = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, id));
        comActDiscussVO.setSignNum(integer1);
        Integer type = comActDiscussVO.getType();
        if (type.intValue()==2) {
        if (type.equals(2)) {
            List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList(new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id));
            List<ComActDiscussOptionVO> comActDiscussOptionVOS=new ArrayList<>();
            comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> {
@@ -117,6 +119,7 @@
                comActDiscussOptionVO.setNum(selectCount);
                comActDiscussOptionVOS.add(comActDiscussOptionVO);
            });
            comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed());
            comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS);
        }
        Long userId = comActDiscussDO.getUserId();
@@ -335,7 +338,7 @@
            records.forEach(comActDiscussVO -> {
                Integer type = comActDiscussVO.getType();
                Long id = comActDiscussVO.getId();
                if (type.intValue()==2) {
                if (type.equals(2)) {
                    List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList(new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id));
                    List<ComActDiscussOptionVO> comActDiscussOptionVOS=new ArrayList<>();
                    comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> {
@@ -346,6 +349,7 @@
                        comActDiscussOptionVO.setNum(selectCount);
                        comActDiscussOptionVOS.add(comActDiscussOptionVO);
                    });
                    comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed());
                    comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS);
                }
                Integer integer = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, comActDiscussVO.getId()).eq(ComActDiscussUserDO::getUserId, loginUserId));
@@ -469,7 +473,7 @@
        Integer integer1 = comActDiscussUserDAO.selectCount(new QueryWrapper<ComActDiscussUserDO>().lambda().eq(ComActDiscussUserDO::getDiscussId, id));
        comActDiscussVO.setSignNum(integer1);
        Integer type = comActDiscussVO.getType();
        if (type.intValue()==2) {
        if (type.equals(2)) {
            List<ComActDiscussOptionDO> comActDiscussOptionDOS = comActDiscussOptionDAO.selectList(new QueryWrapper<ComActDiscussOptionDO>().lambda().eq(ComActDiscussOptionDO::getDiscussId, id));
            List<ComActDiscussOptionVO> comActDiscussOptionVOS=new ArrayList<>();
            comActDiscussOptionDOS.forEach(comActDiscussOptionDO -> {
@@ -480,6 +484,7 @@
                comActDiscussOptionVO.setNum(selectCount);
                comActDiscussOptionVOS.add(comActDiscussOptionVO);
            });
            comActDiscussOptionVOS.sort(Comparator.comparing(ComActDiscussOptionVO::getNum).reversed());
            comActDiscussVO.setComActDiscussOptionVOS(comActDiscussOptionVOS);
        }
        Long userId = comActDiscussDO.getUserId();
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java
@@ -1,7 +1,12 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.community.easyPhoto.AddEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.EditEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO;
import com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.ComActEasyPhotoActivityVO;
import com.panzhihua.common.utlis.DateUtils;
@@ -34,6 +39,7 @@
        Date nowDate = DateUtils.getCurrentDate(DateUtils.ymdhms_format);
        List<ComActEasyPhotoActivityDO> photoActivityDOS = this.baseMapper.selectList(
                new QueryWrapper<ComActEasyPhotoActivityDO>().lambda().eq(ComActEasyPhotoActivityDO::getCommunityId,communityId)
                        .eq(ComActEasyPhotoActivityDO::getStatus,ComActEasyPhotoActivityDO.status.jxz)
                        .le(ComActEasyPhotoActivityDO::getActivityStartAt,nowDate).ge(ComActEasyPhotoActivityDO::getActivityEndAt,nowDate));
        if(!photoActivityDOS.isEmpty()){
            ComActEasyPhotoActivityDO photoActivityDO = photoActivityDOS.get(0);
@@ -42,4 +48,131 @@
        }
        return R.ok();
    }
    /**
     * 社区后台-分页查询随手拍活动列表
     * @param pageEasyPhotoActivityDTO  请求参数
     * @return  随手拍活动列表
     */
    @Override
    public R pageActivity(PageEasyPhotoActivityDTO pageEasyPhotoActivityDTO){
        return R.ok(this.baseMapper.pageActivity(new Page(pageEasyPhotoActivityDTO.getPageNum(),pageEasyPhotoActivityDTO.getPageSize()),pageEasyPhotoActivityDTO));
    }
    /**
     * 社区后台-添加随手拍活动
     * @param addEasyPhotoActivityDTO   请求参数
     * @return  添加结果
     */
    @Override
    public R addActivity(AddEasyPhotoActivityDTO addEasyPhotoActivityDTO){
        //判断当前活动时间是否与其他时间有冲突
        Integer count = this.baseMapper.getEasyPhotoActivityTimeConflict(addEasyPhotoActivityDTO.getActivityStartAt(),addEasyPhotoActivityDTO.getActivityEndAt(),null);
        if(count > 0){
            return R.fail("在此期间已有活动,请勿重复添加");
        }
        ComActEasyPhotoActivityDO photoActivityDO = new ComActEasyPhotoActivityDO();
        BeanUtils.copyProperties(addEasyPhotoActivityDTO,photoActivityDO);
        photoActivityDO.setActivityStartAt(DateUtils.stringToDate(addEasyPhotoActivityDTO.getActivityStartAt(),DateUtils.ymdhms_format));
        photoActivityDO.setActivityEndAt(DateUtils.stringToDate(addEasyPhotoActivityDTO.getActivityEndAt(),DateUtils.ymdhms_format));
        photoActivityDO.setCreateAt(new Date());
        photoActivityDO.setReleaseAt(new Date());
        photoActivityDO.setStatus(1);
        photoActivityDO.setCount(0);
        if(this.baseMapper.insert(photoActivityDO) > 0){
            return R.ok();
        }
        return R.fail("添加失败");
    }
    /**
     * 社区后台-编辑随手拍活动
     * @param editEasyPhotoActivityDTO  请求参数
     * @return  编辑结果
     */
    @Override
    public R editActivity(EditEasyPhotoActivityDTO editEasyPhotoActivityDTO){
        ComActEasyPhotoActivityDO photoActivityDO = this.baseMapper.selectById(editEasyPhotoActivityDTO.getId());
        if(photoActivityDO == null){
            return R.fail("未查询到活动记录");
        }
        Integer count = this.baseMapper.getEasyPhotoActivityTimeConflict(editEasyPhotoActivityDTO.getActivityStartAt(),editEasyPhotoActivityDTO.getActivityEndAt(),editEasyPhotoActivityDTO.getId());
        if(count > 0){
            return R.fail("在此期间已有活动,请勿重复添加");
        }
        BeanUtils.copyProperties(editEasyPhotoActivityDTO,photoActivityDO);
        photoActivityDO.setActivityStartAt(DateUtils.stringToDate(editEasyPhotoActivityDTO.getActivityStartAt(),DateUtils.ymdhms_format));
        photoActivityDO.setActivityEndAt(DateUtils.stringToDate(editEasyPhotoActivityDTO.getActivityEndAt(),DateUtils.ymdhms_format));
        if(this.baseMapper.updateById(photoActivityDO) > 0){
            return R.ok();
        }
        return R.fail("编辑失败");
    }
    /**
     * 社区后台-取消随手拍活动
     * @param id    随手拍活动id
     * @return  取消结果
     */
    @Override
    public R cancelActivity(Long id){
        ComActEasyPhotoActivityDO photoActivityDO = this.baseMapper.selectById(id);
        if(photoActivityDO == null){
            return R.fail("未查询到活动记录");
        }
        photoActivityDO.setStatus(ComActEasyPhotoActivityDO.status.yqx);
        if(this.baseMapper.updateById(photoActivityDO) > 0){
            return R.ok();
        }
        return R.fail("取消失败");
    }
    /**
     * 分页查询随手拍活动下居民参与记录
     * @param activityUserDTO  请求参数
     * @return  居民参与记录
     */
    @Override
    public R pageActivityUser(PageEasyPhotoActivityUserDTO activityUserDTO){
        return R.ok(this.baseMapper.pageActivityUser(new Page(activityUserDTO.getPageNum(),activityUserDTO.getPageSize()),activityUserDTO));
    }
    /**
     * 随手拍活动定时任务
     * @return  执行结果
     */
    @Override
    public R timeTaskEasyPhotoActivity(){
        //定时任务扫描未开始活动,如果开始时间大于当前时间则更新活动状态
        log.info("定时任务检测未开始的随手拍活动,判断是否开始");
        List<ComActEasyPhotoActivityDO> photoActivityDOS = this.baseMapper.selectList(new QueryWrapper<ComActEasyPhotoActivityDO>()
                .lambda().eq(ComActEasyPhotoActivityDO::getStatus,ComActEasyPhotoActivityDO.status.dks));
        if(!photoActivityDOS.isEmpty()){
            Date nowDate = new Date();
            photoActivityDOS.forEach(photoActivity -> {
                if(photoActivity.getActivityStartAt().getTime() >= nowDate.getTime()){
                    photoActivity.setStatus(ComActEasyPhotoActivityDO.status.jxz);
                    this.baseMapper.updateById(photoActivity);
                }
            });
        }
        //定时任务扫描已开始活动,如果结束时间大于当前时间则更新活动状态
        log.info("定时任务检测已开始的随手拍活动,判断活动是否已结束");
        List<ComActEasyPhotoActivityDO> oldPhotoActivityDOS = this.baseMapper.selectList(new QueryWrapper<ComActEasyPhotoActivityDO>()
                .lambda().eq(ComActEasyPhotoActivityDO::getStatus,ComActEasyPhotoActivityDO.status.jxz));
        if(!oldPhotoActivityDOS.isEmpty()){
            Date nowDate = new Date();
            oldPhotoActivityDOS.forEach(photoActivity -> {
                if(photoActivity.getActivityEndAt().getTime() <= nowDate.getTime()){
                    photoActivity.setStatus(ComActEasyPhotoActivityDO.status.yjs);
                    this.baseMapper.updateById(photoActivity);
                }
            });
        }
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java
@@ -382,7 +382,15 @@
        return R.fail();
    }
    /**
     * 社区随手拍列表统计
     * @param communityId   社区id
     * @return  统计结果
     */
    @Override
    public R easyPhotoStatistics(Long communityId){
        return R.ok(this.baseMapper.getEasyPhotoStatistics(communityId));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleServiceImpl.java
@@ -71,6 +71,8 @@
    private ComActNeighborCircleBrowseDAO comActNeighborCircleBrowseDAO;
    @Resource
    private ComActDAO comActDAO;
    @Resource
    private ComActNeighborCircleTopicMapper comActNeighborCircleTopicMapper;
    /**
     * 分页查询邻里圈列表
@@ -539,13 +541,19 @@
    @Override
    public R detailNeighborByAdmin(Long id) {
        ComActNeighborCircleDO comActNeighborCircleDO = this.baseMapper.selectById(id);
        AdministratorsUserVO user = this.baseMapper.selectUserByUserId(comActNeighborCircleDO.getReleaseId());
        if (comActNeighborCircleDO == null) {
            return R.fail("id有误");
        }
        AdministratorsUserVO user = this.baseMapper.selectUserByUserId(comActNeighborCircleDO.getReleaseId());
        DetailNeighborCircleAdminVO vo = new DetailNeighborCircleAdminVO();
        BeanUtils.copyProperties(comActNeighborCircleDO, vo);
        vo.setReleaseName(user.getName());
        //查询话题名称
        if(comActNeighborCircleDO.getTopicId() != null){
            ComActNeighborCircleTopicDO circleTopicDO = comActNeighborCircleTopicMapper.selectById(comActNeighborCircleDO.getTopicId());
            vo.setTopicName(circleTopicDO.getName());
        }
        return R.ok(vo);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActNeighborCircleTopicServiceImpl.java
New file
@@ -0,0 +1,104 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.neighbor.AddNeighborCircleTopicAdminDTO;
import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.dao.ComActNeighborCircleTopicMapper;
import com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO;
import com.panzhihua.service_community.service.ComActNeighborCircleTopicService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.Date;
/**
 * @auther lyq
 * @create 2021-07-06 15:04:37
 * @describe 邻里圈话题表服务实现类
 */
@Slf4j
@Service
public class ComActNeighborCircleTopicServiceImpl extends ServiceImpl<ComActNeighborCircleTopicMapper, ComActNeighborCircleTopicDO> implements ComActNeighborCircleTopicService {
    /**
     * 分页查询邻里圈话题列表
     * @param circleTopicAdminDTO   请求参数
     * @return  邻里圈话题列表
     */
    @Override
    public R pageNeighborTopicByAdmin(ComActNeighborCircleTopicAdminDTO circleTopicAdminDTO){
        return R.ok(this.baseMapper.pageNeighborTopicByAdmin(new Page(circleTopicAdminDTO.getPageNum(),circleTopicAdminDTO.getPageSize()),circleTopicAdminDTO));
    }
    /**
     * 添加邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  添加结果
     */
    @Override
    public R addNeighborTopicByAdmin(AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO){
        ComActNeighborCircleTopicDO circleTopicDO = this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>()
                .lambda().eq(ComActNeighborCircleTopicDO::getName,addCircleTopicAdminDTO.getName())
                .eq(ComActNeighborCircleTopicDO::getCommunityId,addCircleTopicAdminDTO.getCommunityId()));
        if(circleTopicDO != null){
            return R.fail("该话题已存在");
        }
        circleTopicDO = new ComActNeighborCircleTopicDO();
        BeanUtils.copyProperties(addCircleTopicAdminDTO,circleTopicDO);
        circleTopicDO.setStatus(1);
        circleTopicDO.setCreateAt(new Date());
        circleTopicDO.setCreateBy(addCircleTopicAdminDTO.getUserId());
        if(this.baseMapper.insert(circleTopicDO) > 0){
            return R.ok();
        }
        return R.fail("添加失败");
    }
    /**
     * 编辑邻里圈话题
     * @param addCircleTopicAdminDTO    请求参数
     * @return  编辑结果
     */
    @Override
    public R editNeighborTopicByAdmin(AddNeighborCircleTopicAdminDTO addCircleTopicAdminDTO){
        ComActNeighborCircleTopicDO circleTopicDO = this.baseMapper.selectById(addCircleTopicAdminDTO.getId());
        if(circleTopicDO == null){
            return R.fail("未找到邻里圈话题记录");
        }
        if(StringUtils.isNotEmpty(addCircleTopicAdminDTO.getName())){
            ComActNeighborCircleTopicDO oldCircleTopicDO = this.baseMapper.selectOne(new QueryWrapper<ComActNeighborCircleTopicDO>()
                    .lambda().eq(ComActNeighborCircleTopicDO::getName,addCircleTopicAdminDTO.getName())
                    .eq(ComActNeighborCircleTopicDO::getCommunityId,addCircleTopicAdminDTO.getCommunityId())
                    .ne(ComActNeighborCircleTopicDO::getId,circleTopicDO.getId()));
            if(oldCircleTopicDO != null){
                return R.fail("该话题已存在");
            }
        }
        BeanUtils.copyProperties(addCircleTopicAdminDTO,circleTopicDO);
        if(this.baseMapper.updateById(circleTopicDO) > 0){
            return R.ok();
        }
        return R.fail("修改失败");
    }
    /**
     * 小程序查询邻里圈话题列表
     * @param communityId   社区id
     * @return  邻里圈话题列表
     */
    @Override
    public R getNeighborTopicByApp(Long communityId){
        return R.ok(this.baseMapper.getNeighborTopicByApp(communityId));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletServiceImpl.java
@@ -1,12 +1,17 @@
package com.panzhihua.service_community.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletDetailDTO;
import com.panzhihua.common.model.dtos.community.wallet.ComActWalletSettlementAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.wallet.ComActWalletVO;
import com.panzhihua.common.utlis.StringUtils;
import com.panzhihua.service_community.dao.ComActEasyPhotoActivityMapper;
import com.panzhihua.service_community.dao.ComActEasyPhotoDAO;
import com.panzhihua.service_community.dao.ComActUserWalletMapper;
@@ -20,6 +25,7 @@
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
@@ -73,7 +79,10 @@
        Map<String,String> resultMap = this.baseMapper.getCommunityName(walletDetailDTO.getCommunityId());
        if(!resultMap.isEmpty()){
            comActWalletVO.setCommunityName(resultMap.get("name"));
            comActWalletVO.setAgreement(resultMap.get("content"));
            if(StringUtils.isEmpty(resultMap.get("content"))){
                this.baseMapper.insertSysAgreement(Constants.PROFIT_EXPLAIN,walletDetailDTO.getCommunityId());
            }
            comActWalletVO.setAgreement(Constants.PROFIT_EXPLAIN);
        }
        return R.ok(comActWalletVO);
    }
@@ -119,9 +128,14 @@
            return;
        }
        Date nowDate = new Date();
        //活动正在进行中,需要给用户计算收益
        if(nowDate.getTime() - photoActivityDO.getActivityStartAt().getTime() > 0 && nowDate.getTime() - photoActivityDO.getActivityEndAt().getTime() < 0){
            photoActivityDO.setCount(photoActivityDO.getCount() + 1);
            comActEasyPhotoActivityMapper.updateById(photoActivityDO);
            //查询用户钱包
            ComActUserWalletDO userWalletDO = comActUserWalletMapper.selectOne(new QueryWrapper<ComActUserWalletDO>()
                    .lambda().eq(ComActUserWalletDO::getUserId,easyPhotoDO.getSponsorId()).eq(ComActUserWalletDO::getCommunityId,easyPhotoDO.getCommunityId()));
@@ -147,31 +161,31 @@
                profitAmount = photoActivityDO.getOrdinaryReward();
            }
            if(profitAmount.equals(BigDecimal.ZERO)){
            if(profitAmount.compareTo(BigDecimal.ZERO) == 0){
                log.error("此次参加活动的随手拍收益为0,不记录本次交易");
                return;
            }else{
                //记录钱包变动前金额
                BigDecimal oldIncomeAmount = userWalletDO.getIncomeAmount();
                BigDecimal oldAvailableAmount = userWalletDO.getAvailableAmount();
                BigDecimal oldSettlementAmount = userWalletDO.getSettlementAmount();
                //更新钱包金额
                userWalletDO.setEasyCount(userWalletDO.getEasyCount() + 1);
                userWalletDO.setIncomeAmount(userWalletDO.getIncomeAmount().add(profitAmount));
                userWalletDO.setAvailableAmount(userWalletDO.getAvailableAmount().add(profitAmount));
                comActUserWalletMapper.updateById(userWalletDO);
                //新增钱包资金交易记录
                Long tradeId = comActUserWalletTradeService.addWalletTrade(easyPhotoDO.getSponsorId(),easyPhotoDO.getCommunityId()
                        ,easyPhotoDO.getId(),profitAmount, ComActUserWalletTradeDO.type.fb,"发布随手拍"
                        ,userId,userWalletDO.getId(),ComActUserWalletTradeDO.changeType.add);
                //新增钱包资金变动记录
                comActUserWalletChangeService.addWalletChange(easyPhotoDO.getSponsorId(),easyPhotoDO.getCommunityId(),userWalletDO.getId()
                        ,oldIncomeAmount,userWalletDO.getIncomeAmount(),oldAvailableAmount,userWalletDO.getAvailableAmount()
                        ,oldSettlementAmount,userWalletDO.getSettlementAmount(),tradeId);
            }
            //记录钱包变动前金额
            BigDecimal oldIncomeAmount = userWalletDO.getIncomeAmount();
            BigDecimal oldAvailableAmount = userWalletDO.getAvailableAmount();
            BigDecimal oldSettlementAmount = userWalletDO.getSettlementAmount();
            //更新钱包金额
            userWalletDO.setIncomeAmount(userWalletDO.getIncomeAmount().add(profitAmount));
            userWalletDO.setAvailableAmount(userWalletDO.getAvailableAmount().add(profitAmount));
            comActUserWalletMapper.updateById(userWalletDO);
            //新增钱包资金交易记录
            Long tradeId = comActUserWalletTradeService.addWalletTrade(easyPhotoDO.getSponsorId(),easyPhotoDO.getCommunityId()
                    ,easyPhotoDO.getId(),profitAmount, ComActUserWalletTradeDO.type.fb,"发布随手拍"
                    ,userId,userWalletDO.getId(),ComActUserWalletTradeDO.changeType.add);
            //新增钱包资金变动记录
            comActUserWalletChangeService.addWalletChange(easyPhotoDO.getSponsorId(),easyPhotoDO.getCommunityId(),userWalletDO.getId()
                    ,oldIncomeAmount,userWalletDO.getIncomeAmount(),oldAvailableAmount,userWalletDO.getAvailableAmount()
                    ,oldSettlementAmount,userWalletDO.getSettlementAmount(),tradeId);
            //更新随手拍活动信息
            easyPhotoDO.setActivityType(activityType);
            easyPhotoDO.setActivityAmount(profitAmount);
@@ -179,4 +193,54 @@
        }
    }
    /**
     * 分页查询收益结算列表
     * @param pageWalletAdminDTO    请求参数
     * @return  收益结算列表
     */
    @Override
    public R pageUserWalletAdmin(PageComActWalletAdminDTO pageWalletAdminDTO){
        return R.ok(this.baseMapper.getUserWalletList(new Page(pageWalletAdminDTO.getPageNum(),pageWalletAdminDTO.getPageSize()),pageWalletAdminDTO));
    }
    /**
     * 用户结算收益
     * @param settlementAdminDTO    请求参数
     * @return  结算结果
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public R userWalletSettlementAdmin(ComActWalletSettlementAdminDTO settlementAdminDTO){
        //查询用户钱包
        ComActUserWalletDO userWalletDO = this.baseMapper.selectById(settlementAdminDTO.getId());
        if(userWalletDO == null){
            return R.fail("未查询到用户钱包");
        }
        if(userWalletDO.getAvailableAmount().compareTo(settlementAdminDTO.getSettlementAmount()) < 0){
            return R.fail("结算金额不能高于钱包可结算金额");
        }
        try {
            BigDecimal oldIncomeAmount = userWalletDO.getIncomeAmount();
            BigDecimal oldAvailableAmount = userWalletDO.getAvailableAmount();
            BigDecimal oldSettlementAmount = userWalletDO.getSettlementAmount();
            userWalletDO.setAvailableAmount(userWalletDO.getAvailableAmount().subtract(settlementAdminDTO.getSettlementAmount()));
            userWalletDO.setSettlementAmount(userWalletDO.getSettlementAmount().add(settlementAdminDTO.getSettlementAmount()));
            userWalletDO.setUpdateAt(new Date());
            this.baseMapper.updateById(userWalletDO);
            //添加钱包交易记录
            Long tradeServiceId = comActUserWalletTradeService.addWalletTrade(userWalletDO.getUserId(),userWalletDO.getCommunityId()
                    ,null,settlementAdminDTO.getSettlementAmount(),ComActUserWalletTradeDO.type.js
                    ,settlementAdminDTO.getRemark(),settlementAdminDTO.getUserId(),userWalletDO.getId(),ComActUserWalletTradeDO.changeType.reduce);
            //添加钱包变动记录
            comActUserWalletChangeService.addWalletChange(userWalletDO.getUserId(),userWalletDO.getCommunityId(),userWalletDO.getId()
                    ,oldIncomeAmount,userWalletDO.getIncomeAmount(),oldAvailableAmount,userWalletDO.getAvailableAmount()
                    ,oldSettlementAmount,userWalletDO.getSettlementAmount(),tradeServiceId);
            return R.ok();
        }catch (Exception e){
            log.error("给用户结算收益失败,原因:" + e.getMessage());
            return R.fail("结算失败");
        }
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActUserWalletTradeServiceImpl.java
@@ -2,6 +2,7 @@
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO;
import com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeDTO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.dao.ComActUserWalletTradeMapper;
@@ -62,4 +63,9 @@
        return walletTradeDO.getId();
    }
    @Override
    public R pageUserWalletTradeAdmin(PageComActWalletTradeAdminDTO pageTradeAdminDTO){
        return R.ok(this.baseMapper.getUserWalletTradeAdmin(new Page(pageTradeAdminDTO.getPageNum(),pageTradeAdminDTO.getPageSize()),pageTradeAdminDTO));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoActivityDOMapper.xml
@@ -23,4 +23,67 @@
        id, status, content, activity_start_at, activity_end_at, release_at, good_reward, excellent_reward, ordinary_reward, count, create_at, logo
    </sql>
    <select id="pageActivity" parameterType="com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityDTO"
            resultType="com.panzhihua.common.model.vos.community.ComActEasyPhotoActivityVO">
        select id,community_id,status,content,activity_start_at,activity_end_at,release_at,good_reward
        ,excellent_reward,ordinary_reward,count,logo from com_act_easy_photo_activity
        <where>
            <if test="pageEasyPhotoActivityDTO.status != null">
                and status = #{pageEasyPhotoActivityDTO.status}
            </if>
            <if test="pageEasyPhotoActivityDTO.communityId != null">
                and community_id = #{pageEasyPhotoActivityDTO.communityId}
            </if>
            <if test="pageEasyPhotoActivityDTO.startTime != null and pageEasyPhotoActivityDTO.startTime != &quot;&quot;
            and pageEasyPhotoActivityDTO.endTime != null and pageEasyPhotoActivityDTO.endTime != &quot;&quot;">
                and (
                #{pageEasyPhotoActivityDTO.startTime} BETWEEN activity_start_at AND activity_end_at OR
                #{pageEasyPhotoActivityDTO.endTime} BETWEEN activity_start_at AND activity_end_at OR
                activity_start_at BETWEEN #{pageEasyPhotoActivityDTO.startTime} AND #{pageEasyPhotoActivityDTO.endTime} OR
                activity_end_at   BETWEEN #{pageEasyPhotoActivityDTO.startTime} AND #{pageEasyPhotoActivityDTO.endTime}
                )
            </if>
        </where>
    </select>
    <select id="getEasyPhotoActivityTimeConflict" resultType="Integer">
        SELECT count(id)
        FROM com_act_easy_photo_activity
        WHERE status in (1,2) and (
        #{startTime} BETWEEN activity_start_at AND activity_end_at OR
        #{endTime} BETWEEN activity_start_at AND activity_end_at OR
        activity_start_at BETWEEN #{startTime} AND #{endTime} OR
        activity_end_at   BETWEEN #{startTime} AND #{endTime}
        )
        <if test="activityId != null">
            and id != #{activityId}
        </if>
    </select>
    <select id="pageActivityUser" parameterType="com.panzhihua.common.model.dtos.community.easyPhoto.PageEasyPhotoActivityUserDTO"
            resultType="com.panzhihua.common.model.vos.community.easyPhoto.ComActEasyPhotoActivityUserVO">
        SELECT
            caep.id,
            su.nick_name,
            su.name as userName,
            su.phone,
            caep.detail,
            caep.activity_type,
            caep.activity_amount,
            caep.`status`,
            caep.create_at
        FROM
            com_act_easy_photo AS caep
            LEFT JOIN sys_user AS su ON su.user_id = caep.sponsor_id
            <where>
                <if test="pageEasyPhotoActivityUserDTO.activityId != null">
                    and activity_id = #{pageEasyPhotoActivityUserDTO.activityId}
                </if>
            </where>
            order by caep.create_at desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActNeighborCircleTopicDOMapper.xml
New file
@@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.panzhihua.service_community.dao.ComActNeighborCircleTopicMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComActNeighborCircleTopicDO">
        <id column="id" property="id" />
        <result column="community_id" property="communityId" />
        <result column="name" property="name" />
        <result column="status" property="status" />
        <result column="create_at" property="createAt" />
        <result column="create_by" property="createBy" />
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, community_id, name, status, create_at, create_by
    </sql>
    <select id="pageNeighborTopicByAdmin" parameterType="com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleTopicAdminDTO"
            resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAdminVO">
        SELECT
            canct.id,
            canct.`name`,
            canct.`status`,
            canct.create_at,
            su.`name` as createBy
        FROM
            com_act_neighbor_circle_topic AS canct
            LEFT JOIN sys_user AS su ON su.user_id = canct.create_by
        <where>
            <if test="circleTopicAdminDTO.communityId != null">
                and canct.community_id = #{circleTopicAdminDTO.communityId}
            </if>
            <if test="circleTopicAdminDTO.status != null">
                and canct.status = #{circleTopicAdminDTO.status}
            </if>
            <if test="circleTopicAdminDTO.name != null and circleTopicAdminDTO.name != &quot;&quot;">
                and canct.name like concat(#{circleTopicAdminDTO.name},'%')
            </if>
        </where>
    </select>
    <select id="getNeighborTopicByApp" resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleTopicAppVO">
        select id,`name` from com_act_neighbor_circle_topic where `status` = 1 and community_id = #{communityId}
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletDOMapper.xml
@@ -33,7 +33,9 @@
    <select id="getWalletRanking" resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletRankingVO">
        SELECT
            su.`name` as userName,
            su.nick_name,
            su.image_url,
            cauw.income_amount,
            cauw.easy_count
        FROM
@@ -44,4 +46,36 @@
            cauw.income_amount DESC
    </select>
    <select id="getUserWalletList" parameterType="com.panzhihua.common.model.dtos.community.wallet.PageComActWalletAdminDTO"
            resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletAdminVO">
        SELECT
            cauw.id,
            su.user_id,
            su.`name` AS userName,
            su.nick_name,
            su.phone,
            cauw.income_amount,
            cauw.available_amount,
            cauw.settlement_amount
        FROM
            com_act_user_wallet AS cauw
            LEFT JOIN sys_user AS su ON su.user_id = cauw.user_id
        <where>
            <if test="pageWalletAdminDTO.communityId != null">
                AND cauw.community_id = #{pageWalletAdminDTO.communityId}
            </if>
            <if test="pageWalletAdminDTO.name != null and pageWalletAdminDTO.name != &quot;&quot;">
                AND (su.nick_name like concat (#{pageWalletAdminDTO.name},'%') or su.name like concat (#{pageWalletAdminDTO.name},'%'))
            </if>
            <if test="pageWalletAdminDTO.phone != null and pageWalletAdminDTO.phone != &quot;&quot;">
                AND su.phone = #{pageWalletAdminDTO.phone}
            </if>
        </where>
        order by cauw.create_at desc
    </select>
    <insert id="insertSysAgreement">
        insert into sys_user_agreement(`type`,content,create_at,`name`,community_id) values (5,#{content},now(),'收益说明',#{communityId})
    </insert>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActUserWalletTradeDOMapper.xml
@@ -39,4 +39,44 @@
            and cauwt.user_id = #{walletTradeDTO.userId}
    </select>
    <select id="getUserWalletTradeAdmin" parameterType="com.panzhihua.common.model.dtos.community.wallet.PageComActWalletTradeAdminDTO"
            resultType="com.panzhihua.common.model.vos.community.wallet.ComActWalletTradeAdminVO">
        SELECT
            cauwt.id,
            su.user_id,
            cauwt.amount,
            cauwt.type,
            su.`name` AS userName,
            su.nick_name,
            cauwt.change_type,
            su.phone,
            cauwt.create_at,
            su1.`name` AS operationUserName
        FROM
            com_act_user_wallet_trade AS cauwt
            LEFT JOIN sys_user AS su ON su.user_id = cauwt.user_id
            LEFT JOIN sys_user AS su1 ON su1.user_id = cauwt.create_by
        <where>
            <if test="walletTradeDTO.communityId != null">
                and cauwt.community_id = #{walletTradeDTO.communityId}
            </if>
            <if test="walletTradeDTO.type != null">
                and cauwt.type = #{walletTradeDTO.type}
            </if>
            <if test="walletTradeDTO.name != null and walletTradeDTO.name != &quot;&quot;">
                AND (su.nick_name like concat (#{walletTradeDTO.name},'%') or su.name like concat (#{walletTradeDTO.name},'%'))
            </if>
            <if test="walletTradeDTO.phone != null and walletTradeDTO.phone != &quot;&quot;">
                AND su.phone like concat (#{walletTradeDTO.phone},'%')
            </if>
            <if test="walletTradeDTO.startTime != null and walletTradeDTO.startTime != &quot;&quot;">
                AND cauwt.create_at <![CDATA[>=]]> #{walletTradeDTO.startTime}
            </if>
            <if test="walletTradeDTO.endTime != null and walletTradeDTO.endTime != &quot;&quot;">
                AND cauwt.create_at <![CDATA[<=]]> #{walletTradeDTO.endTime}
            </if>
        </where>
        order by create_at desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -968,5 +968,14 @@
        return userService.noTips(userId);
    }
    /**
     * 查询社区的收益说明
     * @param communityId   社区id
     * @return  收益说明
     */
    @PostMapping("listagreements")
    public R listAgreements(@RequestParam("communityId") Long communityId) {
        return userService.listAgreements(communityId);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -460,4 +460,11 @@
    R gridMemberEditStatus(EventGridMemberEditStatusDTO gridMemberEditDTO);
    R noTips(Long userId);
    /**
     * 查询社区的收益说明
     * @param communityId   社区id
     * @return  收益说明
     */
    R listAgreements(Long communityId);
}
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -2131,4 +2131,33 @@
        }
        return R.fail();
    }
    /**
     * 查询社区的收益说明
     * @param communityId   社区id
     * @return  收益说明
     */
    @Override
    public R listAgreements(Long communityId){
        List<SysUserAgreementDO> sysUserAgreementDOS = sysUserAgreementDAO.selectList(new LambdaQueryWrapper<SysUserAgreementDO>()
                .eq(SysUserAgreementDO::getCommunityId,communityId).eq(SysUserAgreementDO::getType,5));
        if (sysUserAgreementDOS.isEmpty()) {
            SysUserAgreementDO agreementDO = new SysUserAgreementDO();
            agreementDO.setCommunityId(communityId);
            agreementDO.setName("收益说明");
            agreementDO.setType(5);
            agreementDO.setCreateAt(new Date());
            agreementDO.setContent(Constants.PROFIT_EXPLAIN);
            sysUserAgreementDAO.insert(agreementDO);
            sysUserAgreementDOS.add(agreementDO);
        }
        List<SysUserAgreementVO> sysUserAgreementVOS = new ArrayList<>();
        sysUserAgreementDOS.forEach(sysUserAgreementDO -> {
            SysUserAgreementVO sysUserAgreementVO = new SysUserAgreementVO();
            BeanUtils.copyProperties(sysUserAgreementDO, sysUserAgreementVO);
            sysUserAgreementVOS.add(sysUserAgreementVO);
        });
        return R.ok(sysUserAgreementVOS);
    }
}
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/EasyPhotoActivityJobHandler.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.timejob.jobhandler;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.service.community.CommunityService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
@Slf4j
@Component
public class EasyPhotoActivityJobHandler {
    @Resource
    private CommunityService communityService;
    @XxlJob("timedTaskEasyPhotoActivityJobHandler")
    public ReturnT<String> timedTaskEasyPhotoActivityJobHandler(String param) throws Exception {
        log.info("定时任务扫描随手拍活动是否开始,激活状态");
        R r=communityService.timedTaskEasyPhotoActivity();
        log.info("执行结果【{}】",r.toString());
        return ReturnT.SUCCESS;
    }
}