罗元桥
2021-09-27 5f349fe34e3e33625f8593ec1b616f0c4528a12c
Merge branch 'test' into 'test_bak'

Test

See merge request root/zhihuishequ!196
38个文件已添加
49个文件已修改
3527 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ClusterApi.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/SystemManagementApi.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComClusterMemberExcelListen.java 196 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/PageClusterMemberDto.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/AddClusterAdminDto.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/AddClusterMemberAdminDto.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/EditClusterAdminDto.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/EditClusterMemberAdminDto.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/PageClusterAdminDto.java 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/PageClusterMemberAdminDto.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/convenient/ConvenientMerchantDTO.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/convenient/DisableOrEnableConvenientMerchantDTO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/ConvenientResetPasswordDTO.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComPensionAuthRecordVO.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/PageClusterMemberVo.java 41 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/PageClusterVo.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ClusterDetailAdminVo.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ClusterMemberNationVo.java 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ComClusterMemberExcelErrorVO.java 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ComClusterMemberExcelExportAdminVO.java 26 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ComClusterMemberExcelVO.java 35 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/PageClusterAdminVo.java 33 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/PageClusterMemberAdminVo.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/convenient/ConvenientProductVO.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyRepairVO.java 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java 137 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ClusterApi.java 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyAlarmApi.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/UserApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ClusterApi.java 184 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComClusterOrganizationMapper.java 37 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComClusterOrganizationMemberMapper.java 64 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActCommittee.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActFourMember.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActSocialOrg.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComProperty.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComClusterOrganizationDO.java 107 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComClusterOrganizationMemberDO.java 121 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComClusterOrganizationMemberService.java 92 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComClusterOrganizationService.java 59 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActCommitteeServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActFourMemberServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComClusterOrganizationMemberServiceImpl.java 278 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComClusterOrganizationServiceImpl.java 145 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java 14 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActCommitteeMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActFourMemberMapper.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationDOMapper.xml 58 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationMemberDOMapper.xml 139 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthRecordsMapper.xml 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthRecordMapper.xml 20 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientProductMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientServiceCategoryMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/pom.xml 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/KafkaConfig.java 31 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/CallForward.java 70 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/CallForwardDto.java 45 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/CustomBtn.java 69 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/DeviceInfoDto.java 255 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/TaskDetail.java 130 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/TaskInfo.java 28 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/listener/OrderListener.java 54 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/message/AlarmMessage.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/bootstrap.yml 29 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/RoleService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/RoleServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/ConvenientApi.java 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/filter/StoreValidFilter.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/ClusterApi.java
New file
@@ -0,0 +1,47 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.cluster.PageClusterMemberVo;
import com.panzhihua.common.model.vos.community.cluster.PageClusterVo;
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;
import java.util.Objects;
/**
 * title: 群团组织接口类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 群团组织接口类
 *
 * @author lyq
 * @date 2021/9/23 16:12
 */
@Slf4j
@Api(tags = {"群团组织"})
@RestController
@RequestMapping("/cluster/")
public class ClusterApi extends BaseController {
    @Resource
    private CommunityService communityService;
    @ApiOperation(value = "群团组织成员分页查询",response = PageClusterMemberVo.class)
    @PostMapping("/member/page")
    public R pageMemberClusterApplets(@RequestBody PageClusterMemberDto pageClusterMemberDto) {
        pageClusterMemberDto.setCommunityId(this.getCommunityId());
        return communityService.pageClusterMemberApplets(pageClusterMemberDto);
    }
    @ApiOperation(value = "群团组织列表",response = PageClusterVo.class)
    @GetMapping("list")
    public R listClusterApplets() {
        return communityService.listClusterApplets(this.getCommunityId());
    }
}
springcloud_k8s_panzhihuazhihuishequ/applets_backstage/src/main/java/com/panzhihua/applets_backstage/api/SystemManagementApi.java
@@ -84,9 +84,9 @@
    @ApiOperation(value = "角色下拉列表", response = RoleVO.class)
    @GetMapping("listrolebackstage")
    public R listRoleBackstage() {
        Long communityId = 0l;
        return userService.listRoleBackstage(communityId);
    public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) {
        Long communityId = 0L;
        return userService.listRoleBackstage(communityId,pageNum,pageSize);
    }
    @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class)
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/constants/Constants.java
@@ -186,6 +186,10 @@
    public static final String PENSION_RECORD_ERROR_LIST = "PENSION_RECORD_ERROR_LIST_";
    public static final String CLUSTER_MEMBER_ERROR_LIST = "CLUSTER_MEMBER_ERROR_LIST_";
    public static final String CLUSTER_MEMBER_DEFAULT_IMAGE_URL = "https://www.psciio.com/files/4822602b68af48bcbbea7842aa463227/a6a7882b3fd24d60ac6809fef42d879d.png";
    /**
     * 高德地图获取天气url
     */
@@ -212,4 +216,8 @@
     * 常量
     */
    public static final Integer ONE_HUNDRED = 100;
    /**
     * 字典表民族系统配置码key
     */
    public static final String NATION_DICT_KEY = "nation";
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComClusterMemberExcelListen.java
New file
@@ -0,0 +1,196 @@
package com.panzhihua.common.listen;
import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import com.alibaba.fastjson.JSONArray;
import com.google.common.collect.Lists;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.exceptions.ServiceException;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelErrorVO;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.utlis.ListUtils;
import com.panzhihua.common.utlis.StringUtils;
import lombok.extern.slf4j.Slf4j;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
/**
 * title: 群团组织成员导入监听
 * @author : lyq
 */
