From 06e430b4df84a3862e9ede72b417ff0bb2704075 Mon Sep 17 00:00:00 2001 From: weikai <123456> Date: Mon, 27 Apr 2020 15:18:53 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E6=8F=90=E4=BA=A4?= =?UTF-8?q?=EF=BC=8C=E5=B9=B6=E9=9B=86=E6=88=90=E5=9B=9B=E4=B8=AA=E6=A8=A1?= =?UTF-8?q?=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 28 + .gitmodules | 12 + db/epdc-user.html | 397 +++ db/esua_epdc_user.pdman.json | 2594 +++++++++++++++++ epdc-cloud-client-yushan | 1 + epdc-cloud-commons-yushan | 1 + epdc-cloud-gateway-yushan | 1 + epdc-cloud-parent-yushan | 1 + epdc-cloud-user/Dockerfile | 20 + epdc-cloud-user/pom.xml | 251 ++ .../com/elink/esua/epdc/UserApplication.java | 31 + .../com/elink/esua/epdc/async/NewsTask.java | 33 + .../com/elink/esua/epdc/async/PartyTask.java | 54 + .../esua/epdc/config/ModuleConfigImpl.java | 26 + .../elink/esua/epdc/config/StreamUtils.java | 56 + .../controller/EpdcAppUserController.java | 423 +++ .../EpdcAppUserWxFormIdController.java | 92 + .../EpdcAppVolunteerInfoController.java | 65 + .../EpdcUserGridRelationController.java | 83 + .../PartyAuthenticationFailedController.java | 98 + .../controller/PartyMembersController.java | 179 ++ .../PartyTagRelationController.java | 102 + .../UserAuthenticateHistoryController.java | 126 + .../controller/UserCarInfoController.java | 94 + .../esua/epdc/controller/UserController.java | 286 ++ .../UserGridInvitationCodeController.java | 135 + .../UserGridRelationController.java | 105 + .../UserInvitationRecordController.java | 94 + .../epdc/controller/UserTagController.java | 103 + .../controller/UserTagRelationController.java | 94 + .../controller/UserWxFormIdController.java | 94 + .../controller/VolunteerInfoController.java | 183 ++ .../dao/PartyAuthenticationFailedDao.java | 67 + .../elink/esua/epdc/dao/PartyMembersDao.java | 96 + .../esua/epdc/dao/PartyTagRelationDao.java | 36 + .../epdc/dao/UserAuthenticateHistoryDao.java | 64 + .../elink/esua/epdc/dao/UserCarInfoDao.java | 33 + .../java/com/elink/esua/epdc/dao/UserDao.java | 244 ++ .../epdc/dao/UserGridInvitationCodeDao.java | 43 + .../esua/epdc/dao/UserGridRelationDao.java | 69 + .../epdc/dao/UserInvitationRecordDao.java | 58 + .../com/elink/esua/epdc/dao/UserTagDao.java | 53 + .../esua/epdc/dao/UserTagRelationDao.java | 45 + .../elink/esua/epdc/dao/UserWxFormIdDao.java | 41 + .../elink/esua/epdc/dao/VolunteerInfoDao.java | 131 + .../epdc/datasources/DataSourceNames.java | 14 + .../PartyAuthenticationFailedEntity.java | 112 + .../esua/epdc/entity/PartyMembersEntity.java | 90 + .../epdc/entity/PartyTagRelationEntity.java | 53 + .../entity/UserAuthenticateHistoryEntity.java | 76 + .../esua/epdc/entity/UserCarInfoEntity.java | 51 + .../elink/esua/epdc/entity/UserEntity.java | 267 ++ .../entity/UserGridInvitationCodeEntity.java | 56 + .../epdc/entity/UserGridRelationEntity.java | 67 + .../entity/UserInvitationRecordEntity.java | 66 + .../elink/esua/epdc/entity/UserTagEntity.java | 59 + .../epdc/entity/UserTagRelationEntity.java | 51 + .../esua/epdc/entity/UserWxFormIdEntity.java | 50 + .../esua/epdc/entity/VolunteerInfoEntity.java | 138 + .../excel/PartyAuthenticationFailedExcel.java | 54 + .../esua/epdc/excel/PartyMembersExcel.java | 60 + .../epdc/excel/PartyTagRelationExcel.java | 52 + .../excel/UserAuthenticateHistoryExcel.java | 74 + .../esua/epdc/excel/UserCarInfoExcel.java | 62 + .../com/elink/esua/epdc/excel/UserExcel.java | 52 + .../excel/UserGridInvitationCodeExcel.java | 65 + .../epdc/excel/UserInvitationRecordExcel.java | 68 + .../elink/esua/epdc/excel/UserTagExcel.java | 52 + .../esua/epdc/excel/UserTagRelationExcel.java | 62 + .../esua/epdc/excel/UserWxFormIdExcel.java | 62 + .../esua/epdc/excel/VolunteerInfoExcel.java | 126 + .../epdc/exception/UserModuleErrorCode.java | 16 + .../esua/epdc/feign/AdminFeignClient.java | 42 + .../esua/epdc/feign/NewsFeignClient.java | 32 + .../fallback/AdminFeignClientFallback.java | 29 + .../fallback/NewsFeignClientFallback.java | 23 + .../redis/PartyAuthenticationFailedRedis.java | 47 + .../esua/epdc/redis/PartyMembersRedis.java | 47 + .../epdc/redis/PartyTagRelationRedis.java | 47 + .../esua/epdc/redis/UserCarInfoRedis.java | 47 + .../redis/UserGridInvitationCodeRedis.java | 47 + .../epdc/redis/UserGridRelationRedis.java | 47 + .../epdc/redis/UserInvitationRecordRedis.java | 47 + .../com/elink/esua/epdc/redis/UserRedis.java | 46 + .../elink/esua/epdc/redis/UserTagRedis.java | 47 + .../esua/epdc/redis/UserTagRelationRedis.java | 47 + .../esua/epdc/redis/UserWxFormIdRedis.java | 47 + .../esua/epdc/redis/VolunteerInfoRedis.java | 47 + .../consumer/OrganizationModifyConsumer.java | 65 + .../rocketmq/dto/OrganizationModifyDTO.java | 37 + .../PartyAuthenticationFailedService.java | 107 + .../epdc/service/PartyMembersService.java | 132 + .../epdc/service/PartyTagRelationService.java | 50 + .../UserAuthenticateHistoryService.java | 116 + .../esua/epdc/service/UserCarInfoService.java | 104 + .../UserGridInvitationCodeService.java | 99 + .../epdc/service/UserGridRelationService.java | 191 ++ .../service/UserInvitationRecordService.java | 117 + .../elink/esua/epdc/service/UserService.java | 410 +++ .../epdc/service/UserTagRelationService.java | 116 + .../esua/epdc/service/UserTagService.java | 48 + .../epdc/service/UserWxFormIdService.java | 104 + .../epdc/service/VolunteerInfoService.java | 207 ++ .../PartyAuthenticationFailedServiceImpl.java | 167 ++ .../service/impl/PartyMembersServiceImpl.java | 527 ++++ .../impl/PartyTagRelationServiceImpl.java | 112 + .../UserAuthenticateHistoryServiceImpl.java | 132 + .../service/impl/UserCarInfoServiceImpl.java | 112 + .../UserGridInvitationCodeServiceImpl.java | 125 + .../impl/UserGridRelationServiceImpl.java | 276 ++ .../impl/UserInvitationRecordServiceImpl.java | 118 + .../epdc/service/impl/UserServiceImpl.java | 1656 +++++++++++ .../impl/UserTagRelationServiceImpl.java | 162 + .../epdc/service/impl/UserTagServiceImpl.java | 125 + .../service/impl/UserWxFormIdServiceImpl.java | 105 + .../impl/VolunteerInfoServiceImpl.java | 380 +++ .../elink/esua/epdc/util/AppUserUtils.java | 63 + .../src/main/resources/application.yml | 120 + .../main/resources/i18n/messages.properties | 3 + .../resources/i18n/messages_en_US.properties | 0 .../resources/i18n/messages_zh_CN.properties | 0 .../resources/i18n/messages_zh_TW.properties | 0 .../main/resources/i18n/validation.properties | 0 .../i18n/validation_en_US.properties | 0 .../i18n/validation_zh_CN.properties | 0 .../i18n/validation_zh_TW.properties | 0 .../src/main/resources/logback-spring.xml | 159 + .../mapper/PartyAuthenticationFailedDao.xml | 75 + .../main/resources/mapper/PartyMembersDao.xml | 238 ++ .../resources/mapper/PartyTagRelationDao.xml | 23 + .../mapper/UserAuthenticateHistoryDao.xml | 58 + .../main/resources/mapper/UserCarInfoDao.xml | 19 + .../src/main/resources/mapper/UserDao.xml | 623 ++++ .../mapper/UserGridInvitationCodeDao.xml | 30 + .../resources/mapper/UserGridRelationDao.xml | 36 + .../mapper/UserInvitationRecordDao.xml | 48 + .../src/main/resources/mapper/UserTagDao.xml | 41 + .../resources/mapper/UserTagRelationDao.xml | 27 + .../main/resources/mapper/UserWxFormIdDao.xml | 18 + .../resources/mapper/VolunteerInfoDao.xml | 207 ++ .../src/main/resources/registry.conf | 21 + pom.xml | 22 + 142 files changed, 17217 insertions(+) create mode 100644 .gitignore create mode 100644 .gitmodules create mode 100644 db/epdc-user.html create mode 100644 db/esua_epdc_user.pdman.json create mode 160000 epdc-cloud-client-yushan create mode 160000 epdc-cloud-commons-yushan create mode 160000 epdc-cloud-gateway-yushan create mode 160000 epdc-cloud-parent-yushan create mode 100644 epdc-cloud-user/Dockerfile create mode 100644 epdc-cloud-user/pom.xml create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/UserApplication.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/NewsTask.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/PartyTask.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/ModuleConfigImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/StreamUtils.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserWxFormIdController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcUserGridRelationController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyAuthenticationFailedController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserAuthenticateHistoryController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridInvitationCodeController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridRelationController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserInvitationRecordController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagRelationController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserWxFormIdController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyAuthenticationFailedDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserAuthenticateHistoryDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridRelationDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserInvitationRecordDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagRelationDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserWxFormIdDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyAuthenticationFailedEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserAuthenticateHistoryEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridRelationEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserInvitationRecordEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagRelationEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserWxFormIdEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyAuthenticationFailedExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyMembersExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserAuthenticateHistoryExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserInvitationRecordExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagRelationExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserWxFormIdExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/VolunteerInfoExcel.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/exception/UserModuleErrorCode.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyAuthenticationFailedRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyMembersRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridRelationRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserInvitationRecordRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRelationRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserWxFormIdRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/VolunteerInfoRedis.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyAuthenticationFailedService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyMembersService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserAuthenticateHistoryService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridRelationService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserInvitationRecordService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagRelationService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserWxFormIdService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyAuthenticationFailedServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyTagRelationServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserAuthenticateHistoryServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridInvitationCodeServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridRelationServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserInvitationRecordServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagRelationServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserWxFormIdServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java create mode 100644 epdc-cloud-user/src/main/java/com/elink/esua/epdc/util/AppUserUtils.java create mode 100644 epdc-cloud-user/src/main/resources/application.yml create mode 100644 epdc-cloud-user/src/main/resources/i18n/messages.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/messages_en_US.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/messages_zh_CN.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/messages_zh_TW.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/validation.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/validation_en_US.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/validation_zh_CN.properties create mode 100644 epdc-cloud-user/src/main/resources/i18n/validation_zh_TW.properties create mode 100644 epdc-cloud-user/src/main/resources/logback-spring.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/PartyAuthenticationFailedDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/PartyMembersDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/PartyTagRelationDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserAuthenticateHistoryDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserCarInfoDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserGridInvitationCodeDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserGridRelationDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserInvitationRecordDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserTagDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserTagRelationDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/UserWxFormIdDao.xml create mode 100644 epdc-cloud-user/src/main/resources/mapper/VolunteerInfoDao.xml create mode 100644 epdc-cloud-user/src/main/resources/registry.conf create mode 100644 pom.xml diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c73fa0e --- /dev/null +++ b/.gitignore @@ -0,0 +1,28 @@ +# Created by .ignore support plugin (hsz.mobi) +### Java template +# Compiled class file +*.class + +# Log file +*.log + +# BlueJ files +*.ctxt + +# Mobile Tools for Java (J2ME) +.mtj.tmp/ + +# Package Files # +*.jar +*.war +*.nar +*.ear +*.zip +*.tar.gz +*.rar + +# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml +hs_err_pid* +.idea/ +*.iml +**/target/ diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..3f1f4a2 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,12 @@ +[submodule "epdc-cloud-client-yushan"] + path = epdc-cloud-client-yushan + url = http://121.42.41.42:7070/r/epdc-cloud-client-yushan.git +[submodule "epdc-cloud-commons-yushan"] + path = epdc-cloud-commons-yushan + url = http://121.42.41.42:7070/r/epdc-cloud-commons-yushan.git +[submodule "epdc-cloud-gateway-yushan"] + path = epdc-cloud-gateway-yushan + url = http://121.42.41.42:7070/r/epdc-cloud-gateway-yushan.git +[submodule "epdc-cloud-parent-yushan"] + path = epdc-cloud-parent-yushan + url = http://121.42.41.42:7070/r/epdc-cloud-parent-yushan.git diff --git a/db/epdc-user.html b/db/epdc-user.html new file mode 100644 index 0000000..465b7cc --- /dev/null +++ b/db/epdc-user.html @@ -0,0 +1,397 @@ + + + + + epdc-job + + +
目录
+
+
+ \ No newline at end of file diff --git a/db/esua_epdc_user.pdman.json b/db/esua_epdc_user.pdman.json new file mode 100644 index 0000000..f1a858e --- /dev/null +++ b/db/esua_epdc_user.pdman.json @@ -0,0 +1,2594 @@ +{ + "modules": [ + { + "name": "DB_REVERSE_MYSQL", + "chnname": "逆向解析_MYSQL", + "entities": [ + { + "title": "EPDC_PARTY_AUTHENTICATION_FAILED", + "chnname": "党员认证失败表 党员认证失败表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REAL_NAME", + "type": "VARCHAR_20", + "chnname": "姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MOBILE", + "type": "VARCHAR_20", + "chnname": "手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "IDENTITY_NO", + "type": "VARCHAR_20", + "chnname": "身份证号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "POST", + "type": "VARCHAR_128", + "chnname": "职务 字典表dict_name", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "POST_VALUE", + "type": "VARCHAR_32", + "chnname": "职务ID 字典表dict_value", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CADRE_FLAG", + "type": "VARCHAR_1", + "chnname": "干部下沉标识 0-否,1-是", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGIST_FLAG", + "type": "VARCHAR_1", + "chnname": "注册状态 0-否,1-是", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGIST_TIME", + "type": "DATETIME", + "chnname": "注册时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET_NAME", + "type": "VARCHAR_128", + "chnname": "街道名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET_ID", + "type": "BIGINT_19", + "chnname": "街道ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY_NAME", + "type": "VARCHAR_128", + "chnname": "社区名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY_ID", + "type": "BIGINT_19", + "chnname": "社区ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID_NAME", + "type": "VARCHAR_128", + "chnname": "网格名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID_ID", + "type": "BIGINT_19", + "chnname": "网格ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEPT_ID", + "type": "BIGINT_19", + "chnname": "部门ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STATE", + "type": "INT_10", + "chnname": "状态 0-认证失败", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "PROCESSING_OPINIONS", + "type": "VARCHAR_500", + "chnname": "处理意见", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记 0-否,1-是", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "USER_ID", + "type": "VARCHAR_32", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ADDRESS", + "type": "VARCHAR_512", + "chnname": "居民住址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_PARTY_MEMBERS", + "chnname": "党员表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REAL_NAME", + "type": "VARCHAR_20", + "chnname": "姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MOBILE", + "type": "VARCHAR_20", + "chnname": "手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "IDENTITY_NO", + "type": "VARCHAR_20", + "chnname": "身份证号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "POST", + "type": "VARCHAR_128", + "chnname": "职务(字典表dict_name)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "POST_VALUE", + "type": "VARCHAR_32", + "chnname": "职务ID(字典表dict_value)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CADRE_FLAG", + "type": "VARCHAR_1", + "chnname": "干部下沉标识(0-否,1-是)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGIST_FLAG", + "type": "VARCHAR_1", + "chnname": "注册状态(0-否,1-是)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGIST_TIME", + "type": "DATETIME", + "chnname": "注册时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET_NAME", + "type": "VARCHAR_128", + "chnname": "街道名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET_ID", + "type": "BIGINT_19", + "chnname": "街道ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY_NAME", + "type": "VARCHAR_128", + "chnname": "社区名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY_ID", + "type": "BIGINT_19", + "chnname": "社区ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID_NAME", + "type": "VARCHAR_128", + "chnname": "网格名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID_ID", + "type": "BIGINT_19", + "chnname": "网格ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEPT_ID", + "type": "BIGINT_19", + "chnname": "部门ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ADDRESS", + "type": "VARCHAR_512", + "chnname": "居民住址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_PARTY_TAG_RELATION", + "chnname": "党员标签关系表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "PARTY_ID", + "type": "VARCHAR_32", + "chnname": "党员ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "TAG_ID", + "type": "VARCHAR_32", + "chnname": "标签ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER", + "chnname": "用户信息表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "NICKNAME", + "type": "VARCHAR_50", + "chnname": "昵称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MOBILE", + "type": "VARCHAR_20", + "chnname": "手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "PASSWORD", + "type": "VARCHAR_30", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGISTER_TIME", + "type": "DATETIME", + "chnname": "注册时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "FACE_IMG", + "type": "VARCHAR_512", + "chnname": "头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "SEX", + "type": "VARCHAR_10", + "chnname": "性别(女性-0,男性-1)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "BIRTHDAY", + "type": "DATE", + "chnname": "生日", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "EMAIL", + "type": "VARCHAR_128", + "chnname": "邮箱", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "TELEPHONE", + "type": "VARCHAR_20", + "chnname": "电话", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ZIP_CODE", + "type": "VARCHAR_10", + "chnname": "邮编", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "PROFESSION", + "type": "VARCHAR_50", + "chnname": "职业", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "HOBBIES", + "type": "VARCHAR_100", + "chnname": "爱好", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "USER_SIGN", + "type": "VARCHAR_100", + "chnname": "个性签名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "INVITATION_CODE", + "type": "VARCHAR_10", + "chnname": "邀请码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LAST_LOGIN_TIME", + "type": "DATETIME", + "chnname": "最近登录时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LAST_LOGIN_IP", + "type": "VARCHAR_50", + "chnname": "最近登录IP", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LAST_LONGITUDE", + "type": "VARCHAR_30", + "chnname": "最近登录位置经度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LAST_LATITUDE", + "type": "VARCHAR_30", + "chnname": "最近登录位置维度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REAL_NAME", + "type": "VARCHAR_30", + "chnname": "真实姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "IDENTITY_NO", + "type": "VARCHAR_20", + "chnname": "身份证号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ROAD", + "type": "VARCHAR_64", + "chnname": "所在道路(如山东路168号)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "VILLAGE_NAME", + "type": "VARCHAR_64", + "chnname": "小区名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DWELLING_PLACE", + "type": "VARCHAR_128", + "chnname": "住处(楼栋-单元-房间)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ADDRESS", + "type": "VARCHAR_512", + "chnname": "居民住址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "WX_OPEN_ID", + "type": "VARCHAR_32", + "chnname": "微信OPENID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "WX_UNION_ID", + "type": "VARCHAR_32", + "chnname": "微信unionId", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "PARTY_FLAG", + "type": "VARCHAR_32", + "chnname": "是否是党员(0-否,1-是)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGISTER_WAY", + "type": "VARCHAR_10", + "chnname": "注册方式(wx:微信注册)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REGISTER_SOURCE", + "type": "VARCHAR_10", + "chnname": "用户来源(wp:公众号)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MOBILE_PROVINCE", + "type": "VARCHAR_50", + "chnname": "手机号所属省份", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MOBILE_CITY", + "type": "VARCHAR_50", + "chnname": "手机号所属城市", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MOBILE_CARRIER", + "type": "VARCHAR_50", + "chnname": "手机号所属运营商", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "POINTS", + "type": "INT_10", + "chnname": "用户积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "INVITE_USER_ID", + "type": "VARCHAR_32", + "chnname": "邀请人ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STATE", + "type": "VARCHAR_1", + "chnname": "状态(0-已注册,1-已完善信息待审核,2-信息审核不通过,3-信息审核通过)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DISTRICT", + "type": "VARCHAR_128", + "chnname": "区县", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DISTRICT_ID", + "type": "BIGINT_19", + "chnname": "区县ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET", + "type": "VARCHAR_128", + "chnname": "街道", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET_ID", + "type": "BIGINT_19", + "chnname": "街道ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY", + "type": "VARCHAR_128", + "chnname": "社区", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY_ID", + "type": "BIGINT_19", + "chnname": "社区ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID", + "type": "VARCHAR_128", + "chnname": "网格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID_ID", + "type": "BIGINT_19", + "chnname": "网格ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LAST_NAME", + "type": "VARCHAR_32", + "chnname": "姓", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "FIRST_NAME", + "type": "VARCHAR_32", + "chnname": "名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REMARK", + "type": "VARCHAR_255", + "chnname": "审核备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER_BEHAVIOR", + "chnname": "用户行为表 用户行为表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "BEHAVIOR", + "type": "VARCHAR_32", + "chnname": "行为", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "BEHAVIOR_TYPE", + "type": "VARCHAR_32", + "chnname": "行为类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "USER_ID", + "type": "VARCHAR_32", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REFERENCE_ID", + "type": "VARCHAR_32", + "chnname": "引用ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER_GRID_RELATION", + "chnname": "网格长与网格关系表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "USER_ID", + "type": "VARCHAR_32", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DISTRICT", + "type": "VARCHAR_128", + "chnname": "区县", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DISTRICT_ID", + "type": "BIGINT_19", + "chnname": "区县ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET_ID", + "type": "BIGINT_19", + "chnname": "街道ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "STREET", + "type": "VARCHAR_128", + "chnname": "街道", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY", + "type": "VARCHAR_128", + "chnname": "社区", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "COMMUNITY_ID", + "type": "BIGINT_19", + "chnname": "社区ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID", + "type": "VARCHAR_64", + "chnname": "所属网格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "GRID_ID", + "type": "BIGINT_19", + "chnname": "网格ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "SWITCHED_TIME", + "type": "DATETIME", + "chnname": "最后切换此网格的时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LEADER_FLAG", + "type": "VARCHAR_1", + "chnname": "是否是网格长 0-否,1-是", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER_MESSAGE", + "chnname": "用户消息表 用户消息表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MESS_TYPE", + "type": "VARCHAR_32", + "chnname": "消息类型 审核通知、互动通知、项目通知", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "MESS_DETAIL_TYPE", + "type": "VARCHAR_32", + "chnname": "消息详细类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "USER_ID", + "type": "VARCHAR_32", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REFERENCE_ID", + "type": "VARCHAR_32", + "chnname": "引用ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ASSIST_REFERENCE_ID", + "type": "VARCHAR_32", + "chnname": "辅助引用ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER_TAG", + "chnname": "用户标签表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "TAG_NAME", + "type": "VARCHAR_50", + "chnname": "标签名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "TAG_DESC", + "type": "VARCHAR_100", + "chnname": "标签描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER_TAG_RELATION", + "chnname": "用户标签关系表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "USER_ID", + "type": "VARCHAR_32", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "TAG_ID", + "type": "VARCHAR_32", + "chnname": "标签ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "EPDC_USER_WX_FORM_ID", + "chnname": "微信formId表", + "fields": [ + { + "name": "ID", + "type": "VARCHAR_32", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "WX_OPEN_ID", + "type": "VARCHAR_32", + "chnname": "微信openId", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "WX_FORM_ID", + "type": "VARCHAR_32", + "chnname": "微信formId", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "REVISION", + "type": "INT_10", + "chnname": "乐观锁", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_BY", + "type": "VARCHAR_32", + "chnname": "创建人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CREATED_TIME", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_BY", + "type": "VARCHAR_32", + "chnname": "更新人", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "UPDATED_TIME", + "type": "DATETIME", + "chnname": "更新时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "DEL_FLAG", + "type": "VARCHAR_1", + "chnname": "删除标记", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "UNDO_LOG", + "chnname": "", + "fields": [ + { + "name": "ID", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "BRANCH_ID", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "XID", + "type": "VARCHAR_100", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "CONTEXT", + "type": "VARCHAR_128", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ROLLBACK_INFO", + "type": "LONGBLOB", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LOG_STATUS", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LOG_CREATED", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "LOG_MODIFIED", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "EXT", + "type": "VARCHAR_100", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ] + } + ], + "dataTypeDomains": { + "datatype": [ + { + "name": "默认字串", + "code": "DefaultString", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(32)" + }, + "ORACLE": { + "type": "NVARCHAR2(32)" + }, + "SQLServer": { + "type": "NVARCHAR(32)" + }, + "PostgreSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "标识号", + "code": "IdOrKey", + "apply": { + "JAVA": { + "type": "String" + }, + "ORACLE": { + "type": "VARCHAR2(32)" + }, + "MYSQL": { + "type": "VARCHAR(32)" + }, + "SQLServer": { + "type": "VARCHAR(32)" + }, + "PostgreSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "标识号-长", + "code": "LongKey", + "apply": { + "MYSQL": { + "type": "VARCHAR(64)" + }, + "ORACLE": { + "type": "VARCHAR2(64)" + }, + "JAVA": { + "type": "String" + }, + "SQLServer": { + "type": "VARCHAR(64)" + }, + "PostgreSQL": { + "type": "VARCHAR(64)" + } + } + }, + { + "name": "名称", + "code": "Name", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(128)" + }, + "ORACLE": { + "type": "NVARCHAR2(128)" + }, + "SQLServer": { + "type": "NVARCHAR(128)" + }, + "PostgreSQL": { + "type": "VARCHAR(128)" + } + } + }, + { + "name": "备注说明", + "code": "Intro", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(512)" + }, + "ORACLE": { + "type": "NVARCHAR2(512)" + }, + "SQLServer": { + "type": "NVARCHAR(512)" + }, + "PostgreSQL": { + "type": "VARCHAR(512)" + } + } + }, + { + "name": "字串-短", + "code": "ShortString", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(128)" + }, + "ORACLE": { + "type": "NVARCHAR2(128)" + }, + "SQLServer": { + "type": "NVARCHAR(128)" + }, + "PostgreSQL": { + "type": "VARCHAR(128)" + } + } + }, + { + "name": "字串-中", + "code": "MiddleString", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(1024)" + }, + "ORACLE": { + "type": "NVARCHAR2(1024)" + }, + "SQLServer": { + "type": "NVARCHAR(1024)" + }, + "PostgreSQL": { + "type": "VARCHAR(1024)" + } + } + }, + { + "name": "字串-长", + "code": "LongString", + "apply": { + "JAVA": { + "type": "String" + }, + "ORACLE": { + "type": "NVARCHAR2(3072)" + }, + "MYSQL": { + "type": "VARCHAR(3072)" + }, + "SQLServer": { + "type": "NVARCHAR(3072)" + }, + "PostgreSQL": { + "type": "VARCHAR(3072)" + } + } + }, + { + "name": "大文本", + "code": "LongText", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "TEXT" + }, + "ORACLE": { + "type": "CLOB" + }, + "SQLServer": { + "type": "NTEXT" + }, + "PostgreSQL": { + "type": "TEXT" + } + } + }, + { + "name": "小数", + "code": "Double", + "apply": { + "JAVA": { + "type": "Double" + }, + "MYSQL": { + "type": "DECIMAL(32,10)" + }, + "ORACLE": { + "type": "NUMBER(32,10)" + }, + "SQLServer": { + "type": "DECIMAL(32,10)" + }, + "PostgreSQL": { + "type": "DECIMAL(32,10)" + } + } + }, + { + "name": "比例", + "code": "Ratio", + "apply": { + "MYSQL": { + "type": "DECIMAL(4,2)" + }, + "JAVA": { + "type": "Double" + }, + "ORACLE": { + "type": "NUMBER(4,2)" + }, + "SQLServer": { + "type": "DECIMAL(4,2)" + }, + "PostgreSQL": { + "type": "DECIMAL(4,2)" + } + } + }, + { + "name": "整数", + "code": "Integer", + "apply": { + "JAVA": { + "type": "Integer" + }, + "MYSQL": { + "type": "INT" + }, + "ORACLE": { + "type": "INT" + }, + "SQLServer": { + "type": "INT" + }, + "PostgreSQL": { + "type": "INT" + } + } + }, + { + "name": "大整数", + "code": "BigInt", + "apply": { + "MYSQL": { + "type": "BIGINT" + }, + "JAVA": { + "type": "Long" + }, + "ORACLE": { + "type": "NUMBER" + }, + "SQLServer": { + "type": "BIGINT" + }, + "PostgreSQL": { + "type": "BIGINT" + } + } + }, + { + "name": "金额", + "code": "Money", + "apply": { + "JAVA": { + "type": "Double" + }, + "MYSQL": { + "type": "DECIMAL(32,8)" + }, + "ORACLE": { + "type": "NUMBER(32,8)" + }, + "SQLServer": { + "type": "DECIMAL(32,8)" + }, + "PostgreSQL": { + "type": "DECIMAL(32,8)" + } + } + }, + { + "name": "是否", + "code": "YesNo", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(1)" + }, + "ORACLE": { + "type": "VARCHAR2(1)" + }, + "SQLServer": { + "type": "VARCHAR(1)" + }, + "PostgreSQL": { + "type": "VARCHAR(1)" + } + } + }, + { + "name": "数据字典", + "code": "Dict", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(32)" + }, + "ORACLE": { + "type": "VARCHAR2(32)" + }, + "SQLServer": { + "type": "VARCHAR(32)" + }, + "PostgreSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "日期", + "code": "Date", + "apply": { + "JAVA": { + "type": "Date" + }, + "MYSQL": { + "type": "DATE" + }, + "ORACLE": { + "type": "DATE" + }, + "SQLServer": { + "type": "DATE" + }, + "PostgreSQL": { + "type": "DATE" + } + } + }, + { + "name": "日期时间", + "code": "DateTime", + "apply": { + "JAVA": { + "type": "Date" + }, + "MYSQL": { + "type": "DATETIME" + }, + "ORACLE": { + "type": "DATE" + }, + "SQLServer": { + "type": "DATE" + }, + "PostgreSQL": { + "type": "DATE" + } + } + }, + { + "name": "单字符", + "code": "Char", + "apply": { + "MYSQL": { + "type": "CHAR(1)" + }, + "ORACLE": { + "type": "CHAR(1)" + }, + "JAVA": { + "type": "String" + }, + "SQLServer": { + "type": "CHAR(1)" + }, + "PostgreSQL": { + "type": "CHAR(1)" + } + } + }, + { + "name": "BIGINT_19", + "code": "BIGINT_19", + "apply": { + "MYSQL": { + "type": "BIGINT(19)" + } + } + }, + { + "name": "DATE", + "code": "DATE", + "apply": { + "MYSQL": { + "type": "DATE" + } + } + }, + { + "name": "DATETIME", + "code": "DATETIME", + "apply": { + "MYSQL": { + "type": "DATETIME" + } + } + }, + { + "name": "INT_10", + "code": "INT_10", + "apply": { + "MYSQL": { + "type": "INT(10)" + } + } + }, + { + "name": "LONGBLOB", + "code": "LONGBLOB", + "apply": { + "MYSQL": { + "type": "LONGBLOB" + } + } + }, + { + "name": "VARCHAR_1", + "code": "VARCHAR_1", + "apply": { + "MYSQL": { + "type": "VARCHAR(1)" + } + } + }, + { + "name": "VARCHAR_10", + "code": "VARCHAR_10", + "apply": { + "MYSQL": { + "type": "VARCHAR(10)" + } + } + }, + { + "name": "VARCHAR_100", + "code": "VARCHAR_100", + "apply": { + "MYSQL": { + "type": "VARCHAR(100)" + } + } + }, + { + "name": "VARCHAR_128", + "code": "VARCHAR_128", + "apply": { + "MYSQL": { + "type": "VARCHAR(128)" + } + } + }, + { + "name": "VARCHAR_20", + "code": "VARCHAR_20", + "apply": { + "MYSQL": { + "type": "VARCHAR(20)" + } + } + }, + { + "name": "VARCHAR_255", + "code": "VARCHAR_255", + "apply": { + "MYSQL": { + "type": "VARCHAR(255)" + } + } + }, + { + "name": "VARCHAR_30", + "code": "VARCHAR_30", + "apply": { + "MYSQL": { + "type": "VARCHAR(30)" + } + } + }, + { + "name": "VARCHAR_32", + "code": "VARCHAR_32", + "apply": { + "MYSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "VARCHAR_50", + "code": "VARCHAR_50", + "apply": { + "MYSQL": { + "type": "VARCHAR(50)" + } + } + }, + { + "name": "VARCHAR_500", + "code": "VARCHAR_500", + "apply": { + "MYSQL": { + "type": "VARCHAR(500)" + } + } + }, + { + "name": "VARCHAR_512", + "code": "VARCHAR_512", + "apply": { + "MYSQL": { + "type": "VARCHAR(512)" + } + } + }, + { + "name": "VARCHAR_64", + "code": "VARCHAR_64", + "apply": { + "MYSQL": { + "type": "VARCHAR(64)" + } + } + } + ], + "database": [ + { + "code": "MYSQL", + "template": "DROP TABLE {{=it.entity.title}};\n$blankline\nCREATE TABLE {{=it.entity.title}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.pk }}{{ pkList.push(field.name) }}{{?}}\n {{=field.name}} {{=field.type}} {{= field.pk ? 'NOT NULL' : '' }} COMMENT '{{=it.func.join(field.chnname,field.remark,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}{{? pkList.length >0 }} PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n CONSTRAINT PK_{{=it.entity.title}} PRIMARY KEY CLUSTERED ({{~pkList:pkName:i}}{{= pkName }} ASC {{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i + + 4.0.0 + + + com.esua.epdc.yushan + epdc-cloud-parent-yushan + 1.0.0 + ../epdc-cloud-parent-yushan + + + epdc-cloud-user + jar + 榆山党群e事通微服务用户模块 + + + + org.springframework.boot + spring-boot-starter-web + + + + org.springframework + spring-context-support + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + + + org.apache.rocketmq + rocketmq-spring-boot-starter + 2.0.3 + + + + + com.esua.epdc.yushan + epdc-cloud-news-client + ${epdc-cloud-client.version} + + + + com.esua.epdc.yushan + epdc-cloud-admin-client + ${epdc-cloud-client.version} + + + + com.esua.epdc.yushan + epdc-cloud-user-client + ${epdc-cloud-client.version} + + + + + + com.esua.epdc.yushan + epdc-commons-tools + ${epdc-cloud-commons.version} + + + + com.esua.epdc.yushan + epdc-commons-dynamic-datasource + ${epdc-cloud-commons.version} + + + + com.esua.epdc.yushan + epdc-commons-mybatis + ${epdc-cloud-commons.version} + + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + + + org.apache.maven.plugins + maven-surefire-plugin + + true + + + + org.apache.maven.plugins + maven-deploy-plugin + + true + + + + com.spotify + dockerfile-maven-plugin + + + + ${project.basedir}/src/main/java + + + + true + ${basedir}/src/main/resources + + **/application*.yml + **/*.properties + logback-spring.xml + registry.conf + + + + ${basedir}/src/main/resources + + **/application*.yml + **/*.properties + logback-spring.xml + registry.conf + + + + + + + + + dev + + true + + + dev + dev + + 9068 + + 2 + 47.104.224.45 + 6379 + elink@888 + + + + + epdc + elink833066 + + + + + epdc + elink833066 + + false + 47.104.224.45:8848 + + 6a3577b4-7b79-43f6-aebb-9c3f31263f6a + + 47.104.85.99:9876;114.215.125.123:9876 + organizationGroup + + + + + test + + test + test + + 10014 + + 2 + 114.215.125.123 + 9603 + epdc!redis@master1405 + + + + + epdc + elink833066 + + + + + epdc + elink833066 + + true + 47.104.224.45:8848 + 47.104.85.99 + 6a3577b4-7b79-43f6-aebb-9c3f31263f6a + + + 47.104.85.99:9876;114.215.125.123:9876 + organizationGroup + + + + + prod + + prod + prod + + 9068 + + + 0 + 172.16.0.54 + 6379 + Elink833066 + + + + + epdc + Elink@833066 + + + + epdc + Elink@833066 + + true + 172.16.0.52:8848 + + + + 172.16.0.52:9876;172.16.0.54:9876 + organizationGroup + + + + + diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/UserApplication.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/UserApplication.java new file mode 100644 index 0000000..4407c63 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/UserApplication.java @@ -0,0 +1,31 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + *

+ * https://www.renren.io + *

+ * 版权所有,侵权必究! + */ + +package com.elink.esua.epdc; + +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.client.discovery.EnableDiscoveryClient; +import org.springframework.cloud.openfeign.EnableFeignClients; + +/** + * APP用户模块 + * + * @author Mark sunlightcs@gmail.com + * @since 1.1.0 + */ +@SpringBootApplication +@EnableDiscoveryClient +@EnableFeignClients +public class UserApplication { + + public static void main(String[] args) { + SpringApplication.run(UserApplication.class, args); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/NewsTask.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/NewsTask.java new file mode 100644 index 0000000..256bb52 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/NewsTask.java @@ -0,0 +1,33 @@ +package com.elink.esua.epdc.async; + +import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; +import com.elink.esua.epdc.feign.NewsFeignClient; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +/** + * 志愿者审核结果通知消息模块 线程任务 + * + * @author zy + * @date 2019/12/16 15:39 + */ +@Component +public class NewsTask { + + @Autowired + private NewsFeignClient newsFeignClient; + + /** + * 志愿者审核结果,消息推送到app + * + * @param informationDto + * @return void + * @author zy + * @date 2019/12/16 15:39 + */ + @Async + public void insertUserInformation(EpdcInformationFormDTO informationDto) { + newsFeignClient.saveInformation(informationDto); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/PartyTask.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/PartyTask.java new file mode 100644 index 0000000..16b0967 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/async/PartyTask.java @@ -0,0 +1,54 @@ +package com.elink.esua.epdc.async; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import com.alibaba.fastjson.JSON; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.config.StreamUtils; +import com.elink.esua.epdc.dto.PartyMembersDTO; +import com.elink.esua.epdc.entity.PartyMembersEntity; +import com.elink.esua.epdc.excel.PartyMembersExcel; +import com.elink.esua.epdc.service.PartyMembersService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.util.List; + + +/** + * @author: qushutong + * @Date: 2019/10/24 16:00 + * @Description: 党员导入异步 + */ +@Component +public class PartyTask { + + @Autowired + private PartyMembersService partyMembersService; + + /*** + * 批量插入党员 + * @param file + * @return void + * @author qushutong + * @date 2019/10/24 16:02 + */ +// @Async +// public void insertPartyList(MultipartFile file) { +// File f = StreamUtils.conversionFile(file); +// ImportParams importParams = new ImportParams(); +// try { +// List partyList = ExcelImportUtil.importExcel(f, PartyMembersExcel.class, importParams); +// partyMembersService.saveList(partyList); +// for (PartyMembersExcel partyMembers : partyList) { +// System.out.println("从Excel导入数据到数据库的详细为 :{}" + JSON.toJSONString(partyMembers)); +// } +// System.out.println("从Excel导入数据一共 {} 行 " + partyList.size()); +// } catch (Exception e1) { +// throw new RuntimeException("导入失败:{}" + e1.getMessage()); +// } +// } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/ModuleConfigImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/ModuleConfigImpl.java new file mode 100644 index 0000000..f4d2ecc --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/ModuleConfigImpl.java @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2018 人人开源 All rights reserved. + *

+ * https://www.renren.io + *

+ * 版权所有,侵权必究! + */ + +package com.elink.esua.epdc.config; + +import com.elink.esua.epdc.commons.tools.config.ModuleConfig; +import org.springframework.stereotype.Service; + +/** + * 模块配置信息-生活服务模块 + * + * @author Mark sunlightcs@gmail.com + * @since 1.0.0 + */ +@Service +public class ModuleConfigImpl implements ModuleConfig { + @Override + public String getName() { + return "user"; + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/StreamUtils.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/StreamUtils.java new file mode 100644 index 0000000..1caef31 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/config/StreamUtils.java @@ -0,0 +1,56 @@ +package com.elink.esua.epdc.config; + +import com.elink.esua.epdc.commons.tools.exception.RenException; +import org.springframework.web.multipart.MultipartFile; + +import java.io.*; + +/** + * 接收文件转化File + * Created by liuhongwei on 2019/6/21. + */ +public class StreamUtils { + + + + public static File conversionFile(MultipartFile file){ + + File toFile =null; + InputStream ins = null; + try { + // 转化字节流 + ins = file.getInputStream(); + // 获取文件名字 + toFile = new File(file.getOriginalFilename()); + // 字节转化文件 + inputStreamToFile(ins, toFile); + ins.close(); + } catch (IOException e) { + new RenException(500,"文件转化失败"); + } + return toFile; + } + + + /** + * 流转化 + * @param ins file + * @return + * @author liuhongwei + * @date 2019/6/14 14:07 + */ + public static void inputStreamToFile(InputStream ins, File file) { + try { + OutputStream os = new FileOutputStream(file); + int bytesRead = 0; + byte[] buffer = new byte[8192]; + while ((bytesRead = ins.read(buffer, 0, 8192)) != -1) { + os.write(buffer, 0, bytesRead); + } + os.close(); + ins.close(); + } catch (Exception e) { + e.printStackTrace(); + } + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java new file mode 100644 index 0000000..250eead --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserController.java @@ -0,0 +1,423 @@ +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.CachingUserInfoDTO; +import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.epdc.form.*; +import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.service.UserInvitationRecordService; +import com.elink.esua.epdc.service.UserService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 对移动端开放 + * + * @author yujintao + * @email yujintao@elink-cn.com + * @date 2019/9/6 20:31 + */ +@RestController +@RequestMapping(Constant.EPDC_APP + "user") +public class EpdcAppUserController { + + @Autowired + private UserService userService; + @Autowired + private UserInvitationRecordService userInvitationRecordService; + + /** + * 根据用户openId获取用户信息(只查询已注册或审核中的用户) + * + * @param openId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/19 19:03 + */ + @GetMapping("getByOpenId/{openId}") + public Result getUserInfoByOpenId(@PathVariable("openId") String openId) { + return userService.getUserInfoByOpenId(openId); + } + + /** + * 查询用户基础信息 + * + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/26 15:13 + */ + @GetMapping("getById/{userId}") + public Result getUserInfoById(@PathVariable("userId") String userId) { + UserDTO dto = userService.get(userId); + return new Result().ok(dto); + } + + /** + * 登录前,获取用户信息 + * + * @param openId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/24 13:57 + */ + @GetMapping("getForLogin/{openId}") + public Result getUserForLoginByOpenId(@PathVariable("openId") String openId) { + return userService.getUserForLoginByOpenId(openId); + } + + /** + * 根据用户unionId获取用户信息(只查询已注册或审核中的用户) + * + * @param unionId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/19 19:03 + */ + @GetMapping("getByUnionId/{unionId}") + public Result getUserInfoByUnionId(@PathVariable("unionId") String unionId) { + return userService.getUserInfoByUnionId(unionId); + } + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户信息 合并上面的getByUnionId、getForLogin方法 + * @Date 2019/12/7 13:57 + **/ + @PostMapping("queryUserDto") + public Result queryUserDto(@RequestBody EpdcAppQueryUserInfoFormDTO formDTO) { + return userService.queryUserDto(formDTO); + } + + /** + * 移动端用户注册 + * + * @param userDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author yujintao + * @date 2019/9/7 14:20 + */ + @PostMapping("regist") + public Result userRegister(@RequestBody UserDTO userDto) { + return userService.userRegister(userDto); + } + + /** + * 网格长注册 + * + * @param registerDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/23 09:34 + */ + @PostMapping("gridLeaderRegister") + public Result gridLeaderRegister(@RequestBody EpdcGridLeaderRegisterFormDTO registerDto) { + return userService.gridLeaderRegister(registerDto); + } + + /*** + * @Description 移动端获取用户信息 + * @Author qushutong + * @Date 2019/9/9 17:00 + * @Param [id] + * @Return com.elink.esua.epdc.commons.tools.utils.Result + * @Exception + * + */ + @GetMapping("getInfoById/{id}") + public Result getInfoById(@PathVariable("id") String id) { + return userService.getInfoById(id); + } + + /*** + * @Description 修改手机号 或者手机号 + * @Author qushutong + * @Date 2019/9/9 17:12 + * @Param [formDto] + * @Return com.elink.esua.epdc.commons.tools.utils.Result + * @Exception + * + */ + @PostMapping("updateMobileOrAvatar") + public Result updateMobileOrAvatar(@RequestBody UserDTO formDto) { + userService.updateMobileOrAvatar(formDto); + return new Result(); + } + + /** + * 验证用户提交的注册信息 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/21 11:03 + */ + @Deprecated + @GetMapping("verify") + public Result verifyUserRegisterData(@RequestBody EpdcUserRegistFormDTO formDto) { + return userService.verifyUserRegisterData(formDto); + } + + /** + * 用户注册审核之后,查询用户审核结果,用于发送服务消息和短信消息 + * + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/27 09:13 + */ + @GetMapping("registerResult/{userId}") + public Result getUserRegisterAuditResult(@PathVariable("userId") String userId) { + return userService.getUserRegisterAuditResult(userId); + } + + /** + * 社群添加好友列表 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @params [formDto] + * @author liuchuang + * @since 2019/10/23 16:22 + */ + @GetMapping("getInviteUserList") + public Result> getInviteUserList(@RequestBody EpdcUserGroupInviteFormDTO formDto) { + List data = userService.listOfInviteUsers(formDto); + return new Result>().ok(data); + } + + /** + * 检查用户注册状态 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [fromDto] + * @author liuchuang + * @since 2019/10/25 11:11 + */ + @GetMapping("checkUserRegister") + public Result getUserRegisterState(@RequestBody EpdcCheckUserRegisterFromDTO fromDto) { + return userService.checkUserRegisterState(fromDto); + } + + /** + * 用户注册或绑定网格 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [fromDto] + * @author liuchuang + * @since 2019/10/25 14:30 + */ + @PostMapping("registerOrBindGrid") + public Result registerOrBindGrid(@RequestBody EpdcUserRegisterBindGridFormDTO fromDto) { + return userService.saveUserOrBindGrid(fromDto); + } + + /** + * 更新用户微信信息 + * + * @param userDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2019/10/25 17:10 + */ + @PostMapping("updateWxInfo") + public Result updateWxInfo(@RequestBody UserDTO userDto) { + // userDto 包含用户id,昵称,头像,性别,unionid,openid + UserDTO user = userService.updateWxInfo(userDto); + + return new Result().ok(user); + } + + /** + * 更新用户信息 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [userDTO] + * @author liuchuang + * @since 2019/10/25 17:10 + */ + @PostMapping("updateUserInfo") + public Result updateUserInfo(@RequestBody UserDTO userDto) { + userService.update(userDto); + return new Result(); + } + + /** + * 验证用户完善个人信息时提交的数据,校验成功,返回用户当前状态 + * + * @param userDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/21 11:03 + */ + @GetMapping("verifyComplete") + public Result verifyUserCompleteData(@RequestBody UserDTO userDto) { + return userService.verifyUserCompleteData(userDto); + } + + /** + * 用户完善个人信息-保存 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/26 11:53 + */ + @PostMapping("completeInfo") + public Result completeUserInfo(@RequestBody EpdcAppUserCompleteInfoFormDTO formDto) { + return userService.completeUserInfo(formDto); + } + + /** + * 获取居民详情(已认证或待认证(提交信息待审核)的居民用户) + * + * @param userId 用户Id + * @return + */ + @GetMapping("residentDetail/{userId}") + public Result residentDetail(@PathVariable("userId") String userId) { + return userService.residentDetail(userId); + } + + /** + * 获取党员详情(已认证或未认证的党员用户) + * + * @param userId + * @return + */ + @GetMapping("partyMemberDetail/{userId}") + public Result partyMemberDetail(@PathVariable("userId") String userId) { + return userService.partyMemberDetail(userId); + } + + /** + * 认证用户(用户信息审核) + * + * @param formDTO + * @return + */ + @PostMapping("authenticateResident") + public Result authenticateResident(@RequestBody EpdcAppAuthenticateResidentFormDTO formDTO) { + return userService.authenticateResident(formDTO); + } + + /*** + * 用户列表 + * @param workUserFromDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2019/11/18 13:47 + */ + @GetMapping("listForWork") + public Result> listUserForWork(@RequestBody EpdcWorkUserFromDTO workUserFromDto) { + return userService.getWorkUserList(workUserFromDto); + } + + + /*** + * 查询待认证用户数量 + * @param fromDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2019/11/19 13:25 + */ + @GetMapping("unauthorizedAmount") + public Result unauthorizedAmount(@RequestBody EpdcUnauthorizedAmountFromDTO fromDto) { + return userService.getUnauthorizedAmount(fromDto); + } + + /** + * 获取邀请记录 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @params [formDto] + * @author liuchuang + * @since 2019/10/23 16:22 + */ + @GetMapping("invitationRecord") + public Result> invitationRecord() { + List data = userInvitationRecordService.invitationRecord(SecurityUser.getUserId()); + return new Result>().ok(data); + } + + /** + * 获取用户最后一次切换的网格信息 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [openId] + * @author liuchuang + * @since 2019/12/6 11:01 + */ + @GetMapping("lastSwitchGrid/{openId}") + public Result getUserLastSwitchGird(@PathVariable("openId") String openId) { + return userService.getUserLastSwitchGird(openId); + } + + /** + * @param gridIdList + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 根据网格id查询网格下所有的用户 + * @Date 2019/12/19 15:02 + **/ + @PostMapping("queryGroupUsers") + public Result> queryGroupUsers(@RequestBody List gridIdList) { + return userService.listGridUserResultDTO(gridIdList); + } + + /*** + * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息 + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2020/2/15 11:06 + */ + @PostMapping("sentryPost/completeInfo") + public Result> sentPidemicInfo(@RequestBody EpdcAppPidemicCompleteInfoFromDTO formDTO) { + return userService.createPidemicInfo(formDTO); + } + + + /*** + * 完善企业信息,必填表单 跟新用户 + * @param + * @return Result + * @author qushutong + * @date 2020/2/28 13:34 + */ + @PostMapping("completeByEnterpriseInfo") + public Result completeRequisiteInfo(@RequestBody CompleteRequisiteUserInfoDTO fromDto) { + return userService.completeRequisiteInfo(fromDto); + } + + /** + * 获取用户缓存信息 + * + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author rongchao + * @since 2019-12-18 + */ + @PostMapping("needCachingUserInfo") + public Result needCachingUserInfo(@RequestBody EpdcAppQueryUserInfoFormDTO formDTO) { + return userService.queryCachingUserInfo(formDTO); + } + + /** + * 根据用户ID获取用户缓存信息 + * + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author rongchao + * @since 2019-12-19 + */ + @GetMapping("needCachingUserInfoByUserId/{userId}") + public Result needCachingUserInfoByUserId(@PathVariable("userId") String userId) { + return userService.cachingUserInfoByUserId(userId); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserWxFormIdController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserWxFormIdController.java new file mode 100644 index 0000000..9bf96d6 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppUserWxFormIdController.java @@ -0,0 +1,92 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.UserWxFormIdDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcDeleteWxFormIdFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserSaveWxFormIdFormDTO; +import com.elink.esua.epdc.service.UserWxFormIdService; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +/** + * 微信formId表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@RestController +@RequestMapping(Constant.EPDC_APP + "wxformid") +public class EpdcAppUserWxFormIdController { + + @Autowired + private UserWxFormIdService userWxFormIdService; + + + /*** + * 完成推送之后删除用过的formid + * @param dto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2019/9/26 14:15 + */ + @PostMapping("deleteById") + public Result deleteById(@RequestBody EpdcDeleteWxFormIdFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userWxFormIdService.deleteById(dto.getId()); + return new Result(); + } + + /*** + * 新增一条 + * @param dto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2019/9/26 14:25 + */ + @PostMapping("save") + public Result save(@RequestBody EpdcUserSaveWxFormIdFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + UserWxFormIdDTO userWxFormIdDTO = new UserWxFormIdDTO(); + BeanUtils.copyProperties(dto, userWxFormIdDTO); + userWxFormIdService.save(userWxFormIdDTO); + return new Result(); + } + + + /*** + * 查出最新一条记录 + * @param openId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2019/9/26 14:11 + */ + @GetMapping("getByOpenId/{openId}") + public Result get(@PathVariable("openId") String openId) { + UserWxFormIdDTO data = userWxFormIdService.getByOpenId(openId); + return new Result().ok(data); + } +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java new file mode 100644 index 0000000..99306f0 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcAppVolunteerInfoController.java @@ -0,0 +1,65 @@ +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; +import com.elink.esua.epdc.service.VolunteerInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +/** + * 对移动端开放 + * + * @author wanggongfeng + * @date 2019/9/6 20:31 + */ +@RestController +@RequestMapping(Constant.EPDC_APP + "volunteerinfo") +public class EpdcAppVolunteerInfoController { + @Autowired + private VolunteerInfoService volunteerInfoService; + + /** + * 根据用户id 进行志愿者认证 + * @param userId + * @author wanggongfeng + * @return + */ + @GetMapping("getVolunteerCountById/{userId}") + public Result getVolunteerCountById(@PathVariable("userId") String userId) { + return volunteerInfoService.getVolunteerCountById(userId); + } + + /** + * 插入一条志愿者数据 + * @param epdcCompleteVolunteerInfoFormDTO + * @author wanggongfeng + * @return + */ + @GetMapping("insertVolunteerInfo") + public Result insertVolunteerInfo(@RequestBody EpdcCompleteVolunteerInfoFormDTO epdcCompleteVolunteerInfoFormDTO) { + //效验数据 + ValidatorUtils.validateEntity(epdcCompleteVolunteerInfoFormDTO, UpdateGroup.class, DefaultGroup.class); + Result result = volunteerInfoService.insertVolunteerInfo(epdcCompleteVolunteerInfoFormDTO); + return result; + } + + /** + * 获取排行榜数据 + * + * @return + */ + @GetMapping("getRankingList") + public Result> getRankingList() { + return volunteerInfoService.getRankingList(); + } + + + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcUserGridRelationController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcUserGridRelationController.java new file mode 100644 index 0000000..98bc550 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/EpdcUserGridRelationController.java @@ -0,0 +1,83 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.UserGridRelationDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAppRemoveGridFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcLeaderSwitchGridFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO; +import com.elink.esua.epdc.service.UserGridRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +@RestController +@RequestMapping(Constant.EPDC_APP + "usergrid") +public class EpdcUserGridRelationController { + + @Autowired + private UserGridRelationService userGridRelationService; + + /** + * 网格长小程序端切换网格 + * + * @param switchGridDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/23 11:04 + */ + @GetMapping("userSwitchGrid") + public Result userSwitchGrid(@RequestBody EpdcLeaderSwitchGridFormDTO switchGridDto) { + return userGridRelationService.userSwitchGrid(switchGridDto); + } + + /** + * 获取网格长管理的网格列表 + * + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author work@yujt.net.cn + * @date 2019/10/23 13:26 + */ + @GetMapping("listUserGrid/{userId}") + public Result> listGridForLeader(@PathVariable("userId") String userId) { + return userGridRelationService.listUserGridForApi(userId); + } + + /** + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 解除与网格的关联 + * @Date 2019/11/22 14:30 + **/ + @PostMapping("removeGrid") + public Result removeGrid(@RequestBody EpdcAppRemoveGridFormDTO formDto) { + return userGridRelationService.removeGrid(formDto); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyAuthenticationFailedController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyAuthenticationFailedController.java new file mode 100644 index 0000000..2453cda --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyAuthenticationFailedController.java @@ -0,0 +1,98 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.PartyAuthenticationFailedDTO; +import com.elink.esua.epdc.excel.PartyAuthenticationFailedExcel; +import com.elink.esua.epdc.service.PartyAuthenticationFailedService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +@RestController +@RequestMapping("partyauthenticationfailed") +public class PartyAuthenticationFailedController { + + @Autowired + private PartyAuthenticationFailedService partyAuthenticationFailedService; + + @GetMapping("page") + @DataFilter(tableAlias = "epaf", deptId = "grid_id", prefix = "AND", isPendingCreator = false) + public Result> page(@RequestParam Map params) { + PageData page = partyAuthenticationFailedService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + PartyAuthenticationFailedDTO data = partyAuthenticationFailedService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PartyAuthenticationFailedDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + partyAuthenticationFailedService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PartyAuthenticationFailedDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + partyAuthenticationFailedService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + partyAuthenticationFailedService.delete(ids); + return new Result(); + } + + @GetMapping("export") + @DataFilter(tableAlias = "epaf", deptId = "grid_id", prefix = "AND", isPendingCreator = false) + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = partyAuthenticationFailedService.list(params); + ExcelUtils.exportExcelToTarget(response, "认证失败党员", list, PartyAuthenticationFailedExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java new file mode 100644 index 0000000..3c092d0 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyMembersController.java @@ -0,0 +1,179 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.PartyMembersDTO; +import com.elink.esua.epdc.excel.PartyMembersExcel; +import com.elink.esua.epdc.service.PartyMembersService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@RestController +@RequestMapping("/partymembers") +public class PartyMembersController { + + @Autowired + private PartyMembersService partyMembersService; + + /** + * 党员库 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author + * @date 2020/2/24 15:16 + */ + @GetMapping("page") + public Result> page(@RequestParam Map params) { + return partyMembersService.pageDIY(params); + } + + /** + * 已认证党员列表 + * + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author + * @date 2020/2/21 19:06 + */ + @GetMapping("hasAuthenticationPartyPage") + @DataFilter(tableAlias = "eu", prefix = "AND", isPendingCreator = false) + public Result> hasAuthenticationPartyPage(@RequestParam Map params) { + return partyMembersService.hasAuthenticationPartyPage(params); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + PartyMembersDTO data = partyMembersService.get(id); + if (null != data && data.getTagIds() != null) { + data.setTagIdsNew(data.getTagIds().split(",")); + } + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PartyMembersDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + dto.setDeptId(SecurityUser.getDeptId()); + partyMembersService.save(dto); + + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PartyMembersDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + partyMembersService.update(dto); + + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + return partyMembersService.delete(ids); + } + + @GetMapping("export") +// @DataFilter(tableAlias = "pm", deptId = "grid_id", prefix = "AND") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = partyMembersService.list(params); + + ExcelUtils.exportExcelToTarget(response, "党员管理", list, PartyMembersExcel.class); + } + + /*** + * 批量导入 + * @param file + * @return java.lang.String + * @author qushutong + * @date 2019/10/24 14:55 + */ + @PostMapping("importExcel") + public Result importExcel(@RequestParam("file") MultipartFile file) { + return partyMembersService.insertPartyList(file); + } + + /*** + * 导出模板 + * @param params + * @param response + * @return void + * @author qushutong + * @date 2019/11/1 17:14 + */ + @GetMapping("exportMoudle") + public void exportMoudle(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = partyMembersService.exportMoudle(); + ExcelUtils.exportExcelToTarget(response, "党员模板", list, PartyMembersExcel.class); + } + + + /*** + * 已认证党员导出 + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2019/12/29 14:43 + */ + @GetMapping("hasAuthenticationexport") + @DataFilter(tableAlias = "pm", deptId = "grid_id", prefix = "AND", isPendingCreator = false) + public void hasAuthenticationexport(@RequestParam Map params, HttpServletResponse response) throws Exception { + ExcelUtils.exportExcelToTarget(response, "已认证党员", partyMembersService.exportHasMoudle(params), PartyMembersExcel.class); + } + + /*** + * 已认证党员优化 + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2020/3/19 13:34 + */ + @GetMapping("optimizeHasAuthenticationPartyPage") + @DataFilter(tableAlias = "eu", prefix = "AND", isPendingCreator = false) + public Result> optimizeHasAuthenticationPartyPage(@RequestParam Map params) { + return partyMembersService.optimizeHasAuthenticationPartyPage(params); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java new file mode 100644 index 0000000..afb4013 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/PartyTagRelationController.java @@ -0,0 +1,102 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.PartyTagRelationDTO; +import com.elink.esua.epdc.excel.PartyTagRelationExcel; +import com.elink.esua.epdc.service.PartyTagRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@RestController +@RequestMapping("/partytagrelation") +public class PartyTagRelationController { + @Autowired + private PartyTagRelationService partyTagRelationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = partyTagRelationService.page(params); + + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + PartyTagRelationDTO data = partyTagRelationService.get(id); + + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody PartyTagRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + partyTagRelationService.save(dto); + + return new Result(); + } + + @PutMapping + public Result update(@RequestBody PartyTagRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + partyTagRelationService.update(dto); + + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + partyTagRelationService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = partyTagRelationService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, PartyTagRelationExcel.class); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserAuthenticateHistoryController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserAuthenticateHistoryController.java new file mode 100644 index 0000000..94db73b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserAuthenticateHistoryController.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.UserAuthenticateHistoryDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAuthenticateHistoryFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAuthenticateHistoryResultDTO; +import com.elink.esua.epdc.entity.UserAuthenticateHistoryEntity; +import com.elink.esua.epdc.excel.UserAuthenticateHistoryExcel; +import com.elink.esua.epdc.service.UserAuthenticateHistoryService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户认证历史表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-11-21 + */ +@RestController +@RequestMapping("userauthenticatehistory") +public class UserAuthenticateHistoryController { + + @Autowired + private UserAuthenticateHistoryService userAuthenticateHistoryService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userAuthenticateHistoryService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserAuthenticateHistoryDTO data = userAuthenticateHistoryService.get(id); + return new Result().ok(data); + } + + /** + * @param userId 用户id + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 根据用户id查询认证历史记录 + * @Date 2019/11/21 13:59 + **/ + @GetMapping("listUserAuthenticateHistory/{userId}") + public Result> listUserAuthenticateHistory(@PathVariable("userId") String userId) { + if (StringUtils.isBlank(userId)) { + return new Result().error("用户id不能为空"); + } + List list = userAuthenticateHistoryService.listUserAuthenticateHistory(userId); + return new Result>().ok(list); + } + + @PostMapping + public Result save(@RequestBody UserAuthenticateHistoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userAuthenticateHistoryService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserAuthenticateHistoryDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userAuthenticateHistoryService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userAuthenticateHistoryService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userAuthenticateHistoryService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, UserAuthenticateHistoryExcel.class); + } + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 用户认证审核历史 + * @Date 2019/11/22 13:17 + **/ + @GetMapping("authenticateHistory") + public Result> authenticateHistory(@RequestBody EpdcAuthenticateHistoryFormDTO formDTO) { + return userAuthenticateHistoryService.authenticateHistory(formDTO); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java new file mode 100644 index 0000000..34358f2 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserCarInfoController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO; +import com.elink.esua.epdc.excel.UserCarInfoExcel; +import com.elink.esua.epdc.service.UserCarInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +@RestController +@RequestMapping("usercarinfo") +public class UserCarInfoController { + + @Autowired + private UserCarInfoService userCarInfoService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userCarInfoService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserCarInfoDTO data = userCarInfoService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserCarInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userCarInfoService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserCarInfoDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userCarInfoService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userCarInfoService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userCarInfoService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, UserCarInfoExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserController.java new file mode 100644 index 0000000..1b1b695 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserController.java @@ -0,0 +1,286 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.mybatis.annotation.DataFilter; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.PartyMemberModifyFormDTO; +import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserPointsFormDTO; +import com.elink.esua.epdc.enums.AppUserStatesEnum; +import com.elink.esua.epdc.excel.UserExcel; +import com.elink.esua.epdc.service.UserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; +import org.springframework.web.multipart.MultipartFile; + +import javax.servlet.http.HttpServletResponse; +import javax.validation.Valid; +import java.util.List; +import java.util.Map; + + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +@RestController +@RequestMapping("user") +public class UserController { + @Autowired + private UserService userService; + + @GetMapping("page") + @DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND") + public Result> page(@RequestParam Map params) { + PageData page = userService.page(params); + return new Result>().ok(page); + } + + /** + * + * 待认证党员列表 + * + * @params [params] + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author liuchuang + * @since 2020/3/24 15:47 + */ + @GetMapping("waitPartyPage") + @DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND") + public Result> waitPartyPage(@RequestParam Map params) { + PageData page = userService.waitPartyPage(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + UserDTO data = userService.get(id); + + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + userService.save(dto); + + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + userService.update(dto); + + return new Result(); + } + + /** + * 审核 + * + * @param dto + * @return + */ + @PostMapping("audit") + public Result audit(@RequestBody UserDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + userService.audit(dto); + + return new Result(); + } + + /** + * + * 党员认证 + * + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2020/3/24 15:58 + */ + @PostMapping("partyReview") + public Result partyReview(@RequestBody UserDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + return userService.partyReview(dto); + } + + /** + * + * 党员认证通过并更新党员库信息 + * + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2020/3/24 19:38 + */ + @PostMapping("updatePartyInfo") + public Result updatePartyInfo(@RequestBody PartyMemberModifyFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + if (StringUtils.isEmpty(dto.getPartyMemberId())) { + return new Result().error("党员ID不能为空"); + } + return userService.modifyPartyInfo(dto); + } + + /** + * + * 新增党员信息并认证通过 + * + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2020/3/25 14:31 + */ + @PostMapping("insertPartyInfo") + public Result insertPartyInfo(@RequestBody PartyMemberModifyFormDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + return userService.addPartyInfo(dto); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + userService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + @DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userService.list(params); + String auditState = (String) params.get("state"); + // 状态(0-未审核,1-审核通过,2-审核未通过) + String fileName = null; + if (AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value().equals(auditState)) { + fileName = "待认证居民"; + } else if (AppUserStatesEnum.STATE_INFORMATION_PASSED.value().equals(auditState)) { + fileName = "已认证居民"; + } else if (AppUserStatesEnum.STATE_INFORMATION_NOT_PASSED.value().equals(auditState)) { + fileName = "居民认证失败"; + } else if (AppUserStatesEnum.STATE_REGISTERED.value().equals(auditState)) { + fileName = "未认证居民"; + } + ExcelUtils.exportExcelToTarget(response, fileName, list, UserExcel.class); + } + + /** + * + * 待认证党员导出 + * + * @params [params, response] + * @return void + * @author liuchuang + * @since 2020/3/24 16:00 + */ + @GetMapping("exportWaitParty") + @DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND") + public void exportWaitParty(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userService.listOfWaitParty(params); + ExcelUtils.exportExcelToTarget(response, "待认证党员", list, UserExcel.class); + } + + /*** + * 未认证导出 + * @param params + * @param response + * @return void + * @author qushutong + * @date 2020/3/18 15:59 + */ + @GetMapping("unauthorizedexport") + @DataFilter(tableAlias = "ug", isPendingCreator = false, deptId = "GRID_ID", prefix = "AND") + public void unauthorizedExport(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userService.list(params); + ExcelUtils.exportExcelToTarget(response, "未认证居民", list, UserExcel.class); + } + + /*** + * 批量导入 + * @param file + * @return java.lang.String + * @author qushutong + * @date 2019/10/24 14:55 + */ + @PostMapping("importExcel") + public Result importExcel(@RequestParam("file") MultipartFile file, @RequestParam Map params) { + return userService.insertUserList(file, params); + } + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据操作类型更新用户积分 + * @Date 2019/12/13 15:01 + **/ + @PostMapping("handleUserPoints") + public Result handleUserPoints(@RequestBody @Valid EpdcUserPointsFormDTO formDTO) { + return userService.handleUserPoints(formDTO); + } + + /*** + * 展示所有的 + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2020/3/16 10:51 + */ + @GetMapping("alluserpage") + public Result> alluserpage(@RequestParam Map params) { + PageData page = userService.allUserPage(params); + return new Result>().ok(page); + } + + + /*** + * 已认证居民 + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2020/3/16 16:54 + */ + @GetMapping("authenticatedpage") + @DataFilter(tableAlias = "u", isPendingCreator = false, deptId = "DEPT_ID", prefix = "AND") + public Result> authenticatedpage(@RequestParam Map params) { + PageData page = userService.authenticatedpage(params); + return new Result>().ok(page); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridInvitationCodeController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridInvitationCodeController.java new file mode 100644 index 0000000..c1b9035 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridInvitationCodeController.java @@ -0,0 +1,135 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.UserGridInvitationCodeDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserGridInvitationCodeFormDTO; +import com.elink.esua.epdc.excel.UserGridInvitationCodeExcel; +import com.elink.esua.epdc.service.UserGridInvitationCodeService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +@RestController +@RequestMapping("usergridinvitationcode") +public class UserGridInvitationCodeController { + + @Autowired + private UserGridInvitationCodeService userGridInvitationCodeService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userGridInvitationCodeService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserGridInvitationCodeDTO data = userGridInvitationCodeService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserGridInvitationCodeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userGridInvitationCodeService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserGridInvitationCodeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userGridInvitationCodeService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userGridInvitationCodeService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userGridInvitationCodeService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, UserGridInvitationCodeExcel.class); + } + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @param formDTO + * @Author yinzuomei + * @Description 查询用户邀请码生成记录 + * @Date 2020/3/1 17:44 + **/ + @PostMapping("getUserGridInvitationCodeDTO") + public Result getUserGridInvitationCodeDTO(@RequestBody EpdcUserGridInvitationCodeFormDTO formDTO){ + ValidatorUtils.validateEntity(formDTO); + return userGridInvitationCodeService.getUserGridInvitationCodeDTO(formDTO); + } + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @param dto + * @Author yinzuomei + * @Description 回写用户网格邀请码表 + * @Date 2020/3/1 18:00 + **/ + @PostMapping("updateInvitationCodeUrl") + public Result updateInvitationCodeUrl(@RequestBody UserGridInvitationCodeDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userGridInvitationCodeService.update(dto); + return new Result(); + } + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @param id + * @Author yinzuomei + * @Description 根据用户网格邀请码表主键查询记录 + * @Date 2020/3/1 16:32 + **/ + @GetMapping("queryUserGridInvitationCodeDTO/{id}") + public Result queryUserGridInvitationCodeDTO(@PathVariable("id") String id){ + UserGridInvitationCodeDTO data = userGridInvitationCodeService.get(id); + return new Result().ok(data); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridRelationController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridRelationController.java new file mode 100644 index 0000000..a4ca83a --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserGridRelationController.java @@ -0,0 +1,105 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.UserGridRelationDTO; +import com.elink.esua.epdc.service.UserGridRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import java.util.List; +import java.util.Map; + + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +@RestController +@RequestMapping("usergrid") +public class UserGridRelationController { + + @Autowired + private UserGridRelationService userGridRelationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userGridRelationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserGridRelationDTO data = userGridRelationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserGridRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userGridRelationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserGridRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userGridRelationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userGridRelationService.delete(ids); + return new Result(); + } + + + @GetMapping("listUserGrid/{userId}") + public Result> listUserGrid(@PathVariable("userId") String userId){ + List data = userGridRelationService.listUserGrid(userId); + return new Result>().ok(data); + } + + /** + * @param id epdc_user_grid_relation表主键 + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 解绑 + * @Date 2019/11/21 19:00 + **/ + @GetMapping("unbindGridHandle/{id}") + public Result unbindGridHandle(@PathVariable("id") String id) { + userGridRelationService.unbindGridHandle(id); + return new Result(); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserInvitationRecordController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserInvitationRecordController.java new file mode 100644 index 0000000..abdb904 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserInvitationRecordController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.UserInvitationRecordDTO; +import com.elink.esua.epdc.excel.UserInvitationRecordExcel; +import com.elink.esua.epdc.service.UserInvitationRecordService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +@RestController +@RequestMapping("userinvitationrecord") +public class UserInvitationRecordController { + + @Autowired + private UserInvitationRecordService userInvitationRecordService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userInvitationRecordService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserInvitationRecordDTO data = userInvitationRecordService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserInvitationRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userInvitationRecordService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserInvitationRecordDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userInvitationRecordService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userInvitationRecordService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userInvitationRecordService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, UserInvitationRecordExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagController.java new file mode 100644 index 0000000..2157e38 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagController.java @@ -0,0 +1,103 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.excel.UserTagExcel; +import com.elink.esua.epdc.service.UserTagService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@RestController +@RequestMapping("/usertag") +public class UserTagController { + @Autowired + private UserTagService userTagService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userTagService.page(params); + return new Result>().ok(page); + } + + @GetMapping("list") + public Result> list(@RequestParam Map params){ + List list = userTagService.list(params); + return new Result>().ok(list); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserTagDTO data = userTagService.get(id); + + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserTagDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + + return userTagService.save(dto); + } + + @PutMapping + public Result update(@RequestBody UserTagDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + + return userTagService.update(dto); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + + userTagService.delete(ids); + + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userTagService.list(params); + + ExcelUtils.exportExcelToTarget(response, null, list, UserTagExcel.class); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagRelationController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagRelationController.java new file mode 100644 index 0000000..3f58de6 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserTagRelationController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.UserTagRelationDTO; +import com.elink.esua.epdc.excel.UserTagRelationExcel; +import com.elink.esua.epdc.service.UserTagRelationService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +@RestController +@RequestMapping("usertagrelation") +public class UserTagRelationController { + + @Autowired + private UserTagRelationService userTagRelationService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userTagRelationService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserTagRelationDTO data = userTagRelationService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserTagRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userTagRelationService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserTagRelationDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userTagRelationService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userTagRelationService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userTagRelationService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, UserTagRelationExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserWxFormIdController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserWxFormIdController.java new file mode 100644 index 0000000..c32147d --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/UserWxFormIdController.java @@ -0,0 +1,94 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.dto.UserWxFormIdDTO; +import com.elink.esua.epdc.excel.UserWxFormIdExcel; +import com.elink.esua.epdc.service.UserWxFormIdService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 用户标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@RestController +@RequestMapping("userwxformid") +public class UserWxFormIdController { + + @Autowired + private UserWxFormIdService userWxFormIdService; + + @GetMapping("page") + public Result> page(@RequestParam Map params){ + PageData page = userWxFormIdService.page(params); + return new Result>().ok(page); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id){ + UserWxFormIdDTO data = userWxFormIdService.get(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody UserWxFormIdDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + userWxFormIdService.save(dto); + return new Result(); + } + + @PutMapping + public Result update(@RequestBody UserWxFormIdDTO dto){ + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + userWxFormIdService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids){ + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + userWxFormIdService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = userWxFormIdService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, UserWxFormIdExcel.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java new file mode 100644 index 0000000..208eab2 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/controller/VolunteerInfoController.java @@ -0,0 +1,183 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.controller; + +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ExcelUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.commons.tools.validator.AssertUtils; +import com.elink.esua.epdc.commons.tools.validator.ValidatorUtils; +import com.elink.esua.epdc.commons.tools.validator.group.AddGroup; +import com.elink.esua.epdc.commons.tools.validator.group.DefaultGroup; +import com.elink.esua.epdc.commons.tools.validator.group.UpdateGroup; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; +import com.elink.esua.epdc.excel.VolunteerInfoExcel; +import com.elink.esua.epdc.service.UserTagService; +import com.elink.esua.epdc.service.VolunteerInfoService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; +import java.util.Map; + + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +@RestController +@RequestMapping("volunteerinfo") +public class VolunteerInfoController { + + @Autowired + private VolunteerInfoService volunteerInfoService; + + @Autowired + private UserTagService userTagService; //标签表 + + /** + * @Description: 查询志愿者列表数据 + * @Param: [params] + * @return: com.elink.esua.epdc.commons.tools.utils.Result> + * @Author: zy + * @Date: 2019-12-17 + */ + @GetMapping("page") + public Result> page(@RequestParam Map params) { + PageData page = volunteerInfoService.volunteerInfo(params); + return new Result>().ok(page); + } + + /** + * @Description: 根据志愿者ID,查询志愿者 信息详情 + * 积分需要连user表查询 + * @Param: [id] + * @return: com.elink.esua.epdc.commons.tools.utils.Result + * @Author: zy + * @Date: 2019-12-17 + */ + @GetMapping("getVolunteerDetail/{id}") + public Result getVolunteerDetail(@PathVariable("id") String id) { + VolunteerInfoDTO data = volunteerInfoService.getVolunteerDetail(id); + return new Result().ok(data); + } + + @PostMapping + public Result save(@RequestBody VolunteerInfoDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); + volunteerInfoService.save(dto); + return new Result(); + } + + @GetMapping("{id}") + public Result get(@PathVariable("id") String id) { + VolunteerInfoDTO data = volunteerInfoService.get(id); + return new Result().ok(data); + } + + /** + * @Description: 志愿者 申请审批 + * 审批不通过、拉入黑名单,清除用户标签关系表,志愿者标签,并进行消息推送 + * @Param: [dto] + * @return: com.elink.esua.epdc.commons.tools.utils.Result + * @Author: zy + * @Date: 2019-12-17 + */ + @PostMapping("volunteerInfoCheck") + public Result volunteerInfoCheck(@RequestBody VolunteerInfoDTO dto) { + return volunteerInfoService.volunteerInfoCheck(dto); + } + + @PutMapping + public Result update(@RequestBody VolunteerInfoDTO dto) { + //效验数据 + ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); + volunteerInfoService.update(dto); + return new Result(); + } + + @DeleteMapping + public Result delete(@RequestBody String[] ids) { + //效验数据 + AssertUtils.isArrayEmpty(ids, "id"); + volunteerInfoService.delete(ids); + return new Result(); + } + + @GetMapping("export") + public void export(@RequestParam Map params, HttpServletResponse response) throws Exception { + List list = volunteerInfoService.list(params); + ExcelUtils.exportExcelToTarget(response, null, list, VolunteerInfoExcel.class); + } + + /** + * @param id + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 积分调整按钮按下, 查询用户信息 + * @Date 2019/12/16 17:48 + **/ + @GetMapping("queryById/{id}") + public Result queryByUserId(@PathVariable("id") String id) { + return volunteerInfoService.getAdjustVolunteerPointsDTO(id); + } + + /** + * @param userId 用户主键 + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据用户主键获取用用户认证志愿者标识(0-待审核,1-认证通过,2-待认证,3-黑名单) + * @Date 2020/2/5 16:48 + **/ + @GetMapping("queryUserVolunteerFlag/{userId}") + public Result queryUserVolunteerFlag(@PathVariable("userId") String userId) { + return volunteerInfoService.queryUserVolunteerFlag(userId); + } + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据用户id查询志愿者信息 + * @Date 2020/2/6 12:23 + **/ + @GetMapping("getVolunteerInfoDTOByUserId/{userId}") + public Result getVolunteerInfoDTOByUserId(@PathVariable("userId") String userId) { + return volunteerInfoService.getVolunteerInfoDTOByUserId(userId); + } + + /** + * 增加志愿者爱心时长 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [formDto] + * @author liuchuang + * @since 2020/2/7 18:40 + */ + @PostMapping("addKindnessTime") + public Result addKindnessTime(@RequestBody EpdcVolunteerKindnessTimeFormDTO formDto) { + return volunteerInfoService.modifyVolunteerKindnessTime(formDto); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyAuthenticationFailedDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyAuthenticationFailedDao.java new file mode 100644 index 0000000..aa36909 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyAuthenticationFailedDao.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.PartyAuthenticationFailedDTO; +import com.elink.esua.epdc.entity.PartyAuthenticationFailedEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; +import java.util.Map; + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +@Mapper +public interface PartyAuthenticationFailedDao extends BaseDao { + + /** + * 查询认证失败的党员列表 + * @params params + * @return java.util.List + * @author gp + * @date 2019-11-18 + */ + List selectListDto(Map params); + + /** + * + * 查询需要修改的组织机构信息 + * + * @params [deptId] + * @return java.util.List + * @author liuchuang + * @since 2020/3/7 15:31 + */ + List selectListOfOrganizationInfo(String deptId); + + /** + * + * 更新网格名称 + * + * @params [newDeptName, deptId] + * @return void + * @author liuchuang + * @since 2020/3/7 1:20 + */ + void updateGridByDeptId(String newDeptName, Long deptId); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java new file mode 100644 index 0000000..9a48274 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyMembersDao.java @@ -0,0 +1,96 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.PartyMembersDTO; +import com.elink.esua.epdc.entity.PartyMembersEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.springframework.web.bind.annotation.PathVariable; + +import java.io.Serializable; +import java.util.List; +import java.util.Map; + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Mapper +public interface PartyMembersDao extends BaseDao { + + List pageDIY(Map params); + + PartyMembersDTO selectByIdNew(String id); + + List hasAuthenticationPartyPage(Map params); + + /** + * + * 查询需要修改的组织机构信息 + * + * @params [deptId] + * @return java.util.List + * @author liuchuang + * @since 2020/3/7 15:31 + */ + List selectListOfOrganizationInfo(String deptId); + + /** + * + * 更新网格名称 + * + * @params [newDeptName, deptId] + * @return void + * @author liuchuang + * @since 2020/3/7 1:20 + */ + void updateGridByDeptId(String newDeptName, Long deptId); + + /*** + * 已认证党员查询优化 + * @param + * @return java.util.List + * @author qushutong + * @date 2020/3/19 13:32 + */ + + List optimizeHasAuthenticationPartyPage(Map params); + + /*** + * 已认证党员查询优化 + * @param + * @return java.util.List + * @author qushutong + * @date 2020/3/19 13:33 + */ + + List optimizeHasAuthenticationPartyPageInfo(@Param("userIdList") List userIdList); + + /*** + * 删除时校验党员是否被认证 + * @param IdentityNo + * @return + * @author qushutong + * @date 2020/3/20 9:21 + */ + Integer selectCountByIdentity(String IdentityNo); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java new file mode 100644 index 0000000..8b96718 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/PartyTagRelationDao.java @@ -0,0 +1,36 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.PartyTagRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@Mapper +public interface PartyTagRelationDao extends BaseDao { + + void deleteByPartyId(String partyId); + + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserAuthenticateHistoryDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserAuthenticateHistoryDao.java new file mode 100644 index 0000000..2461f8c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserAuthenticateHistoryDao.java @@ -0,0 +1,64 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.epdc.result.EpdcAuthenticateHistoryResultDTO; +import com.elink.esua.epdc.entity.UserAuthenticateHistoryEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.poi.ss.formula.functions.T; + +import java.util.List; + +/** + * 用户认证历史表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-11-21 + */ +@Mapper +public interface UserAuthenticateHistoryDao extends BaseDao { + /** + * @param userId 用户id + * @return java.util.List + * @Author yinzuomei + * @Description 根据用户id查询认证历史记录 + * @Date 2019/11/21 15:26 + **/ + List selectListUserAuthenticateHistory(String userId); + + /** + * @param userId 用户id + * @param authenticatedFlag 是否认证通过 0未通过1通过 + * @return java.lang.Integer + * @Author yinzuomei + * @Description 统计用户认证次数 + * @Date 2019/11/21 15:55 + **/ + Integer countAuthenticateHistory(@Param("userId") String userId, @Param("authenticatedFlag")String authenticatedFlag); + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 用户认证审核历史 + * @Date 2019/11/22 13:30 + **/ + List selectListAuthenticateHistory(String userId); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java new file mode 100644 index 0000000..6cecfa1 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserCarInfoDao.java @@ -0,0 +1,33 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.UserCarInfoEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +@Mapper +public interface UserCarInfoDao extends BaseDao { + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserDao.java new file mode 100644 index 0000000..5a53924 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserDao.java @@ -0,0 +1,244 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.CachingUserInfoDTO; +import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAppQueryUserInfoFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUnauthorizedAmountFromDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcWorkUserFromDTO; +import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.entity.UserEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Mapper +public interface UserDao extends BaseDao { + + /** + * 获取个人用户信息 + * + * @param id + * @return com.elink.esua.epdc.dto.epdc.result.EpdcUserInfoResultDTO + * @author yujintao + * @date 2019/9/12 15:29 + */ + EpdcUserInfoResultDTO selectOneInfoById(String id); + + /*** + * 删除之前未通过的 + * @param wxUnionId + * @return + * @author qushutong + * @date 2019/9/19 20:34 + */ + void deleteByUnionId(String wxUnionId); + + /** + * 用户注册审核之后,查询用户审核结果,用于发送服务消息和短信消息 + * + * @param userId + * @return com.elink.esua.epdc.dto.epdc.result.EpdcUserRegisterAuditMsgResultDTO + * @author work@yujt.net.cn + * @date 2019/9/27 09:14 + */ + EpdcUserRegisterAuditMsgResultDTO getUserRegisterAuditResult(@Param("userId") String userId); + + /** + * 根据wxOpenId,删除审核失败的记录 + * + * @param wxOpenId + * @return int + * @author work@yujt.net.cn + * @date 2019/9/27 10:08 + */ + int deleteAuditFailureByOpenId(@Param("wxOpenId") String wxOpenId); + + /** + * 移动端-社群添加好友列表 + * + * @return java.util.List + * @params [formDto] + * @author liuchuang + * @since 2019/10/23 16:25 + */ + List selectListOfInviteUsers(EpdcUserGroupInviteFormDTO formDto); + + /** + * 查询用户列表 + * + * @param params + * @return java.util.List + * @author work@yujt.net.cn + * @date 2019/10/25 16:13 + */ + List selectListUserDto(Map params); + + /** + * + * 待认证党员 + * + * @params [params] + * @return java.util.List + * @author liuchuang + * @since 2020/3/23 15:59 + */ + List selectListOfWaitPartyUserDto(Map params); + + /** + * 获取居民详情(已认证或待认证(提交信息待审核)的居民用户) + * + * @param userId 用户Id + * @return + */ + EpdcResidentDetailResultDTO residentDetailByUserId(@Param("userId") String userId); + + /** + * 获取党员详情(已认证或未认证的党员用户) + * + * @param userId + * @return + */ + EpdcPartyMemberDetailDto partyMemberDetailByUserId(@Param("userId") String userId); + + /** + * 未认证的党员用户 + * + * @param userId + * @return + */ + EpdcPartyMemberDetailDto partyMemberDetailFaild(@Param("userId") String userId); + + /** + * 通过用户ID获取党员身份证号 + * + * @param userId + * @return + */ + String getPartyMemberIdNoByUserID(@Param("userId") String userId); + + /*** + * 用户党员待审核列表 + * @param workUserFromDto + * @return java.util.List + * @author qushutong + * @date 2019/11/18 19:28 + */ + List selectWorkUserList(EpdcWorkUserFromDTO workUserFromDto); + + /*** + * 查询待认证用户数量 + * @param fromDto + * @return java.lang.Integer + * @author qushutong + * @date 2019/11/19 13:31 + */ + int selectCountUnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto); + + /** + * @param workUserFromDto + * @return java.util.List + * @Author yinzuomei + * @Description 获取用户列表:党员认证失败 + * @Date 2019/12/7 11:23 + **/ + List selectPartyAuthenticationFailedList(EpdcWorkUserFromDTO workUserFromDto); + + /** + * @param gridIdList + * @return java.util.List + * @Author yinzuomei + * @Description 根据网格id查询网格下所有的用户 + * @Date 2019/12/19 15:05 + **/ + List selectListGridUserResultDTO(@Param("gridIdList") List gridIdList); + + /** + * 小程序用户登录getToken接口用,获取用户基本信息。因为用户和网格时一对多关系,所有返回为集合 + * + * @param wxOpenId + * @param wxUnionId + * @return java.util.List + * @author work@yujt.net.cn + * @date 2020/2/25 13:54 + */ + List selectListUserByWxForLogin(@Param("wxOpenId") String wxOpenId, @Param("wxUnionId") String wxUnionId); + + /** + * @param openId + * @param unionId + * @return com.elink.esua.epdc.dto.CachingUserInfoDTO + * @Author yinzuomei + * @Description 获取用户缓存信息 + * @Date 2019/12/18 14:12 + **/ + CachingUserInfoDTO selectCachingUserInfoDTO(@Param("openId") String openId, @Param("unionId") String unionId); + + /** + * @param userId + * @return com.elink.esua.epdc.dto.CachingUserInfoDTO + * @Author yinzuomei + * @Description 根据用户id查询CachingUserInfoDTO + * @Date 2020/1/15 17:43 + **/ + CachingUserInfoDTO selectCachingUserInfoDTOByUserId(String userId); + + /** + * + * 查询需要修改的组织机构信息 + * + * @params [deptId] + * @return java.util.List + * @author liuchuang + * @since 2020/3/7 15:31 + */ + List selectListOfOrganizationInfo(String deptId); + + + /*** + * 用户不关联网格关系表 + * @param params + * @return java.util.List + * @author qushutong + * @date 2020/3/16 16:18 + */ + List selectAuthenticatedListUserDto(Map params); + + /** + * + * 待认证居民 + * + * @params [params] + * @return java.util.List + * @author liuchuang + * @since 2020/4/1 18:26 + */ + List selectWaitAuthenticatedListUserDto(Map params); + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java new file mode 100644 index 0000000..2653b00 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridInvitationCodeDao.java @@ -0,0 +1,43 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.UserGridInvitationCodeDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserGridInvitationCodeFormDTO; +import com.elink.esua.epdc.entity.UserGridInvitationCodeEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +@Mapper +public interface UserGridInvitationCodeDao extends BaseDao { + + /** + * @return com.elink.esua.epdc.dto.UserGridInvitationCodeDTO + * @param formDto + * @Author yinzuomei + * @Description 根据网格id、邀请人ID查询邀请码 + * @Date 2020/3/1 15:29 + **/ + UserGridInvitationCodeDTO selectUserGridInvitationCodeDTO(EpdcUserGridInvitationCodeFormDTO formDto); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridRelationDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridRelationDao.java new file mode 100644 index 0000000..cb3a404 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserGridRelationDao.java @@ -0,0 +1,69 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.UserGridRelationDTO; +import com.elink.esua.epdc.entity.UserGridRelationEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +@Mapper +public interface UserGridRelationDao extends BaseDao { + + + /** + * + * 获取用户最后一次切换的网格信息 + * + * @params [userId] + * @return com.elink.esua.epdc.dto.UserGridRelationDTO + * @author liuchuang + * @since 2019/12/6 10:45 + */ + UserGridRelationDTO selectOneOfGird(String userId); + + /** + * + * 查询需要修改的组织机构信息 + * + * @params [deptId] + * @return java.util.List + * @author liuchuang + * @since 2020/3/7 15:31 + */ + List selectListOfOrganizationInfo(String deptId); + + /** + * + * 更新网格名称 + * + * @params [newDeptName, deptId] + * @return void + * @author liuchuang + * @since 2020/3/7 1:20 + */ + void updateGridByDeptId(String newDeptName, Long deptId); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserInvitationRecordDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserInvitationRecordDao.java new file mode 100644 index 0000000..cfcba25 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserInvitationRecordDao.java @@ -0,0 +1,58 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.epdc.result.UserInvitationRecordResultDTO; +import com.elink.esua.epdc.entity.UserInvitationRecordEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +@Mapper +public interface UserInvitationRecordDao extends BaseDao { + + /** + * 获取邀请记录 + * + * @return java.util.List + * @params [formDto] + * @author liuchuang + * @since 2019/10/23 16:25 + */ + List invitationRecord(@Param("userId") Long userId); + + /** + * + * 更新网格名称 + * + * @params [newDeptName, deptId] + * @return void + * @author liuchuang + * @since 2020/3/7 1:20 + */ + void updateGridByDeptId(String newDeptName, Long deptId); + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagDao.java new file mode 100644 index 0000000..d58684f --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagDao.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.UserTagInfo; +import com.elink.esua.epdc.entity.UserTagEntity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Mapper +public interface UserTagDao extends BaseDao { + + /** + * @param tagCode + * @return com.elink.esua.epdc.entity.UserTagEntity + * @Author yinzuomei + * @Description 根据标签编码查询信息 + * @Date 2019/12/17 19:17 + **/ + UserTagEntity selectByTagCode(String tagCode); + + /** + * @param userId + * @return java.util.List + * @Author yinzuomei + * @Description 根据用户id查询用户标签id用户标签编码 + * @Date 2020/2/7 14:17 + **/ + List selectByUserId(String userId); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagRelationDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagRelationDao.java new file mode 100644 index 0000000..7f77161 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserTagRelationDao.java @@ -0,0 +1,45 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.entity.UserTagRelationEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +@Mapper +public interface UserTagRelationDao extends BaseDao { + + /** + * 根据user_id 删除 + * 用户标签关系表 + * + * @param userId + * @return void + * @author zy + * @date 2019-12-16 + */ + void removeUserTagRelation(@Param("userId") String userId, @Param("tagCode") String tagCode); + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserWxFormIdDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserWxFormIdDao.java new file mode 100644 index 0000000..25510e4 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/UserWxFormIdDao.java @@ -0,0 +1,41 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.UserWxFormIdDTO; +import com.elink.esua.epdc.entity.UserWxFormIdEntity; +import org.apache.ibatis.annotations.Mapper; + +/** + * 微信formId表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@Mapper +public interface UserWxFormIdDao extends BaseDao { + /*** + * 获取最新一条formid + * @param openId + * @return com.elink.esua.epdc.dto.UserWxFormIdDTO + * @author qushutong + * @date 2019/9/26 14:05 + */ + UserWxFormIdDTO getByOpenId(String openId); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java new file mode 100644 index 0000000..ad70599 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/dao/VolunteerInfoDao.java @@ -0,0 +1,131 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; +import com.elink.esua.epdc.entity.VolunteerInfoEntity; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +@Mapper +public interface VolunteerInfoDao extends BaseDao { + /** + * 志愿者申请,根据用户表基础信息 赋默认值 + * @param id + * @return VolunteerInfoDTO + * @author zy + * @date 2019-12-11 + */ + VolunteerInfoDTO getVolunteerUserDefaultValue(String id); + + /** + * 根据查询条件,返回首页 志愿者信息列表 + * @param params + * @return + */ + List volunteerInfoList(Map params); + + /** + * 根据志愿者ID,查询志愿者 单条详情 + * 积分需要连user表查询 + * + * @param id + * @return VolunteerInfoDTO + * @author generator + * @date 2019-12-11 + */ + VolunteerInfoDTO getVolunteerDetail(String id); + + /** + * 根据查询条件,返回首页 志愿者信息列表总数 + * @param params + * @return + */ + int volunteerInfoCount(Map params); + + /** + * 自定义 志愿者表修改方法 + * @param dto + */ + void updateVolunteerInfo(VolunteerInfoDTO dto); + + /** + * 向标签表中,查询唯一志愿者标签:tag_code = volunteer + * @param tagCode + * @return + */ + UserTagDTO volunteerTagQuery(String tagCode); + + /** + * 志愿者认证 + * @param userId + * @return + */ + int getVolunteerCountById(@Param("userId") String userId); + + /** + * @param id + * @return com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO + * @Author yinzuomei + * @Description 积分调整按钮按下, 查询用户信息 + * @Date 2019/12/16 17:54 + **/ + EpdcAdjustVolunteerPointsDTO selectAdjustVolunteerPointsDTO(String id); + + /** + * 获取排行榜 + * + * @return + * @author wanggongfeng + */ + List getRankingList(); + + /** + * @param userId + * @return com.elink.esua.epdc.dto.VolunteerInfoDTO + * @Author yinzuomei + * @Description 根据用户id查询志愿者信息 + * @Date 2020/2/6 12:25 + **/ + VolunteerInfoDTO selectOneVolunteerInfoDTO(String userId); + + /** + * + * 增加志愿者爱心时长 + * + * @params [formDto] + * @return void + * @author liuchuang + * @since 2020/2/7 18:34 + */ + void updateVolunteerKindnessTime(EpdcVolunteerKindnessTimeFormDTO formDto); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java new file mode 100644 index 0000000..11df759 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/datasources/DataSourceNames.java @@ -0,0 +1,14 @@ +package com.elink.esua.epdc.datasources; + +/** + * 增加多数据源,除默认数据源外,每增加一个数据源,添加一个新的常量 + * + * @author work@yujt.net.cn + * @date 2020/2/27 15:03 + */ +public interface DataSourceNames { + /** + * 多数据源配置一,对应yml文件中 dynamic:datasource:first: + */ + String FIRST = "first"; +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyAuthenticationFailedEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyAuthenticationFailedEntity.java new file mode 100644 index 0000000..2530a5e --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyAuthenticationFailedEntity.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_party_authentication_failed") +public class PartyAuthenticationFailedEntity extends DeptScope { + + private static final long serialVersionUID = 1L; + + /** + * 姓名 + */ + private String realName; + + /** + * 手机号 + */ + private String mobile; + + /** + * 身份证号 + */ + private String identityNo; + + /** + * 职务 字典表dict_name + */ + private String post; + + /** + * 职务ID 字典表dict_value + */ + private String postValue; + + /** + * 干部下沉标识 0-否,1-是 + */ + private String cadreFlag; + + /** + * 注册状态 0-否,1-是 + */ + private String registFlag; + + /** + * 注册时间 + */ + private Date registTime; + + /** + * 网格名称 + */ + private String gridName; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 部门ID + */ + private Long deptId; + + /** + * 状态 0-认证失败 + */ + private String state; + + /** + * 用户ID + */ + private String userId; + + /** + * 居民住址 + */ + private String address; + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java new file mode 100644 index 0000000..5fe5557 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyMembersEntity.java @@ -0,0 +1,90 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_party_members") +public class PartyMembersEntity extends DeptScope { + + private static final long serialVersionUID = 1L; + + /** + * 姓名 + */ + private String realName; + /** + * 手机号 + */ + private String mobile; + /** + * 身份证号 + */ + private String identityNo; + /** + * 职务 + */ + private String post; + /** + * 职务ID(字典表) + */ + private String postValue; + /** + * 干部下沉标识(0-否,1-是) + */ + private String cadreFlag; + /** + * 注册状态(0-否,1-是) + */ + private String registFlag; + /** + * 注册时间 + */ + private Date registTime; + /** + * 网格名称 + */ + private String gridName; + /** + * 网格ID + */ + private long gridId; + /** + * 部门ID + */ + private long deptId; + + /*** + * 所在党委 + */ + private String partyOrganization; + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java new file mode 100644 index 0000000..a5231fe --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/PartyTagRelationEntity.java @@ -0,0 +1,53 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_party_tag_relation") +public class PartyTagRelationEntity extends BaseEpdcEntity { + private static final long serialVersionUID = 1L; + + /** + * 党员ID + */ + private String partyId; + /** + * 标签ID + */ + private String tagId; + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserAuthenticateHistoryEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserAuthenticateHistoryEntity.java new file mode 100644 index 0000000..3a3b14b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserAuthenticateHistoryEntity.java @@ -0,0 +1,76 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户认证历史表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-11-21 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_user_authenticate_history") +public class UserAuthenticateHistoryEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户ID + */ + private String userId; + + /** + * 手机号 + */ + private String mobile; + + /** + * 姓名 + */ + private String realName; + + /** + * 居民地址 + */ + private String address; + + /** + * 是否认证通过 0未通过1通过 + */ + private String authenticatedFlag; + + /** + * 认证类别(0-居民认证,1-党员认证,2-志愿者认证) + */ + private String authenticatedType; + + /** + * 审核备注 + */ + private String remark; + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java new file mode 100644 index 0000000..d594199 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserCarInfoEntity.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_user_car_info") +public class UserCarInfoEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 昵称 + */ + private String userId; + + /** + * 手机号 + */ + private String carNumber; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserEntity.java new file mode 100644 index 0000000..c239e7c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserEntity.java @@ -0,0 +1,267 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_user") +public class UserEntity extends DeptScope { + + private static final long serialVersionUID = -6047044658708037479L; + + /** + * 昵称 + */ + private String nickname; + + /** + * 手机号 + */ + private String mobile; + + /** + * 密码 + */ + private String password; + + /** + * 注册时间 + */ + private Date registerTime; + + /** + * 头像 + */ + private String faceImg; + + /** + * 性别(女性-female,男性-male) + */ + private String sex; + + /** + * 生日 + */ + private Date birthday; + + /** + * 邮箱 + */ + private String email; + + /** + * 电话 + */ + private String telephone; + + /** + * 邮编 + */ + private String zipCode; + + /** + * 职业 + */ + private String profession; + + /** + * 爱好 + */ + private String hobbies; + + /** + * 个性签名 + */ + private String userSign; + + /** + * 邀请码 + */ + private String invitationCode; + + /** + * 最近登录时间 + */ + private Date lastLoginTime; + + /** + * 最近登录IP + */ + private String lastLoginIp; + + /** + * 最近登录位置经度 + */ + private String lastLongitude; + + /** + * 最近登录位置维度 + */ + private String lastLatitude; + + /** + * 真实姓名 + */ + private String realName; + + /** + * 身份证号 + */ + private String identityNo; + + /** + * 所在道路(如山东路168号) + */ + private String road; + + /** + * 小区名称 + */ + private String villageName; + + /** + * 住处(楼栋-单元-房间) + */ + private String dwellingPlace; + + /** + * 居民住址 + */ + private String address; + + /** + * 微信OPENID + */ + private String wxOpenId; + + /** + * 微信unionId + */ + private String wxUnionId; + + /** + * 是否是党员(0-否,1-是) + */ + private String partyFlag; + + /** + * 注册方式(wx:微信注册) + */ + private String registerWay; + + /** + * 用户来源(wp:公众号) + */ + private String registerSource; + + /** + * 手机号所属省份 + */ + private String mobileProvince; + + /** + * 手机号所属城市 + */ + private String mobileCity; + + /** + * 手机号所属运营商 + */ + private String mobileCarrier; + + /** + * 用户积分 + */ + private Integer points; + + /** + * 邀请人ID + */ + private String inviteUserId; + + /** + * 状态(0-未审核,1-审核通过,2-审核未通过) + */ + private String state; + + + /** + * 姓 + */ + private String lastName; + + /** + * 名 + */ + private String firstName; + + /** + * 审核备注 + */ + private String remark; + + /** + * 居住网格id + */ + private Long deptId; + + /** + * 父所有部门 + */ + private String parentDeptIds; + + /** + * 父所有部门 + */ + private String parentDeptNames; + + /** + * 所有部门ID + */ + private String allDeptIds; + + /** + * 所有部门名称 + */ + private String allDeptNames; + + /** + * 是否有车 + */ + private String rentFlag; + + /** + * 是否租房 + */ + private String driverFlag; +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java new file mode 100644 index 0000000..951ca32 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridInvitationCodeEntity.java @@ -0,0 +1,56 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_user_grid_invitation_code") +public class UserGridInvitationCodeEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 网格ID + */ + private String gridId; + + /** + * 邀请人ID + */ + private String inviteUserId; + + /** + * 邀请码 + */ + private String invitationCodeUrl; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridRelationEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridRelationEntity.java new file mode 100644 index 0000000..02d9ea3 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserGridRelationEntity.java @@ -0,0 +1,67 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_user_grid_relation") +public class UserGridRelationEntity extends DeptScope { + + private static final long serialVersionUID = 8308463158510832072L; + + /** + * 用户ID + */ + private String userId; + + /** + * 所属网格 + */ + private String grid; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 最后切换此网格的时间 + */ + private Date switchedTime; + + /** + * 是否是网格长 0否1是 + */ + private String leaderFlag; + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserInvitationRecordEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserInvitationRecordEntity.java new file mode 100644 index 0000000..36974bc --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserInvitationRecordEntity.java @@ -0,0 +1,66 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_user_invitation_record") +public class UserInvitationRecordEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户ID + */ + private String userId; + + /** + * 邀请人ID + */ + private String inviteUserId; + + /** + * 网格 + */ + private String grid; + + /** + * 网格ID + */ + private Long gridId; + + /** + * 注册时间 + */ + private Date registerTime; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagEntity.java new file mode 100644 index 0000000..a108b6b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagEntity.java @@ -0,0 +1,59 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEntity; +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_user_tag") +public class UserTagEntity extends BaseEpdcEntity { + private static final long serialVersionUID = 1L; + + /** + * 标签名 + */ + private String tagName; + + /** + * 标签编码 + */ + private String tagCode; + + /** + * 标签描述 + */ + private String tagDesc; + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagRelationEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagRelationEntity.java new file mode 100644 index 0000000..cf4aa85 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserTagRelationEntity.java @@ -0,0 +1,51 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.util.Date; + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_user_tag_relation") +public class UserTagRelationEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 用户ID + */ + private String userId; + + /** + * 标签ID + */ + private String tagId; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserWxFormIdEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserWxFormIdEntity.java new file mode 100644 index 0000000..b535377 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/UserWxFormIdEntity.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.BaseEpdcEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +/** + * 微信formId表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@Data +@EqualsAndHashCode(callSuper=false) +@TableName("epdc_user_wx_form_id") +public class UserWxFormIdEntity extends BaseEpdcEntity { + + private static final long serialVersionUID = 1L; + + /** + * 微信openId + */ + private String wxOpenId; + + /** + * 微信formId + */ + private String wxFormId; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java new file mode 100644 index 0000000..0e4ca81 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/entity/VolunteerInfoEntity.java @@ -0,0 +1,138 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.entity; + +import com.baomidou.mybatisplus.annotation.TableName; + +import com.elink.esua.epdc.commons.mybatis.entity.DeptScope; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("epdc_volunteer_info") +public class VolunteerInfoEntity extends DeptScope { + + private static final long serialVersionUID = -4777998686764924965L; + + /** + * 用户ID + */ + private String userId; + + /** + * 姓名 + */ + private String realName; + + /** + * 性别(0-女,1-男) + */ + private String sex; + + /** + * 出生日期 + */ + private Date birthday; + + /** + * 手机号 + */ + private String mobile; + + /** + * 身份证 + */ + private String identityNo; + + /** + * 爱心时长(单位:分钟) + */ + private BigDecimal kindnessTime; + + /** + * 参加活动次数 + */ + private Integer participationNum; + + + /** + * 网格ID + */ + private Long gridId; + + /** + * 所属道路 + */ + private String road; + + /** + * 小区名称 + */ + private String villageName; + + /** + * 住处 + */ + private String dwellingPlace; + + /** + * 居住地址 + */ + private String address; + + /** + * 自我介绍 + */ + private String introduce; + + /** + * 志愿者注册时间 + */ + private Date registTime; + + /** + * 审核状态(0-未审核,1-审核通过,2-审核不通过) + */ + private String auditStatus; + + /** + * 审核不通过的原因 + */ + private String failureReason; + + /** + * 审核时间 + */ + private Date auditTime; + + /** + * 审核人 + */ + private Long auditor; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyAuthenticationFailedExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyAuthenticationFailedExcel.java new file mode 100644 index 0000000..65ef33b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyAuthenticationFailedExcel.java @@ -0,0 +1,54 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +@Data +public class PartyAuthenticationFailedExcel { + + + @Excel(name = "姓名") + private String realName; + + @Excel(name = "身份证号") + private String identityNo; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "所属网格") + private String allDeptNames; + + @Excel(name = "认证时间", format = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; + + @Excel(name = "居民住址") + private String address; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyMembersExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyMembersExcel.java new file mode 100644 index 0000000..5cf674f --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyMembersExcel.java @@ -0,0 +1,60 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Data +public class PartyMembersExcel { + + @Excel(name = "姓名") + private String realName; + + @Excel(name = "联系电话") + private String mobile; + + @Excel(name = "身份证号") + private String identityNo; + + @Excel(name = "职务") + private String post; + + @Excel(name = "干部下沉", replace = {"下沉_1", "不下沉_0"}) + private String cadreFlag; + + @Excel(name = "是否注册", replace = {"是_1", "否_0"}) + private String registFlag; + + @Excel(name = "认证时间", format = "yyyy-MM-dd HH:mm:ss") + private Date registTime; + + @Excel(name = "注册时间", format = "yyyy-MM-dd HH:mm:ss") + private Date createdTime; + + @Excel(name = "街道-社区-网格") + private String allDeptNames; +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java new file mode 100644 index 0000000..9b7a9cc --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/PartyTagRelationExcel.java @@ -0,0 +1,52 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@Data +public class PartyTagRelationExcel { + @Excel(name = "主键") + private String id; + @Excel(name = "党员ID") + private String partyId; + @Excel(name = "标签ID") + private String tagId; + @Excel(name = "乐观锁") + private Integer revision; + @Excel(name = "创建人") + private String createdBy; + @Excel(name = "创建时间") + private Date createdTime; + @Excel(name = "更新人") + private String updatedBy; + @Excel(name = "更新时间") + private Date updatedTime; + @Excel(name = "删除标记") + private String delFlag; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserAuthenticateHistoryExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserAuthenticateHistoryExcel.java new file mode 100644 index 0000000..05a38aa --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserAuthenticateHistoryExcel.java @@ -0,0 +1,74 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户认证历史表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-11-21 + */ +@Data +public class UserAuthenticateHistoryExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "姓名") + private String realName; + + @Excel(name = "居民地址") + private String address; + + @Excel(name = "是否认证通过 0未通过1通过") + private String authenticatedFlag; + + @Excel(name = "审核备注") + private String remark; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标记 0-否,1-是") + private String delFlag; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java new file mode 100644 index 0000000..f20c86c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserCarInfoExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +@Data +public class UserCarInfoExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "昵称") + private String userId; + + @Excel(name = "手机号") + private String carNumber; + + @Excel(name = "删除标记") + private String delFlag; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "注册时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserExcel.java new file mode 100644 index 0000000..8ff9632 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserExcel.java @@ -0,0 +1,52 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Data +public class UserExcel { + + @Excel(name = "真实姓名") + private String realName; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "居民住址") + private String address; + + @Excel(name = "昵称") + private String nickname; + + @Excel(name = "注册时间", format = "yyyy-MM-dd HH:mm:ss") + private Date registerTime; + + @Excel(name = "身份证号") + private String identityNo; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java new file mode 100644 index 0000000..364675c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserGridInvitationCodeExcel.java @@ -0,0 +1,65 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +@Data +public class UserGridInvitationCodeExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "网格ID") + private String gridId; + + @Excel(name = "邀请人ID") + private String inviteUserId; + + @Excel(name = "邀请码") + private String invitationCodeUrl; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标记") + private String delFlag; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserInvitationRecordExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserInvitationRecordExcel.java new file mode 100644 index 0000000..90de41f --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserInvitationRecordExcel.java @@ -0,0 +1,68 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +@Data +public class UserInvitationRecordExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "邀请人ID") + private String inviteUserId; + + @Excel(name = "网格") + private String grid; + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "注册时间") + private Date registerTime; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标记") + private String delFlag; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagExcel.java new file mode 100644 index 0000000..22abfc7 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagExcel.java @@ -0,0 +1,52 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Data +public class UserTagExcel { + @Excel(name = "主键") + private String id; + @Excel(name = "标签名") + private String tagName; + @Excel(name = "标签描述") + private String tagDesc; + @Excel(name = "乐观锁") + private Integer revision; + @Excel(name = "创建人") + private String createdBy; + @Excel(name = "创建时间") + private Date createdTime; + @Excel(name = "更新人") + private String updatedBy; + @Excel(name = "更新时间") + private Date updatedTime; + @Excel(name = "删除标记") + private String delFlag; + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagRelationExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagRelationExcel.java new file mode 100644 index 0000000..3e4d1b7 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserTagRelationExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +@Data +public class UserTagRelationExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "标签ID") + private String tagId; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标记") + private String delFlag; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserWxFormIdExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserWxFormIdExcel.java new file mode 100644 index 0000000..76c98bb --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/UserWxFormIdExcel.java @@ -0,0 +1,62 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.util.Date; + +/** + * 用户标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@Data +public class UserWxFormIdExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "微信openId") + private String wxOpenId; + + @Excel(name = "微信formId") + private String wxFormId; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + @Excel(name = "删除标记") + private String delFlag; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/VolunteerInfoExcel.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/VolunteerInfoExcel.java new file mode 100644 index 0000000..2ffc31d --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/excel/VolunteerInfoExcel.java @@ -0,0 +1,126 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.excel; + +import cn.afterturn.easypoi.excel.annotation.Excel; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +@Data +public class VolunteerInfoExcel { + + @Excel(name = "主键") + private String id; + + @Excel(name = "用户ID") + private String userId; + + @Excel(name = "姓名") + private String realName; + + @Excel(name = "性别(0-女,1-男)") + private String sex; + + @Excel(name = "出生日期") + private Date birthday; + + @Excel(name = "手机号") + private String mobile; + + @Excel(name = "身份证") + private String identityNo; + + @Excel(name = "爱心时长(单位:分钟)") + private BigDecimal kindnessTime; + + @Excel(name = "参加活动次数") + private Integer participationNum; + + @Excel(name = "积分") + private Integer points; + + @Excel(name = "网格ID") + private Long gridId; + + @Excel(name = "父所有部门ID") + private String parentDeptIds; + + @Excel(name = "父所有部门名称") + private String parentDeptNames; + + @Excel(name = "所有部门ID") + private String allDeptIds; + + @Excel(name = "所有部门名称") + private String allDeptNames; + + @Excel(name = "所属道路") + private String road; + + @Excel(name = "小区名称") + private String villageName; + + @Excel(name = "住处") + private String dwellingPlace; + + @Excel(name = "居住地址") + private String address; + + @Excel(name = "自我介绍") + private String introduce; + + @Excel(name = "志愿者注册时间") + private Date registTime; + + @Excel(name = "审核状态(0-未审核,1-审核通过,2-审核不通过)") + private String auditStatus; + + @Excel(name = "审核不通过的原因") + private String failureReason; + + @Excel(name = "审核时间") + private Date auditTime; + + @Excel(name = "审核人") + private Long auditor; + + @Excel(name = "乐观锁") + private Integer revision; + + @Excel(name = "创建人") + private String createdBy; + + @Excel(name = "创建时间") + private Date createdTime; + + @Excel(name = "更新人") + private String updatedBy; + + @Excel(name = "更新时间") + private Date updatedTime; + + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/exception/UserModuleErrorCode.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/exception/UserModuleErrorCode.java new file mode 100644 index 0000000..02ae133 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/exception/UserModuleErrorCode.java @@ -0,0 +1,16 @@ +package com.elink.esua.epdc.exception; + +import com.elink.esua.epdc.commons.tools.exception.ErrorCode; + +/** + * @author: qushutong + * @Date: 2020/1/3 17:31 + * @Description: + */ +public interface UserModuleErrorCode extends ErrorCode { + + /*** + * 党员认证失败 + */ + int AUTHENTICATION_CODE= 100006001; +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java new file mode 100644 index 0000000..7655e32 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/AdminFeignClient.java @@ -0,0 +1,42 @@ +package com.elink.esua.epdc.feign; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.feign.fallback.AdminFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; + +import java.util.List; + +/** + * @author yujintao + * @email yujintao@elink-cn.com + * @date 2019/9/5 14:44 + */ +@FeignClient(name = ServiceConstant.EPDC_ADMIN_SERVER, fallback = AdminFeignClientFallback.class) +public interface AdminFeignClient { + + /** + * 根据部门ID,获取下属所有网格ID + * + * @param pid + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author yujintao + * @date 2019/9/5 14:49 + */ + @GetMapping("/sys/dept/listGridId/{pid}") + Result> listGridIdByDeptPid(@PathVariable("pid") Long pid); + + /** + * 根据部门ID获取上级所有部门信息 + * + * @param deptId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author gp + * @date 2019-11-29 + */ + @GetMapping("/sys/dept/getParentAndAllDept/{deptId}") + Result getParentAndAllDept(@PathVariable("deptId") String deptId); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java new file mode 100644 index 0000000..4372889 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java @@ -0,0 +1,32 @@ +package com.elink.esua.epdc.feign; + +import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.feign.fallback.NewsFeignClientFallback; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.MediaType; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; + +/** + * 志愿者审核结果通知消息模块 线程任务 + * + * @author zy + * @date 2019/12/16 15:39 + */ +@FeignClient(name = ServiceConstant.EPDC_NEWS_SERVER, fallback = NewsFeignClientFallback.class) +public interface NewsFeignClient { + + /** + * 志愿者审核结果,消息推送到app + * + * @param formDto + * @return void + * @author zy + * @date 2019/12/16 15:39 + */ + @PostMapping(value = "news/epdc-app/information/save", consumes = MediaType.APPLICATION_JSON_UTF8_VALUE) + Result saveInformation(@RequestBody EpdcInformationFormDTO formDto); + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java new file mode 100644 index 0000000..7ec1c52 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/AdminFeignClientFallback.java @@ -0,0 +1,29 @@ +package com.elink.esua.epdc.feign.fallback; + +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.feign.AdminFeignClient; +import org.springframework.stereotype.Component; + +import java.util.List; + +/** + * @author yujintao + * @email yujintao@elink-cn.com + * @date 2019/9/5 14:44 + */ +@Component +public class AdminFeignClientFallback implements AdminFeignClient { + + @Override + public Result> listGridIdByDeptPid(Long pid) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "listGridIdByDeptPid", pid); + } + + @Override + public Result getParentAndAllDept(String depId) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ADMIN_SERVER, "getParentAndAllDept", depId); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java new file mode 100644 index 0000000..9965e86 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java @@ -0,0 +1,23 @@ +package com.elink.esua.epdc.feign.fallback; + +import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; +import com.elink.esua.epdc.commons.tools.constant.ServiceConstant; +import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.feign.NewsFeignClient; +import org.springframework.stereotype.Component; + +/** + * 志愿者审核结果通知消息模块 线程任务 + * + * @author zy + * @date 2019/12/16 15:39 + */ +@Component +public class NewsFeignClientFallback implements NewsFeignClient { + + @Override + public Result saveInformation(EpdcInformationFormDTO formDto) { + return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "saveInformation", formDto); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyAuthenticationFailedRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyAuthenticationFailedRedis.java new file mode 100644 index 0000000..c41b642 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyAuthenticationFailedRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +@Component +public class PartyAuthenticationFailedRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyMembersRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyMembersRedis.java new file mode 100644 index 0000000..6d3146c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyMembersRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Component +public class PartyMembersRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java new file mode 100644 index 0000000..e2bde59 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/PartyTagRelationRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@Component +public class PartyTagRelationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java new file mode 100644 index 0000000..4dd4a6b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserCarInfoRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +@Component +public class UserCarInfoRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java new file mode 100644 index 0000000..61640c3 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridInvitationCodeRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +@Component +public class UserGridInvitationCodeRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridRelationRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridRelationRedis.java new file mode 100644 index 0000000..a4487f0 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserGridRelationRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +@Component +public class UserGridRelationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserInvitationRecordRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserInvitationRecordRedis.java new file mode 100644 index 0000000..ce05cdd --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserInvitationRecordRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +@Component +public class UserInvitationRecordRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserRedis.java new file mode 100644 index 0000000..ab9556b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserRedis.java @@ -0,0 +1,46 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Component +public class UserRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRedis.java new file mode 100644 index 0000000..df13f0b --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Component +public class UserTagRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRelationRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRelationRedis.java new file mode 100644 index 0000000..8898d3c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserTagRelationRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +@Component +public class UserTagRelationRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserWxFormIdRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserWxFormIdRedis.java new file mode 100644 index 0000000..5b9ef67 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/UserWxFormIdRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 用户标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@Component +public class UserWxFormIdRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/VolunteerInfoRedis.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/VolunteerInfoRedis.java new file mode 100644 index 0000000..1c5d99c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/redis/VolunteerInfoRedis.java @@ -0,0 +1,47 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.redis; + +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +@Component +public class VolunteerInfoRedis { + @Autowired + private RedisUtils redisUtils; + + public void delete(Object[] ids) { + + } + + public void set(){ + + } + + public String get(String id){ + return null; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java new file mode 100644 index 0000000..b8ef0d0 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/consumer/OrganizationModifyConsumer.java @@ -0,0 +1,65 @@ +package com.elink.esua.epdc.rocketmq.consumer; + +import com.alibaba.fastjson.JSONObject; +import com.elink.esua.epdc.commons.tools.constant.RocketMqConstant; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.elink.esua.epdc.service.*; +import lombok.extern.slf4j.Slf4j; +import org.apache.rocketmq.common.message.MessageExt; +import org.apache.rocketmq.spring.annotation.MessageModel; +import org.apache.rocketmq.spring.annotation.RocketMQMessageListener; +import org.apache.rocketmq.spring.core.RocketMQListener; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +/** + * + * 组织机构信息修改-监听MQ消息 + * + * @Author:liuchuang + * @Date:2020/3/7 13:47 + */ +@Slf4j +@Component +@RocketMQMessageListener(topic = RocketMqConstant.MQ_TOPIC_ORGANIZATION, consumerGroup = "${rocketmq.consumer.group}", messageModel = MessageModel.BROADCASTING) +public class OrganizationModifyConsumer implements RocketMQListener { + + @Autowired + private PartyAuthenticationFailedService partyAuthenticationFailedService; + + @Autowired + private PartyMembersService partyMembersService; + + @Autowired + private UserService userService; + + @Autowired + private UserGridRelationService userGridRelationService; + + @Autowired + private UserInvitationRecordService userInvitationRecordService; + + @Override + public void onMessage(MessageExt messageExt) { + log.info("EPDC-USER-SERVER消费消息START:{topic:{}, msgId:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId()); + try { + String charset = "UTF-8"; + String body = new String(messageExt.getBody(), charset); + OrganizationModifyDTO dto = JSONObject.parseObject(body, OrganizationModifyDTO.class); + // 党员认证失败表修改组织机构信息 + partyAuthenticationFailedService.modifyOrganizationInfo(dto); + // 党员表修改组织机构信息 + partyMembersService.modifyOrganizationInfo(dto); + // 用户表修改组织机构信息 + userService.modifyOrganizationInfo(dto); + // 用户网格关系表修改组织机构信息 + userGridRelationService.modifyOrganizationInfo(dto); + // 用户邀请记录表修改组织机构信息 + userInvitationRecordService.modifyOrganizationInfo(dto); + log.info("EPDC-USER-SERVER消费消息END:{topic:{}, msgId:{}, body:{}}", RocketMqConstant.MQ_TOPIC_ORGANIZATION, messageExt.getMsgId(), body); + } catch (Exception e) { + log.info("EPDC-USER-SERVER消费消息失败:msgId:{}", messageExt.getMsgId()); + e.printStackTrace(); + } + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java new file mode 100644 index 0000000..636d7b7 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/rocketmq/dto/OrganizationModifyDTO.java @@ -0,0 +1,37 @@ +package com.elink.esua.epdc.rocketmq.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * + * 组织机构信息修改-接收MQ消息DTO + * + * @Author:liuchuang + * @Date:2020/3/7 13:46 + */ +@Data +public class OrganizationModifyDTO implements Serializable { + private static final long serialVersionUID = -5692602006311937083L; + + /** + * 部门ID + */ + private Long deptId; + + /** + * 旧部门名称 + */ + private String oldDeptName; + + /** + * 新部门名称 + */ + private String newDeptName; + + /** + * 部门类型 + */ + private String typeKey; +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyAuthenticationFailedService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyAuthenticationFailedService.java new file mode 100644 index 0000000..63d50a8 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyAuthenticationFailedService.java @@ -0,0 +1,107 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.PartyAuthenticationFailedDTO; +import com.elink.esua.epdc.entity.PartyAuthenticationFailedEntity; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +public interface PartyAuthenticationFailedService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-11-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-11-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return PartyAuthenticationFailedDTO + * @author generator + * @date 2019-11-15 + */ + PartyAuthenticationFailedDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-11-15 + */ + void save(PartyAuthenticationFailedDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-11-15 + */ + void update(PartyAuthenticationFailedDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-11-15 + */ + void delete(String[] ids); + + /** + * + * 事件修改组织机构信息 + * + * @params [dto] + * @return void + * @author liuchuang + * @since 2020/3/7 1:23 + */ + void modifyOrganizationInfo(OrganizationModifyDTO dto); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyMembersService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyMembersService.java new file mode 100644 index 0000000..27b1f4f --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyMembersService.java @@ -0,0 +1,132 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.PartyMembersDTO; +import com.elink.esua.epdc.entity.PartyMembersEntity; +import com.elink.esua.epdc.entity.UserEntity; +import com.elink.esua.epdc.excel.PartyMembersExcel; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +public interface PartyMembersService extends BaseService { + + PageData page(Map params); + + Result> pageDIY(Map params); + + Result> hasAuthenticationPartyPage(Map params); + + List list(Map params); + + PartyMembersDTO get(String id); + + void save(PartyMembersDTO dto); + + void update(PartyMembersDTO dto); + + Result delete(String[] ids); + + + /*** + * + * @return + * @author qushutong + * @date 2019/11/1 17:17 + */ + List exportMoudle(); + + /*** + * 导入党员 + * @param file + * @return void + * @author qushutong + * @date 2019/11/4 10:08 + */ + Result insertPartyList(MultipartFile file); + + /** + * 根据身份证号和姓名获取党员数量 + * + * @param identityNo + * @param realName + * @return int + * @author rongchao + * @since 2019-12-18 + */ + int countPartyMemberByIdNoAndRealName(String identityNo, String realName); + + /*** + * 已认证党员 + * @param params + * @return java.util.List + * @author qushutong + * @date 2019/12/29 14:47 + */ + List exportHasMoudle(Map params); + + /*** + * 临时 更新党员库 + * @param userEntities + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2020/2/16 16:18 + */ + Result upDataInfo(List userEntities); + + /** + * + * 事件修改组织机构信息 + * + * @params [dto] + * @return void + * @author liuchuang + * @since 2020/3/7 1:23 + */ + void modifyOrganizationInfo(OrganizationModifyDTO dto); + + /*** + * 已认证党员优化 + * @param params + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2020/3/19 13:36 + */ + Result> optimizeHasAuthenticationPartyPage(Map params); + + /*** + * 通过身份证校验此党员是否被认证 + * @param IdentityNo + * @return java.lang.Integer + * @author qushutong + * @date 2020/3/20 9:10 + */ + Integer checkCertificationByIdentityNo(String IdentityNo); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java new file mode 100644 index 0000000..1f9bb16 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/PartyTagRelationService.java @@ -0,0 +1,50 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.PartyTagRelationDTO; +import com.elink.esua.epdc.entity.PartyTagRelationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +public interface PartyTagRelationService extends BaseService { + + PageData page(Map params); + + List list(Map params); + + PartyTagRelationDTO get(String id); + + void save(PartyTagRelationDTO dto); + + void update(PartyTagRelationDTO dto); + + void delete(String[] ids); + + void deleteByPartyId(String partyId); + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserAuthenticateHistoryService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserAuthenticateHistoryService.java new file mode 100644 index 0000000..ce8ccd2 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserAuthenticateHistoryService.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.UserAuthenticateHistoryDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAuthenticateHistoryFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAuthenticateHistoryResultDTO; +import com.elink.esua.epdc.entity.UserAuthenticateHistoryEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户认证历史表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-11-21 + */ +public interface UserAuthenticateHistoryService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-11-21 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-11-21 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserAuthenticateHistoryDTO + * @author generator + * @date 2019-11-21 + */ + UserAuthenticateHistoryDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-11-21 + */ + void save(UserAuthenticateHistoryDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-11-21 + */ + void update(UserAuthenticateHistoryDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-11-21 + */ + void delete(String[] ids); + + /** + * @param userId 用户id + * @return java.util.List + * @Author yinzuomei + * @Description 根据用户id查询认证历史记录 + * @Date 2019/11/21 14:01 + **/ + List listUserAuthenticateHistory(String userId); + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 用户认证审核历史 + * @Date 2019/11/22 13:17 + **/ + Result> authenticateHistory(EpdcAuthenticateHistoryFormDTO formDTO); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java new file mode 100644 index 0000000..78e06a0 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserCarInfoService.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO; +import com.elink.esua.epdc.entity.UserCarInfoEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +public interface UserCarInfoService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-02-15 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-02-15 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserCarInfoDTO + * @author generator + * @date 2020-02-15 + */ + UserCarInfoDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-15 + */ + void save(UserCarInfoDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-02-15 + */ + void update(UserCarInfoDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-02-15 + */ + void delete(String[] ids); + + /*** + * 根据carNumber + * @param carNumber + * @return com.elink.esua.epdc.dto.epdc.UserCarInfoDTO + * @author qushutong + * @date 2020/2/15 18:42 + */ + UserCarInfoDTO selectOneByCarNumber(String carNumber); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java new file mode 100644 index 0000000..2fcf09c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridInvitationCodeService.java @@ -0,0 +1,99 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.UserGridInvitationCodeDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserGridInvitationCodeFormDTO; +import com.elink.esua.epdc.entity.UserGridInvitationCodeEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +public interface UserGridInvitationCodeService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2020-03-01 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2020-03-01 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserGridInvitationCodeDTO + * @author generator + * @date 2020-03-01 + */ + UserGridInvitationCodeDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-01 + */ + void save(UserGridInvitationCodeDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2020-03-01 + */ + void update(UserGridInvitationCodeDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2020-03-01 + */ + void delete(String[] ids); + + Result getUserGridInvitationCodeDTO(EpdcUserGridInvitationCodeFormDTO formDTO); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridRelationService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridRelationService.java new file mode 100644 index 0000000..c400974 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserGridRelationService.java @@ -0,0 +1,191 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.UserGridRelationDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAppRemoveGridFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcLeaderSwitchGridFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO; +import com.elink.esua.epdc.entity.UserGridRelationEntity; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +public interface UserGridRelationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-10-23 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-10-23 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserGridRelationDTO + * @author generator + * @date 2019-10-23 + */ + UserGridRelationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-10-23 + */ + void save(UserGridRelationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-10-23 + */ + void update(UserGridRelationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-10-23 + */ + void delete(String[] ids); + + /** + * 网格长小程序端切换网格 + * + * @param switchGridDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/23 11:05 + */ + Result userSwitchGrid(EpdcLeaderSwitchGridFormDTO switchGridDto); + + /** + * 获取网格长管理的网格列表 + * + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author work@yujt.net.cn + * @date 2019/10/23 13:28 + */ + Result> listUserGridForApi(String userId); + + /** + * 获取用户绑定网格信息 + * + * @return com.elink.esua.epdc.dto.UserGridRelationDTO + * @params [userId, gridId] + * @author liuchuang + * @since 2019/10/25 11:21 + */ + UserGridRelationDTO getUserRelationInfo(String userId, Long gridId); + + /** + * 获取用户所有网格 + * + * @param userId + * @return java.util.List + * @author work@yujt.net.cn + * @date 2019/10/25 18:20 + */ + List listUserGrid(String userId); + + /** + * 按用户id和网格id删除用户网格关系 + * + * @param userId 用户id + * @param gridId 网格id + * @return int + * @author work@yujt.net.cn + * @date 2019/10/30 17:55 + */ + int delete(String userId, Long gridId); + + /** + * @param id 主键 + * @return void + * @Author yinzuomei + * @Description 解绑 + * @Date 2019/11/21 18:06 + **/ + void unbindGridHandle(String id); + + /** + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 解除与网格的关联 + * @Date 2019/11/22 14:31 + **/ + Result removeGrid(EpdcAppRemoveGridFormDTO formDto); + + /** + * + * 获取用户最后一次切换的网格信息 + * + * @params [userId] + * @return com.elink.esua.epdc.dto.UserGridRelationDTO + * @author liuchuang + * @since 2019/12/6 10:47 + */ + UserGridRelationDTO getUserLastSwitchGird(String userId); + + /** + * + * 事件修改组织机构信息 + * + * @params [dto] + * @return void + * @author liuchuang + * @since 2020/3/7 1:23 + */ + void modifyOrganizationInfo(OrganizationModifyDTO dto); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserInvitationRecordService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserInvitationRecordService.java new file mode 100644 index 0000000..3fd70ee --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserInvitationRecordService.java @@ -0,0 +1,117 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.UserInvitationRecordDTO; +import com.elink.esua.epdc.dto.epdc.result.UserInvitationRecordResultDTO; +import com.elink.esua.epdc.entity.UserInvitationRecordEntity; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; + +import java.util.List; +import java.util.Map; + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +public interface UserInvitationRecordService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-12-02 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-12-02 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserInvitationRecordDTO + * @author generator + * @date 2019-12-02 + */ + UserInvitationRecordDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-12-02 + */ + void save(UserInvitationRecordDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-12-02 + */ + void update(UserInvitationRecordDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-12-02 + */ + void delete(String[] ids); + /** + * 获取邀请记录 + * + * @return java.util.List + * @params [formDto] + * @author liuchuang + * @since 2019/10/23 16:24 + */ + List invitationRecord(Long userId); + + /** + * + * 事件修改组织机构信息 + * + * @params [dto] + * @return void + * @author liuchuang + * @since 2020/3/7 1:23 + */ + void modifyOrganizationInfo(OrganizationModifyDTO dto); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserService.java new file mode 100644 index 0000000..3dacb69 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserService.java @@ -0,0 +1,410 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.PartyMemberModifyFormDTO; +import com.elink.esua.epdc.dto.PartyMembersDTO; +import com.elink.esua.epdc.dto.CachingUserInfoDTO; +import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.epdc.form.*; +import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.entity.UserEntity; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import org.springframework.web.multipart.MultipartFile; + +import java.util.List; +import java.util.Map; + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +public interface UserService extends BaseService { + + PageData page(Map params); + + /** + * + * 待认证党员列表 + * + * @params [params] + * @return com.elink.esua.epdc.commons.tools.page.PageData + * @author liuchuang + * @since 2020/3/23 15:57 + */ + PageData waitPartyPage(Map params); + + List list(Map params); + + /** + * + * 待认证党员导出 + * + * @params [params] + * @return java.util.List + * @author liuchuang + * @since 2020/3/23 16:25 + */ + List listOfWaitParty(Map params); + + UserDTO get(String id); + + void save(UserDTO dto); + + void update(UserDTO dto); + + void delete(String[] ids); + + void audit(UserDTO dto); + + /** + * + * 党员认证 + * + * @params [dto] + * @return void + * @author liuchuang + * @since 2020/3/23 17:56 + */ + Result> partyReview(UserDTO dto); + + /** + * + * 党员认证通过并更新党员库信息 + * + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2020/3/24 19:46 + */ + Result modifyPartyInfo(PartyMemberModifyFormDTO dto); + + /** + * + * 新增党员信息并认证通过 + * + * @params [dto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2020/3/25 14:33 + */ + Result addPartyInfo(PartyMemberModifyFormDTO dto); + + /** + * 根据用户微信openId获取用户信息 + * + * @param openId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/19 19:01 + */ + Result getUserInfoByOpenId(String openId); + + /** + * 根据用户微信unionID获取用户信息 + * + * @param unionId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/19 19:01 + */ + @Deprecated + Result getUserInfoByUnionId(String unionId); + + /** + * 移动端用户注册 + * + * @param userDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author yujintao + * @date 2019/9/7 14:20 + */ + Result userRegister(UserDTO userDto); + + /*** + * @Description 移动端查询个人信息 + * @Author qushutong + * @Date 2019/9/9 16:02 + * @Param [] + * @Return com.elink.esua.epdc.commons.tools.utils.Result + * @Exception + * + */ + Result getInfoById(String id); + + /*** + * @Description 修改手机号 或者头像 + * @Author qushutong + * @Date 2019/9/9 17:14 + * @Param [formDto] + * @Return com.elink.esua.epdc.commons.tools.utils.Result + * @Exception + * + */ + void updateMobileOrAvatar(UserDTO userDto); + + /** + * 验证用户提交的注册信息 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/21 11:04 + */ + @Deprecated + Result verifyUserRegisterData(EpdcUserRegistFormDTO formDto); + + /** + * 登录前,获取用户信息 + * + * @param openId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/24 13:57 + */ + @Deprecated + Result getUserForLoginByOpenId(String openId); + + /** + * 用户注册审核之后,查询用户审核结果,用于发送服务消息和短信消息 + * + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/9/27 09:13 + */ + Result getUserRegisterAuditResult(String userId); + + /** + * 移动端-社群添加好友列表 + * + * @return java.util.List + * @params [formDto] + * @author liuchuang + * @since 2019/10/23 16:24 + */ + List listOfInviteUsers(EpdcUserGroupInviteFormDTO formDto); + + /** + * 网格长注册 + * + * @param registerDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/23 09:35 + */ + Result gridLeaderRegister(EpdcGridLeaderRegisterFormDTO registerDto); + + /** + * 检查用户注册状态 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [fromDto] + * @author liuchuang + * @since 2019/10/25 11:13 + */ + Result checkUserRegisterState(EpdcCheckUserRegisterFromDTO fromDto); + + /** + * 保存用户信息或关联网格信息 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [fromDto] + * @author liuchuang + * @since 2019/10/25 14:35 + */ + Result saveUserOrBindGrid(EpdcUserRegisterBindGridFormDTO fromDto); + + /** + * 验证用户完善个人信息时提交的数据 + * + * @param userDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/26 11:18 + */ + Result verifyUserCompleteData(UserDTO userDto); + + /** + * 用户完善个人信息 + * + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author work@yujt.net.cn + * @date 2019/10/26 11:53 + */ + Result completeUserInfo(EpdcAppUserCompleteInfoFormDTO formDto); + + /** + * 获取居民详情(已认证或待认证(提交信息待审核)的居民用户) + * + * @param userId 用户Id + * @return + */ + Result residentDetail(String userId); + + /** + * 获取党员详情(已认证或未认证的党员用户) + * + * @param userId + * @return + */ + Result partyMemberDetail(String userId); + + /** + * 认证用户(用户信息审核) + * + * @param formDTO + * @return + */ + Result authenticateResident(EpdcAppAuthenticateResidentFormDTO formDTO); + + /*** + * 获取用户列表 + * @param workUserFromDto + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @author qushutong + * @date 2019/11/18 14:00 + */ + Result> getWorkUserList(EpdcWorkUserFromDTO workUserFromDto); + + /*** + * 查询待认证用户数量 + * @param fromDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2019/11/19 13:28 + */ + Result getUnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto); + + /** + * 获取用户最后一次切换的网格信息 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @params [openId] + * @author liuchuang + * @since 2019/12/6 10:59 + */ + Result getUserLastSwitchGird(String openId); + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户信息 合并上面的getByUnionId、getForLogin方法 + * @Date 2019/12/7 13:58 + **/ + Result queryUserDto(EpdcAppQueryUserInfoFormDTO formDTO); + + /** + * @param gridIdList + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 根据网格id查询网格下所有的用户 + * @Date 2019/12/19 15:03 + **/ + Result> listGridUserResultDTO(List gridIdList); + + + /*** + * 居民在防疫哨卡进行登记时,上送数据并完善党群系统个人信息 + * @param completeInfoFromDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2020/2/15 10:58 + */ + Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto); + + + Result insertUserList(MultipartFile file, Map params); + + + /*** + * 完善企业信息,必填表单 + * @param + * @return + * @author qushutong + * @date 2020/2/28 13:44 + */ + Result completeRequisiteInfo(CompleteRequisiteUserInfoDTO fromDto); + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户缓存信息 + * @Date 2019/12/18 14:01 + **/ + Result queryCachingUserInfo(EpdcAppQueryUserInfoFormDTO formDTO); + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据操作类型更新用户积分 + * @Date 2019/12/13 15:10 + **/ + Result handleUserPoints(EpdcUserPointsFormDTO formDTO); + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户缓存信息 + * @Date 2020/1/15 17:40 + **/ + Result cachingUserInfoByUserId(String userId); + + UserDTO updateWxInfo(UserDTO userDto); + + /** + * + * 事件修改组织机构信息 + * + * @params [dto] + * @return void + * @author liuchuang + * @since 2020/3/7 1:23 + */ + void modifyOrganizationInfo(OrganizationModifyDTO dto); + + + /*** + * 所有用户 用来锁定已注册在别的微信里面的信息 + * @param params + * @return com.elink.esua.epdc.commons.tools.page.PageData + * @author qushutong + * @date 2020/3/16 10:53 + */ + PageData allUserPage(Map params); + + + /*** + * 已认证列表 + * @param params + * @return com.elink.esua.epdc.commons.tools.page.PageData + * @author qushutong + * @date 2020/3/16 16:16 + */ + PageData authenticatedpage(Map params); + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagRelationService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagRelationService.java new file mode 100644 index 0000000..3a377d3 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagRelationService.java @@ -0,0 +1,116 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.UserTagRelationDTO; +import com.elink.esua.epdc.entity.UserTagRelationEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +public interface UserTagRelationService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-09-30 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-09-30 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserTagRelationDTO + * @author generator + * @date 2019-09-30 + */ + UserTagRelationDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-09-30 + */ + void save(UserTagRelationDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-09-30 + */ + void update(UserTagRelationDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-09-30 + */ + void delete(String[] ids); + + /** + * @param userId 用户id + * @param tagCode 用户标签code + * @return void + * @Author yinzuomei + * @Description 新增用户标签关系 + * @Date 2020/2/7 12:05 + **/ + void addUserTagRelation(String userId, String tagCode); + + /** + * 移除用户标签关系 + * + * @param userId 用户id + * @param tagCode 标签编码 + * @return void + * @author work@yujt.net.cn + * @date 2020/4/10 13:28 + */ + void removeUserTagRelation(String userId, String tagCode); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagService.java new file mode 100644 index 0000000..c62f138 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserTagService.java @@ -0,0 +1,48 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.entity.UserTagEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +public interface UserTagService extends BaseService { + + PageData page(Map params); + + List list(Map params); + + UserTagDTO get(String id); + + Result save(UserTagDTO dto); + + Result update(UserTagDTO dto); + + void delete(String[] ids); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserWxFormIdService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserWxFormIdService.java new file mode 100644 index 0000000..e3c1f72 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/UserWxFormIdService.java @@ -0,0 +1,104 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.dto.UserWxFormIdDTO; +import com.elink.esua.epdc.entity.UserWxFormIdEntity; + +import java.util.List; +import java.util.Map; + +/** + * 用户标签表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +public interface UserWxFormIdService extends BaseService { + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-09-26 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-09-26 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return UserWxFormIdDTO + * @author generator + * @date 2019-09-26 + */ + UserWxFormIdDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-09-26 + */ + void save(UserWxFormIdDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-09-26 + */ + void update(UserWxFormIdDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-09-26 + */ + void delete(String[] ids); + + /*** + * 获取最新一条formid + * @param openId + * @return com.elink.esua.epdc.dto.UserWxFormIdDTO + * @author qushutong + * @date 2019/9/26 14:03 + */ + UserWxFormIdDTO getByOpenId(String openId); +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java new file mode 100644 index 0000000..4f02ec8 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/VolunteerInfoService.java @@ -0,0 +1,207 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service; + +import com.elink.esua.epdc.commons.mybatis.service.BaseService; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; +import com.elink.esua.epdc.entity.VolunteerInfoEntity; + +import java.util.List; +import java.util.Map; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +public interface VolunteerInfoService extends BaseService { + + /** + * 根据查询条件,返回首页 志愿者信息列表,分页 + * @param params + * @return + */ + PageData volunteerInfo(Map params); + + /** + * 根据志愿者ID,查询志愿者 单条详情 + * 积分需要连user表查询 + * @param id + * @return VolunteerInfoDTO + * @author generator + * @date 2019-12-11 + */ + VolunteerInfoDTO getVolunteerDetail(String id); + + /** + * 默认分页 + * + * @param params + * @return PageData + * @author generator + * @date 2019-12-11 + */ + PageData page(Map params); + + /** + * 默认查询 + * + * @param params + * @return java.util.List + * @author generator + * @date 2019-12-11 + */ + List list(Map params); + + /** + * 单条查询 + * + * @param id + * @return VolunteerInfoDTO + * @author generator + * @date 2019-12-11 + */ + VolunteerInfoDTO get(String id); + + /** + * 默认保存 + * + * @param dto + * @return void + * @author generator + * @date 2019-12-11 + */ + void save(VolunteerInfoDTO dto); + + /** + * 默认更新 + * + * @param dto + * @return void + * @author generator + * @date 2019-12-11 + */ + void update(VolunteerInfoDTO dto); + + /** + * 批量删除 + * + * @param ids + * @return void + * @author generator + * @date 2019-12-11 + */ + void delete(String[] ids); + + + /** + * 志愿者申请,根据用户表基础信息 赋默认值 + * @param id + * @return VolunteerInfoDTO + * @author zy + * @date 2019-12-11 + */ + Result getVolunteerUserDefaultValue(String id); + + /** + * 向标签表中,查询唯一志愿者标签:tag_code = volunteer + * @param tagCode + * @return + */ + UserTagDTO volunteerTagQuery(String tagCode); + + /** + * 根据用户id 进行志愿者认证 + * @param userId + * @author wanggongfeng + * @return + * @Date 2019/12/13 16:39 + */ + Result getVolunteerCountById(String userId); + + /** + * 插入一条志愿者数据 + * @param epdcCompleteVolunteerInfoFormDTO + * @author wanggongfeng + * @return + */ + Result insertVolunteerInfo(EpdcCompleteVolunteerInfoFormDTO epdcCompleteVolunteerInfoFormDTO); + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 积分调整按钮按下,查询用户信息 + * @Date 2019/12/16 17:48 + **/ + Result getAdjustVolunteerPointsDTO(String userId); + + /** + * 获取排行榜 + * + * @return + * @author wanggongfeng + */ + Result> getRankingList(); + + /** + * @param userId 用户主键 + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据用户主键获取用户志愿者标识(0-未认证1-已认证) + * @Date 2020/2/5 16:48 + **/ + Result queryUserVolunteerFlag(String userId); + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据用户id查询志愿者信息 + * @Date 2020/2/6 12:23 + **/ + Result getVolunteerInfoDTOByUserId(String userId); + + /** + * @param dto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 志愿者审批 + * @Date 2020/2/7 10:36 + **/ + Result volunteerInfoCheck(VolunteerInfoDTO dto); + + /** + * + * 增加志愿者爱心时长 + * + * @params [formDto] + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author liuchuang + * @since 2020/2/7 18:37 + */ + Result modifyVolunteerKindnessTime(EpdcVolunteerKindnessTimeFormDTO formDto); +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyAuthenticationFailedServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyAuthenticationFailedServiceImpl.java new file mode 100644 index 0000000..f1614a0 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyAuthenticationFailedServiceImpl.java @@ -0,0 +1,167 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.dynamic.datasource.annotation.DataSource; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dao.PartyAuthenticationFailedDao; +import com.elink.esua.epdc.datasources.DataSourceNames; +import com.elink.esua.epdc.dto.PartyAuthenticationFailedDTO; +import com.elink.esua.epdc.entity.PartyAuthenticationFailedEntity; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.elink.esua.epdc.service.PartyAuthenticationFailedService; +import com.elink.esua.epdc.util.AppUserUtils; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 党员认证失败表 党员认证失败表 + * + * @author gp gupeng@elink-cn.com + * @since v1.0.0 2019-11-15 + */ +@Service +public class PartyAuthenticationFailedServiceImpl extends BaseServiceImpl implements PartyAuthenticationFailedService { + + @Override + @DataSource(value = DataSourceNames.FIRST) + public PageData page(Map params) { + + String[] paramKeys = new String[]{"realName", "identityNo", "startTime", "endTime", "mobile"}; + if (AppUserUtils.isDefaultQuery(params, paramKeys)) { + List userDtoList = Lists.newArrayList(); + return new PageData<>(userDtoList, NumConstant.ZERO); + } + + // 党员认证失败页面 查询条件:姓名, 手机号, 身份证号, 后端处理前后空格 + paramKeys = new String[]{"realName", "identityNo", "mobile"}; + params = AppUserUtils.trimParamValue(params, paramKeys); + + IPage page = this.getPage(params); + List list = baseDao.selectListDto(params); + return new PageData<>(list, page.getTotal()); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public List list(Map params) { + // 党员认证失败页面 查询条件:姓名, 手机号, 身份证号, 后端处理前后空格 + String[] paramKeys = new String[]{"realName", "identityNo", "mobile"}; + params = AppUserUtils.trimParamValue(params, paramKeys); + List list = baseDao.selectListDto(params); + + return list; + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public PartyAuthenticationFailedDTO get(String id) { + PartyAuthenticationFailedEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, PartyAuthenticationFailedDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PartyAuthenticationFailedDTO dto) { + PartyAuthenticationFailedEntity entity = ConvertUtils.sourceToTarget(dto, PartyAuthenticationFailedEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PartyAuthenticationFailedDTO dto) { + PartyAuthenticationFailedEntity entity = ConvertUtils.sourceToTarget(dto, PartyAuthenticationFailedEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void modifyOrganizationInfo(OrganizationModifyDTO dto) { + // 查询需要修改的组织机构信息 + List partyList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); + if (null != partyList && partyList.size() > 0) { + // 组织机构信息处理 + List entities = handleOrganizationInfo(dto, partyList); + // 更新事件组织机构信息 + updateBatchById(entities); + } + + // 更新网格名称 + baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId()); + } + + /** + * + * 组织机构信息处理 + * + * @params [dto, partyList] + * @return java.util.List + * @author liuchuang + * @since 2020/3/7 15:13 + */ + private List handleOrganizationInfo(OrganizationModifyDTO dto, List partyList) { + List entities = new ArrayList<>(); + for (PartyAuthenticationFailedDTO party: partyList) { + PartyAuthenticationFailedEntity entity = new PartyAuthenticationFailedEntity(); + if (StringUtils.isNotEmpty(party.getParentDeptIds()) && StringUtils.isNotEmpty(party.getParentDeptNames())) { + List parentDeptIds = Arrays.asList(party.getParentDeptIds().split(",")); + List parentDeptNames = Arrays.asList(party.getParentDeptNames().split("-")); + int index = parentDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && parentDeptNames.size() > index) { + parentDeptNames.set(index, dto.getNewDeptName()); + entity.setId(party.getId()); + entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-")); + } + } + + if (StringUtils.isNotEmpty(party.getAllDeptIds()) && StringUtils.isNotEmpty(party.getAllDeptNames())) { + List allDeptIds = Arrays.asList(party.getAllDeptIds().split(",")); + List allDeptNames = Arrays.asList(party.getAllDeptNames().split("-")); + int index = allDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && allDeptNames.size() > index) { + allDeptNames.set(index, dto.getNewDeptName()); + entity.setId(party.getId()); + entity.setAllDeptNames(StringUtils.join(allDeptNames, "-")); + } + } + + entities.add(entity); + } + + return entities; + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java new file mode 100644 index 0000000..0eff4f1 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyMembersServiceImpl.java @@ -0,0 +1,527 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.dynamic.datasource.annotation.DataSource; +import com.elink.esua.epdc.async.PartyTask; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.Constant; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.ModuleUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.config.StreamUtils; +import com.elink.esua.epdc.constant.UserFieldConsant; +import com.elink.esua.epdc.dao.PartyMembersDao; +import com.elink.esua.epdc.datasources.DataSourceNames; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.PartyMembersDTO; +import com.elink.esua.epdc.dto.PartyTagRelationDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcPartyErroyResultDTO; +import com.elink.esua.epdc.entity.PartyMembersEntity; +import com.elink.esua.epdc.entity.UserEntity; +import com.elink.esua.epdc.enums.PartyMemberRegFlagEnum; +import com.elink.esua.epdc.excel.PartyMembersExcel; +import com.elink.esua.epdc.feign.AdminFeignClient; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.elink.esua.epdc.service.PartyMembersService; +import com.elink.esua.epdc.service.PartyTagRelationService; +import com.elink.esua.epdc.util.AppUserUtils; +import com.google.common.collect.Lists; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.util.*; + +/** + * 党员表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Service +public class PartyMembersServiceImpl extends BaseServiceImpl implements PartyMembersService { + + @Autowired + private PartyTagRelationService partyTagRelationService; + + @Autowired + private AdminFeignClient adminFeignClient; + + @Override + @DataSource(value = DataSourceNames.FIRST) + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, PartyMembersDTO.class); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result> pageDIY(Map params) { + return new Result().ok(pagePartyMember(params, YesOrNoEnum.YES.value())); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result> hasAuthenticationPartyPage(Map params) { + return new Result().ok(pagePartyMember(params, YesOrNoEnum.NO.value())); + } + + /** + * 党员库和已认证党员列表 + * + * @param params 分页参数 + * @param allPartyMemberFlag 是否是党员库查询 + * @return com.elink.esua.epdc.commons.tools.page.PageData + * @author work@yujt.net.cn + * @date 2020/2/24 16:41 + */ + private PageData pagePartyMember(Map params, String allPartyMemberFlag) { + + List list = Lists.newArrayList(); + // 是否是进入页面时的默认查询 + if (isDefaultQuery(params)) { + return new PageData<>(list, NumConstant.ZERO); + } + + params = trimParamValue(params); + IPage page = getPage(params); + // 党员库 + if (YesOrNoEnum.YES.value().equals(allPartyMemberFlag)) { + list = baseDao.pageDIY(params); + } else { + // 已认证党员 + list = baseDao.hasAuthenticationPartyPage(params); + } + return new PageData<>(list, page.getTotal()); + } + + /** + * 判断是否是进入页面时的默认查询 + * + * @param params 查询参数 + * @return boolean + * @author work@yujt.net.cn + * @date 2020/2/24 16:42 + */ + private boolean isDefaultQuery(Map params) { + String[] paramKeys = new String[]{"realName", "mobile", "streetId", "communityId", "gridId", "identityNo", "registFlag", "postId", "startTime", "endTime"}; + return AppUserUtils.isDefaultQuery(params, paramKeys); + } + + /** + * 将必要的查询参数进行trim + * + * @param params 查询参数 + * @return java.util.Map + * @author work@yujt.net.cn + * @date 2020/2/24 16:43 + */ + private Map trimParamValue(Map params) { + String[] paramKeys = new String[]{"realName", "mobile", "identityNo"}; + return AppUserUtils.trimParamValue(params, paramKeys); + } + + @Override + public List list(Map params) { + return baseDao.pageDIY(params); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public PartyMembersDTO get(String id) { + PartyMembersDTO partyMembersDTO = baseDao.selectByIdNew(id); + if (null != partyMembersDTO && partyMembersDTO.getDeptStrIds() != null) { + String depts[] = partyMembersDTO.getDeptStrIds().split(","); + partyMembersDTO.setAllDeptIds(depts); + } + return partyMembersDTO; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PartyMembersDTO dto) { + PartyMembersEntity entity = new PartyMembersEntity(); + entity.setCadreFlag(dto.getCadreFlag()); + entity.setRealName(dto.getRealName()); + entity.setMobile(dto.getMobile()); + entity.setIdentityNo(dto.getIdentityNo()); + Result parentResult = null; + if (dto.getAllDeptIds() != null && dto.getAllDeptIds().length > 1) { + parentResult = adminFeignClient.getParentAndAllDept(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1]); + } + if (parentResult != null) { + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + entity.setGridId(Long.valueOf(dto.getAllDeptIds()[dto.getAllDeptIds().length - 1])); + String[] split = deptDTO.getAllDeptNames().split("-"); + entity.setGridName(split[split.length - 1]); + } + } + insert(entity); + + JSONArray jsonArray = JSON.parseArray(dto.getTagIds()); + for (int i = 0; i < jsonArray.size(); i++) { + String tagId = jsonArray.getString(i); + PartyTagRelationDTO partyTagRelationDTO = new PartyTagRelationDTO(); + partyTagRelationDTO.setPartyId(entity.getId()); + partyTagRelationDTO.setTagId(tagId); + partyTagRelationService.save(partyTagRelationDTO); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PartyMembersDTO dto) { + PartyMembersEntity entity = ConvertUtils.sourceToTarget(dto, PartyMembersEntity.class); + String[] allDeptIds = dto.getAllDeptIds(); + //所属网格不填写的时候 + if (allDeptIds != null && allDeptIds.length != 0) { + Result parentResult = adminFeignClient.getParentAndAllDept(String.valueOf(allDeptIds[allDeptIds.length - 1])); + if (!parentResult.success() || parentResult.getData() == null) { + throw new RenException("获取部门信息失败"); + } else { + ParentAndAllDeptDTO deptDTO = parentResult.getData(); + entity.setAllDeptIds(deptDTO.getAllDeptIds()); + entity.setAllDeptNames(deptDTO.getAllDeptNames()); + entity.setParentDeptIds(deptDTO.getParentDeptIds()); + entity.setParentDeptNames(deptDTO.getParentDeptNames()); + } + } + updateById(entity); + + partyTagRelationService.deleteByPartyId(entity.getId()); + + JSONArray jsonArray = JSON.parseArray(dto.getTagIds()); + for (int i = 0; i < jsonArray.size(); i++) { + String tagId = jsonArray.getString(i); + PartyTagRelationDTO partyTagRelationDTO = new PartyTagRelationDTO(); + partyTagRelationDTO.setPartyId(entity.getId()); + partyTagRelationDTO.setTagId(tagId); + partyTagRelationService.save(partyTagRelationDTO); + } + + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result delete(String[] ids) { + //逻辑删除 + //logicDelete(ids, PartyMembersEntity.class); + // 删除之前校验此党员是否被认证 + PartyMembersEntity partyMembersEntity = selectById(ids[0]); + Integer integer = checkCertificationByIdentityNo(partyMembersEntity.getIdentityNo()); + if (integer != 0) { + throw new RenException("此党员已被认证不允许删除"); + } else { + //物理删除 + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + return new Result(); + } + + public void saveList(List partyList) { + List partyMembersEntityList = ConvertUtils.sourceToTarget(partyList, PartyMembersEntity.class); + for (int i = 0; i < partyMembersEntityList.size(); i++) { + PartyMembersEntity partyMembersEntity = partyMembersEntityList.get(i); + partyMembersEntity.setCadreFlag(YesOrNoEnum.NO.value()); + partyMembersEntity.setRegistFlag(PartyMemberRegFlagEnum.NO.getValue()); + partyMembersEntity.setGridName(null); + } + insertBatch(partyMembersEntityList); + } + + + @Override + public Result insertPartyList(MultipartFile file) { + File f = StreamUtils.conversionFile(file); + ImportParams importParams = new ImportParams(); + try { + List partyMembersEntityList = baseDao.selectList(new QueryWrapper()); + List partyExportList = ExcelImportUtil.importExcel(f, PartyMembersExcel.class, importParams); + // 去空格 + List partyList = new ArrayList<>(); + for (PartyMembersExcel partyItem : partyExportList) { + if (StringUtils.isNotBlank(partyItem.getIdentityNo())) { + partyItem.setIdentityNo(ModuleUtils.replaceIllegalCharacter(partyItem.getIdentityNo())); + } + if (StringUtils.isNotBlank(partyItem.getRealName())) { + partyItem.setRealName(ModuleUtils.replaceIllegalCharacter(partyItem.getRealName())); + } + partyList.add(partyItem); + } + // 校验数据 + List epdcPartyErroyResultDtos = this.checkExcel(partyList, partyMembersEntityList); + if (epdcPartyErroyResultDtos.size() > 0) { + return new Result().ok(epdcPartyErroyResultDtos); + } + saveList(partyList); + /*for (PartyMembersExcel partyMembers : partyList) { + System.out.println("从Excel导入数据到数据库的详细为 :{}" + JSON.toJSONString(partyMembers)); + } + System.out.println("从Excel导入数据一共 {} 行 " + partyList.size());*/ + } catch (Exception e1) { + throw new RuntimeException("导入失败:{}" + e1.getMessage()); + } + return new Result(); + } + + + @Override + public int countPartyMemberByIdNoAndRealName(String identityNo, String realName) { + QueryWrapper partyWrapper = new QueryWrapper<>(); + partyWrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo) + .eq(UserFieldConsant.REAL_NAME, realName); + return baseDao.selectCount(partyWrapper); + } + + /*** + * 校验excel表格数据 + * @param partyList + * @param partyMembersEntityList + * @return java.lang.String + * @author qushutong + * @date 2019/11/4 10:25 + */ + private List checkExcel(List partyList, List partyMembersEntityList) { + // 不匹配信息 + List errorLineinfoList = new ArrayList<>(); + EpdcPartyErroyResultDTO errorLineinfoDto; + for (int i = 0; i < partyList.size(); i++) { + PartyMembersExcel partyMembersExcel = partyList.get(i); + String realName = partyMembersExcel.getRealName(); + String mobile = partyMembersExcel.getMobile(); + String identityNo = partyMembersExcel.getIdentityNo(); + if (StringUtils.isBlank(realName)) { + errorLineinfoDto = new EpdcPartyErroyResultDTO(); + errorLineinfoDto.setErroLine((i + 2) + ""); + errorLineinfoDto.setErrorInfo("姓名为空"); + errorLineinfoList.add(errorLineinfoDto); + } + if (StringUtils.isBlank(identityNo)) { + errorLineinfoDto = new EpdcPartyErroyResultDTO(); + errorLineinfoDto.setErroLine((i + 2) + ""); + errorLineinfoDto.setErrorInfo("身份证号为空"); + errorLineinfoList.add(errorLineinfoDto); + } + for (PartyMembersEntity item : partyMembersEntityList) { + if (StringUtils.isNotBlank(item.getMobile()) && item.getMobile().equals(mobile)) { + errorLineinfoDto = new EpdcPartyErroyResultDTO(); + errorLineinfoDto.setErroLine((i + 2) + ""); + errorLineinfoDto.setErrorInfo("手机号已存在"); + errorLineinfoList.add(errorLineinfoDto); + } + if (item.getIdentityNo().equals(identityNo)) { + errorLineinfoDto = new EpdcPartyErroyResultDTO(); + errorLineinfoDto.setErroLine((i + 2) + ""); + errorLineinfoDto.setErrorInfo("身份证号已存在"); + errorLineinfoList.add(errorLineinfoDto); + } + } + } + return errorLineinfoList; + } + + @Override + public List exportMoudle() { + List partyMembersDTOList = new ArrayList<>(); + PartyMembersDTO partyMembersDto = new PartyMembersDTO(); + partyMembersDto.setRealName("王小花"); + partyMembersDto.setMobile("13000000000"); + partyMembersDto.setIdentityNo("370681199903038473"); + partyMembersDto.setPartyOrganization("辽宁路党工委****"); + PartyMembersDTO partyMembersDtoTwo = new PartyMembersDTO(); + partyMembersDtoTwo.setRealName("徐小明"); + partyMembersDtoTwo.setMobile("13000000001"); + partyMembersDtoTwo.setIdentityNo("37068119499030542"); + PartyMembersDTO partyMembersDtoThrid = new PartyMembersDTO(); + partyMembersDtoThrid.setRealName("王红"); + partyMembersDtoThrid.setMobile(""); + partyMembersDtoThrid.setIdentityNo("37068119499032541"); + partyMembersDTOList.add(partyMembersDto); + partyMembersDTOList.add(partyMembersDtoTwo); + partyMembersDTOList.add(partyMembersDtoThrid); + return partyMembersDTOList; + } + + + @Override + @DataSource(value = DataSourceNames.FIRST) + public List exportHasMoudle(Map params) { + + params = trimParamValue(params); + + return baseDao.hasAuthenticationPartyPage(params); + } + + + @Override + public Result upDataInfo(List userEntities) { + List partyMembersEntityList = new ArrayList<>(); + List savepartyMembersEntityList = new ArrayList<>(); + QueryWrapper wrapper; + for (UserEntity userItem : userEntities) { + wrapper = new QueryWrapper(); + wrapper.eq("IDENTITY_NO", userItem.getIdentityNo().trim()); + wrapper.eq("REAL_NAME", userItem.getRealName().trim()); + PartyMembersEntity partyMembersEntity; + partyMembersEntity = baseDao.selectOne(wrapper); + if (partyMembersEntity == null) { + partyMembersEntity = new PartyMembersEntity(); + partyMembersEntity.setUpdatedBy("0"); + partyMembersEntity.setCreatedBy("0"); + partyMembersEntity.setCreatedTime(new Date()); + partyMembersEntity.setUpdatedTime(new Date()); + partyMembersEntity.setDelFlag("0"); + } + partyMembersEntity.setCadreFlag("0"); + partyMembersEntity.setRealName(userItem.getRealName()); + partyMembersEntity.setIdentityNo(userItem.getIdentityNo()); + partyMembersEntity.setMobile(userItem.getMobile()); + partyMembersEntity.setGridId(userItem.getDeptId()); + String[] split = userItem.getAllDeptNames().split("-"); + partyMembersEntity.setGridName(split[split.length - 1]); + partyMembersEntity.setAllDeptIds(userItem.getAllDeptIds()); + partyMembersEntity.setAllDeptNames(userItem.getAllDeptNames()); + partyMembersEntity.setParentDeptIds(userItem.getParentDeptIds()); + partyMembersEntity.setParentDeptNames(userItem.getParentDeptNames()); + partyMembersEntity.setDeptId(userItem.getDeptId()); + partyMembersEntity.setRegistTime(userItem.getRegisterTime()); + if (partyMembersEntity.getId() != null) { + partyMembersEntityList.add(partyMembersEntity); + } else { + // 党员库里不存在 直接新增 + savepartyMembersEntityList.add(partyMembersEntity); + } + } + if (partyMembersEntityList.size() > 0) { + updateBatchById(partyMembersEntityList); + } + if (savepartyMembersEntityList.size() > 0) { + insertBatch(savepartyMembersEntityList); + } + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void modifyOrganizationInfo(OrganizationModifyDTO dto) { + // 查询需要修改的组织机构信息 + List partyList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); + if (null != partyList && partyList.size() > 0) { + // 组织机构信息处理 + List entities = handleOrganizationInfo(dto, partyList); + // 更新事件组织机构信息 + updateBatchById(entities); + } + + // 更新网格名称 + baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId()); + } + + + /** + * 组织机构信息处理 + * + * @return java.util.List + * @params [dto, partyList] + * @author liuchuang + * @since 2020/3/7 15:17 + */ + private List handleOrganizationInfo(OrganizationModifyDTO dto, List partyList) { + List entities = new ArrayList<>(); + for (PartyMembersDTO party : partyList) { + PartyMembersEntity entity = new PartyMembersEntity(); + if (StringUtils.isNotEmpty(party.getParentDeptIds()) && StringUtils.isNotEmpty(party.getParentDeptNames())) { + List parentDeptIds = Arrays.asList(party.getParentDeptIds().split(",")); + List parentDeptNames = Arrays.asList(party.getParentDeptNames().split("-")); + int index = parentDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && parentDeptNames.size() > index) { + parentDeptNames.set(index, dto.getNewDeptName()); + entity.setId(party.getId()); + entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-")); + } + } + + if (StringUtils.isNotEmpty(party.getAllDeptIdsStr()) && StringUtils.isNotEmpty(party.getAllDeptNames())) { + List allDeptIds = Arrays.asList(party.getAllDeptIdsStr().split(",")); + List allDeptNames = Arrays.asList(party.getAllDeptNames().split("-")); + int index = allDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && allDeptNames.size() > index) { + allDeptNames.set(index, dto.getNewDeptName()); + entity.setId(party.getId()); + entity.setAllDeptNames(StringUtils.join(allDeptNames, "-")); + } + } + + entities.add(entity); + } + + return entities; + } + + @Override + public Result> optimizeHasAuthenticationPartyPage(Map params) { + IPage page = getPage(params); + List userIds = baseDao.optimizeHasAuthenticationPartyPage(params); + if (userIds.size() > 0) { + List partyMembersDTOList = baseDao.optimizeHasAuthenticationPartyPageInfo(userIds); + return new Result>().ok(new PageData<>(partyMembersDTOList, page.getTotal())); + } else { + return new Result>().ok(new PageData<>(new ArrayList<>(), NumConstant.ZERO)); + } + + } + + @Override + public Integer checkCertificationByIdentityNo(String IdentityNo) { + return baseDao.selectCountByIdentity(IdentityNo); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyTagRelationServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyTagRelationServiceImpl.java new file mode 100644 index 0000000..7f18473 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/PartyTagRelationServiceImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dao.PartyTagRelationDao; +import com.elink.esua.epdc.dto.PartyTagRelationDTO; +import com.elink.esua.epdc.entity.PartyTagRelationEntity; +import com.elink.esua.epdc.redis.PartyTagRelationRedis; +import com.elink.esua.epdc.service.PartyTagRelationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 党员标签关系表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-04 + */ +@Service +public class PartyTagRelationServiceImpl extends BaseServiceImpl implements PartyTagRelationService { + @Autowired + private PartyTagRelationRedis partyTagRelationRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + + return getPageData(page, PartyTagRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, PartyTagRelationDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + + return wrapper; + } + + @Override + public PartyTagRelationDTO get(String id) { + PartyTagRelationEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, PartyTagRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(PartyTagRelationDTO dto) { + PartyTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, PartyTagRelationEntity.class); + + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(PartyTagRelationDTO dto) { + PartyTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, PartyTagRelationEntity.class); + + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + //逻辑删除 + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteByPartyId(String partyId) { + baseDao.deleteByPartyId(partyId); + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserAuthenticateHistoryServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserAuthenticateHistoryServiceImpl.java new file mode 100644 index 0000000..0a6319d --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserAuthenticateHistoryServiceImpl.java @@ -0,0 +1,132 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.dynamic.datasource.annotation.DataSource; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dao.UserAuthenticateHistoryDao; +import com.elink.esua.epdc.datasources.DataSourceNames; +import com.elink.esua.epdc.dto.UserAuthenticateHistoryDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAuthenticateHistoryFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAuthenticateHistoryResultDTO; +import com.elink.esua.epdc.entity.UserAuthenticateHistoryEntity; +import com.elink.esua.epdc.service.UserAuthenticateHistoryService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户认证历史表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-11-21 + */ +@Service +public class UserAuthenticateHistoryServiceImpl extends BaseServiceImpl implements UserAuthenticateHistoryService { + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserAuthenticateHistoryDTO.class); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserAuthenticateHistoryDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public UserAuthenticateHistoryDTO get(String id) { + UserAuthenticateHistoryEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserAuthenticateHistoryDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserAuthenticateHistoryDTO dto) { + UserAuthenticateHistoryEntity entity = ConvertUtils.sourceToTarget(dto, UserAuthenticateHistoryEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserAuthenticateHistoryDTO dto) { + UserAuthenticateHistoryEntity entity = ConvertUtils.sourceToTarget(dto, UserAuthenticateHistoryEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @param userId 用户id + * @return java.util.List + * @Author yinzuomei + * @Description 根据用户id查询认证历史记录 + * @Date 2019/11/21 14:01 + **/ + @Override + @DataSource(value = DataSourceNames.FIRST) + public List listUserAuthenticateHistory(String userId) { + return baseDao.selectListUserAuthenticateHistory(userId); + } + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 用户认证审核历史 + * @Date 2019/11/22 13:17 + **/ + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result> authenticateHistory(EpdcAuthenticateHistoryFormDTO formDTO) { + return new Result>().ok(baseDao.selectListAuthenticateHistory(formDTO.getUserId())); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java new file mode 100644 index 0000000..fb301bb --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserCarInfoServiceImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.dao.UserCarInfoDao; +import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO; +import com.elink.esua.epdc.entity.UserCarInfoEntity; +import com.elink.esua.epdc.redis.UserCarInfoRedis; +import com.elink.esua.epdc.service.UserCarInfoService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户车辆信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-02-15 + */ +@Service +public class UserCarInfoServiceImpl extends BaseServiceImpl implements UserCarInfoService { + + @Autowired + private UserCarInfoRedis userCarInfoRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserCarInfoDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserCarInfoDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public UserCarInfoDTO get(String id) { + UserCarInfoEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserCarInfoDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserCarInfoDTO dto) { + UserCarInfoEntity entity = ConvertUtils.sourceToTarget(dto, UserCarInfoEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserCarInfoDTO dto) { + UserCarInfoEntity entity = ConvertUtils.sourceToTarget(dto, UserCarInfoEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public UserCarInfoDTO selectOneByCarNumber(String carNumber) { + QueryWrapper wrapper = new QueryWrapper(); + wrapper.eq("CAR_NUMBER",carNumber); + UserCarInfoEntity userCarInfoEntity = baseDao.selectOne(wrapper); + return ConvertUtils.sourceToTarget(userCarInfoEntity,UserCarInfoDTO.class); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridInvitationCodeServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridInvitationCodeServiceImpl.java new file mode 100644 index 0000000..9a83845 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridInvitationCodeServiceImpl.java @@ -0,0 +1,125 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dao.UserGridInvitationCodeDao; +import com.elink.esua.epdc.dto.UserGridInvitationCodeDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserGridInvitationCodeFormDTO; +import com.elink.esua.epdc.entity.UserGridInvitationCodeEntity; +import com.elink.esua.epdc.redis.UserGridInvitationCodeRedis; +import com.elink.esua.epdc.service.UserGridInvitationCodeService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户网格邀请码表 用户网格邀请码表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2020-03-01 + */ +@Service +public class UserGridInvitationCodeServiceImpl extends BaseServiceImpl implements UserGridInvitationCodeService { + + @Autowired + private UserGridInvitationCodeRedis userGridInvitationCodeRedis; + /** + * 小程序首页 + */ + private static String MA_FRONT_PAGE_URL = "pages/index/index"; + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserGridInvitationCodeDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserGridInvitationCodeDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public UserGridInvitationCodeDTO get(String id) { + UserGridInvitationCodeEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserGridInvitationCodeDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserGridInvitationCodeDTO dto) { + UserGridInvitationCodeEntity entity = ConvertUtils.sourceToTarget(dto, UserGridInvitationCodeEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserGridInvitationCodeDTO dto) { + UserGridInvitationCodeEntity entity = ConvertUtils.sourceToTarget(dto, UserGridInvitationCodeEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result getUserGridInvitationCodeDTO(EpdcUserGridInvitationCodeFormDTO formDto) { + //1、先查本地是否生成过 + UserGridInvitationCodeDTO userGridInvitationCodeDTO=baseDao.selectUserGridInvitationCodeDTO(formDto); + if(null!=userGridInvitationCodeDTO){ + return new Result().ok(userGridInvitationCodeDTO); + } + //2、没有,则生成主键 + UserGridInvitationCodeEntity entity = new UserGridInvitationCodeEntity(); + entity.setGridId(formDto.getGridId()); + entity.setInviteUserId(formDto.getInviteUserId()); + insert(entity); + UserGridInvitationCodeDTO dto = ConvertUtils.sourceToTarget(entity, UserGridInvitationCodeDTO.class); + return new Result().ok(dto); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridRelationServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridRelationServiceImpl.java new file mode 100644 index 0000000..76a9763 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserGridRelationServiceImpl.java @@ -0,0 +1,276 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.redis.RedisKeys; +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.constant.UserFieldConsant; +import com.elink.esua.epdc.dao.UserGridRelationDao; +import com.elink.esua.epdc.dto.UserGridRelationDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcAppRemoveGridFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcLeaderSwitchGridFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcUserGridResultDTO; +import com.elink.esua.epdc.entity.UserGridRelationEntity; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.elink.esua.epdc.service.UserGridRelationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +/** + * 网格长与网格关系表 + * + * @author work@yujt.net.cn + * @since v1.0.0 2019-10-23 + */ +@Service +public class UserGridRelationServiceImpl extends BaseServiceImpl implements UserGridRelationService { + @Autowired + private RedisUtils redisUtils; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserGridRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserGridRelationDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public UserGridRelationDTO get(String id) { + UserGridRelationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserGridRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserGridRelationDTO dto) { + UserGridRelationEntity entity = ConvertUtils.sourceToTarget(dto, UserGridRelationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserGridRelationDTO dto) { + UserGridRelationEntity entity = ConvertUtils.sourceToTarget(dto, UserGridRelationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public Result userSwitchGrid(EpdcLeaderSwitchGridFormDTO switchGridDto) { + + UpdateWrapper wrapper = new UpdateWrapper<>(); + wrapper.eq(UserFieldConsant.USER_ID, switchGridDto.getAppUserId()) + .eq(FieldConstant.GRID_ID, switchGridDto.getGridId()); + + UserGridRelationEntity entity = new UserGridRelationEntity(); + entity.setSwitchedTime(new Date()); + boolean update = this.update(entity, wrapper); + + if (!update) { + return new Result().error("匹配用户网格失败"); + } + + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(UserFieldConsant.USER_ID, switchGridDto.getAppUserId()) + .eq(FieldConstant.GRID_ID, switchGridDto.getGridId()); + UserGridRelationEntity gridRelationEntity = this.baseDao.selectOne(queryWrapper); + + UserGridRelationDTO gridRelationDto = ConvertUtils.sourceToTarget(gridRelationEntity, UserGridRelationDTO.class); + return new Result().ok(gridRelationDto); + } + + @Override + public Result> listUserGridForApi(String userId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(UserFieldConsant.USER_ID, userId) + .orderByDesc(UserFieldConsant.SWITCHED_TIME); + List entityList = this.baseDao.selectList(queryWrapper); + for (UserGridRelationEntity userGridRelationEntity : entityList) { + String allDeptNames = userGridRelationEntity.getAllDeptNames(); + if (StringUtils.isNotBlank(allDeptNames)) { + String gridName = allDeptNames.substring(allDeptNames.lastIndexOf("-", allDeptNames.lastIndexOf("-") - 1) + 1); + userGridRelationEntity.setGrid(gridName); + } + } + List dtoList = ConvertUtils.sourceToTarget(entityList, EpdcUserGridResultDTO.class); + return new Result>().ok(dtoList); + } + + @Override + public UserGridRelationDTO getUserRelationInfo(String userId, Long gridId) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + queryWrapper.eq(UserFieldConsant.USER_ID, userId) + .eq(FieldConstant.GRID_ID, gridId); + UserGridRelationEntity gridRelationEntity = this.baseDao.selectOne(queryWrapper); + return ConvertUtils.sourceToTarget(gridRelationEntity, UserGridRelationDTO.class); + } + + @Override + public List listUserGrid(String userId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.USER_ID, userId) + .orderByDesc(UserFieldConsant.SWITCHED_TIME); + List gridRelationEntities = this.baseDao.selectList(wrapper); + return ConvertUtils.sourceToTarget(gridRelationEntities, UserGridRelationDTO.class); + } + + @Override + public int delete(String userId, Long gridId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.USER_ID, userId) + .eq(FieldConstant.GRID_ID, gridId); + return this.baseDao.delete(wrapper); + } + + /** + * @param id 主键 + * @return void + * @Author yinzuomei + * @Description 解绑 + * @Date 2019/11/21 18:06 + **/ + @Override + @Transactional(rollbackFor = Exception.class) + public void unbindGridHandle(String id) { + UserGridRelationEntity userGridRelationEntity = this.baseDao.selectById(id); + // 修改删除标志 + this.delete(userGridRelationEntity.getUserId(), userGridRelationEntity.getGridId()); + String key = RedisKeys.getCpUserKey(userGridRelationEntity.getUserId()); + Map map = redisUtils.hGetAll(key); + Long currentGridId = userGridRelationEntity.getGridId(); + if (map.containsKey(FieldConstant.GRID_ID_HUMP) && currentGridId.toString().equals(map.get(FieldConstant.GRID_ID_HUMP).toString())) { + redisUtils.delete(RedisKeys.getCpUserKey(userGridRelationEntity.getUserId())); + } + } + + /** + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 解除与网格的关联 + * @Date 2019/11/22 14:31 + **/ + @Override + public Result removeGrid(EpdcAppRemoveGridFormDTO formDto) { + this.delete(formDto.getUserId(), Long.valueOf(formDto.getGridId())); + String key = RedisKeys.getCpUserKey(formDto.getUserId()); + Map map = redisUtils.hGetAll(key); + if (map.containsKey(FieldConstant.GRID_ID_HUMP) && formDto.getGridId().equals(map.get(FieldConstant.GRID_ID_HUMP).toString())) { + redisUtils.delete(RedisKeys.getCpUserKey(formDto.getUserId())); + } + return new Result(); + } + + @Override + public UserGridRelationDTO getUserLastSwitchGird(String userId) { + return baseDao.selectOneOfGird(userId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void modifyOrganizationInfo(OrganizationModifyDTO dto) { + // 查询需要修改的组织机构信息 + List gridList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); + if (null != gridList && gridList.size() > 0) { + // 组织机构信息处理 + List entities = handleOrganizationInfo(dto, gridList); + // 更新事件组织机构信息 + updateBatchById(entities); + } + + // 更新网格名称 + baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId()); + } + + /** + * + * 组织机构信息处理 + * + * @params [dto, gridList] + * @return java.util.List + * @author liuchuang + * @since 2020/3/7 15:25 + */ + private List handleOrganizationInfo(OrganizationModifyDTO dto, List gridList) { + List entities = new ArrayList<>(); + for (UserGridRelationDTO grid: gridList) { + UserGridRelationEntity entity = new UserGridRelationEntity(); + if (StringUtils.isNotEmpty(grid.getParentDeptIds()) && StringUtils.isNotEmpty(grid.getParentDeptNames())) { + List parentDeptIds = Arrays.asList(grid.getParentDeptIds().split(",")); + List parentDeptNames = Arrays.asList(grid.getParentDeptNames().split("-")); + int index = parentDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && parentDeptNames.size() > index) { + parentDeptNames.set(index, dto.getNewDeptName()); + entity.setId(grid.getId()); + entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-")); + } + } + + if (StringUtils.isNotEmpty(grid.getAllDeptIds()) && StringUtils.isNotEmpty(grid.getAllDeptNames())) { + List allDeptIds = Arrays.asList(grid.getAllDeptIds().split(",")); + List allDeptNames = Arrays.asList(grid.getAllDeptNames().split("-")); + int index = allDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && allDeptNames.size() > index) { + allDeptNames.set(index, dto.getNewDeptName()); + entity.setId(grid.getId()); + entity.setAllDeptNames(StringUtils.join(allDeptNames, "-")); + } + } + + entities.add(entity); + } + + return entities; + } +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserInvitationRecordServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserInvitationRecordServiceImpl.java new file mode 100644 index 0000000..9902181 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserInvitationRecordServiceImpl.java @@ -0,0 +1,118 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.dao.UserInvitationRecordDao; +import com.elink.esua.epdc.dto.UserInvitationRecordDTO; +import com.elink.esua.epdc.dto.epdc.result.UserInvitationRecordResultDTO; +import com.elink.esua.epdc.entity.UserInvitationRecordEntity; +import com.elink.esua.epdc.redis.UserInvitationRecordRedis; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.elink.esua.epdc.service.UserInvitationRecordService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户邀请记录表 用户邀请记录表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-02 + */ +@Service +public class UserInvitationRecordServiceImpl extends BaseServiceImpl implements UserInvitationRecordService { + + @Autowired + private UserInvitationRecordRedis userInvitationRecordRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserInvitationRecordDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserInvitationRecordDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public UserInvitationRecordDTO get(String id) { + UserInvitationRecordEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserInvitationRecordDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserInvitationRecordDTO dto) { + UserInvitationRecordEntity entity = ConvertUtils.sourceToTarget(dto, UserInvitationRecordEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserInvitationRecordDTO dto) { + UserInvitationRecordEntity entity = ConvertUtils.sourceToTarget(dto, UserInvitationRecordEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + @Override + public List invitationRecord(Long userId) { + return baseDao.invitationRecord(userId); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void modifyOrganizationInfo(OrganizationModifyDTO dto) { + // 更新网格名称 + baseDao.updateGridByDeptId(dto.getNewDeptName(), dto.getDeptId()); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java new file mode 100644 index 0000000..fdf45f9 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserServiceImpl.java @@ -0,0 +1,1656 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import cn.afterturn.easypoi.excel.ExcelImportUtil; +import cn.afterturn.easypoi.excel.entity.ImportParams; +import cn.hutool.core.collection.CollUtil; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.dynamic.datasource.annotation.DataSource; +import com.elink.esua.epdc.commons.mybatis.enums.EpdcDelFlagEnum; +import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.mybatis.utils.DeptEntityUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +import com.elink.esua.epdc.commons.tools.constant.StrConstant; +import com.elink.esua.epdc.commons.tools.enums.UserAuthTypeEnum; +import com.elink.esua.epdc.commons.tools.enums.UserSexEnum; +import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; +import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; +import com.elink.esua.epdc.commons.tools.enums.pointsenum.PointsOperationEnum; +import com.elink.esua.epdc.commons.tools.exception.RenException; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.*; +import com.elink.esua.epdc.config.StreamUtils; +import com.elink.esua.epdc.constant.AuthenticatedConsant; +import com.elink.esua.epdc.constant.UserFieldConsant; +import com.elink.esua.epdc.dao.PartyAuthenticationFailedDao; +import com.elink.esua.epdc.dao.PartyMembersDao; +import com.elink.esua.epdc.dao.UserAuthenticateHistoryDao; +import com.elink.esua.epdc.dao.UserDao; +import com.elink.esua.epdc.datasources.DataSourceNames; +import com.elink.esua.epdc.dto.*; +import com.elink.esua.epdc.dto.epdc.UserCarInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcUserRegistFormDTO; +import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.commons.tools.security.user.SecurityUser; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.constant.AuthenticatedConsant; +import com.elink.esua.epdc.constant.UserFieldConsant; +import com.elink.esua.epdc.dao.*; +import com.elink.esua.epdc.dto.CachingUserInfoDTO; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.UserDTO; +import com.elink.esua.epdc.dto.UserGridRelationDTO; +import com.elink.esua.epdc.dto.epdc.EpdcCompleteAppUserDTO; +import com.elink.esua.epdc.dto.epdc.EpdcGridLeaderRegisterDTO; +import com.elink.esua.epdc.dto.epdc.form.*; +import com.elink.esua.epdc.dto.epdc.result.*; +import com.elink.esua.epdc.entity.*; +import com.elink.esua.epdc.enums.AppUserAuditStateEnum; +import com.elink.esua.epdc.enums.AppUserStatesEnum; +import com.elink.esua.epdc.enums.PartyMemberRegFlagEnum; +import com.elink.esua.epdc.excel.UserExcel; +import com.elink.esua.epdc.exception.UserModuleErrorCode; +import com.elink.esua.epdc.feign.AdminFeignClient; +import com.elink.esua.epdc.rocketmq.dto.OrganizationModifyDTO; +import com.elink.esua.epdc.service.*; +import com.elink.esua.epdc.util.AppUserUtils; +import com.google.common.collect.Lists; +import com.elink.esua.epdc.exception.UserModuleErrorCode; +import com.elink.esua.epdc.feign.AdminFeignClient; +import com.elink.esua.epdc.service.PartyMembersService; +import com.elink.esua.epdc.service.UserGridRelationService; +import com.elink.esua.epdc.service.UserInvitationRecordService; +import com.elink.esua.epdc.service.UserService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.web.multipart.MultipartFile; + +import java.io.File; +import java.text.ParseException; +import java.text.SimpleDateFormat; +import java.util.*; +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 用户信息表 + * + * @author qu qu@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Service +public class UserServiceImpl extends BaseServiceImpl implements UserService { + + @Autowired + private UserCarInfoService userCarInfoService; + + @Autowired + private PartyMembersDao partyMembersDao; + + @Autowired + private UserGridRelationService userGridRelationService; + + @Autowired + private UserInvitationRecordService userInvitationRecordService; + + @Autowired + private PartyMembersService partyMembersService; + + @Autowired + private UserAuthenticateHistoryDao userAuthenticateHistoryDao; + + @Autowired + private PartyAuthenticationFailedDao partyAuthenticationFailedDao; + + @Autowired + private UserTagRelationService userTagRelationService; + + @Autowired + private AdminFeignClient adminFeignClient; + + @Override + @DataSource(value = DataSourceNames.FIRST) + public PageData page(Map params) { + String[] paramKeys = new String[]{"streetId", "communityId", "gridId", "realName", "identityNo", "startTime", "endTime", "nickname", "mobile"}; + if (AppUserUtils.isDefaultQuery(params, paramKeys)) { + List userDtoList = Lists.newArrayList(); + return new PageData<>(userDtoList, NumConstant.ZERO); + } + this.verifyParams(params); + // 查询当前用户所具有的的数据权限 + IPage iPage = this.getPage(params); + List userDtoList = this.baseDao.selectListUserDto(params); + return new PageData<>(userDtoList, iPage.getTotal()); + } + + @Override + public PageData waitPartyPage(Map params) { + this.verifyParams(params); + IPage iPage = this.getPage(params); + List userDtoList = this.baseDao.selectListOfWaitPartyUserDto(params); + return new PageData<>(userDtoList, iPage.getTotal()); + } + + @Override + public List list(Map params) { + this.verifyParams(params); + String auditState = (String) params.get("state"); + if (AppUserStatesEnum.STATE_REGISTERED.value().equals(auditState)) { + return this.baseDao.selectListUserDto(params); + } else { + return this.baseDao.selectAuthenticatedListUserDto(params); + } + } + + @Override + public List listOfWaitParty(Map params) { + this.verifyParams(params); + return this.baseDao.selectListOfWaitPartyUserDto(params); + } + + private Map verifyParams(Map params) { + + String[] paramKeys = new String[]{"realName", "identityNo", "nickname", FieldConstant.MOBILE_HUMP}; + + return AppUserUtils.trimParamValue(params, paramKeys); + + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public UserDTO get(String id) { + UserEntity entity = baseDao.selectById(id); + UserDTO resultDTO = ConvertUtils.sourceToTarget(entity, UserDTO.class); + resultDTO.setTotalSubmitNum(userAuthenticateHistoryDao.countAuthenticateHistory(id, null)); + //0 未通过1通过 + resultDTO.setTotalFailNum(userAuthenticateHistoryDao.countAuthenticateHistory(id, NumConstant.ZERO_STR)); + resultDTO.setTotalPassSubmitNum(userAuthenticateHistoryDao.countAuthenticateHistory(id, NumConstant.ONE_STR)); + return resultDTO; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserDTO dto) { + UserEntity entity = ConvertUtils.sourceToTarget(dto, UserEntity.class); + + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserDTO dto) { + UserEntity entity = ConvertUtils.sourceToTarget(dto, UserEntity.class); + + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void audit(UserDTO dto) { + + String userId = dto.getId(); + UserEntity findUser = this.baseDao.selectById(userId); + // 手动认证为党员 + if (YesOrNoEnum.YES.value().equals(dto.getPartyFlag())) { + // 校验是否为党员 + checkUserInfoForPartyMember(findUser); + } + // createdTime作为提交注册时间,registerTime作为注册审核时间(即注册时间) + dto.setRegisterTime(new Date()); + //先删除以前审核未通过的那条数据 + UserEntity entity = ConvertUtils.sourceToTarget(dto, UserEntity.class); + updateById(entity); + // 组装数据并插入用户认证历史表 + saveUserAuthenticateHistory(findUser, dto.getPartyFlag(), dto.getRemark(), dto.getState()); + // 修改党员库信息 + if (YesOrNoEnum.YES.value().equals(dto.getPartyFlag())) { + updatePartyMember(findUser, dto.getRegisterTime()); + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result> partyReview(UserDTO dto) { + this.verifyUserInfo(dto); + UserEntity findUser = this.baseDao.selectById(dto.getId()); + dto.setState(NumConstant.THREE_STR); + // 手动认证为党员 + if (YesOrNoEnum.YES.value().equals(dto.getPartyFlag())) { + // 校验是党员库是否存在相同的身份证号或者姓名 + boolean isParty = getPartyMemberByRealNameAndIdentityNo(dto.getRealName(), dto.getIdentityNo()); + if (!isParty) { + Result> result = getPartyMemberByRealNameOrIdentityNo(dto.getRealName(), dto.getIdentityNo()); + if (result.getCode() != 0) { + return result; + } else { + // 插入党员库 + insertPartyMember(dto); + } + } + } + // createdTime作为提交注册时间,registerTime作为注册审核时间(即注册时间) + dto.setRegisterTime(new Date()); + //先删除以前审核未通过的那条数据 + UserEntity entity = ConvertUtils.sourceToTarget(dto, UserEntity.class); + updateById(entity); + // 组装数据并插入用户认证历史表 + findUser.setMobile(dto.getMobile()); + findUser.setRealName(dto.getRealName()); + saveUserAuthenticateHistory(findUser, dto.getPartyFlag(), dto.getRemark(), dto.getState()); + // 修改党员库信息 + if (YesOrNoEnum.YES.value().equals(dto.getPartyFlag())) { + updatePartyMember(findUser, dto.getRegisterTime()); + } + + return new Result<>(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result modifyPartyInfo(PartyMemberModifyFormDTO dto) { + // 更新党员库信息 + PartyMembersEntity entity = new PartyMembersEntity(); + entity.setId(dto.getPartyMemberId()); + entity.setRealName(dto.getRealName()); + entity.setIdentityNo(dto.getIdentityNo()); + partyMembersDao.updateById(entity); + + // 用户认证党员信息通过 + UserDTO userDTO = ConvertUtils.sourceToTarget(dto, UserDTO.class); + userDTO.setId(dto.getUserId()); + userDTO.setPartyFlag(YesOrNoEnum.YES.value()); + this.partyReview(userDTO); + + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result addPartyInfo(PartyMemberModifyFormDTO dto) { + // 新增党员库信息 + PartyMembersEntity entity = new PartyMembersEntity(); + entity.setRealName(dto.getRealName()); + entity.setIdentityNo(dto.getIdentityNo()); + entity.setRegistFlag(PartyMemberRegFlagEnum.NO.getValue()); + partyMembersDao.insert(entity); + + // 用户认证党员信息通过 + UserDTO userDTO = ConvertUtils.sourceToTarget(dto, UserDTO.class); + userDTO.setId(dto.getUserId()); + userDTO.setPartyFlag(YesOrNoEnum.YES.value()); + this.partyReview(userDTO); + + return new Result(); + } + + /** + * 更新党员库信息 + * + * @param findUser 用户信息 + * @param registerTime 认证时间 + * @return void + * @author work@yujt.net.cn + * @date 2020/2/5 17:50 + */ + private void updatePartyMember(UserEntity findUser, Date registerTime) { + PartyMembersEntity partyMembersEntity = new PartyMembersEntity(); + partyMembersEntity.setRegistFlag(PartyMemberRegFlagEnum.MANUAL.getValue()); + partyMembersEntity.setDeptId(findUser.getDeptId()); + // 已认证党员列表,数据权限匹配的字段是grid_id。至于dept_id,暂时没用 @202002061021 + partyMembersEntity.setGridId(findUser.getDeptId()); + partyMembersEntity.setAllDeptIds(findUser.getAllDeptIds()); + partyMembersEntity.setAllDeptNames(findUser.getAllDeptNames()); + partyMembersEntity.setParentDeptIds(findUser.getParentDeptIds()); + partyMembersEntity.setParentDeptNames(findUser.getParentDeptNames()); + partyMembersEntity.setMobile(findUser.getMobile()); + partyMembersEntity.setRegistTime(registerTime); + + UpdateWrapper partyUpdate = new UpdateWrapper<>(); + partyUpdate.eq(UserFieldConsant.IDENTITY_NO, findUser.getIdentityNo()) + .eq(UserFieldConsant.REAL_NAME, findUser.getRealName()); + this.partyMembersDao.update(partyMembersEntity, partyUpdate); + } + + /** + * 组装数据并插入用户认证历史表(epdc_user_authenticate_history) + * + * @param userEntity 用户信息 + * @param partyFlag 是否党员 + * @param remark 审核备注 + * @param userState 审核状态 + * @return void + * @author work@yujt.net.cn + * @date 2020/2/5 17:49 + */ + private void saveUserAuthenticateHistory(UserEntity userEntity, String partyFlag, String remark, String userState) { + // 组装数据并插入用户认证历史表(epdc_user_authenticate_history) + UserAuthenticateHistoryEntity userAuthenticateHistoryEntity = new UserAuthenticateHistoryEntity(); + userAuthenticateHistoryEntity.setUserId(userEntity.getId()); + userAuthenticateHistoryEntity.setMobile(userEntity.getMobile()); + userAuthenticateHistoryEntity.setRealName(userEntity.getRealName()); + userAuthenticateHistoryEntity.setAddress(userEntity.getAddress()); + userAuthenticateHistoryEntity.setRemark(remark); + // 状态(0-已注册,1-已完善信息待审核,2-信息审核不通过,3-信息审核通过) + userAuthenticateHistoryEntity.setAuthenticatedFlag( + AppUserStatesEnum.STATE_INFORMATION_PASSED.value().equals(userState) ? + YesOrNoEnum.YES.value() : YesOrNoEnum.NO.value()); + // 新维护的 认证类别(0-居民认证,1-党员认证,2-志愿者认证) + userAuthenticateHistoryEntity.setAuthenticatedType(YesOrNoEnum.YES.equals(partyFlag) + ? AuthenticatedConsant.partyAuth : AuthenticatedConsant.userAuth); + userAuthenticateHistoryDao.insert(userAuthenticateHistoryEntity); + } + + /** + * 校验用户是否有匹配的党员信息 + * + * @param userEntity 用户信息 + * @return void + * @author work@yujt.net.cn + * @date 2020/2/5 17:49 + */ + private void checkUserInfoForPartyMember(UserEntity userEntity) { + // 手动认证为党员 + if (StringUtils.isBlank(userEntity.getIdentityNo())) { + throw new RenException("该用户未完善身份证号码"); + } + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.IDENTITY_NO, userEntity.getIdentityNo()) + .eq(UserFieldConsant.REAL_NAME, userEntity.getRealName()); + Integer count = this.partyMembersDao.selectCount(wrapper); + if (count == NumConstant.ZERO) { + throw new RenException("党员库中无此人信息"); + } + } + + + @Override + public Result getUserForLoginByOpenId(String openId) { + QueryWrapper wrapper = new QueryWrapper<>(); + // 根据openId获取已提交注册的用户信息 + wrapper.eq(UserFieldConsant.WX_OPEN_ID, openId) + .orderByDesc(FieldConstant.CREATED_TIME); + UserEntity userEntity = this.baseDao.selectOne(wrapper); + if (null != userEntity) { + QueryWrapper ugWrapper = new QueryWrapper<>(); + ugWrapper.eq(UserFieldConsant.USER_ID, userEntity.getId()) + .orderByDesc(UserFieldConsant.SWITCHED_TIME); + List gridRelations = userGridRelationService.listUserGrid(userEntity.getId()); + if (CollUtil.isNotEmpty(gridRelations)) { + UserDTO dto = ConvertUtils.sourceToTarget(userEntity, UserDTO.class); + dto.setGridId(gridRelations.get(NumConstant.ZERO).getGridId()); + dto.setGrid(gridRelations.get(NumConstant.ZERO).getGrid()); + return new Result().ok(dto); + } + } + return new Result(); + } + + @Override + public Result getUserInfoByOpenId(String openId) { + QueryWrapper wrapper = new QueryWrapper<>(); + // 根据openId查询审核中或审核通过的用户信息 + wrapper.eq(UserFieldConsant.WX_OPEN_ID, openId) + .ne(FieldConstant.STATE, AppUserAuditStateEnum.AUDIT_FAILURE.value()) + .select(FieldConstant.ID, UserFieldConsant.NICKNAME, UserFieldConsant.FACE_IMG, + FieldConstant.MOBILE, UserFieldConsant.REAL_NAME, + FieldConstant.STATE, FieldConstant.GRID_ID, UserFieldConsant.PARTY_FLAG); + UserEntity userEntity = this.baseDao.selectOne(wrapper); + return new Result().ok(ConvertUtils.sourceToTarget(userEntity, UserDTO.class)); + } + + @Override + public Result getUserInfoByUnionId(String unionId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.WX_UNION_ID, unionId) + .ne(FieldConstant.STATE, AppUserAuditStateEnum.AUDIT_FAILURE.value()) + .select(FieldConstant.ID, UserFieldConsant.NICKNAME, UserFieldConsant.FACE_IMG, + FieldConstant.MOBILE, UserFieldConsant.REAL_NAME, + FieldConstant.STATE, FieldConstant.GRID_ID, UserFieldConsant.PARTY_FLAG); + UserEntity userEntity = this.baseDao.selectOne(wrapper); + return new Result().ok(ConvertUtils.sourceToTarget(userEntity, UserDTO.class)); + } + + @Override + public Result userRegister(UserDTO userDto) { + this.save(userDto); + return new Result().ok("注册成功"); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result getInfoById(String id) { + + return new Result().ok(baseDao.selectOneInfoById(id)); + } + + @Override + public void updateMobileOrAvatar(UserDTO userDto) { + UserDTO newUsertDto = new UserDTO(); + if (StringUtils.isNotBlank(userDto.getFaceImg())) { + newUsertDto.setFaceImg(userDto.getFaceImg()); + } + if (StringUtils.isNotBlank(userDto.getMobile())) { + newUsertDto.setMobile(userDto.getMobile()); + newUsertDto.setMobileCarrier(userDto.getMobileCarrier()); + newUsertDto.setMobileCity(userDto.getMobileCity()); + newUsertDto.setMobileProvince(userDto.getMobileProvince()); + } + UserEntity userEntity = ConvertUtils.sourceToTarget(newUsertDto, UserEntity.class); + baseDao.updateById(userEntity); + } + + + @Override + public Result verifyUserRegisterData(EpdcUserRegistFormDTO formDto) { + // 手机号查重 + String mobile = formDto.getMobile(); + if (StringUtils.isNotBlank(mobile)) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(FieldConstant.MOBILE, mobile); + Integer count = this.baseDao.selectCount(wrapper); + if (count > NumConstant.ZERO) { + return new Result().error("手机号已被注册"); + } + } + + // 身份证号查重 + String identityNo = formDto.getIdentityNo(); + if (StringUtils.isNotBlank(identityNo)) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo); + Integer count = this.baseDao.selectCount(wrapper); + if (count > NumConstant.ZERO) { + return new Result().error("身份证号已被注册"); + } + } + + return new Result(); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result getUserRegisterAuditResult(String userId) { + EpdcUserRegisterAuditMsgResultDTO dto = this.baseDao.getUserRegisterAuditResult(userId); + return new Result().ok(dto); + } + + @Override + public List listOfInviteUsers(EpdcUserGroupInviteFormDTO formDto) { + return baseDao.selectListOfInviteUsers(formDto); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result gridLeaderRegister(EpdcGridLeaderRegisterFormDTO registerDto) { + // 网格长用户信息 + EpdcGridLeaderRegisterDTO gridLeader = registerDto.getGridLeader(); + UserEntity userEntity = ConvertUtils.sourceToTarget(gridLeader, UserEntity.class); + // 网格长管理的网格 + List userGridList = registerDto.getUserGridList(); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.WX_OPEN_ID, gridLeader.getWxOpenId()); +// UserEntity existUser = this.baseDao.selectOne(wrapper); + UserDTO existUser = selectUserByWxInfo(gridLeader.getWxOpenId(), gridLeader.getWxUnionId()); + String userId; + String faceImg = userEntity.getFaceImg(); + userEntity.setLastLoginTime(new Date()); + // 首次注册 + if (null == existUser) { + + this.insert(userEntity); + + userId = userEntity.getId(); + + for (UserGridRelationDTO userGridRelation : userGridList) { + userGridRelation.setUserId(userId); + userGridRelation.setLeaderFlag(YesOrNoEnum.YES.value()); + } + // 已注册过,更新信息 + } else { + userId = existUser.getId(); + faceImg = existUser.getFaceImg(); + // 不更新头像信息 + userEntity.setFaceImg(null); + userEntity.setId(userId); + //用户已绑定手机号时不更新手机号 + if (StringUtils.isNotBlank(existUser.getMobile())) { + userEntity.setMobile(existUser.getMobile()); + } + this.updateById(userEntity); + + for (UserGridRelationDTO userGridRelation : userGridList) { + userGridRelationService.delete(userId, userGridRelation.getGridId()); + + userGridRelation.setUserId(userId); + userGridRelation.setLeaderFlag(YesOrNoEnum.YES.value()); + } + } + + List userGridRelationEntityList = ConvertUtils.sourceToTarget(userGridList, UserGridRelationEntity.class); + userGridRelationService.insertBatch(userGridRelationEntityList); + + UserDTO userDto = ConvertUtils.sourceToTarget(gridLeader, UserDTO.class); + userDto.setId(userId); + UserGridRelationDTO userGridRelationDto = userGridList.get(NumConstant.ZERO); + userDto.setGridId(userGridRelationDto.getGridId()); + userDto.setGrid(userGridRelationDto.getGrid()); + userDto.setFaceImg(faceImg); + return new Result().ok(userDto); + } + + @Override + public Result checkUserRegisterState(EpdcCheckUserRegisterFromDTO fromDto) { + + // 当前网格id + Long gridId = fromDto.getGridId(); + // 当前用户 + UserDTO userDto = null; + // 当前用户id + String userId = null; + // 当前用户扫码过的所有网格id + List gridIdList = Lists.newArrayList(); + + // 查询当前用户信息 + List userList = baseDao.selectListUserByWxForLogin(fromDto.getOpenId(), fromDto.getWxUnionId()); + if (CollUtil.isNotEmpty(userList)) { + userDto = userList.get(NumConstant.ZERO); + userId = userDto.getId(); + // 循环集合,确保集合中都是同一个用户的信息 + for (UserDTO oneUserDto : userList) { + if (!userId.equals(oneUserDto.getId())) { + throw new RenException("用户信息异常,无法匹配唯一用户"); + } + gridIdList.add(oneUserDto.getGridId()); + } + } + // 组装接口返回结果 + EpdcUserRegisterInfoResultDTO resultDto = new EpdcUserRegisterInfoResultDTO(); + resultDto.setGridId(gridId); + // 用户已注册 + if (null != userDto) { + resultDto.setUserDTO(userDto); + // 已绑定当前网格 + if (gridIdList.contains(gridId)) { + resultDto.setRegisterState(NumConstant.TWO); + resultDto.setGrid(userDto.getGrid()); + // 更新最后一次切换网格时间 + updateGridSwitchedTime(userId, gridId); + } else { + resultDto.setRegisterState(NumConstant.ONE); + } + } + // 未注册 + else { + resultDto.setRegisterState(NumConstant.ZERO); + } + return new Result().ok(resultDto); + } + + /** + * 用户网格关系表,更新最后访问网格的时间 + * + * @param userId 用户id + * @param gridId 网格id + * @return void + * @author work@yujt.net.cn + * @date 2020/2/26 14:59 + */ + private void updateGridSwitchedTime(String userId, Long gridId) { + UpdateWrapper wrapper = new UpdateWrapper<>(); + wrapper.eq(FieldConstant.GRID_ID, gridId) + .eq(UserFieldConsant.USER_ID, userId); + + UserGridRelationEntity entity = new UserGridRelationEntity(); + entity.setSwitchedTime(new Date()); + + userGridRelationService.update(entity, wrapper); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result saveUserOrBindGrid(EpdcUserRegisterBindGridFormDTO fromDto) { + + + UserDTO formUserDto = fromDto.getUserDTO(); + UserGridRelationDTO userGridRel = fromDto.getGridRelationDTO(); + + // 用户注册 + if (NumConstant.ZERO == fromDto.getRegisterState()) { + UserEntity userEntity = ConvertUtils.sourceToTarget(formUserDto, UserEntity.class); + if (insert(userEntity)) { + formUserDto.setId(userEntity.getId()); + } else { + return new Result().error("用户注册失败"); + } + } + userGridRel.setUserId(formUserDto.getId()); + //修改数据库结构 + Result parentAndAllDeptDTOResult = adminFeignClient.getParentAndAllDept(userGridRel.getGridId().toString()); + if (!parentAndAllDeptDTOResult.success()) { + return new Result().error(parentAndAllDeptDTOResult.getMsg()); + } + userGridRel.setAllDeptNames(parentAndAllDeptDTOResult.getData().getAllDeptNames()); + userGridRel.setAllDeptIds(parentAndAllDeptDTOResult.getData().getAllDeptIds()); + userGridRel.setParentDeptNames(parentAndAllDeptDTOResult.getData().getParentDeptNames()); + userGridRel.setParentDeptIds(parentAndAllDeptDTOResult.getData().getParentDeptIds()); + // 用户绑定网格 + userGridRelationService.save(userGridRel); + // 组装用户注册信息 + EpdcUserRegisterInfoResultDTO resultDto = new EpdcUserRegisterInfoResultDTO(); + resultDto.setRegisterState(NumConstant.TWO); + resultDto.setGrid(userGridRel.getGrid()); + resultDto.setGridId(userGridRel.getGridId()); + resultDto.setUserDTO(formUserDto); + + // 记录邀请记录 + if (StringUtils.isNotEmpty(fromDto.getInviteUserId())) { + UserInvitationRecordEntity entity = new UserInvitationRecordEntity(); + entity.setUserId(formUserDto.getId()); + entity.setInviteUserId(fromDto.getInviteUserId()); + // 获取用户信息 + UserDTO userDto = this.get(formUserDto.getId()); + entity.setRegisterTime(userDto.getRegisterTime()); + entity.setGrid(userGridRel.getGrid()); + entity.setGridId(userGridRel.getGridId()); + userInvitationRecordService.insert(entity); + } + + return new Result().ok(resultDto); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result verifyUserCompleteData(UserDTO userDto) { + + String userId = userDto.getId(); + String mobile = userDto.getMobile(); + + UserEntity userEntity = selectUserForCheck(userId, + YesOrNoEnum.YES.value().equals(userDto.getPartyFlag()) ? userDto.getIdentityNo() : null, + mobile); + + return new Result().ok(userEntity.getState()); + } + + /** + * 生成党员认证失败记录 + * + * @param dto + * @param userGridRelationDTO + * @param parentAndAllDeptDTO + * @return boolean + * @author rongchao + * @since 2019-12-19 + */ + private boolean generatePartyAuthenticationFailedRecord(EpdcCompleteAppUserDTO dto, UserGridRelationDTO userGridRelationDTO, ParentAndAllDeptDTO parentAndAllDeptDTO) { + PartyAuthenticationFailedEntity authenticationFailedEntity = ConvertUtils.sourceToTarget(dto, PartyAuthenticationFailedEntity.class); + // 装载部门冗余信息 + DeptEntityUtils.loadDeptInfo( + ConvertUtils.sourceToTarget(parentAndAllDeptDTO, DeptEntityUtils.DeptDto.class), + authenticationFailedEntity + ); + authenticationFailedEntity.setId(null); + authenticationFailedEntity.setUserId(dto.getId()); + authenticationFailedEntity.setState(dto.getState()); + authenticationFailedEntity.setAddress(dto.getAddress()); + authenticationFailedEntity.setDeptId(dto.getDeptId()); + authenticationFailedEntity.setGridId(userGridRelationDTO.getGridId()); + authenticationFailedEntity.setGridName(userGridRelationDTO.getGrid()); + authenticationFailedEntity.setRegistTime(new Date()); + authenticationFailedEntity.setRegistFlag(YesOrNoEnum.YES.value()); + authenticationFailedEntity.setIdentityNo(dto.getIdentityNo()); + authenticationFailedEntity.setMobile(dto.getMobile()); + authenticationFailedEntity.setRealName(dto.getRealName()); + return SqlHelper.retBool(partyAuthenticationFailedDao.insert(authenticationFailedEntity)); + } + + /** + * 生成认证历史 + * + * @param completeAppUser + * @param userAuthTypeEnum + * @param yesOrNoEnum + * @param remark + * @return boolean + * @author rongchao + * @since 2019-12-19 + */ + private boolean generateUserAuthenticateHistory(EpdcCompleteAppUserDTO completeAppUser, UserAuthTypeEnum userAuthTypeEnum, YesOrNoEnum yesOrNoEnum, String remark) { + UserAuthenticateHistoryEntity userAuthenticateHistoryEntity = new UserAuthenticateHistoryEntity(); + userAuthenticateHistoryEntity.setUserId(completeAppUser.getId()); + userAuthenticateHistoryEntity.setMobile(completeAppUser.getMobile()); + userAuthenticateHistoryEntity.setRealName(completeAppUser.getRealName()); + userAuthenticateHistoryEntity.setAddress(completeAppUser.getAddress()); + userAuthenticateHistoryEntity.setAuthenticatedType(userAuthTypeEnum.value()); + userAuthenticateHistoryEntity.setAuthenticatedFlag(yesOrNoEnum.value()); + if (StringUtils.isNotEmpty(remark)) { + userAuthenticateHistoryEntity.setRemark(remark); + } + return SqlHelper.retBool(userAuthenticateHistoryDao.insert(userAuthenticateHistoryEntity)); + } + + /** + * 更新党员库信息 + * + * @param parentAndAllDeptDTO + * @param formDto + * @return boolean + * @author rongchao + * @since 2019-12-19 + */ + private boolean modifyPartyMembers(ParentAndAllDeptDTO parentAndAllDeptDTO, EpdcAppUserCompleteInfoFormDTO formDto) { + PartyMembersEntity partyMembersEntity = DeptEntityUtils.loadDeptInfo( + ConvertUtils.sourceToTarget(parentAndAllDeptDTO, DeptEntityUtils.DeptDto.class), + PartyMembersEntity.class + ); + EpdcCompleteAppUserDTO completeAppUser = formDto.getCompleteAppUser(); + UserGridRelationDTO userGridRelation = formDto.getUserGridRelation(); + partyMembersEntity.setGridId(userGridRelation.getGridId()); + partyMembersEntity.setGridName(userGridRelation.getGrid()); + partyMembersEntity.setRegistFlag(YesOrNoEnum.YES.value()); + partyMembersEntity.setRegistTime(new Date()); + UpdateWrapper partyUpdate = new UpdateWrapper<>(); + partyUpdate.eq(UserFieldConsant.IDENTITY_NO, completeAppUser.getIdentityNo()) + .eq(UserFieldConsant.REAL_NAME, completeAppUser.getRealName()); + return SqlHelper.retBool(partyMembersDao.update(partyMembersEntity, partyUpdate)); + } + + /** + * 修改居民信息 + * + * @param completeAppUser + * @param userGridRelation + * @param parentAndAllDeptDTO + * @return com.elink.esua.epdc.entity.UserEntity + * @author rongchao + * @since 2019-12-19 + */ + private UserDTO modifyResidentInfo(EpdcCompleteAppUserDTO completeAppUser, UserGridRelationDTO userGridRelation, ParentAndAllDeptDTO parentAndAllDeptDTO) { + + // 数据库已有的用户信息 + // 查询此用户是否已经注册并且完善了用户信息 + UserEntity findUser = baseDao.selectById(completeAppUser.getId()); + + UserEntity userEntity = ConvertUtils.sourceToTarget(completeAppUser, UserEntity.class); + userEntity.setWxOpenId(StringUtils.isBlank(userEntity.getWxOpenId()) ? null : userEntity.getWxOpenId()); + userEntity.setWxUnionId(StringUtils.isBlank(userEntity.getWxUnionId()) ? null : userEntity.getWxUnionId()); + userEntity.setFaceImg(StringUtils.isBlank(userEntity.getFaceImg()) ? null : userEntity.getFaceImg()); + // 只进行认证居民操作 + userEntity.setPartyFlag(YesOrNoEnum.NO.value()); + //返回网格长标识信息 + UserGridRelationDTO relationInfo = userGridRelationService.getUserRelationInfo(completeAppUser.getId(), userGridRelation.getGridId()); + String nicknamePrefix = completeAppUser.getRoad().concat(StrConstant.HYPHEN); + if (relationInfo != null && YesOrNoEnum.YES.value().equals(relationInfo.getLeaderFlag())) { + nicknamePrefix = "网格长-".concat(StrConstant.HYPHEN); + } + // 姓 + String lastName = completeAppUser.getRealName().substring(NumConstant.ZERO, NumConstant.ONE); + userEntity.setLastName(lastName); + userEntity.setNickname(nicknamePrefix.concat(lastName).concat(UserSexEnum.FEMALE.sex().equals(userEntity.getSex()) ? "女士" : "先生")); + + //保存用户居住地所在网格,及其他冗余字段。 + DeptEntityUtils.loadDeptInfo( + ConvertUtils.sourceToTarget(parentAndAllDeptDTO, DeptEntityUtils.DeptDto.class), + userEntity + ); + if (!updateById(userEntity)) { + throw new RenException("用户认证修改居民信息时失败!"); + } + UserDTO userDto = ConvertUtils.sourceToTarget(userEntity, UserDTO.class); + userDto.setLeaderFlag(relationInfo.getLeaderFlag()); + userDto.setFaceImg(StringUtils.isBlank(userDto.getFaceImg()) ? findUser.getFaceImg() : userDto.getFaceImg()); + return userDto; + } + + + /** + * 生成用户身份标签 + * + * @param userId + * @return boolean + * @author rongchao + * @since 2019-12-19 + */ +// private boolean generateUserTag(String userId) { +// UserTagEntity userTagEntity = userTagDao.selectByTagCode(UserTagEnum.PARTY_MEMBER.value()); +// UserTagRelationEntity userTagRelationEntity = new UserTagRelationEntity(); +// userTagRelationEntity.setTagId(userTagEntity.getId()); +// userTagRelationEntity.setUserId(userId); +// return SqlHelper.retBool(userTagRelationDao.insert(userTagRelationEntity)); +// } + + /** + * 根据网格ID获取冗余的组织机构信息 + * + * @param + * @return com.elink.esua.epdc.dto.ParentAndAllDeptDTO + * @author rongchao + * @since 2019-12-19 + */ + private ParentAndAllDeptDTO getParentAndAllDeptDTO(String gridId) { + // 获取组织结构冗余信息 + Result parentAndAllDeptDTOResult = adminFeignClient.getParentAndAllDept(gridId); + ParentAndAllDeptDTO parentAndAllDeptDTO = parentAndAllDeptDTOResult.getData(); + + if (!parentAndAllDeptDTOResult.success()) { + throw new RenException(parentAndAllDeptDTOResult.getMsg()); + } + return parentAndAllDeptDTO; + } + + /** + * 认证党员 + * + * @param formDto + * @param parentAndAllDeptDTO + * @return void + * @author rongchao + * @since 2019-12-19 + */ + private boolean authPartyMembers(EpdcAppUserCompleteInfoFormDTO formDto, ParentAndAllDeptDTO parentAndAllDeptDTO) { + EpdcCompleteAppUserDTO completeAppUser = formDto.getCompleteAppUser(); + UserGridRelationDTO userGridRelation = formDto.getUserGridRelation(); + int selectCount = partyMembersService.countPartyMemberByIdNoAndRealName(completeAppUser.getIdentityNo(), completeAppUser.getRealName()); + if (selectCount == NumConstant.ZERO) { + // 党员认证失败,移除用户身份标签 + userTagRelationService.removeUserTagRelation(completeAppUser.getId(), UserTagEnum.PARTY_MEMBER.value()); + // 若不是志愿者认证,进行党员认证失败保存 + if (!UserAuthTypeEnum.VOLUNTEER_AUTH.value().equals(completeAppUser.getUserAuthType())) { + // 党员库中没有,存进党员认证失败表 + generatePartyAuthenticationFailedRecord(completeAppUser, userGridRelation, parentAndAllDeptDTO); + // 生成党员认证不通过记录 + generateUserAuthenticateHistory(completeAppUser, UserAuthTypeEnum.PARTY_AUTH, YesOrNoEnum.NO, "党员库中无此党员信息"); + } + return Boolean.FALSE; + } else { + //党员认证成功 + modifyPartyMembers(parentAndAllDeptDTO, formDto); + // 党员认证成功,生成用户身份标签 + userTagRelationService.addUserTagRelation(completeAppUser.getId(), UserTagEnum.PARTY_MEMBER.value()); + // 生成党员认证通过记录 + generateUserAuthenticateHistory(completeAppUser, UserAuthTypeEnum.PARTY_AUTH, YesOrNoEnum.YES, null); + return Boolean.TRUE; + } + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result completeUserInfo(EpdcAppUserCompleteInfoFormDTO formDto) { + EpdcCompleteAppUserDTO completeAppUser = formDto.getCompleteAppUser(); + UserGridRelationDTO userGridRelation = formDto.getUserGridRelation(); + + // 获取组织结构冗余信息 + ParentAndAllDeptDTO parentAndAllDeptDTO = getParentAndAllDeptDTO(userGridRelation.getGridId().toString()); + + //进行居民认证 + UserDTO userDTO = modifyResidentInfo(completeAppUser, userGridRelation, parentAndAllDeptDTO); + + Result result = new Result(); + + if (YesOrNoEnum.YES.value().equals(completeAppUser.getPartyFlag())) { + //进行党员认证 + boolean authFlag = authPartyMembers(formDto, parentAndAllDeptDTO); + //认证成功党员 信息审核通过 + if (authFlag) { + userDTO.setPartyFlag(YesOrNoEnum.YES.value()); + userDTO.setState(AppUserStatesEnum.STATE_INFORMATION_PASSED.value()); + // 认证成功之后更新认证时间 + userDTO.setRegisterTime(new Date()); + // 更新用户表党员相关字段 + updateUserPartyMemberInfo(userDTO); + } else { + result = new Result().error(UserModuleErrorCode.AUTHENTICATION_CODE); + } + } + + return result.ok(userDTO); + } + + /** + * 党员认证成功后,更新用户表党员相关字段 + * + * @param userDto + * @return void + * @author work@yujt.net.cn + * @date 2020/2/3 09:40 + */ + private void updateUserPartyMemberInfo(UserDTO userDto) { + UserEntity entity = new UserEntity(); + entity.setId(userDto.getId()); + entity.setState(userDto.getState()); + entity.setRegisterTime(userDto.getRegisterTime()); + entity.setPartyFlag(YesOrNoEnum.YES.value()); + this.updateById(entity); + } + + + /** + * 获取居民详情(已认证或待认证(提交信息待审核)的居民用户) + * + * @param userId 用户Id + * @return + */ + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result residentDetail(String userId) { + if (StringUtils.isBlank(userId)) { + return new Result().error("用户Id不能为空"); + } + EpdcResidentDetailResultDTO dto = this.baseDao.residentDetailByUserId(userId); + if (null != dto) { + EpdcUserAuthenticateHistoryResultDTO userAuthenticateHistory = new EpdcUserAuthenticateHistoryResultDTO(); + userAuthenticateHistory.setTotalSubmitNum(userAuthenticateHistoryDao.countAuthenticateHistory(userId, null)); + userAuthenticateHistory.setTotalFailNum(userAuthenticateHistoryDao.countAuthenticateHistory(userId, NumConstant.ZERO_STR));//0 未通过1通过 + userAuthenticateHistory.setTotalPassSubmitNum(userAuthenticateHistoryDao.countAuthenticateHistory(userId, NumConstant.ONE_STR)); + dto.setAuthenticateHistory(userAuthenticateHistory); + } + return new Result().ok(dto); + } + + /** + * 认证用户(用户信息审核) + * + * @param formDTO + * @return + */ + @Override + public Result authenticateResident(EpdcAppAuthenticateResidentFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getAuthenticatedFlag())) { + formDTO.setAuthenticatedFlag(YesOrNoEnum.NO.value()); + } + UserDTO userDto = this.get(formDTO.getUserId()); + if (null != userDto) { + userDto.setRemark(formDTO.getRemark());//审核不通过的原因 - 2019.12.05.zy + if (YesOrNoEnum.NO.value().equals(formDTO.getAuthenticatedFlag())) {//不通过 + userDto.setState(AppUserStatesEnum.STATE_INFORMATION_NOT_PASSED.value()); + } else if (YesOrNoEnum.YES.value().equals(formDTO.getAuthenticatedFlag())) {//通过 + userDto.setState(AppUserStatesEnum.STATE_INFORMATION_PASSED.value()); + } else { + throw new RenException("是否认证通过数据不匹配"); + } + this.update(userDto); + //插入认证历史表 + UserAuthenticateHistoryEntity authenticateHistoryEntity = new UserAuthenticateHistoryEntity(); + authenticateHistoryEntity.setUserId(userDto.getId()); + authenticateHistoryEntity.setMobile(userDto.getMobile()); + authenticateHistoryEntity.setRealName(userDto.getRealName()); + authenticateHistoryEntity.setAddress(userDto.getAddress()); + authenticateHistoryEntity.setAuthenticatedFlag(formDTO.getAuthenticatedFlag());//是否认证通过 0未通过1通过 + //authenticateHistoryEntity.setRemark(userDto.getRemark()); + authenticateHistoryEntity.setAuthenticatedType(AuthenticatedConsant.userAuth); // 新维护的 认证类别(0-居民认证,1-党员认证,2-志愿者认证) + authenticateHistoryEntity.setRemark(formDTO.getRemark()); //审核不通过的原因 - 2019.12.05.zy + userAuthenticateHistoryDao.insert(authenticateHistoryEntity); + } + return new Result(); + } + + /** + * 获取党员详情(已认证或未认证的党员用户) + * + * @param userId + * @return + */ + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result partyMemberDetail(String userId) { + if (StringUtils.isBlank(userId)) { + return new Result().error("用户Id不能为空"); + } + String idNo = baseDao.getPartyMemberIdNoByUserID(userId); + if (StringUtils.isBlank(idNo)) { + return new Result().error("用户身份证号为空"); + } + EpdcPartyMemberDetailDto dto = baseDao.partyMemberDetailByUserId(userId); + if (dto == null) { + dto = baseDao.partyMemberDetailFaild(userId); + } + if (dto != null) { + return new Result().ok(dto); + } + return new Result().error("获取信息失败"); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result> getWorkUserList(EpdcWorkUserFromDTO workUserFromDto) { +// authenticatedFlag是否已认证 0否 1是 +// partyFlag 是否党员,0否,1是 + int pageIndex = (workUserFromDto.getPageIndex() - NumConstant.ONE) * workUserFromDto.getPageSize(); + workUserFromDto.setPageIndex(pageIndex); + + String partyFlag = workUserFromDto.getPartyFlag(); + String authenticatedFlag = workUserFromDto.getAuthenticatedFlag(); + + + // 查询认证成的居民或党员 + String state = AppUserStatesEnum.STATE_INFORMATION_PASSED.value(); + // 查询待认证的居民 + if (YesOrNoEnum.NO.value().equals(partyFlag) && YesOrNoEnum.NO.value().equals(authenticatedFlag)) { + state = AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value(); + } + // 查询认证失败的党员 + if (YesOrNoEnum.YES.value().equals(partyFlag) && YesOrNoEnum.NO.value().equals(authenticatedFlag)) { + state = AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value(); + workUserFromDto.setAuthenticatedFlag(state); + workUserFromDto.setPartyFlag(YesOrNoEnum.NO.value()); + List epdcWorkUserResultDTOS = baseDao.selectPartyAuthenticationFailedList(workUserFromDto); + return new Result>().ok(epdcWorkUserResultDTOS); + } + workUserFromDto.setAuthenticatedFlag(state); + + List epdcWorkUserResultDTOS = baseDao.selectWorkUserList(workUserFromDto); + return new Result>().ok(epdcWorkUserResultDTOS); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result getUnauthorizedAmount(EpdcUnauthorizedAmountFromDTO fromDto) { + return new Result().ok(baseDao.selectCountUnauthorizedAmount(fromDto)); + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result getUserLastSwitchGird(String openId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.WX_OPEN_ID, openId) + .select(FieldConstant.ID, UserFieldConsant.NICKNAME, UserFieldConsant.FACE_IMG, + FieldConstant.MOBILE, UserFieldConsant.REAL_NAME, + FieldConstant.STATE, UserFieldConsant.PARTY_FLAG, UserFieldConsant.REMARK) + .orderByDesc(FieldConstant.CREATED_TIME); + List userEntityList = this.baseDao.selectList(wrapper); + + EpdcUserRegisterInfoResultDTO resultDto = new EpdcUserRegisterInfoResultDTO(); + if (null != userEntityList && userEntityList.size() > 0) { + UserGridRelationDTO dto = userGridRelationService.getUserLastSwitchGird(userEntityList.get(NumConstant.ZERO).getId()); + if (null == dto) { + resultDto.setRegisterState(NumConstant.ONE); + } else { + resultDto.setRegisterState(NumConstant.TWO); + resultDto.setGridId(dto.getGridId()); + } + } else { + resultDto.setRegisterState(NumConstant.ZERO); + } + return new Result().ok(resultDto); + } + + /** + * @param formDto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户信息 合并上面的getByUnionId、getForLogin方法 + * @Date 2019/12/7 13:58 + **/ + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result queryUserDto(EpdcAppQueryUserInfoFormDTO formDto) { + UserDTO user = selectUserByWxInfo(formDto.getOpenId(), formDto.getUnionId()); + return new Result().ok(user); + } + + + /** + * @param gridIdList + * @return com.elink.esua.epdc.commons.tools.utils.Result> + * @Author yinzuomei + * @Description 根据网格id查询网格下所有的用户 + * @Date 2019/12/19 15:03 + **/ + @Override + @DataSource(value = DataSourceNames.FIRST) + public Result> listGridUserResultDTO(List gridIdList) { + return new Result>().ok(baseDao.selectListGridUserResultDTO(gridIdList)); + } + + @Override + public UserDTO updateWxInfo(UserDTO userDto) { + + // 查询此用户是否已经注册并且完善了用户信息 + UserDTO findUser = this.selectUserByWxInfo(userDto.getWxOpenId(), userDto.getWxUnionId()); + if (null == findUser) { + throw new RenException("无法匹配用户信息,请先注册"); + } + // 新用户id + String userId = userDto.getId(); + String oldUserId = findUser.getId(); + + // ID相同 + if (oldUserId.equals(userId)) { + findUser.setFaceImg(userDto.getFaceImg()); + findUser.setNickname(userDto.getNickname()); + findUser.setSex(userDto.getSex()); + findUser.setWxOpenId(userDto.getWxOpenId()); + findUser.setWxUnionId(userDto.getWxUnionId()); + } else { + // 两个用户对象id不同,表示迁移小程序后,老用户的微信号生成了新的用户,需要删除新用户 + baseDao.deleteById(userId); + + if (findUser.getState().equals(AppUserStatesEnum.STATE_REGISTERED.value())) { + findUser.setFaceImg(userDto.getFaceImg()); + findUser.setSex(userDto.getSex()); + findUser.setNickname(userDto.getNickname()); + } + + findUser.setWxOpenId(userDto.getWxOpenId()); + + } + this.update(findUser); + + return findUser; + + } + + /** + * @param formDTO + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户缓存信息 + * @Date 2019/12/18 14:01 + **/ + @Override + public Result queryCachingUserInfo(EpdcAppQueryUserInfoFormDTO formDTO) { + if (StringUtils.isBlank(formDTO.getOpenId())) { + throw new RenException("openId不能为空"); + } + CachingUserInfoDTO cachingUserInfoDTO = null; + if (StringUtils.isNotBlank(formDTO.getUnionId())) { + //根据unionId查询 + cachingUserInfoDTO = this.baseDao.selectCachingUserInfoDTO(null, formDTO.getUnionId()); + } + if (null == cachingUserInfoDTO) { + //根据openId查询 + cachingUserInfoDTO = this.baseDao.selectCachingUserInfoDTO(formDTO.getOpenId(), null); + } + return new Result().ok(cachingUserInfoDTO); + } + + /** + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据操作类型更新用户积分 + * @Date 2019/12/13 15:02 + **/ + @Override + public Result handleUserPoints(EpdcUserPointsFormDTO formDTO) { + UserEntity userEntity = baseDao.selectById(formDTO.getUserId()); + //规则操作类型(0-减积分,1-加积分) + if (PointsOperationEnum.OPERATION_TYPE_ADD.getOperationType().equals(formDTO.getOperationType())) { + userEntity.setPoints(userEntity.getPoints() + formDTO.getPoints()); + } else if (PointsOperationEnum.OPERATION_TYPE_SUBSTRACT.getOperationType().equals(formDTO.getOperationType())) { + userEntity.setPoints(userEntity.getPoints() - formDTO.getPoints()); + } + baseDao.updateById(userEntity); + return new Result().ok(userEntity); + } + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 获取用户缓存信息 + * @Date 2020/1/15 17:40 + **/ + @Override + public Result cachingUserInfoByUserId(String userId) { + if (StringUtils.isBlank(userId)) { + throw new RenException("userId不能为空"); + } + CachingUserInfoDTO cachingUserInfoDTO = baseDao.selectCachingUserInfoDTOByUserId(userId); + return new Result().ok(cachingUserInfoDTO); + } + + /** + * 根据微信信息查询用户 + * + * @param openId + * @param unionId + * @return com.elink.esua.epdc.dto.UserDTO + * @author work@yujt.net.cn + * @date 2019/12/7 17:19 + */ + private UserDTO selectUserByWxInfo(String openId, String unionId) { + if (StringUtils.isBlank(openId)) { + throw new RenException("openId不能为空"); + } + List userList = baseDao.selectListUserByWxForLogin(openId, unionId); + if (CollUtil.isEmpty(userList)) { + return null; + } + UserDTO user = userList.get(NumConstant.ZERO); + if (userList.size() > NumConstant.ONE) { + String userId = user.getId(); + // 循环集合,确保集合中都是同一个用户的信息 + for (UserDTO oneUserDto : userList) { + if (!userId.equals(oneUserDto.getId())) { + throw new RenException("用户信息异常,无法匹配唯一用户"); + } + } + } + return user; + } + + + /** + * 通过用户id,身份证号,手机号匹配用户,并校验手机号或身份证号是否被占用 + * + * @param userId 用户id,不能为空 + * @param identityNo 身份证号,可为空 + * @param mobile 手机号码,可为空 + * @return com.elink.esua.epdc.entity.UserEntity + * @author work@yujt.net.cn + * @date 2020/2/25 15:05 + */ + private UserEntity selectUserForCheck(String userId, String identityNo, String mobile) { + QueryWrapper queryWrapper = new QueryWrapper<>(); + // del_flag = '0' and (id = ? or identity_no = ? or mobile = ?) + queryWrapper.eq(FieldConstant.DEL_FLAG, EpdcDelFlagEnum.NORMAL.value()) + .and(i -> i.eq(FieldConstant.ID, userId) + .or() + .eq(StringUtils.isNotBlank(identityNo), UserFieldConsant.IDENTITY_NO, identityNo) + .or() + .eq(StringUtils.isNotBlank(mobile), FieldConstant.MOBILE, mobile)); + List userEntityList = baseDao.selectList(queryWrapper); + if (CollUtil.isEmpty(userEntityList)) { + throw new RenException("查询用户信息失败"); + } + if (userEntityList.size() > NumConstant.ONE) { + if (StringUtils.isNotBlank(mobile)) { + for (UserEntity entity : userEntityList) { + if (!userId.equals(entity.getId())) { + if (StringUtils.isNotBlank(entity.getMobile()) && mobile.equals(entity.getMobile())) { + throw new RenException("手机号码已被注册"); + } + } + } + } + throw new RenException("身份证号码已被注册"); + } + return userEntityList.get(NumConstant.ZERO); + } + + + @Override + @Transactional(rollbackFor = Exception.class) + public Result createPidemicInfo(EpdcAppPidemicCompleteInfoFromDTO completeInfoFromDto) { + + String userId = completeInfoFromDto.getUserId(); + + String identityNo = ModuleUtils.replaceIllegalCharacter(completeInfoFromDto.getIdcard()).toUpperCase(); + // 身份证号不合法,置空 + if (StringUtils.isNotBlank(IdentityNoUtils.IdentityNoVerification(identityNo))) { + identityNo = null; + } + + String realName = ModuleUtils.replaceIllegalCharacter(completeInfoFromDto.getName()); + + // 更新用户信息 + UserEntity userEntity = selectUserForCheck(userId, identityNo, completeInfoFromDto.getPhone()); + + if (userEntity.getPartyFlag().equals(YesOrNoEnum.YES.value())) { + if (!(userEntity.getIdentityNo().equals(identityNo) && userEntity.getRealName().equals(realName))) { + throw new RenException("党员姓名或身份证号码匹配失败"); + } + } + + UserEntity updateUser = new UserEntity(); + updateUser.setId(userId); + updateUser.setRealName(realName); + // 有效的身份证号码 + if (StringUtils.isNotBlank(identityNo)) { + updateUser.setIdentityNo(identityNo); + updateUser.setSex(IdentityNoUtils.getSex(identityNo)); + updateUser.setBirthday(DateUtils.parse(IdentityNoUtils.getBirthday(identityNo), DateUtils.DATE_PATTERN)); + } + updateUser.setMobile(completeInfoFromDto.getPhone()); + updateUser.setAddress(completeInfoFromDto.getHabitationDetail()); + updateUser.setRentFlag(completeInfoFromDto.getIsRent()); + updateUser.setDriverFlag(completeInfoFromDto.getIsDriver()); + + Long gridId = completeInfoFromDto.getGridId(); + if (null != gridId) { + Result parentAndAllDeptDTOResult = adminFeignClient.getParentAndAllDept(String.valueOf(gridId)); + if (!parentAndAllDeptDTOResult.success()) { + return new Result().error("查询机构信息失败"); + } + ParentAndAllDeptDTO deptInfo = parentAndAllDeptDTOResult.getData(); + updateUser.setState(AppUserStatesEnum.STATE_INFORMATION_PASSED.value()); + String lastName = updateUser.getRealName().substring(NumConstant.ZERO, NumConstant.ONE); + updateUser.setLastName(lastName); + // 有身份证号码,能判断出性别,进行修改昵称 + if (StringUtils.isNotBlank(identityNo)) { + updateUser.setNickname(deptInfo.getGrid().concat("-").concat(lastName).concat(UserSexEnum.FEMALE.sex().equals(updateUser.getSex()) ? "女士" : "先生")); + } + updateUser.setDeptId(gridId); + updateUser.setAllDeptIds(deptInfo.getAllDeptIds()); + updateUser.setAllDeptNames(deptInfo.getAllDeptNames()); + updateUser.setParentDeptIds(deptInfo.getParentDeptIds()); + updateUser.setParentDeptNames(deptInfo.getParentDeptNames()); + } + + this.updateById(updateUser); + + String carNum = ModuleUtils.replaceIllegalCharacter(completeInfoFromDto.getCarNum()).toUpperCase(); + + if (YesOrNoEnum.YES.value().equals(completeInfoFromDto.getIsDriver()) + && StringUtils.isNotBlank(carNum)) { + // 更新或存储用户车辆信息表 + UserCarInfoDTO userCarInfoDTO = userCarInfoService.selectOneByCarNumber(carNum); + if (userCarInfoDTO == null) { + UserCarInfoDTO dto = new UserCarInfoDTO(); + dto.setUserId(userId); + dto.setCarNumber(carNum); + userCarInfoService.save(dto); + } else { + // 库里存的车牌号与该用户不相符 + if (!userCarInfoDTO.getUserId().equals(userId)) { + throw new RenException("保存失败,此车牌已被注册"); + } + } + } + + return new Result(); + } + + /*** + * 临时生成注册党员 + * @param file + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author qushutong + * @date 2020/2/16 17:48 + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertUserList(MultipartFile file, Map params) { + Long gridId = Long.parseLong((String) params.get("gridId")); + String time = (String) params.get("time"); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Date date = new Date(); + try { + date = simpleDateFormat.parse(time); + } catch (ParseException e) { + e.printStackTrace(); + } + + File f = StreamUtils.conversionFile(file); + ImportParams importParams = new ImportParams(); + List userExcelList = ExcelImportUtil.importExcel(f, UserExcel.class, importParams); + List userEntities = ConvertUtils.sourceToTarget(userExcelList, UserEntity.class); + Result parentAndAllDeptDTOResult = adminFeignClient.getParentAndAllDept(gridId.toString()); + if (!parentAndAllDeptDTOResult.success()) { + return new Result().error(parentAndAllDeptDTOResult.getMsg()); + } + int i = 0; + for (UserEntity userItem : userEntities) { + userItem.setNickname(userItem.getRealName()); + userItem.setRegisterTime(date); + userItem.setLastLoginTime(date); + userItem.setLastLoginIp("219.146.91.110"); + userItem.setCreatedBy("0"); + userItem.setCreatedTime(new Date()); + userItem.setIdentityNo(userItem.getIdentityNo().trim()); + userItem.setRealName(userItem.getRealName().trim()); + userItem.setMobile(userItem.getMobile().trim()); + userItem.setWxOpenId("taidong_" + time + "" + (i++)); + userItem.setDeptId(gridId); + userItem.setPartyFlag("1"); + userItem.setState("3"); + userItem.setAllDeptIds(parentAndAllDeptDTOResult.getData().getAllDeptIds()); + userItem.setAllDeptNames(parentAndAllDeptDTOResult.getData().getAllDeptNames()); + userItem.setParentDeptIds(parentAndAllDeptDTOResult.getData().getParentDeptIds()); + userItem.setParentDeptNames(parentAndAllDeptDTOResult.getData().getParentDeptNames()); + userItem.setSex(IdentityNoUtils.getSex(userItem.getIdentityNo())); + userItem.setBirthday(DateUtils.parse(IdentityNoUtils.getBirthday(userItem.getIdentityNo()), DateUtils.DATE_PATTERN)); + } + // 插入用户表 + insertBatch(userEntities); + // 修改党员 + partyMembersService.upDataInfo(userEntities); + for (UserExcel item : userExcelList) { + System.out.println("从Excel导入数据到数据库的详细为 :{}" + JSON.toJSONString(item)); + } + System.out.println("从Excel导入数据一共 {} 行 " + userExcelList.size()); + return new Result(); + } + + @Override + public Result completeRequisiteInfo(CompleteRequisiteUserInfoDTO fromDto) { + String userId = fromDto.getUserId(); + UserEntity userEntity = selectUserForCheck(userId, null, fromDto.getMobile()); + + // 用于更新用户信息 + UserEntity updateUser = ConvertUtils.sourceToTarget(fromDto, UserEntity.class); + // 党员姓名必须与用户表中原来的姓名一致,否则不更新姓名与昵称。 + if (userEntity.getPartyFlag().equals(YesOrNoEnum.YES.value()) && !userEntity.getRealName().equals(updateUser.getRealName())) { + updateUser.setRealName(null); + } else { + updateUser.setLastName(fromDto.getRealName().substring(NumConstant.ZERO, NumConstant.ONE)); + updateUser.setNickname(fromDto.getGrid() + "-" + updateUser.getLastName() + (Integer.parseInt(fromDto.getSex()) == NumConstant.ZERO ? "女士" : "先生")); + } + updateUser.setId(userId); + // 非党员用户状态修改为待审核l + if (userEntity.getPartyFlag().equals(YesOrNoEnum.NO.value())) { + updateUser.setState(AppUserStatesEnum.STATE_COMPLETED_INFORMATION_PENDING_REVIEW.value()); + } + baseDao.updateById(updateUser); + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void modifyOrganizationInfo(OrganizationModifyDTO dto) { + // 查询需要修改的组织机构信息 + List userList = baseDao.selectListOfOrganizationInfo(dto.getDeptId().toString()); + if (null != userList && userList.size() > 0) { + // 组织机构信息处理 + List entities = handleOrganizationInfo(dto, userList); + // 更新事件组织机构信息 + updateBatchById(entities); + } + } + + + /** + * 组织机构信息处理 + * + * @return java.util.List + * @params [dto, userList] + * @author liuchuang + * @since 2020/3/7 15:22 + */ + private List handleOrganizationInfo(OrganizationModifyDTO dto, List userList) { + List entities = new ArrayList<>(); + for (UserDTO user : userList) { + UserEntity entity = new UserEntity(); + if (StringUtils.isNotEmpty(user.getParentDeptIds()) && StringUtils.isNotEmpty(user.getParentDeptNames())) { + List parentDeptIds = Arrays.asList(user.getParentDeptIds().split(",")); + List parentDeptNames = Arrays.asList(user.getParentDeptNames().split("-")); + int index = parentDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && parentDeptNames.size() > index) { + parentDeptNames.set(index, dto.getNewDeptName()); + entity.setId(user.getId()); + entity.setParentDeptNames(StringUtils.join(parentDeptNames, "-")); + } + } + + if (StringUtils.isNotEmpty(user.getAllDeptIds()) && StringUtils.isNotEmpty(user.getAllDeptNames())) { + List allDeptIds = Arrays.asList(user.getAllDeptIds().split(",")); + List allDeptNames = Arrays.asList(user.getAllDeptNames().split("-")); + int index = allDeptIds.indexOf(dto.getDeptId().toString()); + if (index >= 0 && allDeptNames.size() > index) { + allDeptNames.set(index, dto.getNewDeptName()); + entity.setId(user.getId()); + entity.setAllDeptNames(StringUtils.join(allDeptNames, "-")); + } + } + + entities.add(entity); + } + + return entities; + } + + @Override + @DataSource(value = DataSourceNames.FIRST) + public PageData allUserPage(Map params) { + String[] paramKeys = new String[]{"nickname", "identityNo", "realName", "identityNo", "mobile", "startTime", "endTime"}; + if (AppUserUtils.isDefaultQuery(params, paramKeys)) { + List userDtoList = Lists.newArrayList(); + return new PageData<>(userDtoList, NumConstant.ZERO); + } + this.verifyParams(params); + // 查询当前用户所具有的的数据权限 + IPage iPage = this.getPage(params); + List userDtoList = this.baseDao.selectListUserDto(params); + return new PageData<>(userDtoList, iPage.getTotal()); + } + + @Override + public PageData authenticatedpage(Map params) { + String[] paramKeys = new String[]{"streetId", "communityId", "gridId", "realName", "identityNo", "startTime", "endTime", "nickname", "mobile"}; + if (AppUserUtils.isDefaultQuery(params, paramKeys)) { + List userDtoList = Lists.newArrayList(); + return new PageData<>(userDtoList, NumConstant.ZERO); + } + this.verifyParams(params); + // 查询当前用户所具有的的数据权限 + if (NumConstant.ONE_STR.equals(params.get("state").toString())) { + IPage iPage = this.getPage(params); + List userDtoList = this.baseDao.selectWaitAuthenticatedListUserDto(params); + return new PageData<>(userDtoList, iPage.getTotal()); + } else { + IPage iPage = this.getPage(params); + List userDtoList = this.baseDao.selectAuthenticatedListUserDto(params); + return new PageData<>(userDtoList, iPage.getTotal()); + } + } + + /** + * 用户信息校验 + * + * @return com.elink.esua.epdc.dto.UserDTO + * @params [dto] + * @author liuchuang + * @since 2020/3/23 18:23 + */ + private UserDTO verifyUserInfo(UserDTO dto) { + if (StringUtils.isBlank(dto.getRealName()) && StringUtils.isBlank(dto.getRealName().trim())) { + throw new RenException("用户姓名不能为空"); + } + if (StringUtils.isBlank(dto.getMobile()) && StringUtils.isBlank(dto.getMobile().trim())) { + throw new RenException("手机号不能为空"); + } + if (StringUtils.isBlank(dto.getIdentityNo()) && StringUtils.isBlank(dto.getIdentityNo().trim())) { + throw new RenException("身份证号不能为空"); + } + dto.setRealName(dto.getRealName().trim()); + dto.setMobile(dto.getMobile().trim()); + dto.setIdentityNo(dto.getIdentityNo().trim()); + + return dto; + } + + /** + * 获取党员信息 + * + * @return boolean + * @params [realName, identityNo] + * @author liuchuang + * @since 2020/3/23 18:30 + */ + private boolean getPartyMemberByRealNameAndIdentityNo(String realName, String identityNo) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo) + .eq(UserFieldConsant.REAL_NAME, realName); + Integer count = this.partyMembersDao.selectCount(wrapper); + return count != NumConstant.ZERO; + } + + /** + * 获取党员信息 + * + * @return java.util.List + * @params [realName, identityNo] + * @author liuchuang + * @since 2020/3/23 18:35 + */ + private Result> getPartyMemberByRealNameOrIdentityNo(String realName, String identityNo) { + List partyMembersEntities = null; + List data = null; + Result> result = new Result<>(); + + // 根据身份证号查询党员库 + QueryWrapper identityNoWrapper = new QueryWrapper<>(); + identityNoWrapper.eq(UserFieldConsant.IDENTITY_NO, identityNo); + partyMembersEntities = this.partyMembersDao.selectList(identityNoWrapper); + if (null != partyMembersEntities && partyMembersEntities.size() > 0) { + data = ConvertUtils.sourceToTarget(partyMembersEntities, PartyMembersDTO.class); + result.setCode(NumConstant.ONE); + result.setData(data); + return result; + } + // 根据姓名查询党员库 + QueryWrapper realNameWrapper = new QueryWrapper<>(); + realNameWrapper.eq(UserFieldConsant.REAL_NAME, realName); + partyMembersEntities = this.partyMembersDao.selectList(realNameWrapper); + if (null != partyMembersEntities && partyMembersEntities.size() > 0) { + data = ConvertUtils.sourceToTarget(partyMembersEntities, PartyMembersDTO.class); + result.setCode(NumConstant.TWO); + result.setData(data); + return result; + } + + return new Result<>(); + } + + /** + * 新增党员信息 + * + * @return void + * @params [dto, findUser] + * @author liuchuang + * @since 2020/3/23 19:35 + */ + private void insertPartyMember(UserDTO dto) { + PartyMembersEntity entity = new PartyMembersEntity(); + entity.setRealName(dto.getRealName()); + entity.setIdentityNo(dto.getIdentityNo()); + entity.setRegistFlag(PartyMemberRegFlagEnum.MANUAL.getValue()); + + partyMembersDao.insert(entity); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagRelationServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagRelationServiceImpl.java new file mode 100644 index 0000000..5ff813f --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagRelationServiceImpl.java @@ -0,0 +1,162 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import cn.hutool.core.map.MapUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.redis.RedisKeys; +import com.elink.esua.epdc.commons.tools.redis.RedisUtils; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.dao.UserTagDao; +import com.elink.esua.epdc.dao.UserTagRelationDao; +import com.elink.esua.epdc.dto.UserTagInfo; +import com.elink.esua.epdc.dto.UserTagRelationDTO; +import com.elink.esua.epdc.entity.UserTagEntity; +import com.elink.esua.epdc.entity.UserTagRelationEntity; +import com.elink.esua.epdc.redis.UserTagRelationRedis; +import com.elink.esua.epdc.service.UserTagRelationService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户标签关系表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-30 + */ +@Service +public class UserTagRelationServiceImpl extends BaseServiceImpl implements UserTagRelationService { + + @Autowired + private UserTagDao userTagDao; + @Autowired + private UserTagRelationRedis userTagRelationRedis; + @Autowired + private RedisUtils redisUtils; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserTagRelationDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserTagRelationDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public UserTagRelationDTO get(String id) { + UserTagRelationEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserTagRelationDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserTagRelationDTO dto) { + UserTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, UserTagRelationEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserTagRelationDTO dto) { + UserTagRelationEntity entity = ConvertUtils.sourceToTarget(dto, UserTagRelationEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * @param userId 用户id + * @param tagCode 用户标签code + * @return void + * @Author yinzuomei + * @Description addUserTagRelation + * @Date 2020/2/7 12:06 + **/ + @Override + public void addUserTagRelation(String userId, String tagCode) { + UserTagEntity userTagEntity = userTagDao.selectByTagCode(tagCode); + if (null == userTagEntity) { + return; + } else { + // 执行一遍删除,防止重复 + removeUserTagRelation(userId, tagCode); + } + UserTagRelationDTO userTagRelationDTO = new UserTagRelationDTO(); + userTagRelationDTO.setTagId(userTagEntity.getId()); + userTagRelationDTO.setUserId(userId); + this.save(userTagRelationDTO); + this.updateUserTagInfo(userId); + } + + @Override + public void removeUserTagRelation(String userId, String tagCode) { + baseDao.removeUserTagRelation(userId, tagCode); + this.updateUserTagInfo(userId); + } + + /** + * @param userId 用户id + * @return void + * @Author yinzuomei + * @Description 根据用户id, 更新redis中TokenDto的userTagInfos + * @Date 2020/2/7 14:07 + **/ + public void updateUserTagInfo(String userId) { + List userTagInfos = userTagDao.selectByUserId(userId); + String key = RedisKeys.getCpUserKey(userId); + Map map = redisUtils.hGetAll(key); + if (MapUtil.isEmpty(map)) { + return; + } + map.put("userTagInfos", userTagInfos); + redisUtils.hMSet(key, map); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagServiceImpl.java new file mode 100644 index 0000000..dfc734a --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserTagServiceImpl.java @@ -0,0 +1,125 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dao.UserTagDao; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.entity.UserTagEntity; +import com.elink.esua.epdc.redis.UserTagRedis; +import com.elink.esua.epdc.service.UserTagService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 用户标签表 + * + * @author Mark sunlightcs@gmail.com + * @since v1.0.0 2019-09-02 + */ +@Service +public class UserTagServiceImpl extends BaseServiceImpl implements UserTagService { + @Autowired + private UserTagRedis userTagRedis; + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + + return getPageData(page, UserTagDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserTagDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get("id"); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), "id", id); + return wrapper; + } + + @Override + public UserTagDTO get(String id) { + UserTagEntity entity = baseDao.selectById(id); + + return ConvertUtils.sourceToTarget(entity, UserTagDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result save(UserTagDTO dto) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(dto.getTagCode()), "TAG_CODE", dto.getTagCode()) + .ne(StringUtils.isNotBlank(dto.getId()), "id", dto.getId()); + List list = baseDao.selectList(wrapper); + if (null != list || list.size() > 0) { + return new Result().error("编码有已存在"); + } + UserTagEntity entity = ConvertUtils.sourceToTarget(dto, UserTagEntity.class); + + insert(entity); + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result update(UserTagDTO dto) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(dto.getTagCode()), "TAG_CODE", dto.getTagCode()) + .ne(StringUtils.isNotBlank(dto.getId()), "id", dto.getId()); + List list = baseDao.selectList(wrapper); + if (null != list || list.size() > 0) { + return new Result().error("编码有已存在"); + } + UserTagEntity entity = ConvertUtils.sourceToTarget(dto, UserTagEntity.class); + updateById(entity); + return new Result(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + //逻辑删除 + //logicDelete(ids, UserTagEntity.class); + + //物理删除 + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserWxFormIdServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserWxFormIdServiceImpl.java new file mode 100644 index 0000000..b5ee738 --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/UserWxFormIdServiceImpl.java @@ -0,0 +1,105 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.dao.UserWxFormIdDao; +import com.elink.esua.epdc.dto.UserWxFormIdDTO; +import com.elink.esua.epdc.entity.UserWxFormIdEntity; +import com.elink.esua.epdc.service.UserWxFormIdService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.List; +import java.util.Map; + +/** + * 微信formId表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-09-26 + */ +@Service +public class UserWxFormIdServiceImpl extends BaseServiceImpl implements UserWxFormIdService { + + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, UserWxFormIdDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, UserWxFormIdDTO.class); + } + + private QueryWrapper getWrapper(Map params){ + String id = (String)params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public UserWxFormIdDTO get(String id) { + UserWxFormIdEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, UserWxFormIdDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(UserWxFormIdDTO dto) { + UserWxFormIdEntity entity = ConvertUtils.sourceToTarget(dto, UserWxFormIdEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(UserWxFormIdDTO dto) { + UserWxFormIdEntity entity = ConvertUtils.sourceToTarget(dto, UserWxFormIdEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + @Override + public UserWxFormIdDTO getByOpenId(String openId) { + return baseDao.getByOpenId(openId); + } + +} \ No newline at end of file diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java new file mode 100644 index 0000000..6c9238c --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java @@ -0,0 +1,380 @@ +/** + * Copyright 2018 人人开源 https://www.renren.io + *

+ * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + *

+ * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + *

+ * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +package com.elink.esua.epdc.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.map.MapUtil; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.toolkit.SqlHelper; +import com.elink.esua.epdc.async.NewsTask; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.mybatis.utils.DeptEntityUtils; +import com.elink.esua.epdc.commons.tools.constant.FieldConstant; +import com.elink.esua.epdc.commons.tools.constant.NumConstant; +import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; +import com.elink.esua.epdc.commons.tools.page.PageData; +import com.elink.esua.epdc.commons.tools.utils.ConvertUtils; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.constant.UserFieldConsant; +import com.elink.esua.epdc.constant.VolunteerInfoNoticeConstant; +import com.elink.esua.epdc.dao.VolunteerInfoDao; +import com.elink.esua.epdc.dto.ParentAndAllDeptDTO; +import com.elink.esua.epdc.dto.UserTagDTO; +import com.elink.esua.epdc.dto.VolunteerInfoDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcCompleteVolunteerInfoFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcInformationFormDTO; +import com.elink.esua.epdc.dto.epdc.form.EpdcVolunteerKindnessTimeFormDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcAdjustVolunteerPointsDTO; +import com.elink.esua.epdc.dto.epdc.result.EpdcGetVolunteerRankDTO; +import com.elink.esua.epdc.entity.UserTagEntity; +import com.elink.esua.epdc.entity.UserTagRelationEntity; +import com.elink.esua.epdc.entity.VolunteerInfoEntity; +import com.elink.esua.epdc.feign.AdminFeignClient; +import com.elink.esua.epdc.service.UserTagRelationService; +import com.elink.esua.epdc.service.VolunteerInfoService; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Arrays; +import java.util.Date; +import java.util.List; +import java.util.Map; + +/** + * 志愿者信息表 + * + * @author qu qu@elink-cn.com + * @since v1.0.0 2019-12-11 + */ +@Service +public class VolunteerInfoServiceImpl extends BaseServiceImpl implements VolunteerInfoService { + + @Autowired + private NewsTask newsTask; + + @Autowired + private AdminFeignClient adminFeignClient; + + @Autowired + private UserTagRelationService userTagRelationService; //用户标签关系表 + + /** + * 根据查询条件,返回首页 志愿者信息列表 + * + * @param params + * @return + */ + @Override + public PageData volunteerInfo(Map params) { + String streetId = MapUtil.getStr(params, "streetId"); + String communityId = MapUtil.getStr(params, "communityId"); + + String deptId = StringUtils.isNotBlank(streetId) ? streetId : + StringUtils.isNotBlank(communityId) ? communityId : MapUtil.getStr(params, "gridId"); + params.put("deptId", deptId); + + IPage page = getPage(params); + List list = baseDao.volunteerInfoList(params); + return new PageData<>(list, page.getTotal()); + } + + /** + * 根据志愿者ID,查询志愿者 单条详情 + * 积分需要连user表查询 + * + * @param id + * @return + */ + @Override + public VolunteerInfoDTO getVolunteerDetail(String id) { + return baseDao.getVolunteerDetail(id); + } + + @Override + public PageData page(Map params) { + IPage page = baseDao.selectPage( + getPage(params, FieldConstant.CREATED_TIME, false), + getWrapper(params) + ); + return getPageData(page, VolunteerInfoDTO.class); + } + + @Override + public List list(Map params) { + List entityList = baseDao.selectList(getWrapper(params)); + + return ConvertUtils.sourceToTarget(entityList, VolunteerInfoDTO.class); + } + + private QueryWrapper getWrapper(Map params) { + String id = (String) params.get(FieldConstant.ID_HUMP); + + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); + + return wrapper; + } + + @Override + public VolunteerInfoDTO get(String id) { + VolunteerInfoEntity entity = baseDao.selectById(id); + return ConvertUtils.sourceToTarget(entity, VolunteerInfoDTO.class); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void save(VolunteerInfoDTO dto) { + VolunteerInfoEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerInfoEntity.class); + insert(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(VolunteerInfoDTO dto) { + VolunteerInfoEntity entity = ConvertUtils.sourceToTarget(dto, VolunteerInfoEntity.class); + updateById(entity); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void delete(String[] ids) { + // 逻辑删除(@TableLogic 注解) + baseDao.deleteBatchIds(Arrays.asList(ids)); + } + + /** + * 志愿者申请,根据用户表基础信息 赋默认值 + * + * @param id + * @return VolunteerInfoDTO + * @author zy + * @date 2019-12-11 + */ + @Override + public Result getVolunteerUserDefaultValue(String id) { + VolunteerInfoDTO vo = baseDao.getVolunteerUserDefaultValue(id); + return new Result().ok(vo); + } + + /** + * 向标签表中,查询唯一志愿者标签:tag_code = volunteer + * + * @param tagCode + * @return + */ + @Override + public UserTagDTO volunteerTagQuery(String tagCode) { + return baseDao.volunteerTagQuery(tagCode); + } + + /** + * 根据用户id 进行志愿者认证 + * + * @param userId + * @return + * @author wanggongfeng + * @Date 2019/12/13 16:39 + */ + @Override + public Result getVolunteerCountById(String userId) { + return new Result().ok(baseDao.getVolunteerCountById(userId)); + } + + /** + * 新增志愿者 + * + * @param epdcCompleteVolunteerInfoFormDTO + * @return + * @author wanggongfeng + */ + @Override + @Transactional(rollbackFor = Exception.class) + public Result insertVolunteerInfo(EpdcCompleteVolunteerInfoFormDTO epdcCompleteVolunteerInfoFormDTO) { + + VolunteerInfoEntity volunteerEntity = ConvertUtils.sourceToTarget(epdcCompleteVolunteerInfoFormDTO, VolunteerInfoEntity.class); + + // 补全其他字段 + volunteerEntity.setRegistTime(new Date());// 注册时间 + volunteerEntity.setAuditStatus(NumConstant.ZERO_STR); // 审核状态 默认自动审核通过 + volunteerEntity.setAuditTime(volunteerEntity.getRegistTime()); // 审核时间 + String address = volunteerEntity.getRoad() + .concat(StringUtils.isNotBlank(volunteerEntity.getVillageName()) ? volunteerEntity.getVillageName() : StringUtils.EMPTY) + .concat(StringUtils.isNotBlank(volunteerEntity.getDwellingPlace()) ? volunteerEntity.getDwellingPlace() : StringUtils.EMPTY); + volunteerEntity.setAddress(address); // 居住地址 + + // 获取部门信息 + Result dtoResult = adminFeignClient.getParentAndAllDept(String.valueOf(volunteerEntity.getGridId())); + + // 机构信息 + DeptEntityUtils.loadDeptInfo( + ConvertUtils.sourceToTarget(dtoResult.getData(), DeptEntityUtils.DeptDto.class), + volunteerEntity + ); + + deleteVolunteerByUserId(volunteerEntity.getUserId()); + insert(volunteerEntity); + userTagRelationService.addUserTagRelation(volunteerEntity.getUserId(), UserTagEnum.VOLUNTEER.value()); + return new Result().ok(NumConstant.ONE); + } + + /** + * 清除志愿者认证历史 + * + * @param userId + * @return void + * @author work@yujt.net.cn + * @date 2020/4/3 16:11 + */ + private void deleteVolunteerByUserId(String userId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.USER_ID, userId); + baseDao.delete(wrapper); + } + + /** + * @param id + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 积分调整按钮按下, 查询用户信息 + * @Date 2019/12/16 17:48 + **/ + @Override + public Result getAdjustVolunteerPointsDTO(String id) { + if (StringUtils.isBlank(id)) { + return new Result().error("志愿者主键不能为空"); + } + EpdcAdjustVolunteerPointsDTO adjustVolunteerPointsDTO = baseDao.selectAdjustVolunteerPointsDTO(id); + return new Result().ok(adjustVolunteerPointsDTO); + } + + /** + * 获取排行榜 + * + * @return + * @author wanggongfeng + */ + @Override + public Result> getRankingList() { + List list = baseDao.getRankingList(); + return new Result>().ok(list); + } + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据用户主键获取用户志愿者标识(0-待审核,1-认证通过,2-待认证,3-黑名单) + * @Date 2020/2/5 16:57 + **/ + @Override + public Result queryUserVolunteerFlag(String userId) { + if (StringUtils.isNotBlank(userId)) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.USER_ID, userId) + .orderByDesc(FieldConstant.UPDATED_TIME); + List list = baseDao.selectList(wrapper); + if (CollUtil.isNotEmpty(list)) { + return new Result().ok(list.get(NumConstant.ZERO).getAuditStatus()); + } + } + return new Result().ok(NumConstant.TWO_STR); + } + + /** + * @param userId + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 根据用户id查询志愿者信息 + * @Date 2020/2/6 12:23 + **/ + @Override + public Result getVolunteerInfoDTOByUserId(String userId) { + return new Result().ok(baseDao.selectOneVolunteerInfoDTO(userId)); + } + + /** + * @param dto + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @Author yinzuomei + * @Description 志愿者审批 + * @Date 2020/2/7 10:37 + **/ + @Override + public Result volunteerInfoCheck(VolunteerInfoDTO dto) { + if (StringUtils.isBlank(dto.getAuditStatus())) { + return new Result().error("审核状态不能为空"); + } + VolunteerInfoDTO volunteerInfoDTO = this.get(dto.getId()); + volunteerInfoDTO.setAuditStatus(dto.getAuditStatus()); + volunteerInfoDTO.setFailureReason(dto.getFailureReason()); + if (NumConstant.TWO_STR.equals(volunteerInfoDTO.getAuditStatus())) { + if (StringUtils.isBlank(volunteerInfoDTO.getFailureReason())) { + return new Result().error("请填写原因"); + } + userTagRelationService.removeUserTagRelation(volunteerInfoDTO.getUserId(), UserTagEnum.VOLUNTEER.value()); + } else { + //2、审核通过-新增用户标签关系表(此方法里面实现了更新redis里的userTagInfos) + if (isVolunteer(volunteerInfoDTO.getUserId())) { + return new Result().error("当前用户已审核通过,无法操作历史记录"); + } + userTagRelationService.addUserTagRelation(volunteerInfoDTO.getUserId(), UserTagEnum.VOLUNTEER.value()); + } + sendInfo(volunteerInfoDTO); + //3、更新志愿者信息表 + this.update(volunteerInfoDTO); + return new Result(); + } + + private void sendInfo(VolunteerInfoDTO volunteerInfoDTO) { + EpdcInformationFormDTO informationFormDTO = new EpdcInformationFormDTO(); + // 审核不通过 + if (NumConstant.TWO_STR.equals(volunteerInfoDTO.getAuditStatus())) { + informationFormDTO.setTitle(VolunteerInfoNoticeConstant.NOTICE_CERTIFICATION_NOT_PASSED); + } else { + informationFormDTO.setTitle(VolunteerInfoNoticeConstant.NOTICE_CERTIFICATION_PASSED); + } + informationFormDTO.setContent(volunteerInfoDTO.getFailureReason()); + informationFormDTO.setUserId(volunteerInfoDTO.getUserId()); + informationFormDTO.setType(VolunteerInfoNoticeConstant.NOTICE_TYPE_AUDIT_NOTICE); + informationFormDTO.setBusinessType(VolunteerInfoNoticeConstant.NOTICE__BUSINESS_TYPE_VOLUNTEER); + informationFormDTO.setBusinessId(volunteerInfoDTO.getId()); + + newsTask.insertUserInformation(informationFormDTO); + } + + private boolean isVolunteer(String userId) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.eq(UserFieldConsant.USER_ID, userId) + .eq("AUDIT_STATUS", NumConstant.ONE_STR); + if (baseDao.selectCount(wrapper) > NumConstant.ZERO) { + return Boolean.TRUE; + } + return Boolean.FALSE; + } + + @Override + @Transactional(rollbackFor = Exception.class) + public Result modifyVolunteerKindnessTime(EpdcVolunteerKindnessTimeFormDTO formDto) { + baseDao.updateVolunteerKindnessTime(formDto); + return new Result(); + } + +} diff --git a/epdc-cloud-user/src/main/java/com/elink/esua/epdc/util/AppUserUtils.java b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/util/AppUserUtils.java new file mode 100644 index 0000000..eb892fb --- /dev/null +++ b/epdc-cloud-user/src/main/java/com/elink/esua/epdc/util/AppUserUtils.java @@ -0,0 +1,63 @@ +package com.elink.esua.epdc.util; + +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.ArrayUtil; +import org.apache.commons.lang3.StringUtils; + +import java.util.Map; + +/** + * 一些公用方法 + * + * @author work@yujt.net.cn + * @date 2020/2/24 15:23 + */ +public class AppUserUtils { + + /** + * 是否是进入页面时的首次查询 + * + * @param params 页面分页参数 + * @param paramKeys 查询条件的属性名 如:realName,startTime,endTime + * @return boolean + * @author work@yujt.net.cn + * @date 2020/2/24 15:27 + */ + public static boolean isDefaultQuery(Map params, String[] paramKeys) { + if (ArrayUtil.isEmpty(paramKeys)) { + return true; + } + for (String paramKey : paramKeys) { + if (StringUtils.isBlank(paramKey)) { + continue; + } + if (StringUtils.isNotBlank(MapUtil.getStr(params, paramKey))) { + return false; + } + } + return true; + } + + /** + * 对查询条件进行trim操作 + * + * @param params 查询条件 + * @param paramKeys 需要trim的键 + * @return java.util.Map + * @author work@yujt.net.cn + * @date 2020/2/24 16:39 + */ + public static Map trimParamValue(Map params, String[] paramKeys) { + if (ArrayUtil.isNotEmpty(paramKeys)) { + for (String paramKey : paramKeys) { + if (StringUtils.isNotBlank(paramKey)) { + String paramValue = MapUtil.getStr(params, paramKey); + if (StringUtils.isNotBlank(paramValue)) { + params.put(paramKey, paramValue.trim()); + } + } + } + } + return params; + } +} diff --git a/epdc-cloud-user/src/main/resources/application.yml b/epdc-cloud-user/src/main/resources/application.yml new file mode 100644 index 0000000..d973bb3 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/application.yml @@ -0,0 +1,120 @@ +#server: +# port: @server.port@ +# servlet: +# context-path: /app-user +# +#nacos: +# config: +# server-addr: @nacos.server-addr@ +# type: YAML +# namespace: @nacos.config.namespace@ +# group: @nacos.config.group@ +# dataId: epdc-user-server +# bootstrap: +# enable: true +# log: +# enable: @nacos.config.bootstrap.log.enable@ +# +#spring: +# application: +# name: epdc-user-server +server: + tomcat: + max-swallow-size: 100MB + port: @server.port@ + servlet: + context-path: /app-user + +spring: + main: + allow-bean-definition-overriding: true + servlet: + multipart: + enabled: true + file-size-threshold: 0 + max-file-size: 100MB + max-request-size: 100MB + application: + name: epdc-user-server + # 环境 dev|test|prod + profiles: + active: @spring.profiles.active@ + messages: + encoding: UTF-8 + basename: i18n/messages,i18n/messages_common + jackson: + time-zone: GMT+8 + date-format: yyyy-MM-dd HH:mm:ss + redis: + database: @spring.redis.index@ + host: @spring.redis.host@ + timeout: 30s + port: @spring.redis.port@ + password: @spring.redis.password@ + cloud: + nacos: + discovery: + server-addr: @nacos.server-addr@ + register-enabled: @nacos.register-enabled@ + ip: @nacos.ip@ + namespace: @nacos.namespace@ + alibaba: + seata: + tx-service-group: epdc-user-server-fescar-service-group + # 默认数据源 + datasource: + druid: + driverClassName: com.mysql.jdbc.Driver + url: @spring.datasource.druid.url@ + username: @spring.datasource.druid.username@ + password: @spring.datasource.druid.password@ + initialSize: 10 + maxActive: 300 + minIdle: 10 + +# 多数据源配置 +dynamic: + datasource: + first: + driverClassName: com.mysql.jdbc.Driver + url: @dynamic.datasource.first.url@ + username: @dynamic.datasource.first.username@ + password: @dynamic.datasource.first.password@ + initialSize: 10 + maxActive: 300 + minIdle: 10 + +management: + endpoints: + web: + exposure: + include: "*" + endpoint: + health: + show-details: ALWAYS + +mybatis-plus: + mapper-locations: classpath:/mapper/**/*.xml + #实体扫描,多个package用逗号或者分号分隔 + typeAliasesPackage: io.renren.entity;com.elink.esua.epdc.entity + global-config: + #数据库相关配置 + db-config: + #主键类型 AUTO:"数据库ID自增", INPUT:"用户输入ID", ID_WORKER:"全局唯一ID (数字类型唯一ID)", UUID:"全局唯一ID UUID"; + id-type: ID_WORKER + #字段策略 IGNORED:"忽略判断",NOT_NULL:"非 NULL 判断"),NOT_EMPTY:"非空判断" + field-strategy: NOT_NULL + #驼峰下划线转换 + column-underline: true + banner: false + #原生配置 + configuration: + map-underscore-to-camel-case: true + cache-enabled: false + call-setters-on-nulls: true + jdbc-type-for-null: 'null' + +rocketmq: + name-server: @rocketmq.name.server@ + consumer: + group: @rocketmq.consumer.group@ diff --git a/epdc-cloud-user/src/main/resources/i18n/messages.properties b/epdc-cloud-user/src/main/resources/i18n/messages.properties new file mode 100644 index 0000000..f64345d --- /dev/null +++ b/epdc-cloud-user/src/main/resources/i18n/messages.properties @@ -0,0 +1,3 @@ +#Default +#100006001=\u5728\u515A\u5458\u5E93\u4E2D\u6CA1\u6709\u627E\u5230\u60A8\u7684\u4FE1\u606F\uFF0C\u6211\u4EEC\u5148\u5C06\u60A8\u8BA4\u8BC1\u4E3A\u5C45\u6C11\uFF0C\u8BF7\u8054\u7CFB\u5F53\u5730\u7BA1\u7406\u4EBA\u5458\u5B8C\u5584\u515A\u5458\u5E93\u540E\u7EE7\u7EED\u8BA4\u8BC1 +100006001=\u6211\u4EEC\u6536\u5230\u60A8\u7684\u8BA4\u8BC1\u4FE1\u606F\uFF0C\u4F1A\u5C3D\u5FEB\u5BA1\u6838\uFF0C\u60A8\u53EF\u4EE5\u4EAB\u53D7\u5E73\u53F0\u7684\u670D\u52A1\u4E86 \ No newline at end of file diff --git a/epdc-cloud-user/src/main/resources/i18n/messages_en_US.properties b/epdc-cloud-user/src/main/resources/i18n/messages_en_US.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/i18n/messages_zh_CN.properties b/epdc-cloud-user/src/main/resources/i18n/messages_zh_CN.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/i18n/messages_zh_TW.properties b/epdc-cloud-user/src/main/resources/i18n/messages_zh_TW.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/i18n/validation.properties b/epdc-cloud-user/src/main/resources/i18n/validation.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/i18n/validation_en_US.properties b/epdc-cloud-user/src/main/resources/i18n/validation_en_US.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/i18n/validation_zh_CN.properties b/epdc-cloud-user/src/main/resources/i18n/validation_zh_CN.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/i18n/validation_zh_TW.properties b/epdc-cloud-user/src/main/resources/i18n/validation_zh_TW.properties new file mode 100644 index 0000000..e69de29 diff --git a/epdc-cloud-user/src/main/resources/logback-spring.xml b/epdc-cloud-user/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..342e9b6 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/logback-spring.xml @@ -0,0 +1,159 @@ + + + + + + + + + + + + + + debug + + + ${CONSOLE_LOG_PATTERN} + + UTF-8 + + + + + + + + ${log.path}/debug.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/debug-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + debug + ACCEPT + DENY + + + + + + + ${log.path}/info.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + + ${log.path}/info-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + info + ACCEPT + DENY + + + + + + + ${log.path}/warn.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/warn-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + warn + ACCEPT + DENY + + + + + + + ${log.path}/error.log + + + %d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n + UTF-8 + + + + ${log.path}/error-%d{yyyy-MM-dd}.%i.log + + 100MB + + + 15 + + + + ERROR + ACCEPT + DENY + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/PartyAuthenticationFailedDao.xml b/epdc-cloud-user/src/main/resources/mapper/PartyAuthenticationFailedDao.xml new file mode 100644 index 0000000..1d3aa5f --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/PartyAuthenticationFailedDao.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE epdc_party_authentication_failed SET GRID_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} + + + \ No newline at end of file diff --git a/epdc-cloud-user/src/main/resources/mapper/PartyMembersDao.xml b/epdc-cloud-user/src/main/resources/mapper/PartyMembersDao.xml new file mode 100644 index 0000000..1d7250d --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/PartyMembersDao.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE epdc_party_members SET GRID_NAME = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} + + + + + + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/PartyTagRelationDao.xml b/epdc-cloud-user/src/main/resources/mapper/PartyTagRelationDao.xml new file mode 100644 index 0000000..c559c0d --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/PartyTagRelationDao.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + UPDATE epdc_party_tag_relation SET DEL_FLAG = '1' WHERE PARTY_ID = #{partyId} + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/UserAuthenticateHistoryDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserAuthenticateHistoryDao.xml new file mode 100644 index 0000000..3698469 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserAuthenticateHistoryDao.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/UserCarInfoDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserCarInfoDao.xml new file mode 100644 index 0000000..d67f0e9 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserCarInfoDao.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/epdc-cloud-user/src/main/resources/mapper/UserDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserDao.xml new file mode 100644 index 0000000..7a9355a --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserDao.xml @@ -0,0 +1,623 @@ + + + + + + + DELETE FROM epdc_user WHERE WX_OPEN_ID = #{wxOpenId} AND STATE = '2' + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/UserGridInvitationCodeDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserGridInvitationCodeDao.xml new file mode 100644 index 0000000..efb44a0 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserGridInvitationCodeDao.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/UserGridRelationDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserGridRelationDao.xml new file mode 100644 index 0000000..722d56e --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserGridRelationDao.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + UPDATE epdc_user_grid_relation SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} + + + \ No newline at end of file diff --git a/epdc-cloud-user/src/main/resources/mapper/UserInvitationRecordDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserInvitationRecordDao.xml new file mode 100644 index 0000000..bbafa7e --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserInvitationRecordDao.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE epdc_user_invitation_record SET GRID = #{newDeptName}, UPDATED_TIME = NOW() WHERE GRID_ID = #{deptId} + + + \ No newline at end of file diff --git a/epdc-cloud-user/src/main/resources/mapper/UserTagDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserTagDao.xml new file mode 100644 index 0000000..342b010 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserTagDao.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/epdc-cloud-user/src/main/resources/mapper/UserTagRelationDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserTagRelationDao.xml new file mode 100644 index 0000000..15e11a5 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserTagRelationDao.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + DELETE FROM + epdc_user_tag_relation + WHERE + USER_ID = #{userId} + AND TAG_ID IN ( + SELECT eut.id FROM epdc_user_tag eut WHERE eut.TAG_CODE = #{tagCode} + ) + + diff --git a/epdc-cloud-user/src/main/resources/mapper/UserWxFormIdDao.xml b/epdc-cloud-user/src/main/resources/mapper/UserWxFormIdDao.xml new file mode 100644 index 0000000..894f439 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/UserWxFormIdDao.xml @@ -0,0 +1,18 @@ + + + + + + + + \ No newline at end of file diff --git a/epdc-cloud-user/src/main/resources/mapper/VolunteerInfoDao.xml b/epdc-cloud-user/src/main/resources/mapper/VolunteerInfoDao.xml new file mode 100644 index 0000000..cc604bf --- /dev/null +++ b/epdc-cloud-user/src/main/resources/mapper/VolunteerInfoDao.xml @@ -0,0 +1,207 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE epdc_volunteer_info + SET + UPDATED_BY = #{updatedBy} + ,UPDATED_TIME = #{updatedTime} + ,AUDIT_STATUS = #{auditStatus} + ,FAILURE_REASON = #{failureReason} + ,AUDIT_TIME = #{auditTime} + ,AUDITOR = #{auditor} + WHERE ID = #{id} + + + + + + + + + + + + UPDATE epdc_volunteer_info + SET KINDNESS_TIME = ( KINDNESS_TIME + #{kindnessTime} ), + PARTICIPATION_NUM = ( PARTICIPATION_NUM + 1 ) + WHERE + USER_ID = #{userId} + AND DEL_FLAG = '0' + + diff --git a/epdc-cloud-user/src/main/resources/registry.conf b/epdc-cloud-user/src/main/resources/registry.conf new file mode 100644 index 0000000..b5f0898 --- /dev/null +++ b/epdc-cloud-user/src/main/resources/registry.conf @@ -0,0 +1,21 @@ +registry { + # file 、nacos 、eureka、redis、zk、consul、etcd3、sofa + type = "nacos" + + nacos { + serverAddr = "@nacos.server-addr@" + namespace = "@nacos.namespace@" + cluster = "default" + } +} + +config { + # file、nacos 、apollo、zk、consul、etcd3 + type = "nacos" + + nacos { + serverAddr = "@nacos.server-addr@" + namespace = "@nacos.namespace@" + cluster = "default" + } +} diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..2255661 --- /dev/null +++ b/pom.xml @@ -0,0 +1,22 @@ + + + 4.0.0 + + com.esua.epdc.yushan + epdc-cloud-user-yushan + 1.0.0 + + pom + 榆山党群e事通互帮互助模块 + + + epdc-cloud-user + epdc-cloud-client-yushan + epdc-cloud-commons-yushan + epdc-cloud-gateway-yushan + epdc-cloud-parent-yushan + + +