@Slf4j
public class ComClusterMemberExcelListen extends AnalysisEventListener<Map<Integer, String>> {
    /**
     * 每隔5条存储数据库,实际使用中可以3000条,然后清理list ,方便内存回收
     */
    private static final int BATCH_COUNT = 3000;
    private static int headSize = 0;
    List<Map<Integer, String>> list = new ArrayList<Map<Integer, String>>();
    private CommunityService communityService;
    private Long communityId;
    private Long userId;
    private Map<Integer, String> headData;
    private StringRedisTemplate stringRedisTemplate;
    public ComClusterMemberExcelListen(CommunityService communityService, Long communityId, Long userId,
                                       StringRedisTemplate stringRedisTemplate) {
        this.communityService = communityService;
        this.communityId = communityId;
        this.userId = userId;
        this.stringRedisTemplate = stringRedisTemplate;
    }
    @Override
    public void invoke(Map<Integer, String> data, AnalysisContext context) {
        list.add(data);
        if (list.size() >= BATCH_COUNT) {
            saveData();
            list.clear();
        }
    }
    /**
     * 这里会一行行的返回头
     *
     * @param headMap
     * @param context
     */
    @Override
    public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
        headSize = headMap.size();
        headData = headMap;
    }
    @Override
    public void doAfterAllAnalysed(AnalysisContext context) {
        saveData();
        log.info("所有数据解析完成!");
    }
    /**
     * 不是固定的列只能手动处理
     */
    private void saveData() {
        log.info("表格总数据:" + list.size());
        if (list.size() == 0) {
            throw new ServiceException("000", "导入数据为空!");
        }
        ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
        String key = Constants.CLUSTER_MEMBER_ERROR_LIST + communityId;
        int index = 2;
        try {
            ArrayList<ComClusterMemberExcelVO> voList = Lists.newArrayList();
            ArrayList<ComClusterMemberExcelErrorVO> mistakes = Lists.newArrayList();
            for (Map<Integer, String> oneData : list) {
                ComClusterMemberExcelVO vo = new ComClusterMemberExcelVO();
                if (StringUtils.isEmpty(oneData.get(0))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"名字不可为空,请填写姓名"));
                    continue;
                }
                vo.setName(oneData.get(0));
                if (StringUtils.isEmpty(oneData.get(1))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"组织不可为空,请填写组织名称"));
                    continue;
                }
                vo.setClusterName(oneData.get(1));
                if (StringUtils.isEmpty(oneData.get(2))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"职务不可为空,请填写职务"));
                    continue;
                }
                vo.setJob(oneData.get(2));
                if (StringUtils.isEmpty(oneData.get(3))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"联系电话不可为空,请填写联系电话"));
                    continue;
                }
                vo.setPhone(oneData.get(3));
                if (StringUtils.isEmpty(oneData.get(4))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"民族不可为空,请填写民族"));
                    continue;
                }else{
                    if(!oneData.get(4).contains("族")){
                        index++;
                        mistakes.add(setErrorObject(oneData,"填写的民族有误,请重新填写(民族格式:X族 如:汉族)"));
                        continue;
                    }
                }
                vo.setNation(oneData.get(4));
                if (StringUtils.isEmpty(oneData.get(5))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"住址不可为空,请填写住址"));
                    continue;
                }
                vo.setAddress(oneData.get(5));
                if (StringUtils.isEmpty(oneData.get(6))) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"身份证号不可为空,请填写身份证号码"));
                    continue;
                }
                // 判断身份证号码位数
                if (oneData.get(6).length() != 18) {
                    index++;
                    mistakes.add(setErrorObject(oneData,"身份证号位数有误,请检查身份证号码是否正确"));
                    continue;
                }
                vo.setIdCard(oneData.get(6).toUpperCase());
                voList.add(vo);
                index++;
            }
            List<ComClusterMemberExcelVO> newVoList =
                voList.stream().filter(ListUtils.distinctByKey(ComClusterMemberExcelVO::getIdCard))
                    .collect(Collectors.toList());
            R r = communityService.importClusterMember(newVoList, communityId, userId);
            if (!R.isOk(r)) {
                List<ComClusterMemberExcelErrorVO> list =
                    JSONArray.parseArray(JSONArray.toJSONString(r.getData()), ComClusterMemberExcelErrorVO.class);
                mistakes.addAll(list);
                valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS);
                throw new ServiceException("500", key);
            } else {
                if (!mistakes.isEmpty()) {
                    valueOperations.set(key, JSONArray.toJSONString(mistakes), 1, TimeUnit.HOURS);
                    throw new ServiceException("500", key);
                }
            }
        } catch (NumberFormatException e) {
            e.printStackTrace();
            throw new ServiceException("500", "导入失败");
        }
    }
    private void setError(Map<Integer, String> map, ComClusterMemberExcelErrorVO vo) {
        vo.setName(map.get(0));
        vo.setClusterName(map.get(1));
        vo.setJob(map.get(2));
        vo.setPhone(map.get(3));
        vo.setNation(map.get(4));
        vo.setAddress(map.get(5));
        vo.setIdCard(map.get(6));
    }
    /**
     * 组装错误信息
     * @param oneData   数据表格对象
     * @param error     错误信息
     * @return  错误对象
     */
    private ComClusterMemberExcelErrorVO setErrorObject(Map<Integer, String> oneData, String error){
        ComClusterMemberExcelErrorVO mistake = new ComClusterMemberExcelErrorVO();
        setError(oneData, mistake);
        mistake.setError(error);
        return mistake;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/PageClusterMemberDto.java
New file
@@ -0,0 +1,29 @@
package com.panzhihua.common.model.dtos.community.cluster;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织成员列表请求参数")
public class PageClusterMemberDto {
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
    @ApiModelProperty(value = "关键词")
    private String keyWord;
    @ApiModelProperty(value = "群团组织id")
    private Long clusterId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/AddClusterAdminDto.java
New file
@@ -0,0 +1,38 @@
package com.panzhihua.common.model.dtos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织列表请求参数")
public class AddClusterAdminDto {
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "组织名")
    private String name;
    @ApiModelProperty(value = "组织电话")
    private String phone;
    @ApiModelProperty(value = "组织地址")
    private String address;
    @ApiModelProperty(value = "状态(1.启用  2.禁用)")
    private Integer status;
    @ApiModelProperty(value = "组织logo")
    private String logo;
    @ApiModelProperty(value = "经度")
    private String lng;
    @ApiModelProperty(value = "纬度")
    private String lat;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/AddClusterMemberAdminDto.java
New file
@@ -0,0 +1,44 @@
package com.panzhihua.common.model.dtos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织列表请求参数")
public class AddClusterMemberAdminDto {
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty("群团组织成员名称")
    private String name;
    @ApiModelProperty("群团组织成员照片")
    private String imageUrl;
    @ApiModelProperty("群团组织成员职务")
    private String job;
    @ApiModelProperty("群团组织成员电话")
    private String phone;
    @ApiModelProperty("群团组织成员住址")
    private String address;
    @ApiModelProperty("群团组织成员身份证号码")
    private String idCard;
    @ApiModelProperty("所属群团组织id")
    private Long clusterId;
    @ApiModelProperty("状态(1.启用  2禁用)")
    private Integer status;
    @ApiModelProperty("民族code")
    private String nationCode;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/EditClusterAdminDto.java
New file
@@ -0,0 +1,41 @@
package com.panzhihua.common.model.dtos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织列表请求参数")
public class EditClusterAdminDto {
    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "组织名")
    private String name;
    @ApiModelProperty(value = "组织电话")
    private String phone;
    @ApiModelProperty(value = "组织地址")
    private String address;
    @ApiModelProperty(value = "状态(1.启用  2.禁用)")
    private Integer status;
    @ApiModelProperty(value = "组织logo")
    private String logo;
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "经度")
    private String lng;
    @ApiModelProperty(value = "纬度")
    private String lat;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/EditClusterMemberAdminDto.java
New file
@@ -0,0 +1,47 @@
package com.panzhihua.common.model.dtos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织列表请求参数")
public class EditClusterMemberAdminDto {
    @ApiModelProperty(value = "主键id")
    private Long id;
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty("群团组织成员名称")
    private String name;
    @ApiModelProperty("群团组织成员照片")
    private String imageUrl;
    @ApiModelProperty("群团组织成员职务")
    private String job;
    @ApiModelProperty("群团组织成员电话")
    private String phone;
    @ApiModelProperty("群团组织成员住址")
    private String address;
    @ApiModelProperty("群团组织成员身份证号码")
    private String idCard;
    @ApiModelProperty("所属群团组织id")
    private Long clusterId;
    @ApiModelProperty("状态(1.启用  2禁用)")
    private Integer status;
    @ApiModelProperty("民族code")
    private String nationCode;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/PageClusterAdminDto.java
New file
@@ -0,0 +1,29 @@
package com.panzhihua.common.model.dtos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织列表请求参数")
public class PageClusterAdminDto {
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
    @ApiModelProperty(value = "关键词")
    private String keyWord;
    @ApiModelProperty(value = "状态(1.启用  2.禁用)")
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/cluster/admin/PageClusterMemberAdminDto.java
New file
@@ -0,0 +1,32 @@
package com.panzhihua.common.model.dtos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员列表请求参数
 */
@Data
@ApiModel("分页查询群团组织成员列表请求参数")
public class PageClusterMemberAdminDto {
    @ApiModelProperty(value = "社区id",hidden = true)
    private Long communityId;
    @ApiModelProperty(value = "分页-当前页数",example = "1")
    private Long pageNum = 1L;
    @ApiModelProperty(value = "分页-每页记录数",example = "10")
    private Long pageSize = 10L;
    @ApiModelProperty(value = "关键词")
    private String keyWord;
    @ApiModelProperty(value = "状态(1.启用  2.禁用)")
    private Integer status;
    @ApiModelProperty(value = "群团组织id")
    private Long clusterId;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/convenient/ConvenientMerchantDTO.java
@@ -52,7 +52,7 @@
    private String idCard;
    @ApiModelProperty("咨询电话")
    @Pattern(groups = {AddGroup.class}, message = "咨询电话格式错误", regexp = "(1[3|4|5|7|8][0-9]\\d{8})|(\\d{3}-\\d{8}|\\d{4}-\\d{7})")
    @Pattern(groups = {AddGroup.class}, message = "咨询电话格式错误", regexp = "^(13[0-9]|14[01456879]|15[0-3,5-9]|16[2567]|17[0-8]|18[0-9]|19[0-3,5-9])\\d{8}$")
    private String phone;
    @ApiModelProperty("商家地址")
@@ -94,14 +94,12 @@
    private Integer businessStatus;
    @ApiModelProperty("管理账号")
    @Pattern(groups = {AddGroup.class}, message = "请输入6-10位管理账号,由英文或数字组成", regexp = "^[0-9A-Za-z]{6,10}$")
    @NotBlank(groups = {AddGroup.class}, message = "管理账号不能为空")
    private String account;
    @ApiModelProperty("登陆密码")
//    @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成",
//            regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@$!%*#?&])[A-Za-z\\d$@$!%*#?&]{8,12}$")
    @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成",
            regexp = "^(?=.*[A-Za-z])(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,}$")
            regexp = "^(?=.*[A-Za-z])(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,12}$")
    private String password;
    @ApiModelProperty(value = "所属社区id")
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/community/convenient/DisableOrEnableConvenientMerchantDTO.java
@@ -30,4 +30,7 @@
    @ApiModelProperty(value = "处理人", hidden = true)
    private Long updatedBy;
    @ApiModelProperty(value = "被禁用商家关联用户id", hidden = true)
    private List<Long> userIds;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/dtos/user/ConvenientResetPasswordDTO.java
@@ -26,6 +26,6 @@
    @ApiModelProperty("新密码")
    @Pattern(groups = {AddGroup.class}, message = "请输入8-12位登陆密码,由英文,数字和特殊符号组成",
            regexp = "^(?=.*[A-Za-z])(?=.*\\d)(?=.*[$@$!%*#?&])[A-Za-z\\d$@$!%*#?&]{8,12}$")
            regexp = "^(?=.*[A-Za-z])(?=(.*[\\d]){1,})(?=(.*[\\W]){1,})(?!.*\\s).{8,12}$")
    private String newPassword;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComMngVillageVO.java
@@ -64,4 +64,7 @@
    @ApiModelProperty("车辆数")
    private Integer carTotal = 0;
    @ApiModelProperty("名称")
    private String name;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/ComPensionAuthRecordVO.java
@@ -2,6 +2,9 @@
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.panzhihua.common.model.helper.encrypt.EncryptDecryptClass;
import com.panzhihua.common.model.helper.encrypt.EncryptDecryptField;
@@ -22,9 +25,11 @@
public class ComPensionAuthRecordVO {
    @ApiModelProperty(value = "自增id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    @ApiModelProperty(value = "养老金用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long pensionerId;
    @ApiModelProperty(value = "认证方式(1.视频认证 2.人脸认证)")
@@ -76,10 +81,14 @@
    @ApiModelProperty(value = "审核人员id")
    private String approverId;
    @ApiModelProperty(value = "审核人员名称")
    private String approverName;
    @ApiModelProperty(value = "审核状态(1.待审核 2.驳回 3.通过)")
    private Integer approvalStatus;
    @ApiModelProperty(value = "审核时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date approvalDate;
    @ApiModelProperty(value = "标记")
@@ -92,11 +101,14 @@
    private Integer authStatus;
    @ApiModelProperty(value = "认证时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date authDate;
    @ApiModelProperty(value = "创建时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createAt;
    @ApiModelProperty(value = "更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateAt;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/PageClusterMemberVo.java
New file
@@ -0,0 +1,41 @@
package com.panzhihua.common.model.vos.community.cluster;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员返回参数
 */
@Data
@ApiModel("分页查询群团组织成员返回参数")
public class PageClusterMemberVo {
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("群团组织成员名称")
    private String name;
    @ApiModelProperty("群团组织成员照片")
    private String imageUrl;
    @ApiModelProperty("群团组织成员职务")
    private String job;
    @ApiModelProperty("群团组织成员电话")
    private String phone;
    @ApiModelProperty("群团组织成员住址")
    private String address;
    @ApiModelProperty("群团组织成员身份证号码")
    private String idCard;
    @ApiModelProperty("所属群团组织id")
    private Long clusterId;
    @ApiModelProperty("所属群团组织名称")
    private String clusterName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/PageClusterVo.java
New file
@@ -0,0 +1,21 @@
package com.panzhihua.common.model.vos.community.cluster;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员返回参数
 */
@Data
@ApiModel("分页查询群团组织成员返回参数")
public class PageClusterVo {
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("群团组织成员名称")
    private String name;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ClusterDetailAdminVo.java
New file
@@ -0,0 +1,39 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 群团组织详情返回参数
 */
@Data
@ApiModel("群团组织详情返回参数")
public class ClusterDetailAdminVo {
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("群团组织成员名称")
    private String name;
    @ApiModelProperty("群团组织成员logo")
    private String logo;
    @ApiModelProperty("群团组织成员电话")
    private String phone;
    @ApiModelProperty("群团组织成员地址")
    private String address;
    @ApiModelProperty("状态(1.启用 2.禁用)")
    private Integer status;
    @ApiModelProperty("经度")
    private String lng;
    @ApiModelProperty("维度")
    private String lat;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ClusterMemberNationVo.java
New file
@@ -0,0 +1,21 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 查询系统民族列表返回参数
 */
@Data
@ApiModel("查询系统民族列表返回参数")
public class ClusterMemberNationVo {
    @ApiModelProperty("民族code")
    private String nationCode;
    @ApiModelProperty("民族名称")
    private String nationName;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ComClusterMemberExcelErrorVO.java
New file
@@ -0,0 +1,38 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * @description: 批量导入群团组织成员
 * @author : lyq
 */
@Data
public class ComClusterMemberExcelErrorVO implements Serializable {
    @ExcelProperty(value = "姓名", index = 0)
    private String name;
    @ExcelProperty(value = "组织名称", index = 1)
    private String clusterName;
    @ExcelProperty(value = "职务", index = 2)
    private String job;
    @ExcelProperty(value = "联系电话", index = 3)
    private String phone;
    @ExcelProperty(value = "民族", index = 4)
    private String nation;
    @ExcelProperty(value = "住址", index = 5)
    private String address;
    @ExcelProperty(value = "身份证号码", index = 6)
    private String idCard;
    @ExcelProperty(value = "错误信息", index = 7)
    private String error;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ComClusterMemberExcelExportAdminVO.java
New file
@@ -0,0 +1,26 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.math.BigDecimal;
/**
 * @author lyq
 * title 群团组织导出对象
 */
@Data
public class ComClusterMemberExcelExportAdminVO {
    @ExcelProperty(value = "姓名" ,index = 0)
    private String name;
    @ExcelProperty(value = "所属组织" ,index = 1)
    private String clusterName;
    @ExcelProperty(value = "职务" ,index = 2)
    private String job;
    @ExcelProperty(value = "联系电话" ,index = 3)
    private String phone;
    @ExcelProperty(value = "状态" ,index = 4)
    private String status;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/ComClusterMemberExcelVO.java
New file
@@ -0,0 +1,35 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import com.alibaba.excel.annotation.ExcelProperty;
import lombok.Data;
import java.io.Serializable;
/**
 * @description: 批量导入群团组织成员
 * @author : lyq
 */
@Data
public class ComClusterMemberExcelVO implements Serializable {
    @ExcelProperty(value = "姓名", index = 0)
    private String name;
    @ExcelProperty(value = "组织名称", index = 1)
    private String clusterName;
    @ExcelProperty(value = "职务", index = 2)
    private String job;
    @ExcelProperty(value = "联系电话", index = 3)
    private String phone;
    @ExcelProperty(value = "民族", index = 4)
    private String nation;
    @ExcelProperty(value = "住址", index = 5)
    private String address;
    @ExcelProperty(value = "身份证号码", index = 6)
    private String idCard;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/PageClusterAdminVo.java
New file
@@ -0,0 +1,33 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员返回参数
 */
@Data
@ApiModel("分页查询群团组织返回参数")
public class PageClusterAdminVo {
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("群团组织名称")
    private String name;
    @ApiModelProperty("群团组织logo")
    private String logo;
    @ApiModelProperty("群团组织电话")
    private String phone;
    @ApiModelProperty("群团组织地址")
    private String address;
    @ApiModelProperty("状态(1.启用 2.禁用)")
    private Integer status;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/cluster/admin/PageClusterMemberAdminVo.java
New file
@@ -0,0 +1,48 @@
package com.panzhihua.common.model.vos.community.cluster.admin;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
 * @author lyq
 * 分页查询群团组织成员返回参数
 */
@Data
@ApiModel("分页查询群团组织成员返回参数")
public class PageClusterMemberAdminVo {
    @ApiModelProperty("主键id")
    private Long id;
    @ApiModelProperty("群团组织成员名称")
    private String name;
    @ApiModelProperty("群团组织成员照片")
    private String imageUrl;
    @ApiModelProperty("群团组织成员职务")
    private String job;
    @ApiModelProperty("群团组织成员电话")
    private String phone;
    @ApiModelProperty("群团组织成员住址")
    private String address;
    @ApiModelProperty("群团组织成员身份证号码")
    private String idCard;
    @ApiModelProperty("所属群团组织id")
    private Long clusterId;
    @ApiModelProperty("所属群团组织名称")
    private String clusterName;
    @ApiModelProperty("状态(1.启用  2禁用)")
    private Integer status;
    @ApiModelProperty("民族code")
    private String nationCode;
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/community/convenient/ConvenientProductVO.java
@@ -50,4 +50,8 @@
    @ApiModelProperty("浏览量")
    private Integer viewNum;
    public void setOnShelf(Boolean onShelf) {
        this.onShelf = onShelf ? 1 : 0;
    }
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/property/ComPropertyRepairVO.java
@@ -111,12 +111,14 @@
     * 物业id
     */
    @ApiModelProperty(value = "物业id")
    private Integer propertyId;
    private Long propertyId;
    /**
     * 反馈人
     */
    @ApiModelProperty(value = "反馈人名称")
    private String feedback;
    @ApiModelProperty(value = "小区名称")
    private String areaName;
    /**
     * 状态 0 待处理 1待评价 2已结束
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/community/CommunityService.java
@@ -2,6 +2,21 @@
import java.util.List;
import com.panzhihua.common.model.dtos.community.GetIdentityEidTokenDTO;
import com.panzhihua.common.model.dtos.community.*;
import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.*;
import com.panzhihua.common.model.dtos.property.CommonPage;
import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussDetailDTO;
import com.panzhihua.common.model.dtos.community.discuss.ComActDiscussPublishResultDTO;
import com.panzhihua.common.model.dtos.community.elder.ElderAuthStatisticHeaderDTO;
import com.panzhihua.common.model.dtos.community.elder.PageElderAuthStatisticDTO;
import com.panzhihua.common.model.dtos.community.elder.PagePensionAuthStatisticDTO;
import com.panzhihua.common.model.dtos.community.elder.SignElderAuthStatisticDTO;
import com.panzhihua.common.model.dtos.neighbor.*;
import com.panzhihua.common.model.vos.community.*;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO;
import io.swagger.annotations.ApiOperation;
import com.panzhihua.common.model.vos.community.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.DeleteMapping;
@@ -6417,4 +6432,126 @@
     */
    @GetMapping("/convenient/product/shelf-num")
    R getProductShelfNum(@RequestParam("merchantId") Long merchantId);
    /**
     * 群团组织成员列表-小程序分页查询
     * @param pageClusterMemberDto  请求参数
     * @return  群团组织成员列表
     */
    @PostMapping("/cluster/member/page/applets")
    R pageClusterMemberApplets(@RequestBody PageClusterMemberDto pageClusterMemberDto);
    /**
     * 群团组织列表-小程序查询社区群团组织列表
     * @param communityId   社区id
     * @return  社区群团组织列表
     */
    @GetMapping("/cluster/list/applets")
    R listClusterApplets(@RequestParam("communityId") Long communityId);
    /**
     * 分页查询群团组织列表
     * @param pageClusterAdminDto  请求参数
     * @return  群团组织列表
     */
    @PostMapping("/cluster/page/admin")
    R pageClusterAdmin(@RequestBody PageClusterAdminDto pageClusterAdminDto);
    /**
     * 新增群团组织
     * @param addClusterAdminDto    请求参数
     * @return  新增结果
     */
    @PostMapping("/cluster/add/admin")
    R addClusterAdmin(@RequestBody AddClusterAdminDto addClusterAdminDto);
    /**
     * 修改群团组织
     * @param editClusterAdminDto   请求参数
     * @return  修改结果
     */
    @PostMapping("/cluster/edit/admin")
    R editClusterAdmin(@RequestBody EditClusterAdminDto editClusterAdminDto);
    /**
     * 删除群团组织
     * @param id    组织id
     * @return  删除结果
     */
    @GetMapping("/cluster/delete/admin")
    R deleteClusterAdmin(@RequestParam("id") Long id);
    /**
     * 群团组织详情
     * @param id    组织id
     * @return  群团组织详情
     */
    @GetMapping("/cluster/detail/admin")
    R detailClusterAdmin(@RequestParam("id") Long id);
    /**
     * 分页查询群团组织成员列表
     * @param pageClusterMemberAdminDto 请求参数
     * @return  群团组织成员列表
     */
    @PostMapping("/cluster/member/page/admin")
    R pageClusterMemberAdmin(@RequestBody PageClusterMemberAdminDto pageClusterMemberAdminDto);
    /**
     * 新增群团组织成员
     * @param addClusterMemberAdminDto  请求参数
     * @return  新增结果
     */
    @PostMapping("/cluster/member/add/admin")
    R addClusterMemberAdmin(@RequestBody AddClusterMemberAdminDto addClusterMemberAdminDto);
    /**
     * 编辑群团组织成员
     * @param editClusterMemberAdminDto 请求参数
     * @return  编辑结果
     */
    @PostMapping("/cluster/member/edit/admin")
    R editClusterMemberAdmin(@RequestBody EditClusterMemberAdminDto editClusterMemberAdminDto);
    /**
     * 删除群团组织成员
     * @param id    组织成员id
     * @return  删除结果
     */
    @GetMapping("/cluster/member/delete/admin")
    R deleteClusterMemberAdmin(@RequestParam("id") Long id);
    /**
     * 群团组织成员详情
     * @param id    组织成员id
     * @return  群团组织成员详情
     */
    @GetMapping("/cluster/member/detail/admin")
    R detailClusterMemberAdmin(@RequestParam("id") Long id);
    /**
     * 查询系统民族列表
     * @return  民族列表
     */
    @GetMapping("/cluster/member/nation/list/admin")
    R memberNationListAdmin();
    /**
     * 群团组织成员导入
     * @param list  导入数据
     * @param communityId   社区id
     * @param userId    操作用户id
     * @return  导入结果
     */
    @PostMapping("/cluster/member/import/admin")
    R importClusterMember(@RequestBody List<ComClusterMemberExcelVO> list,
                                     @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId);
    /**
     * 群团组织导出数据查询
     * @param pageClusterMemberAdminDto 请求参数
     * @return  导出数据结果集
     */
    @PostMapping("/cluster/member/export/admin")
    R exportClusterMember(@RequestBody PageClusterMemberAdminDto pageClusterMemberAdminDto);
}
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/service/user/UserService.java
@@ -146,7 +146,7 @@
     * @return 修改结果
     */
    @GetMapping("resetPasswordPatch")
    R resetPasswordPatch(@RequestParam("userIds") Long[] userIds);
    R resetPasswordPatch(@RequestParam("userIds") Long[] userIds,@RequestParam("password") String password);
    /**
     * 某社区后台人员查询
@@ -371,7 +371,7 @@
     * @return 角色集合
     */
    @PostMapping("/role/listrolebackstage")
    R listRoleBackstage(@RequestParam("communityId") Long communityId);
    R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize);
    /**
     * 分页查询后台用户
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ClusterApi.java
New file
@@ -0,0 +1,290 @@
package com.panzhihua.community_backstage.api;
import com.alibaba.excel.EasyExcel;
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.excel.write.style.column.LongestMatchColumnWidthStyleStrategy;
import com.alibaba.fastjson.JSONArray;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.listen.ComClusterMemberExcelListen;
import com.panzhihua.common.model.dtos.community.cluster.*;
import com.panzhihua.common.model.dtos.community.cluster.admin.*;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.cluster.*;
import com.panzhihua.common.model.vos.community.cluster.admin.*;
import com.panzhihua.common.service.community.CommunityService;
import com.panzhihua.common.utlis.DateUtils;
import com.panzhihua.common.utlis.SFTPUtil;
import com.panzhihua.community_backstage.excel.CustomSheetWriteHandler;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.data.redis.core.ValueOperations;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
/**
 * title: 群团组织接口类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 群团组织接口类
 *
 * @author lyq
 * @date 2021/9/23 16:12
 */
@Slf4j
@Api(tags = {"群团组织"})
@RestController
@RequestMapping("/cluster/")
public class ClusterApi extends BaseController {
    @Resource
    private CommunityService communityService;
    // FTP 登录用户名
    @Value("${ftp.username}")
    private String userName;
    // FTP 登录密码
    @Value("${ftp.password}")
    private String password;
    // FTP 服务器地址IP地址
    @Value("${ftp.host}")
    private String host;
    // FTP 端口
    @Value("${ftp.port}")
    private int port;
    @Value("${ftp.url}")
    private String url;
    @Value("${excel.userurl}")
    private String excelUrl;
    @Resource
    private StringRedisTemplate stringRedisTemplate;
    @ApiOperation(value = "群团组织列表",response = PageClusterVo.class)
    @GetMapping("list")
    public R listClusterApplets() {
        return communityService.listClusterApplets(this.getCommunityId());
    }
    @ApiOperation(value = "分页查询群团组织列表",response = PageClusterAdminVo.class)
    @PostMapping("/page")
    public R pageClusterAdmin(@RequestBody PageClusterAdminDto pageClusterAdminDto) {
        pageClusterAdminDto.setCommunityId(this.getCommunityId());
        return communityService.pageClusterAdmin(pageClusterAdminDto);
    }
    @ApiOperation(value = "新增群团组织")
    @PostMapping("/add")
    public R addClusterAdmin(@RequestBody AddClusterAdminDto addClusterAdminDto) {
        addClusterAdminDto.setCommunityId(this.getCommunityId());
        return communityService.addClusterAdmin(addClusterAdminDto);
    }
    @ApiOperation(value = "编辑群团组织")
    @PostMapping("/edit")
    public R editClusterAdmin(@RequestBody EditClusterAdminDto editClusterAdminDto) {
        editClusterAdminDto.setCommunityId(this.getCommunityId());
        return communityService.editClusterAdmin(editClusterAdminDto);
    }
    @ApiOperation(value = "删除群团组织")
    @GetMapping("/delete")
    public R deleteClusterAdmin(@RequestParam("id") Long id) {
        return communityService.deleteClusterAdmin(id);
    }
    @ApiOperation(value = "群团组织详情",response = ClusterDetailAdminVo.class)
    @GetMapping("/detail")
    public R detailClusterAdmin(@RequestParam("id") Long id) {
        return communityService.detailClusterAdmin(id);
    }
    @ApiOperation(value = "分页查询群团组织成员列表",response = PageClusterMemberAdminVo.class)
    @PostMapping("/member/page")
    public R pageClusterMemberAdmin(@RequestBody PageClusterMemberAdminDto pageClusterMemberAdminDto) {
        pageClusterMemberAdminDto.setCommunityId(this.getCommunityId());
        return communityService.pageClusterMemberAdmin(pageClusterMemberAdminDto);
    }
    @ApiOperation(value = "新增群团组织成员")
    @PostMapping("/member/add")
    public R addClusterMemberAdmin(@RequestBody AddClusterMemberAdminDto addClusterMemberAdminDto) {
        addClusterMemberAdminDto.setCommunityId(this.getCommunityId());
        return communityService.addClusterMemberAdmin(addClusterMemberAdminDto);
    }
    @ApiOperation(value = "编辑群团组织成员")
    @PostMapping("/member/edit")
    public R editClusterMemberAdmin(@RequestBody EditClusterMemberAdminDto editClusterMemberAdminDto) {
        return communityService.editClusterMemberAdmin(editClusterMemberAdminDto);
    }
    @ApiOperation(value = "删除群团组织成员")
    @GetMapping("/member/delete")
    public R deleteClusterMemberAdmin(@RequestParam("id") Long id) {
        return communityService.deleteClusterMemberAdmin(id);
    }
    @ApiOperation(value = "群团组织成员详情",response = PageClusterMemberAdminVo.class)
    @GetMapping("/member/detail")
    public R detailClusterMemberAdmin(@RequestParam("id") Long id) {
        return communityService.detailClusterMemberAdmin(id);
    }
    @ApiOperation(value = "群团组织民族列表",response = PageClusterVo.class)
    @GetMapping("/member/nation/list")
    public R memberNationListAdmin() {
        return communityService.memberNationListAdmin();
    }
    @ApiOperation(value = "群团组织成员导入模板下载")
    @GetMapping("/member/import/download")
    public R clusterMemberDownload(){
        return R.ok(this.excelUrl + "群团组织成员导入模板.xlsx");
    }
    @ApiOperation(value = "群团组织成员导入")
    @PostMapping(value = "/member/import", consumes = "multipart/*", headers = "content-type=multipart/form-date")
    public R importClusterMember(@RequestParam MultipartFile file, HttpServletRequest request) {
        // 获取文件名
        String fileName = file.getOriginalFilename();
        log.info("传入文件名字【{}】", fileName);
        InputStream inputStream = null;
        try {
            inputStream = file.getInputStream();
            ComClusterMemberExcelListen clusterMemberExcelListen = new ComClusterMemberExcelListen(
                    communityService, this.getCommunityId(), this.getUserId(), stringRedisTemplate);
            EasyExcel.read(inputStream, null, clusterMemberExcelListen).sheet().doRead();
        } catch (IOException e) {
            log.error("导入模板失败【{}】", e.getMessage());
            e.printStackTrace();
        }
        return R.ok();
    }
    @ApiOperation(value = "下载导入失败群团组织成员数据")
    @PostMapping("/member/download/error")
    public R downloadErrorClusterMember(@RequestParam(value = "key") String key) {
        List<ComClusterMemberExcelErrorVO> list = new ArrayList<>();
        Boolean isExits = stringRedisTemplate.hasKey(key);
        ValueOperations<String, String> valueOperations = stringRedisTemplate.opsForValue();
        if (isExits) {
            String json = valueOperations.get(key);
            list = JSONArray.parseArray(json, ComClusterMemberExcelErrorVO.class);
        }
        String ftpUrl = "/mnt/data/web/excel/";
        String nowDate = DateUtils.getCurrentDateString();
        String name = "群团组织成员导入错误数据" + nowDate + ".xlsx";
        try {
            SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
            sftp.login();
            boolean existDir = sftp.isExistDir(ftpUrl + name);
            if (!existDir) {
                String property = System.getProperty("user.dir");
                String fileName = property + File.separator + name;
                // 这里 需要指定写用哪个class去写
                ExcelWriter excelWriter = null;
                InputStream inputStream = null;
                try {
                    excelWriter = EasyExcel.write(fileName, ComClusterMemberExcelErrorVO.class)
                            .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                            .registerWriteHandler(new CustomSheetWriteHandler()).build();
                    WriteSheet writeSheet = EasyExcel.writerSheet("群团组织成员导入错误数据").build();
                    excelWriter.write(list, writeSheet);
                    excelWriter.finish();
                    File file = new File(fileName);
                    inputStream = new FileInputStream(file);
                    sftp.uploadMore(ftpUrl, name, inputStream);
                    sftp.logout();
                    inputStream.close();
                    String absolutePath = file.getAbsolutePath();
                    boolean delete = file.delete();
                    log.info("删除excel【{}】结果【{}】", absolutePath, delete);
                } finally {
                    // 千万别忘记finish 会帮忙关闭流
                    if (inputStream != null) {
                        inputStream.close();
                    }
                    if (excelWriter != null) {
                        excelWriter.finish();
                    }
                }
            }
            return R.ok(excelUrl + name);
        } catch (Exception e) {
            e.printStackTrace();
            log.error("文件传输失败【{}】", e.getMessage());
            return R.fail();
        }
    }
    @ApiOperation(value = "群团组织成员数据导出")
    @PostMapping("/member/export")
    public R exportClusterMember(@RequestBody PageClusterMemberAdminDto pageClusterMemberAdminDto) {
        LoginUserInfoVO loginUserInfo = this.getLoginUserInfo();
        if (loginUserInfo == null) {
            return R.fail("请先登录");
        }
        pageClusterMemberAdminDto.setCommunityId(loginUserInfo.getCommunityId());
        String name = "群团组织成员导出数据.xlsx";
        String ftpUrl = "/mnt/data/web/excel/";
        R r = communityService.exportClusterMember(pageClusterMemberAdminDto);
        if (R.isOk(r)) {
            List<ComClusterMemberExcelExportAdminVO> resultList = JSONArray.parseArray(
                    JSONArray.toJSONString(r.getData()), ComClusterMemberExcelExportAdminVO.class);
            try {
                SFTPUtil sftp = new SFTPUtil(userName, password, host, port);
                sftp.login();
                boolean existDir = sftp.isExistDir(ftpUrl + name);
                if (!existDir) {
                    String property = System.getProperty("user.dir");
                    String fileName = property + File.separator + name;
                    // 这里 需要指定写用哪个class去写
                    ExcelWriter excelWriter = null;
                    InputStream inputStream = null;
                    try {
                        excelWriter = EasyExcel.write(fileName, ComClusterMemberExcelExportAdminVO.class)
                                .registerWriteHandler(new LongestMatchColumnWidthStyleStrategy())
                                .registerWriteHandler(new CustomSheetWriteHandler()).build();
                        WriteSheet writeSheet = EasyExcel.writerSheet("群团组织成员导出数据").build();
                        excelWriter.write(resultList, writeSheet);
                        excelWriter.finish();
                        File file = new File(fileName);
                        inputStream = new FileInputStream(file);
                        sftp.uploadMore(ftpUrl, name, inputStream);
                        sftp.logout();
                        inputStream.close();
                        String absolutePath = file.getAbsolutePath();
                        boolean delete = file.delete();
                        log.info("删除excel【{}】结果【{}】", absolutePath, delete);
                    } finally {
                        // 千万别忘记finish 会帮忙关闭流
                        if (inputStream != null) {
                            inputStream.close();
                        }
                        if (excelWriter != null) {
                            excelWriter.finish();
                        }
                    }
                }
                return R.ok(excelUrl + name);
            } catch (Exception e) {
                e.printStackTrace();
                log.error("文件传输失败【{}】", e.getMessage());
                return R.fail();
            }
        }
        return r;
    }
}
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/ComPropertyAlarmApi.java
@@ -41,7 +41,7 @@
    @ApiOperation(value = "分页查询",response = ComPropertyAlarmVO.class)
    @PostMapping("queryAll")
    public R selectAll(@RequestBody CommonPage commonPage) {
        commonPage.setParamId(2L);
        commonPage.setParamId(this.getCommunityId());
        return propertyService.comPropertyAlarmSelectAll(commonPage);
    }
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/SystemManagementApi.java
@@ -81,9 +81,9 @@
    @ApiOperation(value = "角色下拉列表", response = RoleVO.class)
    @GetMapping("listrolebackstage")
    public R listRoleBackstage() {
    public R listRoleBackstage(@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) {
        Long communityId = this.getCommunityId();
        return userService.listRoleBackstage(communityId);
        return userService.listRoleBackstage(communityId,pageNum,pageSize);
    }
    @ApiOperation(value = "分页查询后台用户", response = AdministratorsUserVO.class)
springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/UserApi.java
@@ -56,8 +56,8 @@
    @ApiOperation("批量重置密码")
    @GetMapping("resetPasswordPatch")
    public R resetPasswordPatch(@RequestParam("userIds") Long[] userId){
        return userService.resetPasswordPatch(userId);
    public R resetPasswordPatch(@RequestParam("userIds") Long[] userId,@RequestParam("password") String password){
        return userService.resetPasswordPatch(userId,password);
    }
    @ApiOperation(value = "用户菜单获取", response = SysMenuVO.class)
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ClusterApi.java
New file
@@ -0,0 +1,184 @@
package com.panzhihua.service_community.api;
import com.panzhihua.common.model.dtos.community.cluster.*;
import com.panzhihua.common.model.dtos.community.cluster.admin.*;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO;
import com.panzhihua.service_community.service.ComClusterOrganizationMemberService;
import com.panzhihua.service_community.service.ComClusterOrganizationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
 * title: 群团组织接口类
 * projectName 成都呐喊信息技术有限公司-智慧社区项目
 * description: 群团组织接口类
 *
 * @author lyq
 * @date 2021/9/23 16:12
 */
@Slf4j
@RestController
@RequestMapping("/cluster/")
public class ClusterApi {
    @Resource
    private ComClusterOrganizationMemberService comClusterOrganizationMemberService;
    @Resource
    private ComClusterOrganizationService comClusterOrganizationService;
    /**
     * 群团组织成员列表-小程序分页查询
     * @param pageClusterMemberDto  请求参数
     * @return  群团组织成员列表
     */
    @PostMapping("/member/page/applets")
    public R pageClusterMemberApplets(@RequestBody PageClusterMemberDto pageClusterMemberDto) {
        return comClusterOrganizationMemberService.pageClusterMemberApplets(pageClusterMemberDto);
    }
    /**
     * 群团组织列表-小程序查询社区群团组织列表
     * @param communityId   社区id
     * @return  社区群团组织列表
     */
    @GetMapping("/list/applets")
    public R listClusterApplets(@RequestParam("communityId") Long communityId) {
        return comClusterOrganizationService.listClusterApplets(communityId);
    }
    /**
     * 分页查询群团组织列表
     * @param pageClusterAdminDto  请求参数
     * @return  群团组织列表
     */
    @PostMapping("/page/admin")
    public R pageClusterAdmin(@RequestBody PageClusterAdminDto pageClusterAdminDto) {
        return comClusterOrganizationService.pageClusterAdmin(pageClusterAdminDto);
    }
    /**
     * 新增群团组织
     * @param addClusterAdminDto    请求参数
     * @return  新增结果
     */
    @PostMapping("/add/admin")
    public R addClusterAdmin(@RequestBody AddClusterAdminDto addClusterAdminDto) {
        return comClusterOrganizationService.addClusterAdmin(addClusterAdminDto);
    }
    /**
     * 修改群团组织
     * @param editClusterAdminDto   请求参数
     * @return  修改结果
     */
    @PostMapping("/edit/admin")
    public R editClusterAdmin(@RequestBody EditClusterAdminDto editClusterAdminDto) {
        return comClusterOrganizationService.editClusterAdmin(editClusterAdminDto);
    }
    /**
     * 删除群团组织
     * @param id    组织id
     * @return  删除结果
     */
    @GetMapping("/delete/admin")
    public R deleteClusterAdmin(@RequestParam("id") Long id) {
        return comClusterOrganizationService.deleteClusterAdmin(id);
    }
    /**
     * 群团组织详情
     * @param id    组织id
     * @return  群团组织详情
     */
    @GetMapping("/detail/admin")
    public R detailClusterAdmin(@RequestParam("id") Long id) {
        return comClusterOrganizationService.detailClusterAdmin(id);
    }
    /**
     * 分页查询群团组织成员列表
     * @param pageClusterMemberAdminDto 请求参数
     * @return  群团组织成员列表
     */
    @PostMapping("/member/page/admin")
    public R pageClusterMemberAdmin(@RequestBody PageClusterMemberAdminDto pageClusterMemberAdminDto) {
        return comClusterOrganizationMemberService.pageClusterMemberAdmin(pageClusterMemberAdminDto);
    }
    /**
     * 新增群团组织成员
     * @param addClusterMemberAdminDto  请求参数
     * @return  新增结果
     */
    @PostMapping("/member/add/admin")
    public R addClusterMemberAdmin(@RequestBody AddClusterMemberAdminDto addClusterMemberAdminDto) {
        return comClusterOrganizationMemberService.addClusterMemberAdmin(addClusterMemberAdminDto);
    }
    /**
     * 编辑群团组织成员
     * @param editClusterMemberAdminDto 请求参数
     * @return  编辑结果
     */
    @PostMapping("/member/edit/admin")
    public R editClusterMemberAdmin(@RequestBody EditClusterMemberAdminDto editClusterMemberAdminDto) {
        return comClusterOrganizationMemberService.editClusterMemberAdmin(editClusterMemberAdminDto);
    }
    /**
     * 删除群团组织成员
     * @param id    组织成员id
     * @return  删除结果
     */
    @GetMapping("/member/delete/admin")
    public R deleteClusterMemberAdmin(@RequestParam("id") Long id) {
        return comClusterOrganizationMemberService.deleteClusterMemberAdmin(id);
    }
    /**
     * 群团组织成员详情
     * @param id    组织成员id
     * @return  群团组织成员详情
     */
    @GetMapping("/member/detail/admin")
    public R detailClusterMemberAdmin(@RequestParam("id") Long id) {
        return comClusterOrganizationMemberService.detailClusterMemberAdmin(id);
    }
    /**
     * 查询系统民族列表
     * @return  民族列表
     */
    @GetMapping("/member/nation/list/admin")
    public R memberNationListAdmin(){
        return comClusterOrganizationMemberService.memberNationListAdmin();
    }
    /**
     * 群团组织成员导入
     * @param list  导入数据
     * @param communityId   社区id
     * @param userId    操作用户id
     * @return  导入结果
     */
    @PostMapping("/member/import/admin")
    public R importClusterMember(@RequestBody List<ComClusterMemberExcelVO> list,
                                 @RequestParam(value = "communityId") Long communityId, @RequestParam(value = "userId") Long userId){
        return comClusterOrganizationMemberService.importClusterMember(list,communityId,userId);
    }
    /**
     * 群团组织导出数据查询
     * @param pageClusterMemberAdminDto 请求参数
     * @return  导出数据结果集
     */
    @PostMapping("/member/export/admin")
    public R exportClusterMember(@RequestBody PageClusterMemberAdminDto pageClusterMemberAdminDto){
        return comClusterOrganizationMemberService.exportClusterMember(pageClusterMemberAdminDto);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComActMicroWishDAO.java
@@ -56,9 +56,6 @@
            "com_act_micro_wish w " +
            "left join com_act_micro_wish_user wu on w.id=wu.micro_wish_id "+
            "left JOIN sys_user u ON w.sponsor_id = u.user_id  " +
            "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != &quot;&quot;'>" +
            "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%')   " +
            " </if> " +
            "<if test='comActMicroWishVO.responsibleName == null or comActMicroWishVO.responsibleName.trim() == &quot;&quot;'>" +
            "LEFT JOIN sys_user su1 ON w.responsible_id = su1.user_id  " +
            " </if> " +
@@ -101,6 +98,9 @@
            "<if test='comActMicroWishVO.backUserId != null and comActMicroWishVO.backUserId != 0 and  comActMicroWishVO.status==0 '>" +
            "and (w.status in(1,2,4,5,6) or (w.status=3 and w.responsible_id  =#{comActMicroWishVO.backUserId})) " +
            " </if> " +
            "<if test='comActMicroWishVO.sponsorName != null and comActMicroWishVO.sponsorName.trim() != &quot;&quot;'>" +
            "AND u.name like concat(#{comActMicroWishVO.sponsorName},'%')   " +
            " </if> " +
            " </where>" +
            " group by w.id   "+
            "ORDER BY  w.create_at desc "+
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComClusterOrganizationMapper.java
New file
@@ -0,0 +1,37 @@
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.cluster.admin.PageClusterAdminDto;
import com.panzhihua.common.model.vos.community.cluster.PageClusterVo;
import com.panzhihua.common.model.vos.community.cluster.admin.PageClusterAdminVo;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
 * @author lyq
 * @date  2021-09-23 16:44:06
 * describe 群团组织表mapper类
 */
@Mapper
public interface ComClusterOrganizationMapper extends BaseMapper<ComClusterOrganizationDO> {
    /**
     * 群团组织列表-小程序查询社区群团组织列表
     * @param communityId   社区id
     * @return  社区群团组织列表
     */
    List<PageClusterVo> listClusterApplets(@Param("communityId") Long communityId);
    /**
     * 分页查询群团组织列表
     * @param pageClusterAdminDto  请求参数
     * @return  群团组织列表
     */
    IPage<PageClusterAdminVo> pageClusterAdmin(Page page,@Param("pageClusterAdminDto") PageClusterAdminDto pageClusterAdminDto);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComClusterOrganizationMemberMapper.java
New file
@@ -0,0 +1,64 @@
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.cluster.PageClusterMemberDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterMemberAdminDto;
import com.panzhihua.common.model.vos.community.cluster.PageClusterMemberVo;
import com.panzhihua.common.model.vos.community.cluster.PageClusterVo;
import com.panzhihua.common.model.vos.community.cluster.admin.ClusterMemberNationVo;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelExportAdminVO;
import com.panzhihua.common.model.vos.community.cluster.admin.PageClusterMemberAdminVo;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationMemberDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
import java.util.Map;
/**
 * @author lyq
 * @date  2021-09-23 16:44:00
 * describe 群团组织成员表mapper类
 */
@Mapper
public interface ComClusterOrganizationMemberMapper extends BaseMapper<ComClusterOrganizationMemberDO> {
    /**
     * 群团组织成员列表-小程序分页查询
     * @param pageClusterMemberDto  请求参数
     * @return  群团组织成员列表
     */
    IPage<PageClusterMemberVo> pageClusterMemberApplets(Page page, @Param("pageClusterMemberDto") PageClusterMemberDto pageClusterMemberDto);
    /**
     * 分页查询群团组织成员列表
     * @param pageClusterMemberAdminDto 请求参数
     * @return  群团组织成员列表
     */
    IPage<PageClusterMemberAdminVo> pageClusterMemberAdmin(Page page, @Param("pageClusterMemberAdminDto") PageClusterMemberAdminDto pageClusterMemberAdminDto);
    /**
     * 查询系统民族列表
     * @param  key 字典码Key
     * @return  民族列表
     */
    List<ClusterMemberNationVo> memberNationListAdmin(@Param("key") String key);
    /**
     * 查询民族code
     * @param nationName    民族名称
     * @param key   民族字典码key
     * @return  民族code
     */
    Map<String,String> getNationCode(@Param("nationName") String nationName,@Param("key") String key);
    /**
     * 群团组织导出数据查询
     * @param pageClusterMemberAdminDto 请求参数
     * @return  导出数据结果集
     */
    List<ComClusterMemberExcelExportAdminVO> exportClusterMember(@Param("pageClusterMemberAdminDto") PageClusterMemberAdminDto pageClusterMemberAdminDto);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActCommittee.java
@@ -73,4 +73,6 @@
    @ApiModelProperty(value = "社区Id")
    private Long communityId;
    private String password;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActFourMember.java
@@ -69,4 +69,6 @@
    @ApiModelProperty(value = "照片")
    private String url;
    private String password;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComActSocialOrg.java
@@ -249,4 +249,6 @@
    @ApiModelProperty(value = "登录用户id")
    private Long userId;
    private String password;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/entity/ComProperty.java
@@ -81,4 +81,6 @@
    private Long areaId;
    private String password;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComClusterOrganizationDO.java
New file
@@ -0,0 +1,107 @@
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;
/**
 * @author lyq
 * @date  2021-09-23 16:38:57
 * describe 群团组织表实体类
 */
@Data
@TableName("com_cluster_organization")
public class ComClusterOrganizationDO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 组织名称
     */
    private String name;
    /**
     * 联系电话
     */
    private String phone;
    /**
     * 详细地址
     */
    private String address;
    /**
     * 状态(1.启用 2.禁用)
     */
    private Integer status;
    /**
     * 组织logo
     */
    private String logo;
    /**
     * 是否删除(1.是  2.否)
     */
    private Integer isDel;
    /**
     * 创建时间
     */
    private Date createAt;
    /**
     * 修改时间
     */
    private Date updateAt;
    /**
     * 社区id
     */
    private Long communityId;
    /**
     * 经度
     */
    private String lng;
    /**
     * 纬度
     */
    private String lat;
    /**
     * 是否枚举(1.是  2.否)
     */
    public interface isOk{
        int yes = 1;
        int no = 2;
    }
    @Override
    public String toString() {
        return "ComClusterOrganizationDO{" +
                "id=" + id +
                ", name=" + name +
                ", phone=" + phone +
                ", address=" + address +
                ", status=" + status +
                ", logo=" + logo +
                ", isDel=" + isDel +
                ", createAt=" + createAt +
                ", updateAt=" + updateAt +
                "}";
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/model/dos/ComClusterOrganizationMemberDO.java
New file
@@ -0,0 +1,121 @@
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;
/**
 * @author lyq
 * @date  2021-09-23 16:39:05
 * describe 群团组织成员表实体类
 */
@Data
@TableName("com_cluster_organization_member")
public class ComClusterOrganizationMemberDO implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * 主键id
     */
    @TableId(type = IdType.AUTO)
    private Long id;
    /**
     * 所属组织id
     */
    private Long clusterId;
    /**
     * 组织成员姓名
     */
    private String name;
    /**
     * 组织成员电话
     */
    private String phone;
    /**
     * 组织成员住址
     */
    private String address;
    /**
     * 组织成员照片
     */
    private String imageUrl;
    /**
     * 组织成员职务
     */
    private String job;
    /**
     * 组织成员身份证号码
     */
    private String idCard;
    /**
     * 民族编号(字典表中dict_value)
     */
    private String nationCode;
    /**
     * 状态(1.启用 2.禁用)
     */
    private Integer status;
    /**
     * 是否删除(1.是 2.否)
     */
    private Integer isDel;
    /**
     * 创建时间
     */
    private Date createAt;
    /**
     * 修改时间
     */
    private Date updateAt;
    /**
     * 社区id
     */
    private Long communityId;
    /**
     * 是否枚举(1.是 2.否)
     */
    public interface isOk{
        int yes = 1;
        int no = 2;
    }
    @Override
    public String toString() {
        return "ComClusterOrganizationMemberDO{" +
                "id=" + id +
                ", clusterId=" + clusterId +
                ", name=" + name +
                ", phone=" + phone +
                ", address=" + address +
                ", imageUrl=" + imageUrl +
                ", job=" + job +
                ", idCard=" + idCard +
                ", nationCode=" + nationCode +
                ", status=" + status +
                ", isDel=" + isDel +
                ", createAt=" + createAt +
                ", updateAt=" + updateAt +
                "}";
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComClusterOrganizationMemberService.java
New file
@@ -0,0 +1,92 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterMemberAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.EditClusterMemberAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterMemberAdminDto;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationMemberDO;
import java.util.List;
/**
 * @author lyq
 * @date 2021-09-23 16:44:00
 * describe  群团组织成员表服务类
 */
public interface ComClusterOrganizationMemberService extends IService<ComClusterOrganizationMemberDO> {
    /**
     * 群团组织成员列表-小程序分页查询
     *
     * @param pageClusterMemberDto 请求参数
     * @return 群团组织成员列表
     */
    R pageClusterMemberApplets(PageClusterMemberDto pageClusterMemberDto);
    /**
     * 分页查询群团组织成员列表
     *
     * @param pageClusterMemberAdminDto 请求参数
     * @return 群团组织成员列表
     */
    R pageClusterMemberAdmin(PageClusterMemberAdminDto pageClusterMemberAdminDto);
    /**
     * 新增群团组织成员
     *
     * @param addClusterMemberAdminDto 请求参数
     * @return 新增结果
     */
    R addClusterMemberAdmin(AddClusterMemberAdminDto addClusterMemberAdminDto);
    /**
     * 编辑群团组织成员
     *
     * @param editClusterMemberAdminDto 请求参数
     * @return 编辑结果
     */
    R editClusterMemberAdmin(EditClusterMemberAdminDto editClusterMemberAdminDto);
    /**
     * 删除群团组织成员
     *
     * @param id 组织成员id
     * @return 删除结果
     */
    R deleteClusterMemberAdmin(Long id);
    /**
     * 群团组织成员详情
     *
     * @param id 组织成员id
     * @return 群团组织成员详情
     */
    R detailClusterMemberAdmin(Long id);
    /**
     * 查询系统民族列表
     *
     * @return 民族列表
     */
    R memberNationListAdmin();
    /**
     * 群团组织成员导入
     * @param list  导入数据
     * @param communityId   社区id
     * @param userId    操作用户id
     * @return  导入结果
     */
    R importClusterMember(List<ComClusterMemberExcelVO> list, Long communityId, Long userId);
    /**
     * 群团组织导出数据查询
     * @param pageClusterMemberAdminDto 请求参数
     * @return  导出数据结果集
     */
    R exportClusterMember(PageClusterMemberAdminDto pageClusterMemberAdminDto);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComClusterOrganizationService.java
New file
@@ -0,0 +1,59 @@
package com.panzhihua.service_community.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.EditClusterAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterAdminDto;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationDO;
/**
 * @author lyq
 * @date 2021-09-23 16:44:06
 * describe  群团组织表服务类
 */
public interface ComClusterOrganizationService extends IService<ComClusterOrganizationDO> {
    /**
     * 群团组织列表-小程序查询社区群团组织列表
     * @param communityId   社区id
     * @return  社区群团组织列表
     */
    R listClusterApplets(Long communityId);
    /**
     * 分页查询群团组织列表
     * @param pageClusterAdminDto  请求参数
     * @return  群团组织列表
     */
    R pageClusterAdmin(PageClusterAdminDto pageClusterAdminDto);
    /**
     * 新增群团组织
     * @param addClusterAdminDto    请求参数
     * @return  新增结果
     */
    R addClusterAdmin(AddClusterAdminDto addClusterAdminDto);
    /**
     * 修改群团组织
     * @param editClusterAdminDto   请求参数
     * @return  修改结果
     */
    R editClusterAdmin(EditClusterAdminDto editClusterAdminDto);
    /**
     * 删除群团组织
     * @param id    组织id
     * @return  删除结果
     */
    R deleteClusterAdmin(Long id);
    /**
     * 群团组织详情
     * @param id    组织id
     * @return  群团组织详情
     */
    R detailClusterAdmin(Long id);
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActCommitteeServiceImpl.java
@@ -11,6 +11,7 @@
import com.panzhihua.service_community.entity.ComActCommittee;
import com.panzhihua.service_community.dao.ComActCommitteeDao;
import com.panzhihua.service_community.entity.ComActSocialOrg;
import com.panzhihua.service_community.entity.ComProperty;
import com.panzhihua.service_community.service.ComActCommitteeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
@@ -57,7 +58,7 @@
                this.comActCommitteeDao.insert(comActCommittee);
                return R.ok();
            }
            return R.fail(r.getMsg());
            return R.fail("账号或手机号已存在");
        }
        return R.fail();
    }
@@ -68,6 +69,14 @@
        if(comActCommiteeVO!=null){
                ComActCommittee comActCommittee=new ComActCommittee();
                BeanUtils.copyProperties(comActCommiteeVO,comActCommittee);
                if(comActCommiteeVO.getRoleId()!=null){
                    ComActCommittee comPropertyBase=this.comActCommitteeDao.selectById(comActCommiteeVO.getId());
                    AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                    administratorsUserVO.setUserId(comPropertyBase.getUserId());
                    administratorsUserVO.setLastLoginTime(DateUtil.date());
                    administratorsUserVO.setRoleId(comActCommiteeVO.getRoleId());
                    this.userService.putUserBackstage(administratorsUserVO);
                }
                this.comActCommitteeDao.updateById(comActCommittee);
                return R.ok();
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActDiscussServiceImpl.java
@@ -678,11 +678,13 @@
     */
    private void checkDiscussStatusIsCorrect(ComActDiscussVO comActDiscussVO) {
        //判断discuss状态是否正确
        boolean isIncorrectStatus = comActDiscussVO.getEndTime().before(new Date()) &&
                (comActDiscussVO.getStatus().intValue() == 1 || comActDiscussVO.getStatus().intValue() == 2);
        if (isIncorrectStatus) {
            comActDiscussVO.setStatus(3);
            comActDiscussDAO.updateStatusById(comActDiscussVO.getId(), 3);
        if(comActDiscussVO.getEndTime() != null){
            boolean isIncorrectStatus = comActDiscussVO.getEndTime().before(new Date()) &&
                    (comActDiscussVO.getStatus().intValue() == 1 || comActDiscussVO.getStatus().intValue() == 2);
            if (isIncorrectStatus) {
                comActDiscussVO.setStatus(3);
                comActDiscussDAO.updateStatusById(comActDiscussVO.getId(), 3);
            }
        }
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActFourMemberServiceImpl.java
@@ -73,15 +73,13 @@
        if(comActFourMemberVO!=null){
            if(comActFourMemberVO.getIds()!=null){
                for(Integer id:comActFourMemberVO.getIds()){
                    ComActFourMember comActFourMember=new ComActFourMember();
                    AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                    ComActFourMember comActFourMemberBase=this.comActFourMemberDao.selectById(id);
                    if(comActFourMemberBase!=null){
                        comActFourMember.setId(comActFourMemberBase.getId());
                        comActFourMember.setUserId(comActFourMemberBase.getUserId());
                        comActFourMemberVO.setUserId(comActFourMemberBase.getUserId());
                        BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO);
                        userService.putUserBackstage(administratorsUserVO);
                    }
                    AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                    BeanUtils.copyProperties(comActFourMemberVO,administratorsUserVO);
                    userService.putUserBackstage(administratorsUserVO);
                }
                return R.ok();
            }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActSocialOrgServiceImpl.java
@@ -8,6 +8,7 @@
import com.panzhihua.common.model.vos.community.ComActSocialOrgVO;
import com.panzhihua.common.model.vos.user.AdministratorsUserVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.entity.ComActCommittee;
import com.panzhihua.service_community.entity.ComActSocialOrg;
import com.panzhihua.service_community.dao.ComActSocialOrgDao;
import com.panzhihua.service_community.service.ComActSocialOrgService;
@@ -62,7 +63,7 @@
                this.comActSocialOrgDao.insert(comActSocialOrg);
                return R.ok();
            }
            return R.fail(r.getMsg());
            return R.fail("账号或手机号已存在");
        }
        return R.fail();
    }
@@ -72,6 +73,14 @@
        if(comActSocialOrgVO!=null){
               ComActSocialOrg comActSocialOrg=new ComActSocialOrg();
               BeanUtils.copyProperties(comActSocialOrgVO,comActSocialOrg);
                if(comActSocialOrgVO.getRoleId()!=null){
                    ComActSocialOrg comPropertyBase=this.comActSocialOrgDao.selectById(comActSocialOrgVO.getId());
                    AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                    administratorsUserVO.setUserId(comPropertyBase.getUserId());
                    administratorsUserVO.setRoleId(comActSocialOrgVO.getRoleId());
                    administratorsUserVO.setLastLoginTime(DateUtil.date());
                    this.userService.putUserBackstage(administratorsUserVO);
                }
               this.comActSocialOrgDao.updateById(comActSocialOrg);
               return R.ok();
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComClusterOrganizationMemberServiceImpl.java
New file
@@ -0,0 +1,278 @@
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.google.common.collect.Lists;
import com.panzhihua.common.constants.Constants;
import com.panzhihua.common.model.dtos.community.cluster.PageClusterMemberDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.AddClusterMemberAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.EditClusterMemberAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterMemberAdminDto;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.common.model.vos.community.cluster.admin.ClusterMemberNationVo;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelErrorVO;
import com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelVO;
import com.panzhihua.common.model.vos.community.cluster.admin.PageClusterMemberAdminVo;
import com.panzhihua.service_community.dao.ComClusterOrganizationMapper;
import com.panzhihua.service_community.dao.ComClusterOrganizationMemberMapper;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationDO;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationMemberDO;
import com.panzhihua.service_community.service.ComClusterOrganizationMemberService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.util.ObjectUtils;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.HashMap;
import java.util.List;
/**
 * @author lyq
 * @date  2021-09-23 16:44:00
 * describe 群团组织成员表服务实现类
 */
@Slf4j
@Service
public class ComClusterOrganizationMemberServiceImpl extends ServiceImpl<ComClusterOrganizationMemberMapper, ComClusterOrganizationMemberDO> implements ComClusterOrganizationMemberService {
    @Resource
    private ComClusterOrganizationMapper comClusterOrganizationMapper;
    /**
     * 群团组织成员列表-小程序分页查询
     * @param pageClusterMemberDto  请求参数
     * @return  群团组织成员列表
     */
    @Override
    public R pageClusterMemberApplets(PageClusterMemberDto pageClusterMemberDto){
        return R.ok(this.baseMapper.pageClusterMemberApplets(new Page(pageClusterMemberDto.getPageNum(),pageClusterMemberDto.getPageSize()),pageClusterMemberDto));
    }
    /**
     * 分页查询群团组织成员列表
     * @param pageClusterMemberAdminDto 请求参数
     * @return  群团组织成员列表
     */
    @Override
    public R pageClusterMemberAdmin(PageClusterMemberAdminDto pageClusterMemberAdminDto){
        return R.ok(this.baseMapper.pageClusterMemberAdmin(new Page(pageClusterMemberAdminDto.getPageNum(),pageClusterMemberAdminDto.getPageSize()),pageClusterMemberAdminDto));
    }
    /**
     * 新增群团组织成员
     * @param addClusterMemberAdminDto  请求参数
     * @return  新增结果
     */
    @Override
    public R addClusterMemberAdmin(AddClusterMemberAdminDto addClusterMemberAdminDto){
        ComClusterOrganizationMemberDO organizationMemberDO = this.baseMapper.selectOne(new QueryWrapper<ComClusterOrganizationMemberDO>()
                .lambda().eq(ComClusterOrganizationMemberDO::getIdCard,addClusterMemberAdminDto.getIdCard())
                .eq(ComClusterOrganizationMemberDO::getIsDel,ComClusterOrganizationMemberDO.isOk.no)
                .eq(ComClusterOrganizationMemberDO::getCommunityId,addClusterMemberAdminDto.getCommunityId()));
        if(organizationMemberDO != null){
            return R.fail("该身份证号已存在,不可重复添加");
        }
        organizationMemberDO = new ComClusterOrganizationMemberDO();
        BeanUtils.copyProperties(addClusterMemberAdminDto,organizationMemberDO);
        organizationMemberDO.setCreateAt(new Date());
        if(this.baseMapper.insert(organizationMemberDO) > 0){
            return R.ok();
        }
        return R.fail();
    }
    /**
     * 编辑群团组织成员
     * @param editClusterMemberAdminDto 请求参数
     * @return  编辑结果
     */
    @Override
    public R editClusterMemberAdmin(EditClusterMemberAdminDto editClusterMemberAdminDto){
        ComClusterOrganizationMemberDO organizationMemberDO = this.baseMapper.selectById(editClusterMemberAdminDto.getId());
        if(organizationMemberDO == null){
            return R.fail("该组织成员不存在");
        }
        Integer count = this.baseMapper.selectCount(new QueryWrapper<ComClusterOrganizationMemberDO>().lambda()
                .eq(ComClusterOrganizationMemberDO::getCommunityId,editClusterMemberAdminDto.getCommunityId())
                .eq(ComClusterOrganizationMemberDO::getIdCard,editClusterMemberAdminDto.getIdCard())
                .eq(ComClusterOrganizationMemberDO::getIsDel,ComClusterOrganizationMemberDO.isOk.no)
                .ne(ComClusterOrganizationMemberDO::getId,editClusterMemberAdminDto.getId()));
        if(count > 0){
            return R.fail("该身份证号已存在,不可重复添加");
        }
        BeanUtils.copyProperties(editClusterMemberAdminDto,organizationMemberDO);
        organizationMemberDO.setUpdateAt(new Date());
        if(this.baseMapper.updateById(organizationMemberDO) > 0){
            return R.ok();
        }
        return R.fail();
    }
    /**
     * 删除群团组织成员
     * @param id    组织成员id
     * @return  删除结果
     */
    @Override
    public R deleteClusterMemberAdmin(Long id){
        ComClusterOrganizationMemberDO organizationMemberDO = new ComClusterOrganizationMemberDO();
        organizationMemberDO.setId(id);
        organizationMemberDO.setIsDel(ComClusterOrganizationMemberDO.isOk.yes);
        organizationMemberDO.setUpdateAt(new Date());
        if(this.baseMapper.updateById(organizationMemberDO) > 0){
            return R.ok();
        }
        return R.fail();
    }
    /**
     * 群团组织成员详情
     * @param id    组织成员id
     * @return  群团组织成员详情
     */
    @Override
    public R detailClusterMemberAdmin(Long id){
        ComClusterOrganizationMemberDO organizationMemberDO = this.baseMapper.selectById(id);
        if(organizationMemberDO == null){
            return R.fail("该组织成员不存在");
        }
        PageClusterMemberAdminVo memberAdminVo = new PageClusterMemberAdminVo();
        BeanUtils.copyProperties(organizationMemberDO,memberAdminVo);
        return R.ok(memberAdminVo);
    }
    /**
     * 查询系统民族列表
     * @return  民族列表
     */
    @Override
    public R memberNationListAdmin(){
        return R.ok(this.baseMapper.memberNationListAdmin(Constants.NATION_DICT_KEY));
    }
    /**
     * 群团组织成员导入
     * @param memberExcelList  导入数据
     * @param communityId   社区id
     * @param userId    操作用户id
     * @return  导入结果
     */
    @Override
    public R importClusterMember(List<ComClusterMemberExcelVO> memberExcelList, Long communityId, Long userId){
        //需要新增的数据
        List<ComClusterOrganizationMemberDO> saveList = Lists.newArrayList();
        //错误数据
        ArrayList<ComClusterMemberExcelErrorVO> mistakes = Lists.newArrayList();
        //查询当前社区现有的所有群团组织成员列表
        List<ComClusterOrganizationMemberDO> memberList = this.baseMapper.selectList(new QueryWrapper<ComClusterOrganizationMemberDO>().lambda()
                .eq(ComClusterOrganizationMemberDO::getCommunityId,communityId)
                .eq(ComClusterOrganizationMemberDO::getIsDel,ComClusterOrganizationMemberDO.isOk.no));
        HashMap<String, Object> memberMap = new HashMap<>();
        memberList.forEach(member -> {
            String key = member.getIdCard();
            memberMap.put(key, member);
        });
        //查询该社区现有的所有群团组织
        List<ComClusterOrganizationDO> clusterList = comClusterOrganizationMapper.selectList(new QueryWrapper<ComClusterOrganizationDO>().lambda()
                .eq(ComClusterOrganizationDO::getCommunityId,communityId).eq(ComClusterOrganizationDO::getIsDel,ComClusterOrganizationDO.isOk.no));
        HashMap<String, Object> clusterMap = new HashMap<>();
        clusterList.forEach(cluster -> {
            String key = cluster.getName();
            clusterMap.put(key, cluster);
        });
        List<ClusterMemberNationVo> nationList = this.baseMapper.memberNationListAdmin(Constants.NATION_DICT_KEY);
        HashMap<String, Object> nationMap = new HashMap<>();
        nationList.forEach(nation -> {
            String key = nation.getNationName();
            nationMap.put(key, nation.getNationCode());
        });
        Date nowDate = new Date();
        for (ComClusterMemberExcelVO memberExcel : memberExcelList) {
            Long clusterId = 0L;
            String nationCode = "";
            //判断成员是否已存在
            if(!isOnly(memberExcel.getIdCard(),memberMap)){
                ComClusterMemberExcelErrorVO memberExcelErrorVO = new ComClusterMemberExcelErrorVO();
                BeanUtils.copyProperties(memberExcel,memberExcelErrorVO);
                memberExcelErrorVO.setError("该成员已存在");
                mistakes.add(memberExcelErrorVO);
                continue;
            }
            //判断组织是否存在
            if(!isOnly(memberExcel.getClusterName(),clusterMap)){
                ComClusterMemberExcelErrorVO memberExcelErrorVO = new ComClusterMemberExcelErrorVO();
                BeanUtils.copyProperties(memberExcel,memberExcelErrorVO);
                memberExcelErrorVO.setError("该组织在本社区不存在");
                mistakes.add(memberExcelErrorVO);
                continue;
            }else{
                ComClusterOrganizationDO clusterDO = (ComClusterOrganizationDO)clusterMap.get(memberExcel.getClusterName());
                clusterId = clusterDO.getId();
            }
            //判断民族是否存在
            if(!isOnly(memberExcel.getNation(),nationMap)){
                ComClusterMemberExcelErrorVO memberExcelErrorVO = new ComClusterMemberExcelErrorVO();
                BeanUtils.copyProperties(memberExcel,memberExcelErrorVO);
                memberExcelErrorVO.setError("您填写的民族不存在");
                mistakes.add(memberExcelErrorVO);
                continue;
            }else{
                nationCode = nationMap.get(memberExcel.getNation()).toString();
            }
            ComClusterOrganizationMemberDO clusterMember = new ComClusterOrganizationMemberDO();
            BeanUtils.copyProperties(memberExcel,clusterMember);
            clusterMember.setClusterId(clusterId);
            clusterMember.setNationCode(nationCode);
            clusterMember.setImageUrl(Constants.CLUSTER_MEMBER_DEFAULT_IMAGE_URL);
            clusterMember.setCreateAt(nowDate);
            saveList.add(clusterMember);
            memberMap.put(clusterMember.getIdCard(),clusterMember);
        }
        //执行导入
        if(saveList.size() > 0){
           this.saveBatch(saveList);
        }
        //有错误,返回错误数据
        if(mistakes.size() > 0){
            return R.fail(mistakes);
        }
        return R.ok();
    }
    /**
     * 判重方法
     *
     * @param key
     *            主键
     * @param hashMap
     *            数据集
     * @return 存在即为false 不存在则为true
     */
    private boolean isOnly(String key, HashMap<String, Object> hashMap) {
        return ObjectUtils.isEmpty(hashMap.get(key));
    }
    /**
     * 群团组织导出数据查询
     * @param pageClusterMemberAdminDto 请求参数
     * @return  导出数据结果集
     */
    @Override
    public R exportClusterMember(PageClusterMemberAdminDto pageClusterMemberAdminDto){
        return R.ok(this.baseMapper.exportClusterMember(pageClusterMemberAdminDto));
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComClusterOrganizationServiceImpl.java
New file
@@ -0,0 +1,145 @@
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.cluster.admin.AddClusterAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.EditClusterAdminDto;
import com.panzhihua.common.model.dtos.community.cluster.admin.PageClusterAdminDto;
import com.panzhihua.common.model.vos.community.cluster.admin.ClusterDetailAdminVo;
import com.panzhihua.common.model.vos.R;
import com.panzhihua.service_community.dao.ComClusterOrganizationMapper;
import com.panzhihua.service_community.dao.ComClusterOrganizationMemberMapper;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationDO;
import com.panzhihua.service_community.model.dos.ComClusterOrganizationMemberDO;
import com.panzhihua.service_community.service.ComClusterOrganizationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Date;
/**
 * @author lyq
 * @date  2021-09-23 16:44:06
 * describe 群团组织表服务实现类
 */
@Slf4j
@Service
public class ComClusterOrganizationServiceImpl extends ServiceImpl<ComClusterOrganizationMapper, ComClusterOrganizationDO> implements ComClusterOrganizationService {
    @Resource
    private ComClusterOrganizationMemberMapper comClusterOrganizationMemberMapper;
    /**
     * 群团组织列表-小程序查询社区群团组织列表
     * @param communityId   社区id
     * @return  社区群团组织列表
     */
    @Override
    public R listClusterApplets(Long communityId){
        return R.ok(this.baseMapper.listClusterApplets(communityId));
    }
    /**
     * 分页查询群团组织列表
     * @param pageClusterAdminDto  请求参数
     * @return  群团组织列表
     */
    @Override
    public R pageClusterAdmin(PageClusterAdminDto pageClusterAdminDto){
        return R.ok(this.baseMapper.pageClusterAdmin(new Page(pageClusterAdminDto.getPageNum(),pageClusterAdminDto.getPageSize()),pageClusterAdminDto));
    }
    /**
     * 新增群团组织
     * @param addClusterAdminDto    请求参数
     * @return  新增结果
     */
    @Override
    public R addClusterAdmin(AddClusterAdminDto addClusterAdminDto){
        ComClusterOrganizationDO organizationDO = this.baseMapper.selectOne(new QueryWrapper<ComClusterOrganizationDO>().lambda()
                .eq(ComClusterOrganizationDO::getCommunityId,addClusterAdminDto.getCommunityId())
                .eq(ComClusterOrganizationDO::getName,addClusterAdminDto.getName())
                .eq(ComClusterOrganizationDO::getIsDel,ComClusterOrganizationDO.isOk.no));
        if(organizationDO != null){
            return R.fail("该组织已存在,不可重复添加");
        }
        organizationDO = new ComClusterOrganizationDO();
        BeanUtils.copyProperties(addClusterAdminDto,organizationDO);
        organizationDO.setCreateAt(new Date());
        if(this.baseMapper.insert(organizationDO) > 0){
            return R.ok();
        }
        return R.fail();
    }
    /**
     * 修改群团组织
     * @param editClusterAdminDto   请求参数
     * @return  修改结果
     */
    @Override
    public R editClusterAdmin(EditClusterAdminDto editClusterAdminDto){
        ComClusterOrganizationDO organizationDO = this.baseMapper.selectById(editClusterAdminDto.getId());
        if(organizationDO == null){
            return R.fail("该组织不存在");
        }
        Integer count = this.baseMapper.selectCount(new QueryWrapper<ComClusterOrganizationDO>().lambda()
                .eq(ComClusterOrganizationDO::getCommunityId,editClusterAdminDto.getCommunityId())
                .eq(ComClusterOrganizationDO::getName,editClusterAdminDto.getName())
                .eq(ComClusterOrganizationDO::getIsDel,ComClusterOrganizationDO.isOk.no)
                .ne(ComClusterOrganizationDO::getId,editClusterAdminDto.getId()));
        if(count > 0){
            return R.fail("该组织已存在");
        }
        BeanUtils.copyProperties(editClusterAdminDto,organizationDO);
        organizationDO.setUpdateAt(new Date());
        if(this.baseMapper.updateById(organizationDO) > 0){
            return R.ok();
        }
        return R.fail();
    }
    /**
     * 删除群团组织
     * @param id    组织id
     * @return  删除结果
     */
    @Override
    public R deleteClusterAdmin(Long id){
        Integer count = comClusterOrganizationMemberMapper.selectCount(new QueryWrapper<ComClusterOrganizationMemberDO>().lambda()
                .eq(ComClusterOrganizationMemberDO::getClusterId,id)
                .eq(ComClusterOrganizationMemberDO::getIsDel,ComClusterOrganizationMemberDO.isOk.no));
        if(count > 0){
            return R.fail("该组织下存在成员,不可删除");
        }
        ComClusterOrganizationDO organizationDO = new ComClusterOrganizationDO();
        organizationDO.setId(id);
        organizationDO.setIsDel(ComClusterOrganizationDO.isOk.yes);
        organizationDO.setUpdateAt(new Date());
        if(this.baseMapper.updateById(organizationDO) > 0){
            return R.ok();
        }
        return R.fail();
    }
    /**
     * 群团组织详情
     * @param id    组织id
     * @return  群团组织详情
     */
    @Override
    public R detailClusterAdmin(Long id){
        ComClusterOrganizationDO organizationDO = this.baseMapper.selectById(id);
        if(organizationDO == null){
            return R.fail("该组织不存在");
        }
        ClusterDetailAdminVo detailAdminVo = new ClusterDetailAdminVo();
        BeanUtils.copyProperties(organizationDO,detailAdminVo);
        return R.ok(detailAdminVo);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComElderAuthRecordsServiceImpl.java
@@ -124,6 +124,11 @@
    public R detailElderAuthRecords(Long authRecordId) {
        ComElderAuthRecordVO comElderAuthRecordVO = comElderAuthRecordsDAO.detailElderAuthRecords(authRecordId);
        comElderAuthRecordVO.setNextIds(comElderAuthRecordsDAO.getNextIds(comElderAuthRecordVO.getCommunityId(),authRecordId));
        try {
            comElderAuthRecordVO.setAge(IdcardUtil.getAgeByIdCard(comElderAuthRecordVO.getIdCard()));
        }catch (Exception e){
            log.error("身份证转换失败");
        }
        return R.ok(comElderAuthRecordVO);
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComPropertyServiceImpl.java
@@ -64,7 +64,7 @@
                this.comPropertyDao.insert(comProperty);
                return R.ok();
            }
            return R.fail(r.getMsg());
            return R.fail("账号或手机号已存在");
        }
        return R.fail();
    }
@@ -74,6 +74,14 @@
        if(comPropertyVO!=null){
            ComProperty comProperty=new ComProperty();
            BeanUtils.copyProperties(comPropertyVO,comProperty);
            if(comPropertyVO.getRoleId()!=null){
                ComProperty comPropertyBase=this.comPropertyDao.selectById(comPropertyVO.getId());
                AdministratorsUserVO administratorsUserVO=new AdministratorsUserVO();
                administratorsUserVO.setUserId(comPropertyBase.getUserId());
                administratorsUserVO.setRoleId(comPropertyVO.getRoleId());
                administratorsUserVO.setLastLoginTime(DateUtil.date());
                this.userService.putUserBackstage(administratorsUserVO);
            }
            this.comPropertyDao.updateById(comProperty);
            return R.ok();
        }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java
@@ -8,10 +8,10 @@
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -39,6 +39,7 @@
import com.panzhihua.common.model.vos.community.convenient.ConvenientProductSpecificationVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientProductVO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientViewStatisticsVO;
import com.panzhihua.common.model.vos.community.convenient.ExportMerchantVO;
import com.panzhihua.common.service.user.UserService;
import com.panzhihua.service_community.dao.ComActDAO;
import com.panzhihua.service_community.dao.ConvenientConsultationStatisticsDAO;
@@ -141,6 +142,7 @@
            });
        }
        BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO);
        convenientMerchantDO.setIntroduction(convenientMerchantDTO.getIntroduction());
        this.baseMapper.updateById(convenientMerchantDO);
        return R.ok();
    }
@@ -182,6 +184,10 @@
    @Override
    public R disableOrEnableMerchant(DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) {
        List<ConvenientMerchantDO> convenientMerchantDOList = this.baseMapper.selectList(new QueryWrapper<ConvenientMerchantDO>()
                .lambda().in(ConvenientMerchantDO::getId, disableOrEnableConvenientMerchantDTO.getIds()));
        List<Long> userIds = convenientMerchantDOList.stream().map(ConvenientMerchantDO::getUserId).collect(Collectors.toList());
        disableOrEnableConvenientMerchantDTO.setUserIds(userIds);
        R result = userService.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO);
        if (R.isOk(result)) {
            return R.ok();
@@ -239,10 +245,16 @@
        SimpleDateFormat dayFormat = new SimpleDateFormat("yyyy-MM-dd");
        String moth = mothFormat.format(nowDate);
        String day = dayFormat.format(nowDate);
        int consultationCount = convenientConsultationStatisticsDAO.selectCount(new QueryWrapper<ConvenientConsultationStatisticsDO>()
                .lambda().eq(ConvenientConsultationStatisticsDO::getMerchantId, merchantId));
        int monthConsultationVolume = convenientConsultationStatisticsDAO.selectMonthConsultationVolume(merchantId, moth);
        int dayConsultationVolume = convenientConsultationStatisticsDAO.selectDayConsultationVolume(merchantId, day);
        Integer viewCount = convenientViewStatisticsDAO.selectCount(new QueryWrapper<ConvenientViewStatisticsDO>()
                .lambda().eq(ConvenientViewStatisticsDO::getMerchantId, merchantId));
        int monthViewNum = convenientViewStatisticsDAO.selectMonthViewNum(merchantId, moth);
        int dayViewNum = convenientViewStatisticsDAO.selectDayViewNum(merchantId, day);
        convenientMerchantVO.setConsultationVolume(consultationCount);
        convenientMerchantVO.setViewNum(viewCount);
        convenientMerchantVO.setMonthConsultationVolume(monthConsultationVolume);
        convenientMerchantVO.setDayConsultationVolume(dayConsultationVolume);
        convenientMerchantVO.setMonthViewNum(monthViewNum);
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActCommitteeMapper.xml
@@ -14,7 +14,7 @@
    </resultMap>
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComActCommiteeVO">
        select t.*,t1.account,t1.password,t2.name as areaName,t3.role_id as roleId from com_act_committee t
        select t.*,t1.account,t1.password,t2.address as areaName,t3.role_id as roleId from com_act_committee t
        left join sys_user t1 on t.user_id = t1.user_id
        left join com_mng_village t2 on t.area_id = t2.village_id
        left join sys_user_role t3 on t.user_id = t3.user_id
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActFourMemberMapper.xml
@@ -31,7 +31,7 @@
                and t.position like concat(#{commonPage.position},'%')
            </if>
            <if test="commonPage.keyword !=null and commonPage.keyword !=''">
                and (t1.name like concat(#{commonPage.keyword},'%') or t1.phone like concat(#{commonPage.keyword},'%') or t.jurisdiction_content like concat(#{commonPage.keyword},'%'))
                and (t1.name like concat(#{commonPage.keyword},'%') or t1.phone like concat(#{commonPage.keyword},'%') or t.jurisdiction_content like concat('%',#{commonPage.keyword},'%'))
            </if>
            <if test="commonPage.status !=null">
                and t1.status =#{commonPage.status}
@@ -41,7 +41,7 @@
    </select>
    <select id="selectBuilding" resultType="String">
        select concat(t1.group_at,t.name,'栋') from com_mng_building t left join com_mng_village t1 on t.village_id = t1.village_id where t.id in (#{id})
        select concat(t1.group_at,t.name,'栋') from com_mng_building t left join com_mng_village t1 on t.village_id = t1.village_id where t.id in (${id})
    </select>
    <select id="getById" resultMap="baseResultMap">
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationDOMapper.xml
New file
@@ -0,0 +1,58 @@
<?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.ComClusterOrganizationMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComClusterOrganizationDO">
        <id column="id" property="id" />
        <result column="name" property="name" />
        <result column="phone" property="phone" />
        <result column="address" property="address" />
        <result column="status" property="status" />
        <result column="logo" property="logo" />
        <result column="is_del" property="isDel" />
        <result column="create_at" property="createAt" />
        <result column="update_at" property="updateAt" />
        <result column="community_id" property="communityId" />
        <result column="lng" property="lng" />
        <result column="lat" property="lat" />
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, name, phone, address, status, logo, is_del, create_at, update_at,community_id, lng, lat
    </sql>
    <select id="listClusterApplets" resultType="com.panzhihua.common.model.vos.community.cluster.PageClusterVo">
        select id,`name` from com_cluster_organization where status = 1 and is_del = 2 and community_id = #{communityId} order by create_at desc
    </select>
    <select id="pageClusterAdmin" resultType="com.panzhihua.common.model.vos.community.cluster.admin.PageClusterAdminVo">
        SELECT
            id,
            `name`,
            logo,
            phone,
            address,
            `status`
        FROM
            com_cluster_organization
        WHERE
            is_del = 2
            <if test="pageClusterAdminDto.communityId != null">
                and community_id = #{pageClusterAdminDto.communityId}
            </if>
            <if test="pageClusterAdminDto.status != null">
                and status = #{pageClusterAdminDto.status}
            </if>
            <if test="pageClusterAdminDto.keyWord != null and pageClusterAdminDto.keyWord != &quot;&quot;">
                and (
                `name` like concat(#{pageClusterAdminDto.keyWord}, '%' ) or
                phone like concat(#{pageClusterAdminDto.keyWord}, '%' )
                )
            </if>
            ORDER BY
                create_at DESC
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComClusterOrganizationMemberDOMapper.xml
New file
@@ -0,0 +1,139 @@
<?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.ComClusterOrganizationMemberMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComClusterOrganizationMemberDO">
        <id column="id" property="id" />
        <result column="cluster_id" property="clusterId" />
        <result column="name" property="name" />
        <result column="phone" property="phone" />
        <result column="address" property="address" />
        <result column="image_url" property="imageUrl" />
        <result column="job" property="job" />
        <result column="id_card" property="idCard" />
        <result column="nation_code" property="nationCode" />
        <result column="status" property="status" />
        <result column="is_del" property="isDel" />
        <result column="create_at" property="createAt" />
        <result column="update_at" property="updateAt" />
        <result column="community_id" property="communityId" />
    </resultMap>
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, cluster_id, name, phone, address, image_url, job, id_card, nation_code, status, is_del, create_at, update_at, community_id
    </sql>
    <select id="pageClusterMemberApplets" resultType="com.panzhihua.common.model.vos.community.cluster.PageClusterMemberVo">
        SELECT
            ccom.id,ccom.`name`,ccom.cluster_id,cco.`name` as clusterName,ccom.phone,ccom.address,ccom.image_url,ccom.job,ccom.id_card
        FROM
            com_cluster_organization_member AS ccom
            LEFT JOIN com_cluster_organization AS cco ON cco.id = ccom.cluster_id
            <where>
                ccom.status = 1 and ccom.is_del = 2
                <if test="pageClusterMemberDto.communityId != null">
                    and ccom.community_id = #{pageClusterMemberDto.communityId}
                </if>
                <if test="pageClusterMemberDto.clusterId != null">
                    and ccom.cluster_id = #{pageClusterMemberDto.clusterId}
                </if>
                <if test="pageClusterMemberDto.keyWord != null and pageClusterMemberDto.keyWord != &quot;&quot;">
                    and ccom.`name` like concat(#{pageClusterMemberDto.keyWord}, '%' )
                </if>
            </where>
            order by ccom.create_at desc
    </select>
    <select id="pageClusterMemberAdmin" resultType="com.panzhihua.common.model.vos.community.cluster.admin.PageClusterMemberAdminVo">
        SELECT
            ccom.id,
            ccom.`name`,
            ccom.image_url,
            cco.`name` AS clusterName,
            ccom.job,
            ccom.phone,
            ccom.`status`
        FROM
            com_cluster_organization_member AS ccom
            LEFT JOIN com_cluster_organization AS cco ON cco.id = ccom.cluster_id
        WHERE
            ccom.is_del = 2
            <if test="pageClusterMemberAdminDto.communityId != null">
                and ccom.community_id = #{pageClusterMemberAdminDto.communityId}
            </if>
            <if test="pageClusterMemberAdminDto.status != null">
                and ccom.`status` = #{pageClusterMemberAdminDto.status}
            </if>
            <if test="pageClusterMemberAdminDto.clusterId != null">
                and ccom.cluster_id = #{pageClusterMemberAdminDto.clusterId}
            </if>
            <if test="pageClusterMemberAdminDto.keyWord != null">
                and (
                ccom.`name` like concat(#{pageClusterMemberAdminDto.keyWord}, '%' ) or
                ccom.phone like concat(#{pageClusterMemberAdminDto.keyWord}, '%' )
                )
            </if>
        order by ccom.create_at desc
    </select>
    <select id="memberNationListAdmin" resultType="com.panzhihua.common.model.vos.community.cluster.admin.ClusterMemberNationVo">
        SELECT
            dict_value AS nationCode,
            dict_item_name AS nationName
        FROM
            bc_dictionary_item
        WHERE
            dict_id = (
            SELECT
                id
            FROM
                bc_dictionary
        WHERE
            `dict_key` = #{key})
    </select>
    <select id="getNationCode" resultType="Map">
        SELECT
            dict_value
        FROM
            bc_dictionary_item
        WHERE
            dict_id = ( SELECT id FROM bc_dictionary WHERE dict_key =#{key} )
            AND dict_item_name = #{nationName}
    </select>
    <select id="exportClusterMember" resultType="com.panzhihua.common.model.vos.community.cluster.admin.ComClusterMemberExcelExportAdminVO">
        SELECT
        ccom.`name`,
        cco.`name` AS clusterName,
        ccom.job,
        ccom.phone,
        case ccom.`status`
        when '1' then '启用'
        when '2' then '禁用'
        end
        FROM
        com_cluster_organization_member AS ccom
        LEFT JOIN com_cluster_organization AS cco ON cco.id = ccom.cluster_id
        WHERE
        ccom.is_del = 2
        <if test="pageClusterMemberAdminDto.communityId != null">
            and ccom.community_id = #{pageClusterMemberAdminDto.communityId}
        </if>
        <if test="pageClusterMemberAdminDto.status != null">
            and ccom.`status` = #{pageClusterMemberAdminDto.status}
        </if>
        <if test="pageClusterMemberAdminDto.clusterId != null">
            and ccom.cluster_id = #{pageClusterMemberAdminDto.clusterId}
        </if>
        <if test="pageClusterMemberAdminDto.keyWord != null">
            and (
            ccom.`name` like concat(#{pageClusterMemberAdminDto.keyWord}, '%' ) or
            ccom.phone like concat(#{pageClusterMemberAdminDto.keyWord}, '%' )
            )
        </if>
        order by ccom.create_at desc
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComElderAuthRecordsMapper.xml
@@ -159,6 +159,8 @@
                '视频认证'
                WHEN 2 THEN
                '人脸认证'
                WHEN 3 THEN
                '线下认证'
                END authMethod,
            cear.auth_period,
            cear.auth_date,
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPensionAuthRecordMapper.xml
@@ -100,6 +100,7 @@
            cpar.auth_method,
            cpar.auth_video,
            cpar.approval_status,
            cpar.id,
            su1.`name` as approverName,
            cpar.approval_date
        FROM
@@ -138,12 +139,12 @@
        END personnelCategory,
        cpap.address,
        CASE
        cpap.isAlive
        cpap.is_alive
        WHEN 1 THEN
        '是'
        WHEN 0 THEN
        '否'
        END is_alive,
        END isAlive,
        cpar.auth_period,
        cpar.auth_date,
        CASE
@@ -152,6 +153,8 @@
        '视频认证'
        WHEN 2 THEN
        '人脸认证'
        WHEN 3 THEN
        '线下认证'
        END authMethod,
        cpar.mark,
        CASE
@@ -167,11 +170,14 @@
        com_pension_auth_records cpar
        LEFT JOIN com_pension_auth_pensioners cpap ON cpar.pensioner_id = cpap.id
        LEFT JOIN sys_user su ON cpar.submit_user_id = su.user_id
        WHERE
        cpar.id in
        <foreach collection="ids" item="id" open="(" separator="," close=")" >
            #{id}
        </foreach>
        <where>
            <if test="ids != null and ids.size > 0">
                and cpar.id in
                <foreach collection="ids" item="id" open="(" separator="," close=")" >
                    #{id}
                </foreach>
            </if>
        </where>
        order by cpar.create_at desc
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComPropertyMapper.xml
@@ -16,7 +16,7 @@
    </resultMap>
    <select id="pageList" resultType="com.panzhihua.common.model.vos.community.ComPropertyVO">
        select t.*,t1.account,t1.password,t2.name as areaName,t3.role_id as roleId from com_property t
        select t.*,t1.account,t1.password,t2.address as areaName,t3.role_id as roleId from com_property t
        left join sys_user t1 on t.user_id = t1.user_id
        left join com_mng_village t2 on t.area_id = t2.village_id
        left join sys_user_role t3 on t.user_id = t3.user_id
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientMerchantMapper.xml
@@ -54,9 +54,11 @@
            AND ccm.business_status = #{pageConvenientMerchantDTO.businessStatus}
        </if>
        <if test="pageConvenientMerchantDTO.keyword != null and pageConvenientMerchantDTO.keyword != &quot;&quot;">
            AND ccm.name LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%')
            AND ccm.address LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%')
            AND ccm.phone LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%')
            AND (
                    ccm.name LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%')
                    OR ccm.address LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%')
                    OR ccm.phone LIKE CONCAT('%', #{pageConvenientMerchantDTO.keyword}, '%')
                )
        </if>
        GROUP BY ccm.id
    </select>
@@ -77,7 +79,7 @@
            FROM com_convenient_merchants ccm
            LEFT JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE ccm.community_id = #{communityId} AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id
            WHERE ccm.community_id = #{communityId} AND ccm.business_status = 1 AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
    </select>
    <select id="getClassifyMerchants" resultType="com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO">
@@ -90,7 +92,7 @@
            FROM com_convenient_merchants ccm
            LEFT JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE ccm.community_id = #{pageClassifyMerchantDTO.communityId} AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId}
            WHERE ccm.community_id = #{pageClassifyMerchantDTO.communityId} AND ccm.business_status = 1 AND ccss.service_category_id = #{pageClassifyMerchantDTO.serviceId}
                AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
    </select>
@@ -103,7 +105,7 @@
                ccm.id, ccm.name, ccm.introduction, ccm.logo, ccm.phone, ccm.begin_at, ccm.end_at, ccm.period,
                ccm.address, ccm.lat, ccm.lon, cccs.consultation_volume,GROUP_CONCAT(ccss.service_name) AS serviceScope
            FROM com_convenient_merchants ccm
            INNER JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE ccm.id = #{merchantId} AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
@@ -119,7 +121,7 @@
            FROM com_convenient_merchants ccm
            INNER JOIN com_convenient_consultation_statistics cccs ON ccm.id = cccs.merchant_id
            LEFT JOIN com_convenient_service_scope ccss ON ccm.id = ccss.merchant_id
            WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%')
            WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccm.business_status = 1 AND ccm.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%')
                AND ccm.is_del = 0 AND (cccs.statistic_date LIKE #{currentMon} OR cccs.statistic_date IS NULL) GROUP BY cccs.id
        ) temp GROUP BY temp.id ORDER BY SUM(temp.consultation_volume) DESC
    </select>
@@ -140,9 +142,11 @@
            AND ccm.business_status = #{exportMerchantDTO.businessStatus}
        </if>
        <if test="exportMerchantDTO.keyword != null and exportMerchantDTO.keyword != &quot;&quot;">
            AND ccm.name LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%')
            AND ccm.address LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%')
            AND ccm.phone LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%')
            AND (
                    ccm.name LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%')
                    OR ccm.address LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%')
                    OR ccm.phone LIKE CONCAT('%', #{exportMerchantDTO.keyword}, '%')
                )
        </if>
        GROUP BY ccm.id
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientProductMapper.xml
@@ -71,6 +71,8 @@
        SELECT ccp.id,ccp.`name`,ccp.category_id,ccp.merchant_id,ccp.introduction
        FROM com_convenient_products ccp
        LEFT JOIN com_convenient_merchants ccm  ON  ccp.merchant_id = ccm.id
        WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccp.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%')
        INNER JOIN com_convenient_product_specifications ccps ON ccp.id = ccps.product_id
        WHERE ccm.community_id = #{pageSearchDTO.communityId} AND ccp.is_del = 0
        AND ccp.on_shelf = 1 AND ccps.is_del = 0 AND ccp.`name` LIKE CONCAT('%', #{pageSearchDTO.keyword}, '%') GROUP BY ccp.id
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ConvenientServiceCategoryMapper.xml
@@ -50,6 +50,6 @@
        FROM com_convenient_service_categories ccsc
        INNER JOIN com_convenient_service_scope ccss ON ccsc.id = ccss.service_category_id
        LEFT JOIN com_convenient_merchants ccm ON ccss.merchant_id = ccm.id
        WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND ccm.community_id = #{communityId} GROUP BY ccsc.id
        WHERE ccsc.is_del = 0 AND ccm.is_del = 0 AND ccm.community_id = #{communityId} AND ccm.business_status = 1 GROUP BY ccsc.id
    </select>
</mapper>
springcloud_k8s_panzhihuazhihuishequ/service_property/pom.xml
@@ -111,6 +111,23 @@
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-actuator</artifactId>
        </dependency>
        <!--kafka依赖 -->
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka</artifactId>
            <version>2.7.6</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.kafka</groupId>
            <artifactId>spring-kafka-test</artifactId>
            <scope>test</scope>
            <version>2.7.6</version>
        </dependency>
        <!--json转换工具包依赖 -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
        </dependency>
    </dependencies>
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/config/KafkaConfig.java
New file
@@ -0,0 +1,31 @@
package com.panzhihua.service_property.config;
import org.apache.kafka.clients.admin.NewTopic;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.EnableKafka;
import org.springframework.kafka.config.TopicBuilder;
/**
 * @author manailin
 * @version 1.0
 * @description kafka配置类 开启Kafka监听器标注的端点
 * @date 2021/9/26 15:33
 */
@Configuration
@EnableKafka
public class KafkaConfig {
    @Value("${kafka.topic.kafka-demo-topic}")
    private String orderTopic;
    /** 条件匹配,如果配置kafka.topic.autoCreate=true的话,该配置类生效,反之则无效 */
    @Bean
    @ConditionalOnProperty(name = "kafka.topic.autoCreate", havingValue = "true")
    public NewTopic orderTopic() {
        return TopicBuilder.name(orderTopic).build();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/CallForward.java
New file
@@ -0,0 +1,70 @@
package com.panzhihua.service_property.dto;
import lombok.Data;
/**
 * 应用模块名称
 * <p>
 * * 应用模块名称
 * <p>
 * 订阅一键报警的设备信息主题返回的对象 代码描述
 * <p>
 * Copyright; Copyright (C) 2021 XXX, Inc. All rights reserved.
 * <p>
 * Company; 成都呐喊信息技术有限公司
 * <p>
 *
 * @author manailin
 * @since 2021/9/26 16;33
 */
@Data
public class CallForward {
    /**
     * 呼叫转移记录GUID
     */
    private String CallForwardId;
    /**
     * 呼叫者GUID
     */
    private String Caller;
    /**
     * 呼叫顺序
     */
    private String Order;
    /**
     * 被呼叫者GUID
     */
    private String Callee;
    /**
     * 预定的呼叫时间
     */
    private String CallDateTime;
    /**
     * 呼叫次数
     */
    private String CallNums;
    /**
     * 呼叫持续时间
     */
    private String CallSeconds;
    /**
     * 呼叫策略
     */
    private String CallStrate;
    /**
     * 策略名称
     */
    private String ProName;
    /**
     * 是否自动接听
     */
    private String AutoAnswer;
    /**
     * 呼叫等待mp3文件id
     */
    private String WaitMp3Id;
    /**
     * 呼叫应答mp3文件id
     */
    private String CallMp3Id;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/CallForwardDto.java
New file
@@ -0,0 +1,45 @@
package com.panzhihua.service_property.dto;
import lombok.Data;
/**
 * 应用模块名称
 * <p>
 * 订阅一键报警的设备信息主题返回的对象 代码描述
 * <p>
 * Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved.
 * <p>
 * Company: 成都呐喊信息技术有限公司
 * <p>
 *
 * @author manailin
 * @since 2021/9/26 16:23
 */
@Data
public class CallForwardDto {
    private String CallForwardId;
    /** 呼叫转移记录GUID */
    private String Caller;
    /** 呼叫者GUID */
    private String Order;
    /** 呼叫顺序 */
    private String Callee;
    /** 被呼叫者GUID */
    private String CallDateTime;
    /** 预定的呼叫时间 */
    private String CallNums;
    /** 呼叫次数 */
    private String CallSeconds;
    /** 呼叫持续时间 */
    private String CallStratus;
    /** 呼叫策略 */
    private String ProName;
    /** 策略名称 */
    private String AutoAnswer;
    /** 是否自动接听 */
    private String WaitMp3Id;
    /** 呼叫等待mp3文件id */
    private String CallMp3Id;
    /** 呼叫应答mp3文件id */
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/CustomBtn.java
New file
@@ -0,0 +1,69 @@
package com.panzhihua.service_property.dto;
import lombok.Data;
/**
 * 应用模块名称
 * <p>
 * 代码描述
 * <p>
 * Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved.
 * <p>
 * Company: 成都呐喊信息技术有限公司
 * <p>
 *
 * @author manailin
 * @since 2021/9/26 16:23
 */
@Data
public class CustomBtn {
    /**
     * 按键所属终端id
     */
    private String TerminalId;
    /**
     * 按键编码
     */
    private String BtnCode;
    /**
     * 按键任务guid
     */
    private String TskGuid;
    /**
     * 按键对应的响应终端id
     */
    private String ResTerminalId;
    /**
     * 播放曲目文件id
     */
    private String FileId;
    /**
     * 播放音量
     */
    private String SoundVol;
    /**
     * 灯光模式
     */
    private String LightMode;
    /**
     * 报警强切
     */
    private String CutAlarm;
    /**
     * 短路输出1
     */
    private String IoOut1;
    /**
     * 短路输出2
     */
    private String IoOut2;
    /**
     * 终端短路输出频率
     */
    private String IoOutFreQuency;
    /**
     * 终端短路输出持续时间
     */
    private String IoOutDuration;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/DeviceInfoDto.java
New file
@@ -0,0 +1,255 @@
package com.panzhihua.service_property.dto;
import java.util.ArrayList;
import lombok.*;
/**
 * 应用模块名称
 * <p>
 * 订阅一键报警的设备信息主题返回的对象 代码描述
 * <p>
 * Copyright;Copyright (C) 2021 XXX Inc. All rights reserved.
 * <p>
 * Company;成都呐喊信息技术有限公司
 * <p>
 *
 * @author manailin
 * @since 2021/9/26 16:33
 */
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
@ToString
public class DeviceInfoDto {
    private String DeviceType;
    /**
     * 设备类型
     */
    private String DeviceName;
    /**
     * 设备用户名
     */
    private String DeviceNickName;
    /**
     * 设备用户昵称
     */
    private String DeviceGuid;
    /**
     * 设备GUID
     */
    private String DevicePwd;
    /**
     * 设备用户密码
     */
    private String DeviceAreaId;
    /**
     * 用户所在分区GUID
     */
    private String DeviceIp;
    /**
     * 设备IP
     */
    private String DevicePriority;
    /**
     * 设备用户级别
     */
    private String DeviceStatus;
    /**
     * 设备用户状态
     */
    private String HasVid;
    /**
     * 有无视频
     */
    private String HasTalk;
    /**
     * 有无对讲
     */
    private String RtspUrl;
    /**
     * 关联rtsp相机流地址
     */
    private String IoInCnt;
    /**
     * IO输入口数量
     */
    private String IoIn1State;
    /**
     * IO输入口1状态
     */
    private String IoIn2State;
    /**
     * IO输入口2状态
     */
    private String IoIn3State;
    /**
     * IO输入口3状态
     */
    private String IoIn4State;
    /**
     * IO输入口4状态
     */
    private String IoIn5State;
    /**
     * IO输入口5状态
     */
    private String IoIn6State;
    /**
     * IO输入口6状态
     */
    private String IoIn2Tp;
    /**
     * 报警输入2类型
     */
    private String IoOutCnt;
    /**
     * IO输出口数量
     */
    private String IoOut1State;
    /**
     * IO输出口1状态
     */
    private String IoOut2State;
    /**
     * IO输出口2状态
     */
    private String IoOut3State;
    /**
     * IO输出口3状态
     */
    private String IoOut4State;
    /**
     * IO输出口4状态
     */
    private String IoOut5State;
    /**
     * IO输出口5状态
     */
    private String IoOut6State;
    /**
     * IO输出口6状态
     */
    private String PlayTalkVol;
    /**
     * 对讲的播放音量
     */
    private String PlayBcVol;
    /**
     * 广播的播放音量
     */
    private String PlayBellVol;
    /**
     * 铃声的播放音量
     */
    private String CollTalkVol;
    /**
     * 采集的对讲音量
     */
    private String CollWatchVol;
    /**
     * 采集的监视音量
     */
    private String DeviceSerialNumber;
    /**
     * 设备序列号
     */
    private String ManufactureDate;
    /**
     * 出厂日期
     */
    private String DbAlarm;
    /**
     * 喧哗报警阈值
     */
    private String Model;
    /**
     * 设备模式
     */
    private String MoDet1;
    /**
     * 设备模式
     */
    private String MoDet2;
    /**
     * 设备模式
     */
    private String DeamonTime;
    /**
     * ARM守护程序发布时间
     */
    private String CompileTime;
    /**
     * ARM主程序发布时间
     */
    private String DeviceAbility;
    /**
     * 设备功能
     */
    private String DeviceCode;
    /**
     * 设备编码
     */
    private String DeviceDesc;
    /**
     * 设备描述
     */
    private String DeviceToken;
    /**
     * 加密狗id
     */
    private String TimeStamp;
    /**
     * 当前时间戳
     */
    private String DeviceVer;
    /**
     * 设备版本
     */
    private String CurrentTaskGuid;
    /**
     * 当前执行的任务guid
     */
    private String CurrentSoundSrc;
    /**
     * 当前音源
     */
    private String SipUsr;
    /**
     * sip账号
     */
    private String SipPwd;
    /**
     * sip密码
     */
    private String ProtocalType;
    /**
     * 协议类型 1:私有协议 2:sip协议 3:都有
     */
    private String TaskStatus;
    /**
     * 任务状态
     */
    private String CtlType;
    /**
     * 更改类型 1 添加 2 更新 3 删除 4权限改变
     */
    private String ReservedField1;
    /**
     * 扩展字段1
     */
    private String ReservedField2;
    /**
     * 扩展字段2
     */
    private String ReservedField3;
    /**
     * 扩展字段3
     */
    private ArrayList<CallForwardDto> CallForwardList;
    private ArrayList<CustomBtn> customBtns;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/TaskDetail.java
New file
@@ -0,0 +1,130 @@
package com.panzhihua.service_property.dto;
import java.util.ArrayList;
import lombok.Data;
/**
 * 应用模块名称
 * <p>
 * 一键报警kafka 订阅主题 任务消息对象 代码描述
 * <p>
 * Copyright;Copyright (C) 2021 XXX Inc. All rights reserved.
 * <p>
 * Company;成都呐喊信息技术有限公司
 * <p>
 *
 * @author manailin
 * @since 2021/9/26 16:33
 */
@Data
public class TaskDetail {
    /**
     * 对讲服务地址
     */
    private String TalkServer;
    /**
     * 对讲服务端口
     */
    private String TalkPort;
    /**
     * 任务拨号时间
     */
    private String TskCallStartTime;
    /**
     * 任务启动时间
     */
    private String TskStartTime;
    /**
     * 任务guid
     */
    private String TskGuid;
    /**
     * 任务级别
     */
    private String TskPrio;
    /**
     * 呼叫者guid
     */
    private String CallerGuid;
    /**
     * 被呼叫者guid
     */
    private String CalleeGuid;
    /**
     * 呼叫者等级
     */
    private String CallerLevel;
    /**
     * 任务状态
     */
    private String TskStatus;
    /**
     * 任务参数:通道号
     */
    private String ChIdx;
    /**
     * 任务参数:传输方式
     */
    private String TransProto;
    /**
     * 任务参数:数据类型
     */
    private String MdTp;
    /**
     * 对讲音量
     */
    private String TalkVolumn;
    /**
     * 第三方厂家策略
     */
    private String CustomJson;
    /**
     * 呼叫转移记录GUID
     */
    private ArrayList<CallForward> CallForwardList;
    /**
     * 任务超时时间unix时间戳
     */
    private String TskTimeout;
    /**
     * 码流属性,0主码流 1子码流
     */
    private String StrmMode;
    /**
     * 是否已处理 1未 2已
     */
    private String AlreadyDeal;
    /**
     * 创建者guid
     */
    private String Creater;
    /**
     * 启动者guid
     */
    private String Starter;
    /**
     * 呼叫者名字
     */
    private String CallerName;
    /**
     * 被呼叫者名字
     */
    private String CalleeName;
    /**
     * 协议类型 1:私有协议 2:sip协议 3:都有
     */
    private String ProtocalType;
    /**
     * 扩展字段1 发起者类型 1 ARM 2 PC
     */
    private String ReservedField1;
    /**
     * 扩展字段2
     */
    private String ReservedField2;
    /**
     * 扩展字段3
     */
    private String ReservedField3;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/dto/TaskInfo.java
New file
@@ -0,0 +1,28 @@
package com.panzhihua.service_property.dto;
import lombok.Data;
/**
 * 应用模块名称
 * <p>
 * 一键报警kafka 订阅主题 任务消息对象 代码描述
 * <p>
 * Copyright: Copyright (C) 2021 XXX, Inc. All rights reserved.
 * <p>
 * Company: 成都呐喊信息技术有限公司
 * <p>
 *
 * @author manailin
 * @since 2021/9/26 16:30
 */
@Data
public class TaskInfo {
    /** 任务类型(1) */
    private Integer task_type;
    /** 更改类型 1 添加 2 更新 3 删除 */
    private Integer CtlType;
    /** 任务 */
    private TaskDetail talk;
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/listener/OrderListener.java
New file
@@ -0,0 +1,54 @@
package com.panzhihua.service_property.listener;
import java.util.Date;
import javax.annotation.Resource;
import org.springframework.kafka.annotation.KafkaListener;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.panzhihua.service_property.dao.ComPropertyAlarmDao;
import com.panzhihua.service_property.dto.TaskInfo;
import com.panzhihua.service_property.entity.ComPropertyAlarm;
import lombok.extern.slf4j.Slf4j;
/**
 * @author manailin
 * @version 1.0
 * @description kafka 消息消费者
 * @date 2021/9/26 15:33
 */
@Slf4j
@Component
public class OrderListener {
    @Resource
    private ComPropertyAlarmDao comPropertyAlarmDao;
    /** 用于监听kafka,符合条件的消息能够即时消费 */
    @KafkaListener(topics = {"${kafka.topic.kafka-demo-topic}"}, autoStartup = "${kafka.topic.autoCreate:true}")
    public void processing(String message) throws Exception {
        log.info("监控来消息了:{}", message);
        try {
            TaskInfo task = JSONObject.parseObject(message, TaskInfo.class);
            if (task.getCtlType() == 1) {
                saveTask(task);
            }
        } catch (Exception e) {
            throw new Exception();
        }
    }
    @Async
    void saveTask(TaskInfo task) {
        ComPropertyAlarm comPropertyAlarm = new ComPropertyAlarm();
        comPropertyAlarm.setSerialNo(task.getTalk().getCallerGuid());
        comPropertyAlarm.setStatus(1);
        comPropertyAlarm.setCreateTime(new Date());
        comPropertyAlarmDao.insert(comPropertyAlarm);
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/java/com/panzhihua/service_property/message/AlarmMessage.java
@@ -30,6 +30,7 @@
        if(!stringRedisTemplate.hasKey(comPropertyEquipment.getSerialNo())){
            ComPropertyAlarm comPropertyAlarm=new ComPropertyAlarm();
            comPropertyAlarm.setCreateTime(DateUtil.date());
            comPropertyAlarm.setPhone(comPropertyEquipment.getPhone());
            comPropertyAlarm.setSerialNo(comPropertyEquipment.getSerialNo());
            comPropertyAlarm.setType(ComPropertyAlarm.type.one);
            comPropertyAlarm.setCommunityId(comPropertyEquipment.getCommunityId());
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/bootstrap.yml
@@ -1,6 +1,25 @@
spring:
  application:
    name: property
  kafka:
    bootstrap-servers: 182.151.37.143:9092 #kafka地址
    consumer:
      group-id: order-consumer
      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer #kafkaTemplate.send()方法参数类型
      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      auto-offset-reset: earliest
      security:
        protocol: PLAINTEXT
    producer:
      batch-size: 16384
      buffer-memory: 33554432
      retries: 0
      key-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      value-deserializer: org.apache.kafka.common.serialization.StringDeserializer
      properties:
        linger.ms: 1
      security:
        protocol: PLAINTEXT
  cloud:
    config:
      discovery:
@@ -21,6 +40,7 @@
    service-url:
      defaultZone: http://${EUREKA_URL:localhost}:8192/eureka
#实体加密、解密、字段脱敏拦截设置
domain:
  decrypt: true
@@ -40,4 +60,11 @@
  metrics:
    tags:
      application: property
      application: property
# kafka自定义消息发送配置
kafka:
  topic:
    kafka-demo-topic: Task_Info
    kafka-demo-key: order-key
    autoCreate: false
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyAlarmMapper.xml
@@ -57,10 +57,11 @@
    <select id="selectById" resultType="com.panzhihua.common.model.vos.property.ComPropertyAlarmVO">
        select t.*, t1.position, t2.name as solveName
        select t.*, t3.address as position, t2.name as solveName
        from com_property_alarm t
                 left join com_property_equipment t1 on t.serial_no = t1.serial_no
                 left join sys_user t2 on t.solve_id = user_id
                 left join com_mng_population_house t3 on t1.village_id=t3.id
        where t.id=#{id}
    </select>
springcloud_k8s_panzhihuazhihuishequ/service_property/src/main/resources/mapper/ComPropertyRepairMapper.xml
@@ -24,7 +24,7 @@
    </resultMap>
    <select id="pageList" resultType="com.panzhihua.common.model.vos.property.ComPropertyRepairVO" parameterType="com.panzhihua.common.model.dtos.property.CommonPage">
        select t.*,t1.name as feedback from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id
        select t.*,t1.name as feedback,t3.address as areaName from com_property_repair t left join sys_user t1 on t.feedback_by = t1.user_id left join com_property t2 on t.property_id = t2.area_id left join com_mng_village t3 on t.property_id=t3.village_id
        <where>
            1=1
            <if test="commonPage.status !=null">
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/RoleApi.java
@@ -66,8 +66,8 @@
     * @return 角色集合
     */
    @PostMapping("listrolebackstage")
    public R listRoleBackstage(@RequestParam("communityId") Long communityId) {
        return roleService.listRoleBackstage(communityId);
    public R listRoleBackstage(@RequestParam("communityId") Long communityId,@RequestParam("pageNum")Integer pageNum,@RequestParam("pageSize")Integer pageSize) {
        return roleService.listRoleBackstage(communityId,pageNum,pageSize);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/api/UserApi.java
@@ -146,8 +146,8 @@
     * @return 修改结果
     */
    @GetMapping("resetPasswordPatch")
    public R resetPasswordPatch(@RequestParam("userIds") Long[] userId) {
        return userService.resetPasswordPatch(userId);
    public R resetPasswordPatch(@RequestParam("userIds") Long[] userId,@RequestParam("password")String password) {
        return userService.resetPasswordPatch(userId,password);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/RoleService.java
@@ -46,7 +46,7 @@
     *            对应社区 0 表示运营后台
     * @return 角色集合
     */
    R listRoleBackstage(Long communityId);
    R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize);
    /**
     * 新增角色
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/UserService.java
@@ -704,7 +704,7 @@
    /**
     * 批量重置密码
     */
    R resetPasswordPatch(Long[] userId);
    R resetPasswordPatch(Long[] userId,String password);
    /**
     * 便民服务新增商家账号
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/RoleServiceImpl.java
@@ -6,6 +6,8 @@
import javax.annotation.Resource;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.beans.BeanUtils;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.stereotype.Service;
@@ -106,19 +108,12 @@
     * @return 角色集合
     */
    @Override
    public R listRoleBackstage(Long communityId) {
        List<SysRoleDO> sysRoleDOS =
            roleDAO.selectList(new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId));
        if (ObjectUtils.isEmpty(sysRoleDOS)) {
    public R listRoleBackstage(Long communityId,Integer pageNum,Integer pageSize) {
        IPage<SysRoleDO> sysRoleDOIPage=this.roleDAO.selectPage(new Page<>(pageNum,pageSize),new QueryWrapper<SysRoleDO>().lambda().eq(SysRoleDO::getCommunityId, communityId).orderByDesc(SysRoleDO::getCreateAt));
        if (ObjectUtils.isEmpty(sysRoleDOIPage.getRecords())) {
            return R.fail("角色列表为空");
        }
        List<RoleVO> roleVOS = new ArrayList<>();
        sysRoleDOS.forEach(sysRoleDO -> {
            RoleVO roleVO = new RoleVO();
            BeanUtils.copyProperties(sysRoleDO, roleVO);
            roleVOS.add(roleVO);
        });
        return R.ok(roleVOS);
        return R.ok(sysRoleDOIPage);
    }
    /**
springcloud_k8s_panzhihuazhihuishequ/service_user/src/main/java/com/panzhihua/service_user/service/impl/UserServiceImpl.java
@@ -1090,6 +1090,8 @@
                    throw new ServiceException("手机号已经存在");
                } else if (e.getMessage().contains("union_account_type")) {
                    throw new ServiceException("账户已经存在");
                }else if(e.getMessage().contains("23000")){
                    throw new ServiceException("手机号已存在");
                }
            }
@@ -2565,12 +2567,12 @@
    }
    @Override
    public R resetPasswordPatch(Long[] userId) {
    public R resetPasswordPatch(Long[] userId,String password) {
        if(userId!=null){
            for(Long user:userId){
                SysUserDO sysUserDO = new SysUserDO();
                sysUserDO.setUserId(user);
                String encode = new BCryptPasswordEncoder().encode("admin123456");
                String encode = new BCryptPasswordEncoder().encode(password);
                sysUserDO.setPassword(encode);
                userDao.updateById(sysUserDO);
            }
@@ -2669,7 +2671,7 @@
    @Override
    public R disableOrEnableMerchantUsers(DisableOrEnableConvenientMerchantDTO disableOrEnableConvenientMerchantDTO) {
        userDao.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO.getType(), disableOrEnableConvenientMerchantDTO.getIds());
        userDao.disableOrEnableMerchantUsers(disableOrEnableConvenientMerchantDTO.getType(), disableOrEnableConvenientMerchantDTO.getUserIds());
        return R.ok();
    }
}
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/api/ConvenientApi.java
@@ -1,12 +1,19 @@
package com.panzhihua.shop_backstage.api;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Comparator;
import java.util.List;
import java.util.TreeSet;
import java.util.UUID;
import java.util.stream.Collectors;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import javax.validation.constraints.NotEmpty;
import com.panzhihua.common.model.dtos.community.convenient.ConvenientProductSpecificationDTO;
import com.panzhihua.common.model.vos.community.convenient.ConvenientProductShelfVO;
import org.apache.commons.io.FilenameUtils;
import org.springframework.beans.BeanUtils;
@@ -234,6 +241,12 @@
    @ApiOperation(value = "便民服务商家后台新增产品")
    @PostMapping("/product/add")
    public R addProduct(@RequestBody @Validated(AddGroup.class) ConvenientProductDTO convenientProductDTO) {
        List<ConvenientProductSpecificationDTO> specificationDTOList = convenientProductDTO.getProductSpecificationDTOList();
        ArrayList<ConvenientProductSpecificationDTO> filteredSpecificationList = specificationDTOList.stream()
                .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ConvenientProductSpecificationDTO::getName))), ArrayList::new));
        if (specificationDTOList.size() != filteredSpecificationList.size()) {
            return R.fail("规格名称重复!");
        }
        Long userId = this.getUserId();
        convenientProductDTO.setCreatedBy(userId);
        R<ConvenientMerchantVO> merchantInfo = communityService.getUserConvenientMerchantInfo(userId);
@@ -249,6 +262,12 @@
    @ApiOperation(value = "便民服务商家后台编辑产品")
    @PutMapping("/product/put")
    public R putProduct(@RequestBody @Validated(PutGroup.class) ConvenientProductDTO convenientProductDTO) {
        List<ConvenientProductSpecificationDTO> specificationDTOList = convenientProductDTO.getProductSpecificationDTOList();
        ArrayList<ConvenientProductSpecificationDTO> filteredSpecificationList = specificationDTOList.stream()
                .collect(Collectors.collectingAndThen(Collectors.toCollection(() -> new TreeSet<>(Comparator.comparing(ConvenientProductSpecificationDTO::getName))), ArrayList::new));
        if (specificationDTOList.size() != filteredSpecificationList.size()) {
            return R.fail("规格名称重复!");
        }
        Long userId = this.getUserId();
        convenientProductDTO.setUpdatedBy(userId);
        R<ConvenientMerchantVO> merchantInfo = communityService.getUserConvenientMerchantInfo(userId);
springcloud_k8s_panzhihuazhihuishequ/shop_backstage/src/main/java/com/panzhihua/shop_backstage/filter/StoreValidFilter.java
@@ -53,8 +53,9 @@
        boolean convenientLogin = "/convenient/login".equals(uri);
        boolean isConvenientReq = uri.contains("/convenient");
        boolean storeLogin = "/login".equals(uri);
        boolean isUpload = "/convenient/upload/file".equals(uri);
        if (isDoc) {
        if (isDoc || isUpload) {
            //放过swagger请求
        } else {
            if (!storeLogin && !isConvenientReq) {
springcloud_k8s_panzhihuazhihuishequ/timejob/src/main/java/com/panzhihua/timejob/jobhandler/CommunityJobHandler.java
@@ -221,8 +221,12 @@
        log.info("定时任务扫描上月高龄认证使用视频认证的用户添加成功记录");
        R r = communityService.timedTaskEldersAuthRecordJobHandler();
        log.info("执行结果【{}】", r.toString());
        return ReturnT.SUCCESS;
    }
        log.info("定时任务扫描高龄认证记录统计信息");
    @XxlJob("timedTaskEldersAuthJobMonthHandler")
    public ReturnT<String> timedTaskEldersAuthJobMonthHandler(String param) throws Exception {
        log.info("定时任务扫描高龄认证记录重置任务");
        R r1 = communityService.timedTaskEldersAuthJobHandler();
        log.info("执行结果【{}】", r1.toString());
        return ReturnT.SUCCESS;
springcloud_k8s_panzhihuazhihuishequ/zuul/src/main/java/com/panzhihua/zuul/filters/JWTAuthenticationTokenFilter.java
@@ -260,6 +260,7 @@
                noLoginUrl.add("/api/applets/convenient/merchant/incr-consult");
                noLoginUrl.add("/api/applets/convenient/merchant/incr-view");
                noLoginUrl.add("/api/applets/convenient/product/incr-view");
                noLoginUrl.add("/api/shopbackstage/convenient/upload/file");
                if (noLoginUrl.contains(requestURI)) {
                    List<SimpleGrantedAuthority> authorities = new ArrayList<>();
                    authorities.add(new SimpleGrantedAuthority(SecurityConstants.ROLE_APPLETS));