From d2833c7465ee77c613398ed17045e3236843f135 Mon Sep 17 00:00:00 2001 From: tuyp Date: Tue, 5 Sep 2023 16:24:10 +0800 Subject: [PATCH] 演示前版本备份 --- logs/springboot-logback-error.log | 96 ++---------------------------------------------------------------------------------------------- logs/springboot-logback-info.log | 84 ++++++++++++++++++++++++++++++++++++++++++------------------------------------------ logs/springboot-logback/error/2023-03-30-0.log.gz | Bin 371 -> 0 bytes logs/springboot-logback/error/2023-04-04-0.log.gz | Bin 493 -> 0 bytes logs/springboot-logback/error/2023-04-06-0.log.gz | Bin 2905 -> 0 bytes logs/springboot-logback/error/2023-05-18-0.log.gz | Bin 2673 -> 0 bytes logs/springboot-logback/error/2023-05-19-0.log.gz | Bin 1398 -> 0 bytes logs/springboot-logback/info/2023-07-03-0.log.gz | Bin 1395 -> 0 bytes logs/springboot-logback/info/2023-07-05-0.log.gz | Bin 1389 -> 0 bytes logs/springboot-logback/info/2023-07-06-0.log.gz | Bin 5904 -> 0 bytes logs/springboot-logback/info/2023-07-07-0.log.gz | Bin 1305 -> 0 bytes pom.xml | 6 ++++++ src/main/java/com/laowu/common/RestTemplateConfig.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/laowu/controller/AccessTokenController.java | 22 ++++++++++++++++++++++ src/main/java/com/laowu/controller/AdministerController.java | 2 +- src/main/java/com/laowu/controller/ImageCheckRecordController.java | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/controller/MemberCertsController.java | 4 ++-- src/main/java/com/laowu/controller/MemberCollegeMappingController.java | 51 --------------------------------------------------- src/main/java/com/laowu/controller/MemberDictController.java | 47 +++++++++++++++++++++++++++++++++++++++-------- src/main/java/com/laowu/controller/MemberJobInfoController.java | 4 ++-- src/main/java/com/laowu/controller/MemberTeamMappingController.java | 22 ---------------------- src/main/java/com/laowu/controller/MemberTrainInfoController.java | 13 ++++++------- src/main/java/com/laowu/controller/MemberTrainPositionsController.java | 51 --------------------------------------------------- src/main/java/com/laowu/controller/MemberUpdateHistoryController.java | 22 ---------------------- src/main/java/com/laowu/controller/TeamDictController.java | 117 --------------------------------------------------------------------------------------------------------------------- src/main/java/com/laowu/controller/WorkstationDictController.java | 26 +++++++++++++++++++++++++- src/main/java/com/laowu/controller/WorkstationMemberMappingController.java | 26 +++++++++++++++++++++++--- src/main/java/com/laowu/dto/image/CheckResultDTO.java | 10 ++++++++++ src/main/java/com/laowu/dto/member/AddMemberDTO.java | 10 +++------- src/main/java/com/laowu/dto/member/AddTrainDTO.java | 14 -------------- src/main/java/com/laowu/dto/member/MemberManagementDTO.java | 112 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/dto/member/UpdateMemberDTO.java | 4 ---- src/main/java/com/laowu/dto/team/LeaderMembersDTO.java | 16 ---------------- src/main/java/com/laowu/dto/team/MemberManagementDTO.java | 25 ------------------------- src/main/java/com/laowu/dto/team/ProvinceStationTeamDTO.java | 10 ---------- src/main/java/com/laowu/dto/team/TeamMemberDTO.java | 16 ---------------- src/main/java/com/laowu/dto/team/TeamsDTO.java | 17 ----------------- src/main/java/com/laowu/dto/team/UpdateTeamMembersDTO.java | 14 -------------- src/main/java/com/laowu/mapper/AccessTokenMapper.java | 18 ++++++++++++++++++ src/main/java/com/laowu/mapper/ImageCheckRecordMapper.java | 19 +++++++++++++++++++ src/main/java/com/laowu/mapper/MemberCollegeMappingMapper.java | 18 ------------------ src/main/java/com/laowu/mapper/MemberDictMapper.java | 41 ++++++++++++++++++++++++++++++++++++++++- src/main/java/com/laowu/mapper/MemberTeamMappingMapper.java | 31 ------------------------------- src/main/java/com/laowu/mapper/MemberTrainPositionsMapper.java | 25 ------------------------- src/main/java/com/laowu/mapper/MemberUpdateHistoryMapper.java | 18 ------------------ src/main/java/com/laowu/mapper/TeamDictMapper.java | 51 --------------------------------------------------- src/main/java/com/laowu/mapper/WorkstationDictMapper.java | 2 +- src/main/java/com/laowu/mapper/WorkstationMemberMappingMapper.java | 15 +++++++++++++-- src/main/java/com/laowu/model/AccessTokenDO.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/laowu/model/ImageCheckRecordDO.java | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/model/MemberCertsDO.java | 5 +++++ src/main/java/com/laowu/model/MemberCollegeMappingDO.java | 69 --------------------------------------------------------------------- src/main/java/com/laowu/model/MemberDictDO.java | 254 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------- src/main/java/com/laowu/model/MemberJobInfoDO.java | 31 ++++++++++--------------------- src/main/java/com/laowu/model/MemberTeamMappingDO.java | 33 --------------------------------- src/main/java/com/laowu/model/MemberTrainInfoDO.java | 43 ++----------------------------------------- src/main/java/com/laowu/model/MemberTrainPositionsDO.java | 33 --------------------------------- src/main/java/com/laowu/model/TeamDictDO.java | 49 ------------------------------------------------- src/main/java/com/laowu/service/AccessTokenService.java | 16 ++++++++++++++++ src/main/java/com/laowu/service/CompanyDictService.java | 2 +- src/main/java/com/laowu/service/ImageCheckRecordService.java | 33 +++++++++++++++++++++++++++++++++ src/main/java/com/laowu/service/MemberCollegeMappingService.java | 21 --------------------- src/main/java/com/laowu/service/MemberDictService.java | 8 +++++++- src/main/java/com/laowu/service/MemberTeamMappingService.java | 16 ---------------- src/main/java/com/laowu/service/MemberTrainInfoService.java | 7 +++---- src/main/java/com/laowu/service/MemberTrainPositionsService.java | 21 --------------------- src/main/java/com/laowu/service/MemberUpdateHistoryService.java | 16 ---------------- src/main/java/com/laowu/service/TeamDictService.java | 52 ---------------------------------------------------- src/main/java/com/laowu/service/WorkstationDictService.java | 13 ++++++++++--- src/main/java/com/laowu/service/WorkstationMemberMappingService.java | 7 ++++++- src/main/java/com/laowu/service/impl/AccessTokenServiceImpl.java | 20 ++++++++++++++++++++ src/main/java/com/laowu/service/impl/AdministerServiceImpl.java | 1 + src/main/java/com/laowu/service/impl/CompanyDictServiceImpl.java | 2 +- src/main/java/com/laowu/service/impl/ImageCheckRecordServiceImpl.java | 461 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/service/impl/MemberCollegeMappingServiceImpl.java | 60 ------------------------------------------------------------ src/main/java/com/laowu/service/impl/MemberDictServiceImpl.java | 512 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/main/java/com/laowu/service/impl/MemberJobInfoServiceImpl.java | 27 ++------------------------- src/main/java/com/laowu/service/impl/MemberTeamMappingServiceImpl.java | 20 -------------------- src/main/java/com/laowu/service/impl/MemberTrainInfoServiceImpl.java | 69 ++------------------------------------------------------------------- src/main/java/com/laowu/service/impl/MemberTrainPositionsServiceImpl.java | 58 ---------------------------------------------------------- src/main/java/com/laowu/service/impl/MemberUpdateHistoryServiceImpl.java | 20 -------------------- src/main/java/com/laowu/service/impl/TeamDictServiceImpl.java | 334 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/main/java/com/laowu/service/impl/WorkstationDictServiceImpl.java | 232 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------- src/main/java/com/laowu/service/impl/WorkstationMemberMappingServiceImpl.java | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++-- src/main/java/com/laowu/util/Base64Util.java | 87 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/util/MathUtil.java | 7 +++++-- src/main/java/com/laowu/util/OSSUtils.java | 119 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/util/RandomUtil.java | 34 ++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/util/SecretUtils.java | 158 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/vo/image/CheckResultVO.java | 18 ++++++++++++++++++ src/main/java/com/laowu/vo/image/GetMemberCheckDetailVO.java | 18 ++++++++++++++++++ src/main/java/com/laowu/vo/image/IdCardAccessTokenVO.java | 19 +++++++++++++++++++ src/main/java/com/laowu/vo/image/IdCardSignTicketVO.java | 18 ++++++++++++++++++ src/main/java/com/laowu/vo/image/IdCardTicketsVO.java | 14 ++++++++++++++ src/main/java/com/laowu/vo/image/ResultVO.java | 31 +++++++++++++++++++++++++++++++ src/main/java/com/laowu/vo/image/SendIdCardInfoVO.java | 18 ++++++++++++++++++ src/main/java/com/laowu/vo/image/SendResultVO.java | 30 ++++++++++++++++++++++++++++++ src/main/java/com/laowu/vo/job/RecentJobInfoVO.java | 20 +++++++++++++++----- src/main/java/com/laowu/vo/member/MemberCardVO.java | 5 ++--- src/main/java/com/laowu/vo/member/MemberCollegeVO.java | 13 ------------- src/main/java/com/laowu/vo/member/MemberManagementVO.java | 195 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/vo/member/MemberTrainInfoVO.java | 14 -------------- src/main/java/com/laowu/vo/member/OneMemberVO.java | 23 +++++++++++++++-------- src/main/java/com/laowu/vo/member/TokenLoginVO.java | 14 ++++++++++++++ src/main/java/com/laowu/vo/station/BusinessTop7VO.java | 14 ++++++++++++++ src/main/java/com/laowu/vo/station/HomepageVO.java | 26 ++++++++++++++++++++++++++ src/main/java/com/laowu/vo/station/Screen1VO.java | 19 +++++++++++++++++++ src/main/java/com/laowu/vo/station/Screen2VO.java | 38 ++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/vo/station/Screen3VO.java | 43 +++++++++++++++++++++++++++++++++++++++++++ src/main/java/com/laowu/vo/station/TotalTeamsVO.java | 10 ++++++++++ src/main/java/com/laowu/vo/team/HomepageVO.java | 26 -------------------------- src/main/java/com/laowu/vo/team/LeaderMembersVO.java | 22 ---------------------- src/main/java/com/laowu/vo/team/MemberManagementVO.java | 57 --------------------------------------------------------- src/main/java/com/laowu/vo/team/OneTeamInfoVO.java | 17 ----------------- src/main/java/com/laowu/vo/team/ProvinceStationTeamVO.java | 14 -------------- src/main/java/com/laowu/vo/team/TeamsVO.java | 18 ------------------ src/main/java/com/laowu/vo/team/TotalTeamsVO.java | 10 ---------- src/main/java/com/laowu/vo/team/WorkstationDictVO.java | 14 -------------- src/main/resources/application-ceshi.properties | 33 +++++++++++++++++++++++++++++++++ src/main/resources/application-dev.properties | 9 +++------ src/main/resources/code.properties | 4 ++++ src/main/resources/mapper/AccessTokenMapper.xml | 22 ++++++++++++++++++++++ src/main/resources/mapper/CompanyDictMapper.xml | 11 ----------- src/main/resources/mapper/ImageCheckRecordMapper.xml | 5 +++++ src/main/resources/mapper/LibGeoLocationMapper.xml | 9 +-------- src/main/resources/mapper/MemberCollegeMappingMapper.xml | 28 ---------------------------- src/main/resources/mapper/MemberDictMapper.xml | 184 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------------------- src/main/resources/mapper/MemberJobInfoMapper.xml | 21 ++++++++++++--------- src/main/resources/mapper/MemberTeamMappingMapper.xml | 58 ---------------------------------------------------------- src/main/resources/mapper/MemberTrainPositionsMapper.xml | 45 --------------------------------------------- src/main/resources/mapper/MemberUpdateHistoryMapper.xml | 25 ------------------------- src/main/resources/mapper/TeamDictMapper.xml | 228 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ src/main/resources/mapper/WorkstationAdministersMapper.xml | 4 +++- src/main/resources/mapper/WorkstationDictMapper.xml | 2 +- src/main/resources/mapper/WorkstationMemberMappingMapper.xml | 253 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++---------------- 135 files changed, 3282 insertions(+), 2724 deletions(-) delete mode 100644 logs/springboot-logback/error/2023-03-30-0.log.gz delete mode 100644 logs/springboot-logback/error/2023-04-04-0.log.gz delete mode 100644 logs/springboot-logback/error/2023-04-06-0.log.gz delete mode 100644 logs/springboot-logback/error/2023-05-18-0.log.gz delete mode 100644 logs/springboot-logback/error/2023-05-19-0.log.gz delete mode 100644 logs/springboot-logback/info/2023-07-03-0.log.gz delete mode 100644 logs/springboot-logback/info/2023-07-05-0.log.gz delete mode 100644 logs/springboot-logback/info/2023-07-06-0.log.gz delete mode 100644 logs/springboot-logback/info/2023-07-07-0.log.gz create mode 100644 src/main/java/com/laowu/common/RestTemplateConfig.java create mode 100644 src/main/java/com/laowu/controller/AccessTokenController.java create mode 100644 src/main/java/com/laowu/controller/ImageCheckRecordController.java delete mode 100644 src/main/java/com/laowu/controller/MemberCollegeMappingController.java delete mode 100644 src/main/java/com/laowu/controller/MemberTeamMappingController.java delete mode 100644 src/main/java/com/laowu/controller/MemberTrainPositionsController.java delete mode 100644 src/main/java/com/laowu/controller/MemberUpdateHistoryController.java delete mode 100644 src/main/java/com/laowu/controller/TeamDictController.java create mode 100644 src/main/java/com/laowu/dto/image/CheckResultDTO.java delete mode 100644 src/main/java/com/laowu/dto/member/AddTrainDTO.java create mode 100644 src/main/java/com/laowu/dto/member/MemberManagementDTO.java delete mode 100644 src/main/java/com/laowu/dto/team/LeaderMembersDTO.java delete mode 100644 src/main/java/com/laowu/dto/team/MemberManagementDTO.java delete mode 100644 src/main/java/com/laowu/dto/team/ProvinceStationTeamDTO.java delete mode 100644 src/main/java/com/laowu/dto/team/TeamMemberDTO.java delete mode 100644 src/main/java/com/laowu/dto/team/TeamsDTO.java delete mode 100644 src/main/java/com/laowu/dto/team/UpdateTeamMembersDTO.java create mode 100644 src/main/java/com/laowu/mapper/AccessTokenMapper.java create mode 100644 src/main/java/com/laowu/mapper/ImageCheckRecordMapper.java delete mode 100644 src/main/java/com/laowu/mapper/MemberCollegeMappingMapper.java delete mode 100644 src/main/java/com/laowu/mapper/MemberTeamMappingMapper.java delete mode 100644 src/main/java/com/laowu/mapper/MemberTrainPositionsMapper.java delete mode 100644 src/main/java/com/laowu/mapper/MemberUpdateHistoryMapper.java delete mode 100644 src/main/java/com/laowu/mapper/TeamDictMapper.java create mode 100644 src/main/java/com/laowu/model/AccessTokenDO.java create mode 100644 src/main/java/com/laowu/model/ImageCheckRecordDO.java delete mode 100644 src/main/java/com/laowu/model/MemberCollegeMappingDO.java delete mode 100644 src/main/java/com/laowu/model/MemberTeamMappingDO.java delete mode 100644 src/main/java/com/laowu/model/MemberTrainPositionsDO.java delete mode 100644 src/main/java/com/laowu/model/TeamDictDO.java create mode 100644 src/main/java/com/laowu/service/AccessTokenService.java create mode 100644 src/main/java/com/laowu/service/ImageCheckRecordService.java delete mode 100644 src/main/java/com/laowu/service/MemberCollegeMappingService.java delete mode 100644 src/main/java/com/laowu/service/MemberTeamMappingService.java delete mode 100644 src/main/java/com/laowu/service/MemberTrainPositionsService.java delete mode 100644 src/main/java/com/laowu/service/MemberUpdateHistoryService.java delete mode 100644 src/main/java/com/laowu/service/TeamDictService.java create mode 100644 src/main/java/com/laowu/service/impl/AccessTokenServiceImpl.java create mode 100644 src/main/java/com/laowu/service/impl/ImageCheckRecordServiceImpl.java delete mode 100644 src/main/java/com/laowu/service/impl/MemberCollegeMappingServiceImpl.java delete mode 100644 src/main/java/com/laowu/service/impl/MemberTeamMappingServiceImpl.java delete mode 100644 src/main/java/com/laowu/service/impl/MemberTrainPositionsServiceImpl.java delete mode 100644 src/main/java/com/laowu/service/impl/MemberUpdateHistoryServiceImpl.java delete mode 100644 src/main/java/com/laowu/service/impl/TeamDictServiceImpl.java create mode 100644 src/main/java/com/laowu/util/Base64Util.java create mode 100644 src/main/java/com/laowu/util/OSSUtils.java create mode 100644 src/main/java/com/laowu/util/RandomUtil.java create mode 100644 src/main/java/com/laowu/util/SecretUtils.java create mode 100644 src/main/java/com/laowu/vo/image/CheckResultVO.java create mode 100644 src/main/java/com/laowu/vo/image/GetMemberCheckDetailVO.java create mode 100644 src/main/java/com/laowu/vo/image/IdCardAccessTokenVO.java create mode 100644 src/main/java/com/laowu/vo/image/IdCardSignTicketVO.java create mode 100644 src/main/java/com/laowu/vo/image/IdCardTicketsVO.java create mode 100644 src/main/java/com/laowu/vo/image/ResultVO.java create mode 100644 src/main/java/com/laowu/vo/image/SendIdCardInfoVO.java create mode 100644 src/main/java/com/laowu/vo/image/SendResultVO.java delete mode 100644 src/main/java/com/laowu/vo/member/MemberCollegeVO.java create mode 100644 src/main/java/com/laowu/vo/member/MemberManagementVO.java delete mode 100644 src/main/java/com/laowu/vo/member/MemberTrainInfoVO.java create mode 100644 src/main/java/com/laowu/vo/member/TokenLoginVO.java create mode 100644 src/main/java/com/laowu/vo/station/BusinessTop7VO.java create mode 100644 src/main/java/com/laowu/vo/station/HomepageVO.java create mode 100644 src/main/java/com/laowu/vo/station/Screen1VO.java create mode 100644 src/main/java/com/laowu/vo/station/Screen2VO.java create mode 100644 src/main/java/com/laowu/vo/station/Screen3VO.java create mode 100644 src/main/java/com/laowu/vo/station/TotalTeamsVO.java delete mode 100644 src/main/java/com/laowu/vo/team/HomepageVO.java delete mode 100644 src/main/java/com/laowu/vo/team/LeaderMembersVO.java delete mode 100644 src/main/java/com/laowu/vo/team/MemberManagementVO.java delete mode 100644 src/main/java/com/laowu/vo/team/OneTeamInfoVO.java delete mode 100644 src/main/java/com/laowu/vo/team/ProvinceStationTeamVO.java delete mode 100644 src/main/java/com/laowu/vo/team/TeamsVO.java delete mode 100644 src/main/java/com/laowu/vo/team/TotalTeamsVO.java delete mode 100644 src/main/java/com/laowu/vo/team/WorkstationDictVO.java create mode 100644 src/main/resources/application-ceshi.properties create mode 100644 src/main/resources/mapper/AccessTokenMapper.xml create mode 100644 src/main/resources/mapper/ImageCheckRecordMapper.xml delete mode 100644 src/main/resources/mapper/MemberCollegeMappingMapper.xml delete mode 100644 src/main/resources/mapper/MemberTeamMappingMapper.xml delete mode 100644 src/main/resources/mapper/MemberTrainPositionsMapper.xml delete mode 100644 src/main/resources/mapper/MemberUpdateHistoryMapper.xml delete mode 100644 src/main/resources/mapper/TeamDictMapper.xml diff --git a/logs/springboot-logback-error.log b/logs/springboot-logback-error.log index 57c8d00..5c530e8 100644 --- a/logs/springboot-logback-error.log +++ b/logs/springboot-logback-error.log @@ -1,94 +1,2 @@ -2023-05-22 09:54:53,188 [http-nio-34567-exec-2] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token - at [Source: (PushbackInputStream); line: 2, column: 16] (through reference chain: com.laowu.model.MemberDictDO["userName"]) -2023-05-22 09:56:25,376 [http-nio-34567-exec-5] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value; nested exception is com.fasterxml.jackson.databind.JsonMappingException: Illegal unquoted character ((CTRL-CHAR, code 13)): has to be escaped using backslash to be included in string value - at [Source: (PushbackInputStream); line: 2, column: 16] (through reference chain: com.laowu.model.MemberDictDO["userName"]) -2023-05-22 09:56:54,840 [http-nio-34567-exec-8] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token; nested exception is com.fasterxml.jackson.databind.exc.MismatchedInputException: Cannot deserialize instance of `java.lang.String` out of START_ARRAY token - at [Source: (PushbackInputStream); line: 2, column: 16] (through reference chain: com.laowu.model.MemberDictDO["userName"]) -2023-07-06 16:53:26,161 [main] ERROR org.apache.catalina.util.LifecycleBase:175 - Failed to start component [Connector[HTTP/1.1-34567]] -org.apache.catalina.LifecycleException: Protocol handler start failed - at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008) - at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) - at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227) - at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:263) - at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:195) - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) - at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) - at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) - at com.laowu.LaowuApplication.main(LaowuApplication.java:14) -Caused by: java.net.BindException: Address already in use: bind - at sun.nio.ch.Net.bind0(Native Method) - at sun.nio.ch.Net.bind(Net.java:433) - at sun.nio.ch.Net.bind(Net.java:425) - at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) - at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) - at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:230) - at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213) - at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1124) - at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1210) - at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585) - at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005) - ... 14 common frames omitted -2023-07-06 16:53:26,184 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 - - -*************************** -APPLICATION FAILED TO START -*************************** - -Description: - -The Tomcat connector configured to listen on port 34567 failed to start. The port may already be in use or the connector may be misconfigured. - -Action: - -Verify the connector's configuration, identify and stop any process that's listening on port 34567, or configure this application to listen on another port. - -2023-07-06 17:05:55,745 [main] ERROR org.apache.catalina.util.LifecycleBase:175 - Failed to start component [Connector[HTTP/1.1-34567]] -org.apache.catalina.LifecycleException: Protocol handler start failed - at org.apache.catalina.connector.Connector.startInternal(Connector.java:1008) - at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:183) - at org.apache.catalina.core.StandardService.addConnector(StandardService.java:227) - at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.addPreviouslyRemovedConnectors(TomcatWebServer.java:263) - at org.springframework.boot.web.embedded.tomcat.TomcatWebServer.start(TomcatWebServer.java:195) - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.startWebServer(ServletWebServerApplicationContext.java:297) - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:163) - at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:552) - at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) - at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:743) - at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:390) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:312) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1214) - at org.springframework.boot.SpringApplication.run(SpringApplication.java:1203) - at com.laowu.LaowuApplication.main(LaowuApplication.java:14) -Caused by: java.net.BindException: Address already in use: bind - at sun.nio.ch.Net.bind0(Native Method) - at sun.nio.ch.Net.bind(Net.java:433) - at sun.nio.ch.Net.bind(Net.java:425) - at sun.nio.ch.ServerSocketChannelImpl.bind(ServerSocketChannelImpl.java:223) - at sun.nio.ch.ServerSocketAdaptor.bind(ServerSocketAdaptor.java:74) - at org.apache.tomcat.util.net.NioEndpoint.initServerSocket(NioEndpoint.java:230) - at org.apache.tomcat.util.net.NioEndpoint.bind(NioEndpoint.java:213) - at org.apache.tomcat.util.net.AbstractEndpoint.bindWithCleanup(AbstractEndpoint.java:1124) - at org.apache.tomcat.util.net.AbstractEndpoint.start(AbstractEndpoint.java:1210) - at org.apache.coyote.AbstractProtocol.start(AbstractProtocol.java:585) - at org.apache.catalina.connector.Connector.startInternal(Connector.java:1005) - ... 14 common frames omitted -2023-07-06 17:05:55,766 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter:40 - - -*************************** -APPLICATION FAILED TO START -*************************** - -Description: - -The Tomcat connector configured to listen on port 34567 failed to start. The port may already be in use or the connector may be misconfigured. - -Action: - -Verify the connector's configuration, identify and stop any process that's listening on port 34567, or configure this application to listen on another port. - +2023-08-15 15:57:34,530 [http-nio-34567-exec-9] ERROR com.laowu.common.exception.GlobalExceptionHandler:88 - JSON parse error: Cannot deserialize value of type `java.time.LocalDateTime` from String "2023-08-09": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2023-08-09' could not be parsed at index 10; nested exception is com.fasterxml.jackson.databind.exc.InvalidFormatException: Cannot deserialize value of type `java.time.LocalDateTime` from String "2023-08-09": Failed to deserialize java.time.LocalDateTime: (java.time.format.DateTimeParseException) Text '2023-08-09' could not be parsed at index 10 + at [Source: (PushbackInputStream); line: 1, column: 113] (through reference chain: com.laowu.dto.member.AddMemberDTO["homecomingDate"]) diff --git a/logs/springboot-logback-info.log b/logs/springboot-logback-info.log index 198b2ee..a2dd37f 100644 --- a/logs/springboot-logback-info.log +++ b/logs/springboot-logback-info.log @@ -1,42 +1,42 @@ -2023-07-31 11:16:43,146 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$856a7738] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) -2023-07-31 11:16:43,335 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 34567 (http) -2023-07-31 11:16:43,345 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-34567"] -2023-07-31 11:16:43,350 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat] -2023-07-31 11:16:43,350 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22] -2023-07-31 11:16:43,355 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - Loaded APR based Apache Tomcat Native library [1.2.37] using APR version [1.7.4]. -2023-07-31 11:16:43,355 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. -2023-07-31 11:16:43,355 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] -2023-07-31 11:16:43,366 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023] -2023-07-31 11:16:43,445 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext -2023-07-31 11:16:43,445 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1339 ms -2023-07-31 11:16:43,541 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource -2023-07-31 11:16:44,656 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited -2023-07-31 11:16:46,295 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping:69 - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] -2023-07-31 11:16:46,375 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor' -2023-07-31 11:16:46,563 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed -2023-07-31 11:16:46,576 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s) -2023-07-31 11:16:46,602 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references -2023-07-31 11:16:46,781 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addCollegeUsingPOST_1 -2023-07-31 11:16:46,782 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteCollegeUsingPOST_1 -2023-07-31 11:16:46,783 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateCollegeUsingPOST_1 -2023-07-31 11:16:46,813 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addJobUsingPOST_1 -2023-07-31 11:16:46,814 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteJobUsingPOST_1 -2023-07-31 11:16:46,815 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateJobUsingPOST_1 -2023-07-31 11:16:46,824 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addPositionUsingPOST_1 -2023-07-31 11:16:46,825 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deletePositionUsingPOST_1 -2023-07-31 11:16:46,826 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updatePositionUsingPOST_1 -2023-07-31 11:16:46,846 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addPositionUsingPOST_2 -2023-07-31 11:16:46,847 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deletePositionUsingPOST_2 -2023-07-31 11:16:46,848 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updatePositionUsingPOST_2 -2023-07-31 11:16:46,880 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: importUsersUsingPOST_1 -2023-07-31 11:16:46,887 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addAdministerUsingPOST_1 -2023-07-31 11:16:46,892 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateAdministerUsingPOST_1 -2023-07-31 11:16:46,894 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addGeoUsingPOST_1 -2023-07-31 11:16:46,894 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteGeoUsingPOST_1 -2023-07-31 11:16:46,895 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateGeoUsingPOST_1 -2023-07-31 11:16:46,897 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteRequireUsingPOST_1 -2023-07-31 11:16:46,897 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requireStationsUsingPOST_1 -2023-07-31 11:16:46,898 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requiresUsingPOST_1 -2023-07-31 11:16:46,898 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: shareUsingPOST_1 -2023-07-31 11:16:46,911 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-34567"] -2023-07-31 11:16:46,929 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 34567 (http) with context path '' +2023-09-04 10:22:15,737 [main] INFO org.springframework.context.support.PostProcessorRegistrationDelegate$BeanPostProcessorChecker:330 - Bean 'org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration' of type [org.springframework.transaction.annotation.ProxyTransactionManagementConfiguration$$EnhancerBySpringCGLIB$$610e7030] is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying) +2023-09-04 10:22:15,939 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:90 - Tomcat initialized with port(s): 34567 (http) +2023-09-04 10:22:15,950 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Initializing ProtocolHandler ["http-nio-34567"] +2023-09-04 10:22:15,957 [main] INFO org.apache.catalina.core.StandardService:173 - Starting service [Tomcat] +2023-09-04 10:22:15,958 [main] INFO org.apache.catalina.core.StandardEngine:173 - Starting Servlet engine: [Apache Tomcat/9.0.22] +2023-09-04 10:22:15,963 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - Loaded APR based Apache Tomcat Native library [1.2.37] using APR version [1.7.4]. +2023-09-04 10:22:15,963 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR capabilities: IPv6 [true], sendfile [true], accept filters [false], random [true]. +2023-09-04 10:22:15,964 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - APR/OpenSSL configuration: useAprConnector [false], useOpenSSL [true] +2023-09-04 10:22:15,974 [main] INFO org.apache.catalina.core.AprLifecycleListener:173 - OpenSSL successfully initialized [OpenSSL 1.1.1u 30 May 2023] +2023-09-04 10:22:16,055 [main] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring embedded WebApplicationContext +2023-09-04 10:22:16,056 [main] INFO org.springframework.web.context.ContextLoader:284 - Root WebApplicationContext: initialization completed in 1407 ms +2023-09-04 10:22:16,157 [main] INFO com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure:56 - Init DruidDataSource +2023-09-04 10:22:17,297 [main] INFO com.alibaba.druid.pool.DruidDataSource:994 - {dataSource-1} inited +2023-09-04 10:22:18,939 [main] INFO springfox.documentation.spring.web.PropertySourcedRequestMappingHandlerMapping:69 - Mapped URL path [/v2/api-docs] onto method [public org.springframework.http.ResponseEntity springfox.documentation.swagger2.web.Swagger2Controller.getDocumentation(java.lang.String,javax.servlet.http.HttpServletRequest)] +2023-09-04 10:22:19,028 [main] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:171 - Initializing ExecutorService 'applicationTaskExecutor' +2023-09-04 10:22:19,226 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:160 - Context refreshed +2023-09-04 10:22:19,239 [main] INFO springfox.documentation.spring.web.plugins.DocumentationPluginsBootstrapper:163 - Found 1 custom documentation plugin(s) +2023-09-04 10:22:19,266 [main] INFO springfox.documentation.spring.web.scanners.ApiListingReferenceScanner:41 - Scanning for api listing references +2023-09-04 10:22:19,499 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addJobUsingPOST_1 +2023-09-04 10:22:19,500 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteJobUsingPOST_1 +2023-09-04 10:22:19,501 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateJobUsingPOST_1 +2023-09-04 10:22:19,525 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addPositionUsingPOST_1 +2023-09-04 10:22:19,526 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deletePositionUsingPOST_1 +2023-09-04 10:22:19,527 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updatePositionUsingPOST_1 +2023-09-04 10:22:19,550 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: importUsersUsingPOST_1 +2023-09-04 10:22:19,558 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addAdministerUsingPOST_1 +2023-09-04 10:22:19,566 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateAdministerUsingPOST_1 +2023-09-04 10:22:19,568 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: addGeoUsingPOST_1 +2023-09-04 10:22:19,569 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteGeoUsingPOST_1 +2023-09-04 10:22:19,570 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: updateGeoUsingPOST_1 +2023-09-04 10:22:19,571 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: deleteRequireUsingPOST_1 +2023-09-04 10:22:19,571 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requireStationsUsingPOST_1 +2023-09-04 10:22:19,572 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: requiresUsingPOST_1 +2023-09-04 10:22:19,573 [main] INFO springfox.documentation.spring.web.readers.operation.CachingOperationNameGenerator:40 - Generating unique operation named: shareUsingPOST_1 +2023-09-04 10:22:19,586 [main] INFO org.apache.coyote.http11.Http11NioProtocol:173 - Starting ProtocolHandler ["http-nio-34567"] +2023-09-04 10:22:19,604 [main] INFO org.springframework.boot.web.embedded.tomcat.TomcatWebServer:202 - Tomcat started on port(s): 34567 (http) with context path '' +2023-09-04 10:22:57,210 [http-nio-34567-exec-1] INFO org.apache.catalina.core.ContainerBase.[Tomcat].[localhost].[/]:173 - Initializing Spring DispatcherServlet 'dispatcherServlet' +2023-09-04 10:22:57,210 [http-nio-34567-exec-1] INFO org.springframework.web.servlet.DispatcherServlet:524 - Initializing Servlet 'dispatcherServlet' +2023-09-04 10:22:57,216 [http-nio-34567-exec-1] INFO org.springframework.web.servlet.DispatcherServlet:546 - Completed initialization in 6 ms +2023-09-04 14:29:16,253 [Thread-13] INFO org.springframework.scheduling.concurrent.ThreadPoolTaskExecutor:208 - Shutting down ExecutorService 'applicationTaskExecutor' +2023-09-04 14:29:16,268 [Thread-13] INFO com.alibaba.druid.pool.DruidDataSource:2029 - {dataSource-1} closing ... +2023-09-04 14:29:16,317 [Thread-13] INFO com.alibaba.druid.pool.DruidDataSource:2101 - {dataSource-1} closed diff --git a/logs/springboot-logback/error/2023-03-30-0.log.gz b/logs/springboot-logback/error/2023-03-30-0.log.gz deleted file mode 100644 index 012b9c2..0000000 Binary files a/logs/springboot-logback/error/2023-03-30-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/error/2023-04-04-0.log.gz b/logs/springboot-logback/error/2023-04-04-0.log.gz deleted file mode 100644 index 434b9cb..0000000 Binary files a/logs/springboot-logback/error/2023-04-04-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/error/2023-04-06-0.log.gz b/logs/springboot-logback/error/2023-04-06-0.log.gz deleted file mode 100644 index 4905d61..0000000 Binary files a/logs/springboot-logback/error/2023-04-06-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/error/2023-05-18-0.log.gz b/logs/springboot-logback/error/2023-05-18-0.log.gz deleted file mode 100644 index ba8bb36..0000000 Binary files a/logs/springboot-logback/error/2023-05-18-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/error/2023-05-19-0.log.gz b/logs/springboot-logback/error/2023-05-19-0.log.gz deleted file mode 100644 index 1b500cd..0000000 Binary files a/logs/springboot-logback/error/2023-05-19-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/info/2023-07-03-0.log.gz b/logs/springboot-logback/info/2023-07-03-0.log.gz deleted file mode 100644 index 068e74c..0000000 Binary files a/logs/springboot-logback/info/2023-07-03-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/info/2023-07-05-0.log.gz b/logs/springboot-logback/info/2023-07-05-0.log.gz deleted file mode 100644 index ceebfb4..0000000 Binary files a/logs/springboot-logback/info/2023-07-05-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/info/2023-07-06-0.log.gz b/logs/springboot-logback/info/2023-07-06-0.log.gz deleted file mode 100644 index 6c91778..0000000 Binary files a/logs/springboot-logback/info/2023-07-06-0.log.gz and /dev/null differ diff --git a/logs/springboot-logback/info/2023-07-07-0.log.gz b/logs/springboot-logback/info/2023-07-07-0.log.gz deleted file mode 100644 index b6c52ee..0000000 Binary files a/logs/springboot-logback/info/2023-07-07-0.log.gz and /dev/null differ diff --git a/pom.xml b/pom.xml index a5167fa..c4ceadd 100644 --- a/pom.xml +++ b/pom.xml @@ -114,6 +114,12 @@ + cn.hutool + hutool-all + 5.5.2 + + + com.auth0 java-jwt ${java-jwt.version} diff --git a/src/main/java/com/laowu/common/RestTemplateConfig.java b/src/main/java/com/laowu/common/RestTemplateConfig.java new file mode 100644 index 0000000..49cb842 --- /dev/null +++ b/src/main/java/com/laowu/common/RestTemplateConfig.java @@ -0,0 +1,31 @@ +package com.laowu.common; + +import org.springframework.context.annotation.Bean; +import org.springframework.http.MediaType; +import org.springframework.http.converter.json.MappingJackson2HttpMessageConverter; +import org.springframework.stereotype.Component; +import org.springframework.web.client.RestTemplate; + +import java.util.ArrayList; +import java.util.List; + +@Component +public class RestTemplateConfig { + + @Bean + public RestTemplate restTemplate() { + RestTemplate restTemplate = new RestTemplate(); + restTemplate.getMessageConverters().add(new WxMappingJackson2HttpMessageConverter()); + return restTemplate; + } + + public class WxMappingJackson2HttpMessageConverter extends MappingJackson2HttpMessageConverter { + public WxMappingJackson2HttpMessageConverter(){ + List mediaTypes = new ArrayList<>(); + mediaTypes.add(MediaType.TEXT_PLAIN); + mediaTypes.add(MediaType.TEXT_HTML); + setSupportedMediaTypes(mediaTypes); + } + } + +} diff --git a/src/main/java/com/laowu/controller/AccessTokenController.java b/src/main/java/com/laowu/controller/AccessTokenController.java new file mode 100644 index 0000000..8136b9c --- /dev/null +++ b/src/main/java/com/laowu/controller/AccessTokenController.java @@ -0,0 +1,22 @@ +package com.laowu.controller; + + +import org.springframework.web.bind.annotation.RequestMapping; + +import org.springframework.web.bind.annotation.RestController; +import io.swagger.annotations.Api; + +/** + *

+ * 前端控制器 + *

+ * + * @author Tuyp + * @since 2023-08-23 + */ +@RestController +@Api(tags = "") +@RequestMapping("/access-token-do") +public class AccessTokenController { + +} diff --git a/src/main/java/com/laowu/controller/AdministerController.java b/src/main/java/com/laowu/controller/AdministerController.java index ca10ab3..18c8051 100644 --- a/src/main/java/com/laowu/controller/AdministerController.java +++ b/src/main/java/com/laowu/controller/AdministerController.java @@ -52,7 +52,7 @@ public class AdministerController { } @PostMapping("addAdminister") - @ApiOperation("新增管理员 addAdminister userName telephone remark stationIds") + @ApiOperation("新增管理员 addAdminister userName telephone remark stationIds[]") public ResponseVO addAdminister(@RequestBody AddAdministerDTO addAdministerDTO){ return ResponseData.generateCreatedResponse(0,administerService.addAdminister(addAdministerDTO)); } diff --git a/src/main/java/com/laowu/controller/ImageCheckRecordController.java b/src/main/java/com/laowu/controller/ImageCheckRecordController.java new file mode 100644 index 0000000..6365b0f --- /dev/null +++ b/src/main/java/com/laowu/controller/ImageCheckRecordController.java @@ -0,0 +1,77 @@ +package com.laowu.controller; + + +import com.laowu.common.interceptor.LoginRequired; +import com.laowu.common.interceptor.TimeRequired; +import com.laowu.dto.image.CheckResultDTO; +import com.laowu.model.ImageCheckRecordDO; +import com.laowu.service.ImageCheckRecordService; +import com.laowu.util.ResponseData; +import com.laowu.util.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + *

+ * 人脸识别记录表 前端控制器 + *

+ * + * @author Tuyp + * @since 2023-08-22 + */ +@RestController +@Api(tags = "人脸识别记录表") +@RequestMapping("/imageCheckRecord") +public class ImageCheckRecordController { + + + @Autowired + private ImageCheckRecordService imageCheckRecordService; + + @PostMapping("getImageCheckHistory") + @ApiOperation("获取某人某个班级的验证历史 memberId ") + @LoginRequired + public ResponseVO getImageCheckHistory(@RequestBody ImageCheckRecordDO imageCheckRecordDO) { + return ResponseData.generateCreatedResponse(0, imageCheckRecordService.getImageCheckHistory(imageCheckRecordDO)); + } + + @PostMapping("imageCheck") + @ApiOperation("课程/测评人身核验(权威库:身份证) PC端 memberId 用户id ") + @TimeRequired + public ResponseVO imageCheck(@RequestBody ImageCheckRecordDO imageCheckRecordDO) throws Exception { + return ResponseData.generateCreatedResponse(0, imageCheckRecordService.imageCheck(imageCheckRecordDO)); + } + + @PostMapping("h5ImageCheck") + @ApiOperation("课程/测评人脸核验(权威库:身份证) 微信浮层H5 memberId 用户id ") + @TimeRequired + public ResponseVO h5CheckResult(@RequestBody ImageCheckRecordDO imageCheckRecordDO)throws Exception{ + return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5CheckResult(imageCheckRecordDO)); + } + +// @PostMapping("loginCheck") +// @ApiOperation("签到页做人脸核验 (权威库:身份证) PC端 id 用户id") +// @TimeRequired +// public ResponseVO loginCheck(@RequestBody ImageCheckRecordDO imageCheckRecordDO)throws Exception{ +// return ResponseData.generateCreatedResponse(0,imageCheckRecordService.loginCheck(imageCheckRecordDO)); +// } +// +// @PostMapping("h5LoginCheck") +// @ApiOperation("签到页做人脸核验 (权威库:身份证) id 用户id") +// @TimeRequired +// public ResponseVO h5LoginCheck(@RequestBody ImageCheckRecordDO imageCheckRecordDO)throws Exception{ +// return ResponseData.generateCreatedResponse(0,imageCheckRecordService.h5LoginCheck(imageCheckRecordDO)); +// } + + @PostMapping("checkResult") + @ApiOperation("人脸验证结果 存图片 id 订单号 ") + public ResponseVO checkResult(@RequestBody CheckResultDTO checkResultDTO)throws Exception{ + return ResponseData.generateCreatedResponse(0,imageCheckRecordService.checkResult(checkResultDTO)); + } + +} diff --git a/src/main/java/com/laowu/controller/MemberCertsController.java b/src/main/java/com/laowu/controller/MemberCertsController.java index 3e2a0d8..391fee6 100644 --- a/src/main/java/com/laowu/controller/MemberCertsController.java +++ b/src/main/java/com/laowu/controller/MemberCertsController.java @@ -31,7 +31,7 @@ public class MemberCertsController { @PostMapping("addMemberCert") - @ApiOperation("添加证书信息 memberId cert") + @ApiOperation("添加证书信息 memberId cert certNo") public ResponseVO addMemberCert(@RequestBody MemberCertsDO memberCertsDO){ return ResponseData.generateCreatedResponse(0,memberCertsService.addMemberCert(memberCertsDO)); } @@ -43,7 +43,7 @@ public class MemberCertsController { } @PostMapping("updateMemberCert") - @ApiOperation("修改证书信息 id cert") + @ApiOperation("修改证书信息 id cert certNo") public ResponseVO updateMemberCert(@RequestBody MemberCertsDO memberCertsDO){ return ResponseData.generateCreatedResponse(0,memberCertsService.updateMemberCert(memberCertsDO)); } diff --git a/src/main/java/com/laowu/controller/MemberCollegeMappingController.java b/src/main/java/com/laowu/controller/MemberCollegeMappingController.java deleted file mode 100644 index 6199843..0000000 --- a/src/main/java/com/laowu/controller/MemberCollegeMappingController.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.laowu.controller; - - -import com.laowu.model.MemberCollegeMappingDO; -import com.laowu.service.MemberCollegeMappingService; -import com.laowu.util.ResponseData; -import com.laowu.util.ResponseVO; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; - -/** - *

- * 学员-学校映射表 前端控制器 - *

- * - * @author Tuyp - * @since 2023-04-04 - */ -@RestController -@Api(tags = "学员-学校映射表") -@RequestMapping("/memberCollege") -public class MemberCollegeMappingController { - - @Autowired - private MemberCollegeMappingService memberCollegeMappingService; - - @PostMapping("addCollege") - @ApiOperation("添加院校信息 schoolType collegeId memberId startDate endDate majorId rank educationType") - public ResponseVO addCollege(@RequestBody MemberCollegeMappingDO memberCollegeMappingDO){ - return ResponseData.generateCreatedResponse(0,memberCollegeMappingService.addCollege(memberCollegeMappingDO)); - } - - @PostMapping("updateCollege") - @ApiOperation("修改院校 id schoolType collegeId memberId startDate endDate majorId rank educationType") - public ResponseVO updateCollege(@RequestBody MemberCollegeMappingDO memberCollegeMappingDO){ - return ResponseData.generateCreatedResponse(0,memberCollegeMappingService.updateCollege(memberCollegeMappingDO)); - } - - @PostMapping("deleteCollege") - @ApiOperation("删除院校 id") - public ResponseVO deleteCollege(@RequestBody MemberCollegeMappingDO memberCollegeMappingDO){ - return ResponseData.generateCreatedResponse(0,memberCollegeMappingService.deleteCollege(memberCollegeMappingDO)); - } - -} diff --git a/src/main/java/com/laowu/controller/MemberDictController.java b/src/main/java/com/laowu/controller/MemberDictController.java index 37f2e8a..be2b153 100644 --- a/src/main/java/com/laowu/controller/MemberDictController.java +++ b/src/main/java/com/laowu/controller/MemberDictController.java @@ -43,8 +43,14 @@ public class MemberDictController { } @PostMapping("addMember") - @ApiOperation("添加自然人 userId module userName status 学生/社会 telephone idCardType idCard province city county address education" + - "isPoor isMigration isParty jobStatus stationId positionIds[] teamId") + @ApiOperation("添加自然人 workstationId userName idCardType idCard telephone hostUserName hostIdCardType hostIdCard province city county town village team address" + + "provinceNow cityNow countyNow townNow villageNow addressNow familyCnt hostRelation " + + "gender age nation isParty education health" + + "isPoor monitorType isMigration migrationType migrationName fisherman insured pensionInsurance insurePlace" + + "memberType laborAbility jobStatus jobType jobAge yearJobMonth averageSalary " + + "incomeStatement employmentWillingness provinceEmployment cityEmployment " + + "employmentTrainingWillingness homecoming homecomingDate homecomingReason " + + "comment positionIds[] ") public ResponseVO addMember(@RequestBody AddMemberDTO addMemberDTO){ return ResponseData.generateCreatedResponse(0,memberDictService.addMember(addMemberDTO)); } @@ -56,8 +62,13 @@ public class MemberDictController { } @PostMapping("updateMember") - @ApiOperation("修改自然人 id userId module userName status 学生/社会 telephone idCardType idCard province city county address education" + - "isPoor isMigration isParty jobStatus infoOrigin positionIds[]") + @ApiOperation("修改自然人 workstationId id userName idCardType idCard telephone hostId province city county town village team address" + + "provinceNow cityNow countyNow townNow villageNow addressNow familyCnt hostRelation " + + "gender age nation isParty education health isPoor monitorType isMigration migrationType " + + "migrationName fisherman insured pensionInsurance insurePlace" + + "memberType laborAbility jobStatus jobType jobAge yearJobMonth averageSalary " + + "incomeStatement employmentWillingness provinceEmployment cityEmployment " + + "employmentTrainingWillingness homecoming homecomingDate homecomingReason commentpositionIds[] ") public ResponseVO updateMember(@RequestBody UpdateMemberDTO updateMemberDTO){ return ResponseData.generateCreatedResponse(0,memberDictService.updateMember(updateMemberDTO)); } @@ -69,9 +80,9 @@ public class MemberDictController { } @PostMapping("importUsers") - @ApiOperation("导入用户 workstationId teamId file") - public ResponseVO importUsers(@RequestParam("workstationId") String workstationId,@RequestParam("teamId") String teamId,@RequestParam("file") MultipartFile file){ - return ResponseData.generateCreatedResponse(0,memberDictService.importMember(workstationId,teamId,file)); + @ApiOperation("导入用户 workstationId file") + public ResponseVO importUsers(@RequestParam("workstationId") String workstationId,@RequestParam("file") MultipartFile file){ + return ResponseData.generateCreatedResponse(0,memberDictService.importMember(workstationId,file)); } @PostMapping("downloadErrorData") @@ -80,18 +91,38 @@ public class MemberDictController { return ResponseData.generateCreatedResponse(0,memberDictService.downloadErrorData(downloadErrorDataDTO)); } + @PostMapping("downloadUsers") + @ApiOperation("导出花名册 pageSize,pageNum,stationId,positionId,province,city,county,town,village,gender,maxAge," + + "minAge,isParty,education,health,provinceNow,cityNow,countyNow,townNow,isPoor,monitorType,isMigration,migrationType," + + "fisherman,insured,pensionInsurance,insurePlace,memberType,laborAbility,jobStatus,jobType,provinceJob,cityJob,countyJob," + + "townJob,jobDestination,jobsStartDate,jobsEndDate,businessId,maxAverageSalary,minAverageSalary," + + "maxJobAge,minJobAge,employmentWillingness,provinceEmployment,cityEmployment,willingBusinessId,employmentTrainingWillingness,trainType,homecoming,userId") + public ResponseVO downloadUsers(@RequestBody MemberManagementDTO memberManagementDTO){ + return ResponseData.generateCreatedResponse(0,memberDictService.downloadUsers(memberManagementDTO)); + } + @PostMapping("address") @ApiOperation("地址 导入省市县镇") public void address (@RequestBody List addressDTO){ memberDictService.address(addressDTO); } - @PostMapping("roster") @ApiOperation("花名册 pageSize pageNum province city county ") public ResponseVO roster(@RequestBody RosterDTO rosterDTO){ return ResponseData.generateCreatedResponse(0,memberDictService.roster(rosterDTO)); } + @PostMapping("checkLogin") + @ApiOperation("登录验证 userName idCard") + public ResponseVO checkLogin(@RequestBody MemberDictDO memberDictDO){ + return ResponseData.generateCreatedResponse(0,memberDictService.checkLogin(memberDictDO)); + } + + @PostMapping("tokenLogin") + @ApiOperation("免密跳转 idCard") + public ResponseVO tokenLogin(@RequestBody MemberDictDO memberDictDO){ + return ResponseData.generateCreatedResponse(0,memberDictService.tokenLogin(memberDictDO)); + } } diff --git a/src/main/java/com/laowu/controller/MemberJobInfoController.java b/src/main/java/com/laowu/controller/MemberJobInfoController.java index 2faf221..69379db 100644 --- a/src/main/java/com/laowu/controller/MemberJobInfoController.java +++ b/src/main/java/com/laowu/controller/MemberJobInfoController.java @@ -30,13 +30,13 @@ public class MemberJobInfoController { private MemberJobInfoService memberJobInfoService; @PostMapping("addJob") - @ApiOperation("添加工作 memberId jobSource jobType job province city town address companyId startDate endDate jobMonth salary ") + @ApiOperation("添加工作 memberId province city county town village jobDestination jobIndustry startDate endDate jobMonth salary ") public ResponseVO addJob(@RequestBody MemberJobInfoDO memberJobInfoDO){ return ResponseData.generateCreatedResponse(0,memberJobInfoService.addJob(memberJobInfoDO)); } @PostMapping("updateJob") - @ApiOperation("修改工作 id memberId jobSource jobType job province city town address companyId startDate endDate jobMonth salary ") + @ApiOperation("修改工作 id memberId province city county town village jobDestination jobIndustry startDate endDate jobMonth salary ") public ResponseVO updateJob(@RequestBody MemberJobInfoDO memberJobInfoDO){ return ResponseData.generateCreatedResponse(0,memberJobInfoService.updateJob(memberJobInfoDO)); } diff --git a/src/main/java/com/laowu/controller/MemberTeamMappingController.java b/src/main/java/com/laowu/controller/MemberTeamMappingController.java deleted file mode 100644 index 311ee3d..0000000 --- a/src/main/java/com/laowu/controller/MemberTeamMappingController.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.laowu.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; - -/** - *

- * 团队成员映射表 前端控制器 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@RestController -@Api(tags = "团队成员映射表") -@RequestMapping("/member-team-mapping-do") -public class MemberTeamMappingController { - -} diff --git a/src/main/java/com/laowu/controller/MemberTrainInfoController.java b/src/main/java/com/laowu/controller/MemberTrainInfoController.java index b6504d4..bbc54e4 100644 --- a/src/main/java/com/laowu/controller/MemberTrainInfoController.java +++ b/src/main/java/com/laowu/controller/MemberTrainInfoController.java @@ -1,7 +1,6 @@ package com.laowu.controller; -import com.laowu.dto.member.AddTrainDTO; import com.laowu.model.MemberTrainInfoDO; import com.laowu.service.MemberTrainInfoService; import com.laowu.util.ResponseData; @@ -32,9 +31,9 @@ public class MemberTrainInfoController { private MemberTrainInfoService memberTrainInfoService; @PostMapping("addTrain") - @ApiOperation("添加培训 memberId trainFrom trainType trainName startDate endDate province city county trainContent trainResult positionIds[]") - public ResponseVO addTrain(@RequestBody AddTrainDTO addTrainDTO){ - return ResponseData.generateCreatedResponse(0,memberTrainInfoService.addTrain(addTrainDTO)); + @ApiOperation("添加培训 memberId trainType trainJob businessId startDate endDate") + public ResponseVO addTrain(@RequestBody MemberTrainInfoDO memberTrainInfoDO){ + return ResponseData.generateCreatedResponse(0,memberTrainInfoService.addTrain(memberTrainInfoDO)); } @PostMapping("deleteTrain") @@ -44,9 +43,9 @@ public class MemberTrainInfoController { } @PostMapping("updateTrain") - @ApiOperation("修改培训 id memberId trainFrom trainType trainName startDate endDate province city county trainContent trainResult positionIds[] ") - public ResponseVO updateTrain(@RequestBody AddTrainDTO addTrainDTO){ - return ResponseData.generateCreatedResponse(0,memberTrainInfoService.updateTrain(addTrainDTO)); + @ApiOperation("修改培训 id memberId trainType trainJob businessId startDate endDate") + public ResponseVO updateTrain(@RequestBody MemberTrainInfoDO memberTrainInfoDO){ + return ResponseData.generateCreatedResponse(0,memberTrainInfoService.updateTrain(memberTrainInfoDO)); } diff --git a/src/main/java/com/laowu/controller/MemberTrainPositionsController.java b/src/main/java/com/laowu/controller/MemberTrainPositionsController.java deleted file mode 100644 index 47f4014..0000000 --- a/src/main/java/com/laowu/controller/MemberTrainPositionsController.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.laowu.controller; - - -import com.laowu.model.MemberTrainPositionsDO; -import com.laowu.service.MemberTrainPositionsService; -import com.laowu.util.ResponseData; -import com.laowu.util.ResponseVO; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; - -/** - *

- * 培训关联职业范围 前端控制器 - *

- * - * @author Tuyp - * @since 2023-04-12 - */ -@RestController -@Api(tags = "培训关联职业范围") -@RequestMapping("/memberTrainPositions") -public class MemberTrainPositionsController { - - @Autowired - private MemberTrainPositionsService memberTrainPositionsService; - - @PostMapping("addPosition") - @ApiOperation("添加职业技能范围 memberTrainId positionId") - public ResponseVO addPosition(@RequestBody MemberTrainPositionsDO memberTrainPositionsDO){ - return ResponseData.generateCreatedResponse(0,memberTrainPositionsService.addPosition(memberTrainPositionsDO)); - } - - @PostMapping("deletePosition") - @ApiOperation("删除职业技能范围 id ") - public ResponseVO deletePosition(@RequestBody MemberTrainPositionsDO memberTrainPositionsDO){ - return ResponseData.generateCreatedResponse(0,memberTrainPositionsService.deletePosition(memberTrainPositionsDO)); - } - - @PostMapping("updatePosition") - @ApiOperation("修改职业技能范围 id positionId") - public ResponseVO updatePosition(@RequestBody MemberTrainPositionsDO memberTrainPositionsDO){ - return ResponseData.generateCreatedResponse(0,memberTrainPositionsService.updatePosition(memberTrainPositionsDO)); - } - -} diff --git a/src/main/java/com/laowu/controller/MemberUpdateHistoryController.java b/src/main/java/com/laowu/controller/MemberUpdateHistoryController.java deleted file mode 100644 index ab26211..0000000 --- a/src/main/java/com/laowu/controller/MemberUpdateHistoryController.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.laowu.controller; - - -import org.springframework.web.bind.annotation.RequestMapping; - -import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; - -/** - *

- * 公司更新日志表 前端控制器 - *

- * - * @author Tuyp - * @since 2023-04-07 - */ -@RestController -@Api(tags = "公司更新日志表") -@RequestMapping("/member-update-history-do") -public class MemberUpdateHistoryController { - -} diff --git a/src/main/java/com/laowu/controller/TeamDictController.java b/src/main/java/com/laowu/controller/TeamDictController.java deleted file mode 100644 index 4e84fd6..0000000 --- a/src/main/java/com/laowu/controller/TeamDictController.java +++ /dev/null @@ -1,117 +0,0 @@ -package com.laowu.controller; - - -import com.laowu.dto.team.*; -import com.laowu.model.TeamDictDO; -import com.laowu.service.TeamDictService; -import com.laowu.util.ResponseData; -import com.laowu.util.ResponseVO; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -/** - *

- * 团队字典表 前端控制器 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@RestController -@Api(tags = "团队字典表") -@RequestMapping("/teamDict") -public class TeamDictController { - - @Autowired - private TeamDictService teamDictService; - - @PostMapping("teams") - @ApiOperation("工作站下的团队 pageSize pageNum province stationId teamName") - public ResponseVO teams(@RequestBody TeamsDTO teamsDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.teams(teamsDTO)); - } - - @PostMapping("totalTeams") - @ApiOperation("总团队数 stationId") - public ResponseVO totalTeams(@RequestBody TeamDictDO teamDictDO){ - return ResponseData.generateCreatedResponse(0,teamDictService.totalTeams(teamDictDO)); - } - - @PostMapping("deleteTeam") - @ApiOperation("删除团队 id") - public ResponseVO deleteTeam(@RequestBody TeamDictDO teamDictDO){ - return ResponseData.generateCreatedResponse(0,teamDictService.deleteTeam(teamDictDO)); - } - - @PostMapping("addTeam") - @ApiOperation("添加团队 stationId teamName comment memberId") - public ResponseVO addTeam(@RequestBody TeamDictDO teamDictDO){ - return ResponseData.generateCreatedResponse(0,teamDictService.addTeam(teamDictDO)); - } - - @PostMapping("updateTeam") - @ApiOperation("id stationId teamName comment memberId") - public ResponseVO updateTeam(@RequestBody TeamDictDO teamDict){ - return ResponseData.generateCreatedResponse(0,teamDictService.updateTeam(teamDict)); - } - - @PostMapping("teamMember") - @ApiOperation("查看团队成员信息 teamId") - public ResponseVO teamMember(@RequestBody TeamMemberDTO teamMemberDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.teamMember(teamMemberDTO)); - } - - @PostMapping("oneTeamInfo") - @ApiOperation("查看一个团队详情 id") - public ResponseVO oneTeamInfo(@RequestBody TeamDictDO teamDictDO){ - return ResponseData.generateCreatedResponse(0,teamDictService.oneTeamInfo(teamDictDO)); - } - - @PostMapping("noTeamMembers") - @ApiOperation("查看没有团队的成员信息 pageSize pageNum teamId userName") - public ResponseVO noTeamMembers(@RequestBody TeamMemberDTO teamMemberDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.noTeamMembers(teamMemberDTO)); - } - - @PostMapping("updateTeamMembers") - @ApiOperation("编辑团队信息 teamId memberIds[] ") - public ResponseVO updateMembers(@RequestBody UpdateTeamMembersDTO updateTeamMembersDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.updateMembers(updateTeamMembersDTO)); - } - - @PostMapping("leaderMembers") - @ApiOperation("团队带头人 stationId pageSize pageNum ") - public ResponseVO leaderMembers(@RequestBody LeaderMembersDTO leaderMembersDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.leaderMembers(leaderMembersDTO)); - } - - @PostMapping("leaderMemberCounts") - @ApiOperation("团队带头人数 stationId") - public ResponseVO leaderMemberCounts(@RequestBody TeamDictDO teamDictDO){ - return ResponseData.generateCreatedResponse(0,teamDictService.leaderMemberCounts(teamDictDO)); - } - - @PostMapping("provinceStationTeam") - @ApiOperation("省-工作站-团队 userId") - public ResponseVO provinceStationTeam(@RequestBody ProvinceStationTeamDTO provinceStationTeamDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.provinceStationTeam(provinceStationTeamDTO)); - } - - @PostMapping("memberManagement") - @ApiOperation("人员管理 pageSize pageNum userId teamId stationId province jobStatus userName positionId 技能范围") - public ResponseVO memberManagement (@RequestBody MemberManagementDTO memberManagementDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.memberManagement(memberManagementDTO)); - } - - @PostMapping("memberManagementCount") - @ApiOperation("人员管理 人数 teamId stationId province jobStatus userName") - public ResponseVO memberManagementCount(@RequestBody MemberManagementDTO memberManagementDTO){ - return ResponseData.generateCreatedResponse(0,teamDictService.memberManagementCount(memberManagementDTO)); - } - -} diff --git a/src/main/java/com/laowu/controller/WorkstationDictController.java b/src/main/java/com/laowu/controller/WorkstationDictController.java index 6625500..ff3a1d4 100644 --- a/src/main/java/com/laowu/controller/WorkstationDictController.java +++ b/src/main/java/com/laowu/controller/WorkstationDictController.java @@ -6,6 +6,7 @@ import com.laowu.dto.station.StationAccountDTO; import com.laowu.dto.station.StationsDTO; import com.laowu.dto.station.UpdateAdministerDTO; import com.laowu.model.AdministerDO; +import com.laowu.model.LibGeoLocationDO; import com.laowu.model.WorkstationDictDO; import com.laowu.service.WorkstationDictService; import com.laowu.util.ResponseData; @@ -71,7 +72,7 @@ public class WorkstationDictController { } @PostMapping("provinceStations") - @ApiOperation("以省为单位查看工作站 ") + @ApiOperation("以省为单位查看工作站 userId") public ResponseVO provinceStations(@RequestBody ProvinceStationsDTO provinceStationsDTO){ return ResponseData.generateCreatedResponse(0,workstationDictService.provinceStations(provinceStationsDTO)); } @@ -94,4 +95,27 @@ public class WorkstationDictController { return ResponseData.generateCreatedResponse(0,workstationDictService.homepage(workstationDictDO)); } + @PostMapping("screen1") + @ApiOperation("大屏1 province city") + public ResponseVO screen1(@RequestBody LibGeoLocationDO libGeoLocationDO){ + return ResponseData.generateCreatedResponse(0,workstationDictService.screen1(libGeoLocationDO)); + } + + @PostMapping("screen2") + @ApiOperation("大屏2 province city") + public ResponseVO screen2(@RequestBody LibGeoLocationDO libGeoLocationDO){ + return ResponseData.generateCreatedResponse(0,workstationDictService.screen2(libGeoLocationDO)); + } + + @PostMapping("screen3") + @ApiOperation("大屏3 province city") + public ResponseVO screen3(@RequestBody LibGeoLocationDO libGeoLocationDO){ + return ResponseData.generateCreatedResponse(0,workstationDictService.screen3(libGeoLocationDO)); + } + + @PostMapping("ageGender") + public ResponseVO ageGender(){ + return ResponseData.generateCreatedResponse(0,workstationDictService.ageGender()); + } + } diff --git a/src/main/java/com/laowu/controller/WorkstationMemberMappingController.java b/src/main/java/com/laowu/controller/WorkstationMemberMappingController.java index 5130a4d..2791eda 100644 --- a/src/main/java/com/laowu/controller/WorkstationMemberMappingController.java +++ b/src/main/java/com/laowu/controller/WorkstationMemberMappingController.java @@ -1,10 +1,17 @@ package com.laowu.controller; +import com.laowu.dto.member.MemberManagementDTO; +import com.laowu.service.WorkstationMemberMappingService; +import com.laowu.util.ResponseData; +import com.laowu.util.ResponseVO; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; - import org.springframework.web.bind.annotation.RestController; -import io.swagger.annotations.Api; /** *

@@ -16,7 +23,20 @@ import io.swagger.annotations.Api; */ @RestController @Api(tags = "学员--工作站映射关系") -@RequestMapping("/workstation-member-mapping-do") +@RequestMapping("/workstationMemberMapping") public class WorkstationMemberMappingController { + @Autowired + private WorkstationMemberMappingService workstationMemberMappingService; + + @PostMapping("memberManagement") + @ApiOperation("人员管理 pageSize,pageNum,userName,stationId,positionId,province,city,county,town,village,gender,maxAge," + + "minAge,isParty,education,health,provinceNow,cityNow,countyNow,townNow,isPoor,monitorType,isMigration,migrationType," + + "fisherman,insured,pensionInsurance,insurePlace,memberType,laborAbility,jobStatus,jobType,provinceJob,cityJob,countyJob," + + "townJob,jobDestination,jobsStartDate,jobsEndDate,businessId,maxAverageSalary,minAverageSalary," + + "maxJobAge,minJobAge,employmentWillingness,provinceEmployment,cityEmployment,willingBusinessId,employmentTrainingWillingness,trainType,homecoming,userId") + public ResponseVO memberManagement (@RequestBody MemberManagementDTO memberManagementDTO){ + return ResponseData.generateCreatedResponse(0,workstationMemberMappingService.memberManagement(memberManagementDTO)); + } + } diff --git a/src/main/java/com/laowu/dto/image/CheckResultDTO.java b/src/main/java/com/laowu/dto/image/CheckResultDTO.java new file mode 100644 index 0000000..7d2ef30 --- /dev/null +++ b/src/main/java/com/laowu/dto/image/CheckResultDTO.java @@ -0,0 +1,10 @@ +package com.laowu.dto.image; + +import lombok.Data; + +@Data +public class CheckResultDTO { + + private String id; + +} diff --git a/src/main/java/com/laowu/dto/member/AddMemberDTO.java b/src/main/java/com/laowu/dto/member/AddMemberDTO.java index 442eaef..506c89a 100644 --- a/src/main/java/com/laowu/dto/member/AddMemberDTO.java +++ b/src/main/java/com/laowu/dto/member/AddMemberDTO.java @@ -8,14 +8,10 @@ import java.util.List; @Data public class AddMemberDTO extends MemberDictDO { - private Long userId; - - private String module; - - private Long stationId; - - private Long teamId; + private Long workstationId; private List positionIds; + private List jobIds; + } diff --git a/src/main/java/com/laowu/dto/member/AddTrainDTO.java b/src/main/java/com/laowu/dto/member/AddTrainDTO.java deleted file mode 100644 index 7f92000..0000000 --- a/src/main/java/com/laowu/dto/member/AddTrainDTO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.laowu.dto.member; - -import com.laowu.model.MemberTrainInfoDO; -import lombok.Data; - -import java.util.List; - -@Data -public class AddTrainDTO extends MemberTrainInfoDO { - - private List positionIds; - - -} diff --git a/src/main/java/com/laowu/dto/member/MemberManagementDTO.java b/src/main/java/com/laowu/dto/member/MemberManagementDTO.java new file mode 100644 index 0000000..3aaa3de --- /dev/null +++ b/src/main/java/com/laowu/dto/member/MemberManagementDTO.java @@ -0,0 +1,112 @@ +package com.laowu.dto.member; + +import lombok.Data; + +@Data +public class MemberManagementDTO { + + private Integer pageSize; + + private Integer pageNum; + + private String userName; + + private Long stationId; + + private Long positionId; + + private String province; + + private String city; + + private String county; + + private String town; + + private String village; + + private String gender; + + private Integer maxAge; + + private Integer minAge; + + private String isParty; + + private String education; + + private String health; + + private String provinceNow; + + private String cityNow; + + private String countyNow; + + private String townNow; + + private String isPoor; + + private String monitorType; + + private String isMigration; + + private String migrationType; + + private String fisherman; + + private String insured; + + private String pensionInsurance; + + private String insurePlace; + + private String memberType; + + private String laborAbility; + + private String jobStatus; + + private String jobType; + + private String provinceJob; + + private String cityJob; + + private String countyJob; + + private String townJob; + + private String jobDestination; + + private String jobsStartDate; + + private String jobsEndDate; + + private Long businessId; + + private Integer maxAverageSalary; + + private Integer minAverageSalary; + + private Integer maxJobAge; + + private Integer minJobAge; + + private Long willingBusinessId; + + private String employmentWillingness; + + private String provinceEmployment; + + private String cityEmployment; + + private String employmentTrainingWillingness; + + private String homecoming; + + private String trainType; + + private Long userId; + +} diff --git a/src/main/java/com/laowu/dto/member/UpdateMemberDTO.java b/src/main/java/com/laowu/dto/member/UpdateMemberDTO.java index 123f204..0d8343d 100644 --- a/src/main/java/com/laowu/dto/member/UpdateMemberDTO.java +++ b/src/main/java/com/laowu/dto/member/UpdateMemberDTO.java @@ -11,10 +11,6 @@ public class UpdateMemberDTO extends MemberDictDO { private List memberJobInfoVOS; - private Long userId; - - private String module; - private List positionIds; } diff --git a/src/main/java/com/laowu/dto/team/LeaderMembersDTO.java b/src/main/java/com/laowu/dto/team/LeaderMembersDTO.java deleted file mode 100644 index 5b35b9f..0000000 --- a/src/main/java/com/laowu/dto/team/LeaderMembersDTO.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.laowu.dto.team; - -import lombok.Data; - -@Data -public class LeaderMembersDTO { - - private Integer pageSize; - - private Integer pageNum; - - private Long stationId; - - private String userName; - -} diff --git a/src/main/java/com/laowu/dto/team/MemberManagementDTO.java b/src/main/java/com/laowu/dto/team/MemberManagementDTO.java deleted file mode 100644 index 4149115..0000000 --- a/src/main/java/com/laowu/dto/team/MemberManagementDTO.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.laowu.dto.team; - -import lombok.Data; - -@Data -public class MemberManagementDTO { - - private Integer pageSize; - - private Integer pageNum; - - private Long teamId; - - private Long stationId; - - private String province; - - private String jobStatus; - - private String userName; - - private Long userId; - - private Long positionId; -} diff --git a/src/main/java/com/laowu/dto/team/ProvinceStationTeamDTO.java b/src/main/java/com/laowu/dto/team/ProvinceStationTeamDTO.java deleted file mode 100644 index bc5a838..0000000 --- a/src/main/java/com/laowu/dto/team/ProvinceStationTeamDTO.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.laowu.dto.team; - -import lombok.Data; - -@Data -public class ProvinceStationTeamDTO { - - private Long userId; - -} diff --git a/src/main/java/com/laowu/dto/team/TeamMemberDTO.java b/src/main/java/com/laowu/dto/team/TeamMemberDTO.java deleted file mode 100644 index c55d8eb..0000000 --- a/src/main/java/com/laowu/dto/team/TeamMemberDTO.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.laowu.dto.team; - -import lombok.Data; - -@Data -public class TeamMemberDTO { - - private Integer pageSize; - - private Integer pageNum; - - private Long teamId; - - private String userName; - -} diff --git a/src/main/java/com/laowu/dto/team/TeamsDTO.java b/src/main/java/com/laowu/dto/team/TeamsDTO.java deleted file mode 100644 index 68ca486..0000000 --- a/src/main/java/com/laowu/dto/team/TeamsDTO.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.laowu.dto.team; - -import lombok.Data; - -@Data -public class TeamsDTO { - - private Integer pageSize; - - private Integer pageNum; - - private Long stationId; - - private String teamName; - - private String province; -} diff --git a/src/main/java/com/laowu/dto/team/UpdateTeamMembersDTO.java b/src/main/java/com/laowu/dto/team/UpdateTeamMembersDTO.java deleted file mode 100644 index e17e65e..0000000 --- a/src/main/java/com/laowu/dto/team/UpdateTeamMembersDTO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.laowu.dto.team; - -import lombok.Data; - -import java.util.List; - -@Data -public class UpdateTeamMembersDTO { - - private Long teamId; - - private List memberIds; - -} diff --git a/src/main/java/com/laowu/mapper/AccessTokenMapper.java b/src/main/java/com/laowu/mapper/AccessTokenMapper.java new file mode 100644 index 0000000..7789b3a --- /dev/null +++ b/src/main/java/com/laowu/mapper/AccessTokenMapper.java @@ -0,0 +1,18 @@ +package com.laowu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.laowu.model.AccessTokenDO; +import org.springframework.stereotype.Repository; + +/** + *

+ * Mapper 接口 + *

+ * + * @author DengMin + * @since 2022-02-18 + */ + @Repository +public interface AccessTokenMapper extends BaseMapper { + +} diff --git a/src/main/java/com/laowu/mapper/ImageCheckRecordMapper.java b/src/main/java/com/laowu/mapper/ImageCheckRecordMapper.java new file mode 100644 index 0000000..55c5fb5 --- /dev/null +++ b/src/main/java/com/laowu/mapper/ImageCheckRecordMapper.java @@ -0,0 +1,19 @@ +package com.laowu.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.laowu.model.ImageCheckRecordDO; +import org.springframework.stereotype.Repository; + +/** + *

+ * 人脸识别记录表 Mapper 接口 + *

+ * + * @author Tuyp + * @since 2023-08-22 + */ + @Repository +public interface ImageCheckRecordMapper extends BaseMapper { + + +} diff --git a/src/main/java/com/laowu/mapper/MemberCollegeMappingMapper.java b/src/main/java/com/laowu/mapper/MemberCollegeMappingMapper.java deleted file mode 100644 index 0a6c701..0000000 --- a/src/main/java/com/laowu/mapper/MemberCollegeMappingMapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.laowu.mapper; - -import com.laowu.model.MemberCollegeMappingDO; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.springframework.stereotype.Repository; - -/** - *

- * 学员-学校映射表 Mapper 接口 - *

- * - * @author Tuyp - * @since 2023-04-04 - */ - @Repository -public interface MemberCollegeMappingMapper extends BaseMapper { - -} diff --git a/src/main/java/com/laowu/mapper/MemberDictMapper.java b/src/main/java/com/laowu/mapper/MemberDictMapper.java index f6c7bfc..45b7b6c 100644 --- a/src/main/java/com/laowu/mapper/MemberDictMapper.java +++ b/src/main/java/com/laowu/mapper/MemberDictMapper.java @@ -1,10 +1,11 @@ package com.laowu.mapper; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.laowu.model.MemberDictDO; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.laowu.model.PositionDictDO; import com.laowu.vo.member.AllMembersVO; +import com.laowu.vo.station.BusinessTop7VO; import org.springframework.stereotype.Repository; import java.util.List; @@ -35,6 +36,44 @@ public interface MemberDictMapper extends BaseMapper { */ List memberPositions(Long memberId); + /** + * 劳动力总数:只算技能劳动力,普通劳动力,部分丧失劳动力 + */ + Integer laborAbility(String province,String city,String county,String isPoor); + + /** + * 在沪就业人数 + */ + Integer cityEmployeeCnt(String province,String city); + + /** + * 转移人数 + */ + Integer migrationCnt(String province,String city,String isMigration); + + /** + * 持证人数 + */ + Integer memberCertCnt(String province,String city); + + /** + * 就业行业占比 + */ + List businessTop7(String province, String city); + + /** + * 薪资中位数 + */ + List middleSalary(String province, String city); + + /** + * 学历查询 + */ + Integer education(String province,String city,String county,String education,String destinationProvince); + /** + * 某个地方某个年龄段的劳动力 + */ + Integer ageLabor(String province,String city,String county,Integer minAge,Integer maxAge); } diff --git a/src/main/java/com/laowu/mapper/MemberTeamMappingMapper.java b/src/main/java/com/laowu/mapper/MemberTeamMappingMapper.java deleted file mode 100644 index aedbd4f..0000000 --- a/src/main/java/com/laowu/mapper/MemberTeamMappingMapper.java +++ /dev/null @@ -1,31 +0,0 @@ -package com.laowu.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.laowu.model.MemberDictDO; -import com.laowu.model.MemberTeamMappingDO; -import org.springframework.stereotype.Repository; - -/** - *

- * 团队成员映射表 Mapper 接口 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@Repository -public interface MemberTeamMappingMapper extends BaseMapper { - - /** - * 查看某个团队的成员 - */ - IPage teamMembers(IPage page,Long teamId); - - /** - * 查看还不在这个团队里的人 - */ - IPage noTeamMembers(IPage iPage,Long teamId,String userName); - - -} diff --git a/src/main/java/com/laowu/mapper/MemberTrainPositionsMapper.java b/src/main/java/com/laowu/mapper/MemberTrainPositionsMapper.java deleted file mode 100644 index 334ace1..0000000 --- a/src/main/java/com/laowu/mapper/MemberTrainPositionsMapper.java +++ /dev/null @@ -1,25 +0,0 @@ -package com.laowu.mapper; - -import com.laowu.model.MemberTrainPositionsDO; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.laowu.model.PositionDictDO; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - *

- * 培训关联职业范围 Mapper 接口 - *

- * - * @author Tuyp - * @since 2023-04-12 - */ -@Repository -public interface MemberTrainPositionsMapper extends BaseMapper { - - List positionIds(Long memberTrainId); - - List positions(Long memberTrainId); - -} diff --git a/src/main/java/com/laowu/mapper/MemberUpdateHistoryMapper.java b/src/main/java/com/laowu/mapper/MemberUpdateHistoryMapper.java deleted file mode 100644 index 40ce559..0000000 --- a/src/main/java/com/laowu/mapper/MemberUpdateHistoryMapper.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.laowu.mapper; - -import com.laowu.model.MemberUpdateHistoryDO; -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import org.springframework.stereotype.Repository; - -/** - *

- * 公司更新日志表 Mapper 接口 - *

- * - * @author Tuyp - * @since 2023-04-07 - */ - @Repository -public interface MemberUpdateHistoryMapper extends BaseMapper { - -} diff --git a/src/main/java/com/laowu/mapper/TeamDictMapper.java b/src/main/java/com/laowu/mapper/TeamDictMapper.java deleted file mode 100644 index 458bde8..0000000 --- a/src/main/java/com/laowu/mapper/TeamDictMapper.java +++ /dev/null @@ -1,51 +0,0 @@ -package com.laowu.mapper; - -import com.baomidou.mybatisplus.core.mapper.BaseMapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.laowu.model.TeamDictDO; -import com.laowu.vo.team.LeaderMembersVO; -import com.laowu.vo.team.MemberManagementVO; -import com.laowu.vo.team.TeamsVO; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - *

- * 团队字典表 Mapper 接口 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@Repository -public interface TeamDictMapper extends BaseMapper { - - IPage teams(IPage iPage, Long stationId, String teamName,String province); - - /** - * 查看某个工作站的带头人总数 - */ - Integer leaderMemberCounts(Long stationId); - - /** - * 查看带头人的团队情况 - */ - IPage leaderMembers(IPage iPage, Long stationId, String userName); - - /** - * 人员管理 - */ - IPage memberManagement(IPage page, Long teamId, Long stationId, String province, String jobStatus, String userName, List workstationIds,Long positionId); - - - /** - * 人员管理---人数 - */ - Integer memberManagementCount(Long teamId, Long stationId, String province, String jobStatus,Long positionId); - - /** - * 将组长为memberId的team职位空 - */ - void noLeader(Long id); -} diff --git a/src/main/java/com/laowu/mapper/WorkstationDictMapper.java b/src/main/java/com/laowu/mapper/WorkstationDictMapper.java index 43ef3e6..52ba68f 100644 --- a/src/main/java/com/laowu/mapper/WorkstationDictMapper.java +++ b/src/main/java/com/laowu/mapper/WorkstationDictMapper.java @@ -5,7 +5,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage; import com.laowu.model.WorkstationDictDO; import com.laowu.vo.station.StationAccountVO; import com.laowu.vo.station.StationsVO; -import com.laowu.vo.team.HomepageVO; +import com.laowu.vo.station.HomepageVO; import org.springframework.stereotype.Repository; import java.util.List; diff --git a/src/main/java/com/laowu/mapper/WorkstationMemberMappingMapper.java b/src/main/java/com/laowu/mapper/WorkstationMemberMappingMapper.java index 779bba2..1e0cab4 100644 --- a/src/main/java/com/laowu/mapper/WorkstationMemberMappingMapper.java +++ b/src/main/java/com/laowu/mapper/WorkstationMemberMappingMapper.java @@ -1,7 +1,9 @@ package com.laowu.mapper; -import com.laowu.model.WorkstationMemberMappingDO; import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.laowu.model.WorkstationMemberMappingDO; +import com.laowu.vo.member.MemberManagementVO; import org.springframework.stereotype.Repository; /** @@ -12,9 +14,18 @@ import org.springframework.stereotype.Repository; * @author Tuyp * @since 2023-04-07 */ - @Repository +@Repository public interface WorkstationMemberMappingMapper extends BaseMapper { + /** +* 人员管理 +*/ + IPage memberManagement(IPage page,String userName,Long stationId,Long positionId,String province,String city,String county,String town,String village,String gender,Integer maxAge, + Integer minAge,String isParty,String education,String health,String provinceNow,String cityNow,String countyNow,String townNow, + String isPoor,String monitorType,String isMigration,String migrationType,String fisherman,String insured,String pensionInsurance, + String insurePlace,String memberType,String laborAbility,String jobStatus,String jobType,String provinceJob,String cityJob,String countyJob, + String townJob,String jobDestination,String jobsStartDate,String jobsEndDate,Long businessId,Integer maxAverageSalary,Integer minAverageSalary,Integer maxJobAge,Integer minJobAge, + String employmentWillingness,String provinceEmployment,String cityEmployment,Long willingBusinessId,String employmentTrainingWillingness,String homecoming,Long userId,String trainType); } diff --git a/src/main/java/com/laowu/model/AccessTokenDO.java b/src/main/java/com/laowu/model/AccessTokenDO.java new file mode 100644 index 0000000..11bdce0 --- /dev/null +++ b/src/main/java/com/laowu/model/AccessTokenDO.java @@ -0,0 +1,31 @@ +package com.laowu.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.laowu.util.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * + *

+ * + * @author DengMin + * @since 2022-02-18 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("access_token") +public class AccessTokenDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + private String accessToken; + + +} diff --git a/src/main/java/com/laowu/model/ImageCheckRecordDO.java b/src/main/java/com/laowu/model/ImageCheckRecordDO.java new file mode 100644 index 0000000..3df4da4 --- /dev/null +++ b/src/main/java/com/laowu/model/ImageCheckRecordDO.java @@ -0,0 +1,66 @@ +package com.laowu.model; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.laowu.util.BaseModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + +import java.time.LocalDateTime; + +/** + *

+ * 人脸识别记录表 + *

+ * + * @author Tuyp + * @since 2023-08-22 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("image_check_record") +public class ImageCheckRecordDO extends BaseModel { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** + * 学员id + */ + private Long memberId; + + /** + * 活体检测得分 + */ + private String liveRate; + + /** + * 人脸比对得分 + */ + private String similarity; + + /** + * 刷脸时间 + */ + private LocalDateTime occurredTime; + + /** + * 图片 + */ + private String photo; + + /** + * 流水号 + */ + private String bizSeqNo; + + /** + * 结果 + */ + private Integer result; + + +} diff --git a/src/main/java/com/laowu/model/MemberCertsDO.java b/src/main/java/com/laowu/model/MemberCertsDO.java index a3ddc49..dab0dfa 100644 --- a/src/main/java/com/laowu/model/MemberCertsDO.java +++ b/src/main/java/com/laowu/model/MemberCertsDO.java @@ -35,5 +35,10 @@ public class MemberCertsDO extends BaseModel { */ private String cert; + /** + * 证书编号 + */ + private String certNo; + } diff --git a/src/main/java/com/laowu/model/MemberCollegeMappingDO.java b/src/main/java/com/laowu/model/MemberCollegeMappingDO.java deleted file mode 100644 index 833ed13..0000000 --- a/src/main/java/com/laowu/model/MemberCollegeMappingDO.java +++ /dev/null @@ -1,69 +0,0 @@ -package com.laowu.model; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.laowu.util.BaseModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * 学员-学校映射表 - *

- * - * @author Tuyp - * @since 2023-04-04 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("member_college_mapping") -public class MemberCollegeMappingDO extends BaseModel { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 学校类型 - */ - private String schoolType; - - /** - * 成员id - */ - private Long memberId; - - /** - * 院校id - */ - private Long collegeId; - - /** - * 开始时间 - */ - private String startDate; - - /** - * 结束时间 - */ - private String endDate; - - /** - * 专业id - */ - private Long majorId; - - /** - * 成绩排名 - */ - private String rank; - - /** - * 学历类型 - */ - private String educationType; - - -} diff --git a/src/main/java/com/laowu/model/MemberDictDO.java b/src/main/java/com/laowu/model/MemberDictDO.java index 6640636..d41888a 100644 --- a/src/main/java/com/laowu/model/MemberDictDO.java +++ b/src/main/java/com/laowu/model/MemberDictDO.java @@ -7,6 +7,8 @@ import com.laowu.util.BaseModel; import lombok.Data; import lombok.EqualsAndHashCode; +import java.time.LocalDateTime; + /** *

* 自然人表 @@ -31,9 +33,19 @@ public class MemberDictDO extends BaseModel { private String userName; /** - * 学生/社会 + * 个人证件类型 */ - private String status; + private String idCardType; + + /** + * 个人证件 + */ + private String idCard; + + /** + * 头像 + */ + private String img; /** * 手机号码 @@ -41,94 +53,179 @@ public class MemberDictDO extends BaseModel { private String telephone; /** - * 个人证件类型 + * 户主姓名 */ - private String idCardType; + private String hostUserName; /** - * 个人证件 + * 户主证件类型 */ - private String idCard; + private String hostIdCardType; /** - * 省 + * 户主证件 + */ + private String hostIdCard; + + /** + * 省(户籍) */ private String province; /** - * 市 + * 市(户籍) */ private String city; /** - * 县 + * 县(户籍) */ private String county; /** - * 镇 + * 镇(户籍) */ private String town; /** - * 村 + * 村(户籍) */ private String village; /** - * 具体地址 + * 组(户籍) + */ + private String team; + + /** + * 具体地址(户籍) */ private String address; /** - * 学历 + * 省(现居) */ - private String education; + private String provinceNow; + + /** + * 市(现居) + */ + private String cityNow; + + /** + * 县(现居) + */ + private String countyNow; /** - * 学历类型 + * 镇(现居) */ - private String educationType; + private String townNow; /** - * 院校id + * 村(现居) */ - private Long collegeId; + private String villageNow; /** - * 开始时间 + * 具体地址(现居) */ - private String startDate; + private String addressNow; /** - * 结束时间 + * 家庭人数 */ - private String endDate; + private Integer familyCnt; /** - * 专业id + * 与户主关系 */ - private Long majorId; + private String hostRelation; /** - * 排名 + * 性别 */ - private String rank; + private String gender; /** - * 是否为脱贫劳动力 + * 年龄 + */ + private Integer age; + + /** + * 民族 + */ + private String nation; + + /** + * 是否党员 + */ + private String isParty; + + /** + * 学历 + */ + private String education; + + /** + * 健康状态 + */ + private String health; + + /** + * 是否为脱贫户 */ private String isPoor; /** + * 监测对象类型 + */ + private String monitorType; + + /** * 是否易迁户 */ private String isMigration; /** - * 是否党员 + * 搬迁类型 */ - private String isParty; + private String migrationType; + + /** + * 搬迁点名称 + */ + private String migrationName; + + /** + * 是否退捕渔民 + */ + private String fisherman; + + /** + * 是否参保 + */ + private String insured; + + /** + * 养老保险参保情况 + */ + private String pensionInsurance; + + /** + * 当前参保地 + */ + private String insurePlace; + + /** + * 人员类别 + */ + private String memberType; + + /** + * 劳动能力 + */ + private String laborAbility; /** * 就业状态 @@ -136,8 +233,103 @@ public class MemberDictDO extends BaseModel { private String jobStatus; /** - * 信息来源 + * 就业类型 + */ + private String jobType; + + /** + * 就业行业id + */ + private Long businessId; + + /** + * 工龄 + */ + private String jobAge; + + /** + * 本年内务工月数 + */ + private String yearJobMonth; + + /** + * 年平均收入 + */ + private Double averageSalary; + + /** + * 收入情况说明 + */ + private String incomeStatement; + + /** + * 就业意愿 + */ + private String employmentWillingness; + + /** + * 省(就业意愿) + */ + private String provinceEmployment; + + /** + * 市(就业意愿) + */ + private String cityEmployment; + + /** + * 就业培训意愿 + */ + private String employmentTrainingWillingness; + + /** + * 意愿培训行业 + */ + private Long willingBusinessId; + + /** + * 培训开始时间 + */ + private String willingStartDate; + + /** + * 培训结束时间 + */ + private String willingEndDate; + + /** + * 是否返乡 + */ + private String homecoming; + + /** + * 返乡时间 + */ + private String homecomingDate; + + /** + * 返乡原因 + */ + private String homecomingReason; + + /** + * 备注(异常原因) + */ + private String comment; + + /** + * 户最后更新时间 + */ + private LocalDateTime hostLastUpdate; + + /** + * 基础信息更新时间 + */ + private LocalDateTime baseLastUpdate; + + /** + * 就业信息更新时间 */ - private String infoOrigin; + private LocalDateTime employmentLastUpdate; } diff --git a/src/main/java/com/laowu/model/MemberJobInfoDO.java b/src/main/java/com/laowu/model/MemberJobInfoDO.java index 6f06795..fb15d4a 100644 --- a/src/main/java/com/laowu/model/MemberJobInfoDO.java +++ b/src/main/java/com/laowu/model/MemberJobInfoDO.java @@ -31,21 +31,6 @@ public class MemberJobInfoDO extends BaseModel { private Long memberId; /** - * 就业来源 - */ - private String jobSource; - - /** - * 就业类型 - */ - private String jobType; - - /** - * 就业岗位 - */ - private String job; - - /** * 省 */ private String province; @@ -61,14 +46,19 @@ public class MemberJobInfoDO extends BaseModel { private String county; /** - * 具体地址 + * 镇 + */ + private String town; + + /** + * 村 */ - private String address; + private String village; /** - * 公司名称 + * 就业去向 */ - private Long companyId; + private String jobDestination; /** * 开始时间 @@ -76,7 +66,7 @@ public class MemberJobInfoDO extends BaseModel { private String startDate; /** - * 结束实际上 + * 结束时间 */ private String endDate; @@ -90,5 +80,4 @@ public class MemberJobInfoDO extends BaseModel { */ private String salary; - } diff --git a/src/main/java/com/laowu/model/MemberTeamMappingDO.java b/src/main/java/com/laowu/model/MemberTeamMappingDO.java deleted file mode 100644 index 1c06272..0000000 --- a/src/main/java/com/laowu/model/MemberTeamMappingDO.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.laowu.model; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.laowu.util.BaseModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * 团队成员映射表 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("member_team_mapping") -public class MemberTeamMappingDO extends BaseModel { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long memberId; - - private Long teamId; - - -} diff --git a/src/main/java/com/laowu/model/MemberTrainInfoDO.java b/src/main/java/com/laowu/model/MemberTrainInfoDO.java index 6366fec..4094085 100644 --- a/src/main/java/com/laowu/model/MemberTrainInfoDO.java +++ b/src/main/java/com/laowu/model/MemberTrainInfoDO.java @@ -31,54 +31,15 @@ public class MemberTrainInfoDO extends BaseModel { private Long memberId; /** - * 培训项目来源 - */ - private String trainFrom; - - /** * 培训类型 */ private String trainType; /** - * 培训项目名称 - */ - private String trainName; - - /** - * 培训开始时间 - */ - private String startDate; - - /** - * 培训结束时间 - */ - private String endDate; - - /** - * 省 + * 培训工种 */ - private String province; + private String trainJob; - /** - * 市 - */ - private String city; - - /** - * 县 - */ - private String county; - - /** - * 培训内容 - */ - private String trainContent; - - /** - * 培训结果 - */ - private String trainResult; } diff --git a/src/main/java/com/laowu/model/MemberTrainPositionsDO.java b/src/main/java/com/laowu/model/MemberTrainPositionsDO.java deleted file mode 100644 index fb39353..0000000 --- a/src/main/java/com/laowu/model/MemberTrainPositionsDO.java +++ /dev/null @@ -1,33 +0,0 @@ -package com.laowu.model; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.laowu.util.BaseModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * 培训关联职业范围 - *

- * - * @author Tuyp - * @since 2023-04-12 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("member_train_positions") -public class MemberTrainPositionsDO extends BaseModel { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - private Long memberTrainId; - - private Long positionId; - - -} diff --git a/src/main/java/com/laowu/model/TeamDictDO.java b/src/main/java/com/laowu/model/TeamDictDO.java deleted file mode 100644 index 06f9a1f..0000000 --- a/src/main/java/com/laowu/model/TeamDictDO.java +++ /dev/null @@ -1,49 +0,0 @@ -package com.laowu.model; - -import com.baomidou.mybatisplus.annotation.TableName; -import com.baomidou.mybatisplus.annotation.IdType; -import com.baomidou.mybatisplus.annotation.TableId; -import com.laowu.util.BaseModel; -import lombok.Data; -import lombok.EqualsAndHashCode; - -/** - *

- * 团队字典表 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@Data -@EqualsAndHashCode(callSuper = true) -@TableName("team_dict") -public class TeamDictDO extends BaseModel { - - private static final long serialVersionUID = 1L; - - @TableId(value = "id", type = IdType.AUTO) - private Long id; - - /** - * 工作站id - */ - private Long stationId; - - /** - * 团队名称 - */ - private String teamName; - - /** - * 备注 - */ - private String comment; - - /** - * 团队带头人 - */ - private Long memberId; - - -} diff --git a/src/main/java/com/laowu/service/AccessTokenService.java b/src/main/java/com/laowu/service/AccessTokenService.java new file mode 100644 index 0000000..e1c3f16 --- /dev/null +++ b/src/main/java/com/laowu/service/AccessTokenService.java @@ -0,0 +1,16 @@ +package com.laowu.service; + +import com.laowu.model.AccessTokenDO; +import com.baomidou.mybatisplus.extension.service.IService; + +/** + *

+ * 服务类 + *

+ * + * @author Tuyp + * @since 2023-08-23 + */ +public interface AccessTokenService extends IService { + +} diff --git a/src/main/java/com/laowu/service/CompanyDictService.java b/src/main/java/com/laowu/service/CompanyDictService.java index f714635..b80b150 100644 --- a/src/main/java/com/laowu/service/CompanyDictService.java +++ b/src/main/java/com/laowu/service/CompanyDictService.java @@ -10,7 +10,7 @@ import com.laowu.model.CompanyDictDO; import com.laowu.model.WorkstationDictDO; import com.laowu.vo.company.CompanyCardVO; import com.laowu.vo.company.CompanyVO; -import com.laowu.vo.team.TotalTeamsVO; +import com.laowu.vo.station.TotalTeamsVO; /** *

diff --git a/src/main/java/com/laowu/service/ImageCheckRecordService.java b/src/main/java/com/laowu/service/ImageCheckRecordService.java new file mode 100644 index 0000000..29ba909 --- /dev/null +++ b/src/main/java/com/laowu/service/ImageCheckRecordService.java @@ -0,0 +1,33 @@ +package com.laowu.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.laowu.dto.image.CheckResultDTO; +import com.laowu.model.ImageCheckRecordDO; +import com.laowu.model.MemberDictDO; +import com.laowu.vo.image.SendIdCardInfoVO; + +import java.util.List; + +/** + *

+ * 人脸识别记录表 服务类 + *

+ * + * @author Tuyp + * @since 2023-08-22 + */ +public interface ImageCheckRecordService extends IService { + + List getImageCheckHistory(ImageCheckRecordDO imageCheckRecordDO); + + SendIdCardInfoVO imageCheck(ImageCheckRecordDO imageCheckRecordDO)throws Exception; + + SendIdCardInfoVO h5CheckResult(ImageCheckRecordDO imageCheckRecordDO) throws Exception; + +// SendIdCardInfoVO loginCheck(ImageCheckRecordDO imageCheckRecordDO)throws Exception; +// +// SendIdCardInfoVO h5LoginCheck(ImageCheckRecordDO imageCheckRecordDO)throws Exception; + + MemberDictDO checkResult(CheckResultDTO checkResultDTO)throws Exception; + +} diff --git a/src/main/java/com/laowu/service/MemberCollegeMappingService.java b/src/main/java/com/laowu/service/MemberCollegeMappingService.java deleted file mode 100644 index d3c9c1b..0000000 --- a/src/main/java/com/laowu/service/MemberCollegeMappingService.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.laowu.service; - -import com.laowu.model.MemberCollegeMappingDO; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 学员-学校映射表 服务类 - *

- * - * @author Tuyp - * @since 2023-04-04 - */ -public interface MemberCollegeMappingService extends IService { - - String addCollege(MemberCollegeMappingDO memberCollegeMappingDO); - - String updateCollege(MemberCollegeMappingDO memberCollegeMappingDO); - - String deleteCollege(MemberCollegeMappingDO memberCollegeMappingDO); -} diff --git a/src/main/java/com/laowu/service/MemberDictService.java b/src/main/java/com/laowu/service/MemberDictService.java index b17db92..6db9fc7 100644 --- a/src/main/java/com/laowu/service/MemberDictService.java +++ b/src/main/java/com/laowu/service/MemberDictService.java @@ -31,12 +31,18 @@ public interface MemberDictService extends IService { MemberCardVO memberCard(MemberDictDO memberDictDO); - ImportMemberDictVO importMember(String workstationId,String teamId,MultipartFile multipartFile); + ImportMemberDictVO importMember(String workstationId,MultipartFile multipartFile); String downloadErrorData(DownloadErrorDataDTO downloadErrorDataDTO); + String downloadUsers(MemberManagementDTO memberManagementDTO); + void address(List addressDTO); IPage roster(RosterDTO rosterDTO); + Long checkLogin(MemberDictDO memberDictDO); + + TokenLoginVO tokenLogin(MemberDictDO memberDictDO); + } diff --git a/src/main/java/com/laowu/service/MemberTeamMappingService.java b/src/main/java/com/laowu/service/MemberTeamMappingService.java deleted file mode 100644 index dd448b6..0000000 --- a/src/main/java/com/laowu/service/MemberTeamMappingService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.laowu.service; - -import com.laowu.model.MemberTeamMappingDO; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 团队成员映射表 服务类 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -public interface MemberTeamMappingService extends IService { - -} diff --git a/src/main/java/com/laowu/service/MemberTrainInfoService.java b/src/main/java/com/laowu/service/MemberTrainInfoService.java index b1d7877..725e1f2 100644 --- a/src/main/java/com/laowu/service/MemberTrainInfoService.java +++ b/src/main/java/com/laowu/service/MemberTrainInfoService.java @@ -1,8 +1,7 @@ package com.laowu.service; -import com.laowu.dto.member.AddTrainDTO; -import com.laowu.model.MemberTrainInfoDO; import com.baomidou.mybatisplus.extension.service.IService; +import com.laowu.model.MemberTrainInfoDO; /** *

@@ -14,9 +13,9 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface MemberTrainInfoService extends IService { - String addTrain(AddTrainDTO addTrainDTO); + String addTrain(MemberTrainInfoDO memberTrainInfoDO); String deleteTrain(MemberTrainInfoDO memberTrainInfoDO); - String updateTrain(AddTrainDTO addTrainDTO); + String updateTrain(MemberTrainInfoDO memberTrainInfoDO); } diff --git a/src/main/java/com/laowu/service/MemberTrainPositionsService.java b/src/main/java/com/laowu/service/MemberTrainPositionsService.java deleted file mode 100644 index 7592ca2..0000000 --- a/src/main/java/com/laowu/service/MemberTrainPositionsService.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.laowu.service; - -import com.laowu.model.MemberTrainPositionsDO; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 培训关联职业范围 服务类 - *

- * - * @author Tuyp - * @since 2023-04-12 - */ -public interface MemberTrainPositionsService extends IService { - - String addPosition(MemberTrainPositionsDO memberTrainPositionsDO); - - String deletePosition(MemberTrainPositionsDO memberTrainPositionsDO); - - String updatePosition(MemberTrainPositionsDO memberTrainPositionsDO); -} diff --git a/src/main/java/com/laowu/service/MemberUpdateHistoryService.java b/src/main/java/com/laowu/service/MemberUpdateHistoryService.java deleted file mode 100644 index 4182f19..0000000 --- a/src/main/java/com/laowu/service/MemberUpdateHistoryService.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.laowu.service; - -import com.laowu.model.MemberUpdateHistoryDO; -import com.baomidou.mybatisplus.extension.service.IService; - -/** - *

- * 公司更新日志表 服务类 - *

- * - * @author Tuyp - * @since 2023-04-07 - */ -public interface MemberUpdateHistoryService extends IService { - -} diff --git a/src/main/java/com/laowu/service/TeamDictService.java b/src/main/java/com/laowu/service/TeamDictService.java deleted file mode 100644 index 40fb49d..0000000 --- a/src/main/java/com/laowu/service/TeamDictService.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.laowu.service; - -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.service.IService; -import com.laowu.dto.team.*; -import com.laowu.model.MemberDictDO; -import com.laowu.model.TeamDictDO; -import com.laowu.vo.team.*; - -import java.util.List; - -/** - *

- * 团队字典表 服务类 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -public interface TeamDictService extends IService { - - IPage teams(TeamsDTO teamsDTO); - - TotalTeamsVO totalTeams(TeamDictDO teamDictDO); - - String deleteTeam(TeamDictDO teamDictDO); - - String addTeam(TeamDictDO teamDictDO); - - String updateTeam(TeamDictDO teamDictDO); - - IPage teamMember(TeamMemberDTO teamMemberDTO); - - OneTeamInfoVO oneTeamInfo(TeamDictDO teamDictDO); - - IPage noTeamMembers(TeamMemberDTO teamMemberDTO); - - String updateMembers(UpdateTeamMembersDTO updateTeamMembersDTO); - - IPage leaderMembers(LeaderMembersDTO leaderMembersDTO); - - TotalTeamsVO leaderMemberCounts(TeamDictDO teamDictDO); - - List provinceStationTeam(ProvinceStationTeamDTO provinceStationTeamDTO); - - IPage memberManagement(MemberManagementDTO memberManagementDTO); - - TotalTeamsVO memberManagementCount(MemberManagementDTO memberManagementDTO); - - - -} diff --git a/src/main/java/com/laowu/service/WorkstationDictService.java b/src/main/java/com/laowu/service/WorkstationDictService.java index 0226ae8..5797161 100644 --- a/src/main/java/com/laowu/service/WorkstationDictService.java +++ b/src/main/java/com/laowu/service/WorkstationDictService.java @@ -7,10 +7,9 @@ import com.laowu.dto.station.StationAccountDTO; import com.laowu.dto.station.StationsDTO; import com.laowu.dto.station.UpdateAdministerDTO; import com.laowu.model.AdministerDO; +import com.laowu.model.LibGeoLocationDO; import com.laowu.model.WorkstationDictDO; -import com.laowu.vo.station.OneStationAccountVO; -import com.laowu.vo.station.ProvinceStationsVO; -import com.laowu.vo.team.HomepageVO; +import com.laowu.vo.station.*; import java.util.List; @@ -43,4 +42,12 @@ public interface WorkstationDictService extends IService { String addAdminister(UpdateAdministerDTO updateAdministerDTO); HomepageVO homepage(WorkstationDictDO workstationDictDO); + + Screen1VO screen1(LibGeoLocationDO libGeoLocationDO); + + Screen2VO screen2(LibGeoLocationDO libGeoLocationDO); + + List screen3(LibGeoLocationDO libGeoLocationDO); + + String ageGender(); } diff --git a/src/main/java/com/laowu/service/WorkstationMemberMappingService.java b/src/main/java/com/laowu/service/WorkstationMemberMappingService.java index 0f1b30c..29474d7 100644 --- a/src/main/java/com/laowu/service/WorkstationMemberMappingService.java +++ b/src/main/java/com/laowu/service/WorkstationMemberMappingService.java @@ -1,7 +1,10 @@ package com.laowu.service; -import com.laowu.model.WorkstationMemberMappingDO; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.service.IService; +import com.laowu.dto.member.MemberManagementDTO; +import com.laowu.model.WorkstationMemberMappingDO; +import com.laowu.vo.member.MemberManagementVO; /** *

@@ -13,4 +16,6 @@ import com.baomidou.mybatisplus.extension.service.IService; */ public interface WorkstationMemberMappingService extends IService { + IPage memberManagement(MemberManagementDTO memberManagementDTO); + } diff --git a/src/main/java/com/laowu/service/impl/AccessTokenServiceImpl.java b/src/main/java/com/laowu/service/impl/AccessTokenServiceImpl.java new file mode 100644 index 0000000..926771b --- /dev/null +++ b/src/main/java/com/laowu/service/impl/AccessTokenServiceImpl.java @@ -0,0 +1,20 @@ +package com.laowu.service.impl; + +import com.laowu.model.AccessTokenDO; +import com.laowu.mapper.AccessTokenMapper; +import com.laowu.service.AccessTokenService; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import org.springframework.stereotype.Service; + +/** + *

+ * 服务实现类 + *

+ * + * @author Tuyp + * @since 2023-08-23 + */ +@Service +public class AccessTokenServiceImpl extends ServiceImpl implements AccessTokenService { + +} diff --git a/src/main/java/com/laowu/service/impl/AdministerServiceImpl.java b/src/main/java/com/laowu/service/impl/AdministerServiceImpl.java index 0fef98e..633f170 100644 --- a/src/main/java/com/laowu/service/impl/AdministerServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/AdministerServiceImpl.java @@ -107,6 +107,7 @@ public class AdministerServiceImpl extends ServiceImpl workstationDictDOS = workstationAdministersMapper.workstations(administerDO.getId()); + administerPermissionVO.setWorkstationDictDOS(workstationDictDOS); } diff --git a/src/main/java/com/laowu/service/impl/CompanyDictServiceImpl.java b/src/main/java/com/laowu/service/impl/CompanyDictServiceImpl.java index c5aa366..177857e 100644 --- a/src/main/java/com/laowu/service/impl/CompanyDictServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/CompanyDictServiceImpl.java @@ -17,7 +17,7 @@ import com.laowu.vo.company.CompanyCardVO; import com.laowu.vo.company.CompanyUpdateHistoryVO; import com.laowu.vo.company.CompanyVO; import com.laowu.vo.company.RelateWorkVO; -import com.laowu.vo.team.TotalTeamsVO; +import com.laowu.vo.station.TotalTeamsVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/src/main/java/com/laowu/service/impl/ImageCheckRecordServiceImpl.java b/src/main/java/com/laowu/service/impl/ImageCheckRecordServiceImpl.java new file mode 100644 index 0000000..4105df6 --- /dev/null +++ b/src/main/java/com/laowu/service/impl/ImageCheckRecordServiceImpl.java @@ -0,0 +1,461 @@ +package com.laowu.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.google.common.hash.Hashing; +import com.laowu.common.RestTemplateConfig; +import com.laowu.common.exception.HttpException; +import com.laowu.dto.image.CheckResultDTO; +import com.laowu.mapper.AccessTokenMapper; +import com.laowu.mapper.ImageCheckRecordMapper; +import com.laowu.mapper.MemberDictMapper; +import com.laowu.model.AccessTokenDO; +import com.laowu.model.ImageCheckRecordDO; +import com.laowu.model.MemberDictDO; +import com.laowu.service.ImageCheckRecordService; +import com.laowu.util.OSSUtils; +import com.laowu.util.RandomUtil; +import com.laowu.vo.image.*; +import org.apache.commons.codec.Charsets; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.http.*; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.time.LocalDateTime; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + *

+ * 人脸识别记录表 服务实现类 + *

+ * + * @author Tuyp + * @since 2023-08-22 + */ +@Service +public class ImageCheckRecordServiceImpl extends ServiceImpl implements ImageCheckRecordService { + + @Autowired + private MemberDictMapper memberDictMapper; + + @Autowired + private RestTemplateConfig restTemplateConfig; + + @Autowired + private AccessTokenMapper accessTokenMapper; + + @Autowired + private ImageCheckRecordMapper imageCheckRecordMapper; + + public static final String WBAPPID = "IDAaOibN"; + public static final String SECRET = "GD6Z55rHXSlBZB4oxEEowwI5h4IgwUdh0xOOHi6fambXYMFcHuDaBRxtnMx5FVhk"; + + // public static final String WBAPPID = "TIDAbX8x"; +// public static final String SECRET = "cWAMlQ8Aq7aOad0wrtfJcSpcgksCLFT62qHC4uDHFCGx0SPKqtpt1PungiAKya2M"; + public static final String NONCE = "08f1209ee37b4ba29e61e51f3643a24e"; + + public List getImageCheckHistory(ImageCheckRecordDO imageCheckRecordDO) { + return this.baseMapper.selectList(new QueryWrapper() + .lambda() + .eq(ImageCheckRecordDO::getMemberId, imageCheckRecordDO.getMemberId()) + .orderByDesc(ImageCheckRecordDO::getCreateDate)); + } + + public SendIdCardInfoVO imageCheck(ImageCheckRecordDO imageCheckRecordDO) throws Exception { + return PCCheckIdCard(imageCheckRecordDO.getMemberId()); + } + + public SendIdCardInfoVO h5CheckResult(ImageCheckRecordDO imageCheckRecordDO) throws Exception { + return H5IdCheckCard(imageCheckRecordDO.getMemberId()); + } + +// public SendIdCardInfoVO loginCheck(ImageCheckRecordDO imageCheckRecordDO) throws Exception { +// return PCCheckIdCard(imageCheckRecordDO.getMemberId()); +// } +// +// public SendIdCardInfoVO h5LoginCheck(ImageCheckRecordDO imageCheckRecordDO) throws Exception { +// return H5IdCheckCard(imageCheckRecordDO.getMemberId()); +// } + + /** + * 当天验证次数超过 + */ + public void getDailyCheckCnt(Long memberId) { + int count = imageCheckRecordMapper.selectCount(new QueryWrapper() + .lambda() + .eq(ImageCheckRecordDO::getMemberId, memberId) + .ge(ImageCheckRecordDO::getCreateDate, LocalDateTime.now())); + if (count > 3) { + throw new HttpException(80001); + } + } + + /** + * H5端调取权威库(身份证)验证 权威库 + */ + public SendIdCardInfoVO H5IdCheckCard(Long id) { + getDailyCheckCnt(id); + //获取这个学生的基本信息 + MemberDictDO memberDictDO = memberDictMapper.selectById(id); + + if (StringUtils.isEmpty(memberDictDO.getIdCard())) { + throw new HttpException(10025); + } + + // 生成订单 + ImageCheckRecordDO imageCheckRecordDO = new ImageCheckRecordDO(); + imageCheckRecordDO.setMemberId(id); + imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber()); + imageCheckRecordMapper.insert(imageCheckRecordDO); + + //获取signTicket + IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken()); + //生成签名 + List signList1 = new ArrayList<>(); + signList1.add(WBAPPID); + signList1.add(memberDictDO.getId() + ""); + signList1.add("1.0.0"); + signList1.add(NONCE); + String sign = sign(signList1, idCardTicketsVO.getValue()); + + //合作方后台上送身份信息 + SendIdCardInfoVO sendIdCardInfoVO = null; + if (StringUtils.isEmpty(memberDictDO.getImg())) { + sendIdCardInfoVO = this.h5SendIdCardInfo(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign); + } else { + sendIdCardInfoVO = this.h5SendIdCardInfoCompare(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign, OSSUtils.image2Base64(memberDictDO.getImg())); + } + + if (!"0".equals(sendIdCardInfoVO.getCode())) { + imageCheckRecordMapper.deleteById(imageCheckRecordDO.getId()); + throw new HttpException(10026); + } + + //获取 NONCE ticket + IdCardTicketsVO nonceTicket = this.nonceTicket(getLatestAccessToken(), memberDictDO.getId() + ""); + + //签名2 + List signList2 = new ArrayList<>(); + signList2.add(WBAPPID); + signList2.add(imageCheckRecordDO.getBizSeqNo()); + signList2.add(memberDictDO.getId() + ""); + signList2.add("1.0.0"); + signList2.add(sendIdCardInfoVO.getResult().getFaceId()); + signList2.add(NONCE); + String sign2 = sign(signList2, nonceTicket.getValue()); + + sendIdCardInfoVO.getResult().setWbAppId(WBAPPID); + sendIdCardInfoVO.getResult().setNonce(NONCE); + sendIdCardInfoVO.getResult().setUserId(memberDictDO.getId()); + sendIdCardInfoVO.getResult().setSign(sign2); + + return sendIdCardInfoVO; + } + + /** + * PC端调取权威库(身份证)验证 权威库 + * 1,签到页 0 班级内 + */ + public SendIdCardInfoVO PCCheckIdCard(Long id) { + + getDailyCheckCnt(id); + //获取这个学生的基本信息 + MemberDictDO memberDictDO = memberDictMapper.selectById(id); + if (StringUtils.isEmpty(memberDictDO.getIdCard())) { + throw new HttpException(10025); + } + + //生成订单 + ImageCheckRecordDO imageCheckRecordDO = new ImageCheckRecordDO(); + imageCheckRecordDO.setMemberId(memberDictDO.getId()); + imageCheckRecordDO.setBizSeqNo(RandomUtil.randomOrderNumber()); + imageCheckRecordMapper.insert(imageCheckRecordDO); + + //获取signTicket + IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken()); + + //生成签名 + List signList1 = new ArrayList<>(); + signList1.add(WBAPPID); + signList1.add(imageCheckRecordDO.getBizSeqNo()); + signList1.add(memberDictDO.getId() + ""); + signList1.add("1.0.0"); + String sign = ""; + + //合作方后台上送身份信息 + // 查看之前是否有验证过,没有的话就调取权威库,有的话就进行两个图片对比 + SendIdCardInfoVO sendIdCardInfoVO = null; + + if (StringUtils.isEmpty(memberDictDO.getImg())) { + signList1.add(memberDictDO.getUserName()); + signList1.add(memberDictDO.getIdCard()); + sign = sign(signList1, idCardTicketsVO.getValue()); + sendIdCardInfoVO = this.sendIdCardInfo(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign); + } else { + sign = sign(signList1, idCardTicketsVO.getValue()); + sendIdCardInfoVO = this.sendIdCardInfoCompare(imageCheckRecordDO.getBizSeqNo(), memberDictDO, sign, OSSUtils.image2Base64(memberDictDO.getImg())); + } + + if (!"0".equals(sendIdCardInfoVO.getCode())) { + //删除这个订单 + imageCheckRecordMapper.deleteById(imageCheckRecordDO.getId()); + throw new HttpException(10026); + } + + //获取 NONCE ticket + IdCardTicketsVO nonceTicket = this.nonceTicket(getLatestAccessToken(), memberDictDO.getId() + ""); + + //签名2 faceId ===>H5FaceId + List signList2 = new ArrayList(Arrays.asList(WBAPPID, memberDictDO.getId() + "", NONCE, "1.0.0", sendIdCardInfoVO.getResult().getH5faceId(), sendIdCardInfoVO.getResult().getOrderNo())); + String sign2 = sign(signList2, nonceTicket.getValue()); + + sendIdCardInfoVO.getResult().setWbAppId(WBAPPID); + sendIdCardInfoVO.getResult().setNonce(NONCE); + sendIdCardInfoVO.getResult().setUserId(memberDictDO.getId()); + sendIdCardInfoVO.getResult().setSign(sign2); + return sendIdCardInfoVO; + } + + @Transactional(rollbackFor = Exception.class) + public MemberDictDO checkResult(CheckResultDTO checkResultDTO) throws Exception { + + //获取signTicket + IdCardTicketsVO idCardTicketsVO = this.signTickets(getLatestAccessToken()); + + //签名3 + List signList3 = new ArrayList<>(); + signList3.add(WBAPPID); + signList3.add(checkResultDTO.getId()); + signList3.add("1.0.0"); + signList3.add(NONCE); + + String sign3 = sign(signList3, idCardTicketsVO.getValue()); + + //人身核验结果 + ResultVO resultVO = this.checkResult(checkResultDTO.getId(), sign3); + + //存数据库 + ImageCheckRecordDO imageCheckRecordDO = imageCheckRecordMapper.selectOne(new QueryWrapper() + .lambda() + .eq(ImageCheckRecordDO::getBizSeqNo, checkResultDTO.getId())); + MemberDictDO memberDictDO = memberDictMapper.selectById(imageCheckRecordDO.getMemberId()); + if (!StringUtils.isEmpty(resultVO.getSimilarity())) { + BeanUtils.copyProperties(resultVO, imageCheckRecordDO); + try { + imageCheckRecordDO.setPhoto(OSSUtils.uploadOneFile(resultVO.getPhotoList().get(resultVO.getPhotoList().size() - 1))); + if ((Double.valueOf(imageCheckRecordDO.getSimilarity()) > 50)) { + imageCheckRecordDO.setResult(1); + memberDictDO.setImg(imageCheckRecordDO.getPhoto()); + memberDictMapper.updateById(memberDictDO); + } else { + imageCheckRecordDO.setResult(0); + throw new HttpException(40004); + } + } catch (Exception e) { + imageCheckRecordDO.setResult(0); + e.printStackTrace(); + } + imageCheckRecordMapper.updateById(imageCheckRecordDO); + } + return memberDictDO; + } + + + /** + * 获取accessToken + */ + public IdCardAccessTokenVO accessToken() { + + String url = "https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/access_token?app_id=" + WBAPPID + + "&secret=" + SECRET + "&grant_type=client_credential&version=1.0.0"; + ResponseEntity response = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.GET, null, IdCardAccessTokenVO.class); + return response.getBody(); + } + + /** + * 获取sign_ticket + */ + public IdCardTicketsVO signTickets(String accessToken) { + String url = "https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/api_ticket?app_id=" + WBAPPID + "&access_token=" + accessToken + "&type=SIGN&version=1.0.0"; + ResponseEntity response = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.GET, null, IdCardSignTicketVO.class); + return response.getBody().getTickets().get(0); + } + + /** + * 获取签名 + */ + public static String sign(List values, String ticket) { //values传ticket外的其他参数 + if (values == null) { + throw new NullPointerException("values is null"); + } + values.removeAll(Collections.singleton(null));// remove null + values.add(ticket); + java.util.Collections.sort(values); + + StringBuilder sb = new StringBuilder(); + for (String s : values) { + sb.append(s); + } + return Hashing.sha1().hashString(sb, Charsets.UTF_8).toString().toUpperCase(); + } + + /** + * PC端 合作方后台上送身份信息 POST请求 权威库 姓名+身份证 + */ + public SendIdCardInfoVO sendIdCardInfo(String orderNo, MemberDictDO memberDictDO, String sign) { + String url = "https://miniprogram-kyc.tencentcloudapi.com/api/server/h5/geth5faceid?orderNo=" + orderNo; + + String input = "{\n" + + " \"webankAppId\":\"" + WBAPPID + "\",\n" + + " \"orderNo\":\"" + orderNo + "\",\n" + + " \"name\":\"" + memberDictDO.getUserName() + "\"," + + " \"idNo\":\"" + memberDictDO.getIdCard() + "\"," + + " \"userId\":\"" + memberDictDO.getId() + "\"," + + " \"version\":\"1.0.0\"," + + " \"sign\":\"" + sign + "\"" + + "}"; + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + + ResponseEntity responseEntity = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class); + return responseEntity.getBody(); + } + + /** + * PC端 合作方后台上送身份信息 POST请求 图片对比 + */ + public SendIdCardInfoVO sendIdCardInfoCompare(String orderNo, MemberDictDO memberDictDO, String sign, String sourceImg) { + String url = "https://miniprogram-kyc.tencentcloudapi.com/api/server/h5/geth5faceid?orderNo=" + orderNo; + + String input = "{\n" + + " \"webankAppId\":\"" + WBAPPID + "\",\n" + + " \"orderNo\":\"" + orderNo + "\",\n" + + " \"sourcePhotoStr\":\"" + sourceImg + "\"," + + " \"sourcePhotoType\":\"" + 2 + "\"," + + " \"userId\":\"" + memberDictDO.getId() + "\"," + + " \"version\":\"1.0.0\"," + + " \"sign\":\"" + sign + "\"" + + "}"; + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + + ResponseEntity responseEntity = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class); + return responseEntity.getBody(); + } + + /** + * H5端 合作方后台上送身份信息 POST请求 权威库 姓名+身份证 + */ + public SendIdCardInfoVO h5SendIdCardInfo(String orderNo, MemberDictDO memberDictDO, String sign) { + String url = "https://kyc.qcloud.com/api/server/getAdvFaceId?orderNo=" + orderNo; + + String input = "{\n" + + " \"appId\":\"" + WBAPPID + "\",\n" + + " \"orderNo\":\"" + orderNo + "\",\n" + + " \"name\":\"" + memberDictDO.getUserName() + "\"," + + " \"idNo\":\"" + memberDictDO.getIdCard() + "\"," + + " \"userId\":\"" + memberDictDO.getId() + "\"," + + " \"version\":\"1.0.0\"," + + " \"sign\":\"" + sign + "\"," + + " \"nonce\":\"" + NONCE + "\"" + + "}"; + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + + ResponseEntity responseEntity = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class); + return responseEntity.getBody(); + } + + /** + * H5端 合作方后台上送身份信息 POST请求 图片对比 + */ + public SendIdCardInfoVO h5SendIdCardInfoCompare(String orderNo, MemberDictDO memberDictDO, String sign, String sourceImg) { + String url = "https://kyc.qcloud.com/api/server/getAdvFaceId?orderNo=" + orderNo; + + String input = "{\n" + + " \"appId\":\"" + WBAPPID + "\",\n" + + " \"orderNo\":\"" + orderNo + "\",\n" + + " \"sourcePhotoStr\":\"" + sourceImg + "\"," + + " \"sourcePhotoType\":\"" + 2 + "\"," + + " \"userId\":\"" + memberDictDO.getId() + "\"," + + " \"version\":\"1.0.0\"," + + " \"sign\":\"" + sign + "\"," + + " \"nonce\":\"" + NONCE + "\"" + + "}"; + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + + ResponseEntity responseEntity = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.POST, new HttpEntity<>(input, headers), SendIdCardInfoVO.class); + return responseEntity.getBody(); + } + + + /** + * 获取nonce ticket + */ + public IdCardTicketsVO nonceTicket(String accessToken, String usrId) { + + String url = "https://miniprogram-kyc.tencentcloudapi.com/api/oauth2/api_ticket?app_id=" + WBAPPID + + "&access_token=" + accessToken + + "&type=NONCE&version=1.0.0&user_id=" + usrId; + ResponseEntity response = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.GET, null, IdCardSignTicketVO.class); + return response.getBody().getTickets().get(0); + } + + /** + * 人脸核身结果查询 POST + */ + public ResultVO checkResult(String orderNo, String sign) { + + String url = "https://miniprogram-kyc.tencentcloudapi.com/api/v2/base/queryfacerecord?orderNo=" + orderNo; + + String input = "{\n" + + " \"appId\":\"" + WBAPPID + "\",\n" + + " \"version\":\"1.0.0\",\n" + + " \"nonce\":\"" + NONCE + "\"," + + " \"orderNo\":\"" + orderNo + "\"," + + " \"sign\":\"" + sign + "\"," + + " \"getPhotos\":\"" + 1 + "\"," + + " \"getFile\":\"2\"," + + " \"queryVersion\":\"\"" + + "}"; + HttpHeaders headers = new HttpHeaders(); + headers.setContentType(MediaType.APPLICATION_JSON); + ResponseEntity responseEntity = restTemplateConfig.restTemplate() + .exchange(url, HttpMethod.POST, new HttpEntity<>(input.getBytes(), headers), CheckResultVO.class); + return responseEntity.getBody().getResult(); + } + + //获取最新的accessToken + public String getLatestAccessToken() { + AccessTokenDO accessTokenDO = accessTokenMapper.selectOne(new QueryWrapper() + .lambda() //21min //39min + .gt(AccessTokenDO::getCreateDate, LocalDateTime.now().minusMinutes(19L))); + + //数据库没有的话 + if (null == accessTokenDO) { + accessTokenMapper.delete(null); + //获取token + IdCardAccessTokenVO idCardAccessTokenVO = this.accessToken(); + accessTokenDO = new AccessTokenDO(); + accessTokenDO.setAccessToken(idCardAccessTokenVO.getAccess_token()); + accessTokenMapper.insert(accessTokenDO); + } + return accessTokenDO.getAccessToken(); + } + + +} diff --git a/src/main/java/com/laowu/service/impl/MemberCollegeMappingServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberCollegeMappingServiceImpl.java deleted file mode 100644 index c75c843..0000000 --- a/src/main/java/com/laowu/service/impl/MemberCollegeMappingServiceImpl.java +++ /dev/null @@ -1,60 +0,0 @@ -package com.laowu.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.laowu.common.exception.HttpException; -import com.laowu.mapper.MemberCollegeMappingMapper; -import com.laowu.model.MemberCollegeMappingDO; -import com.laowu.service.MemberCollegeMappingService; -import com.laowu.util.ConstantUtils; -import org.springframework.stereotype.Service; - -/** - *

- * 学员-学校映射表 服务实现类 - *

- * - * @author Tuyp - * @since 2023-04-04 - */ -@Service -public class MemberCollegeMappingServiceImpl extends ServiceImpl implements MemberCollegeMappingService { - - - public String addCollege(MemberCollegeMappingDO memberCollegeMappingDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberCollegeMappingDO::getCollegeId, memberCollegeMappingDO.getCollegeId()) - .eq(MemberCollegeMappingDO::getMemberId, memberCollegeMappingDO.getMemberId())); - - if (count > 0) { - throw new HttpException(70001); - } - - this.baseMapper.insert(memberCollegeMappingDO); - return ConstantUtils.ADD_SUCCESS; - } - - public String updateCollege(MemberCollegeMappingDO memberCollegeMappingDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberCollegeMappingDO::getCollegeId, memberCollegeMappingDO.getCollegeId()) - .eq(MemberCollegeMappingDO::getMemberId, memberCollegeMappingDO.getMemberId()) - .ne(MemberCollegeMappingDO::getId, memberCollegeMappingDO.getId())); - - if (count > 0) { - throw new HttpException(70001); - } - - this.baseMapper.updateById(memberCollegeMappingDO); - return ConstantUtils.SUCCESS_UPDATE; - } - - public String deleteCollege(MemberCollegeMappingDO memberCollegeMappingDO) { - this.baseMapper.deleteById(memberCollegeMappingDO.getId()); - return ConstantUtils.DELETE_SUCCESS; - } - -} diff --git a/src/main/java/com/laowu/service/impl/MemberDictServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberDictServiceImpl.java index ca7f89a..cd6aa6a 100644 --- a/src/main/java/com/laowu/service/impl/MemberDictServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/MemberDictServiceImpl.java @@ -11,6 +11,7 @@ import com.laowu.model.*; import com.laowu.service.MemberDictService; import com.laowu.util.ConstantUtils; import com.laowu.util.ExcelUtil; +import com.laowu.util.SecretUtils; import com.laowu.vo.member.*; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; @@ -38,33 +39,9 @@ public class MemberDictServiceImpl extends ServiceImpl allMembers(AllMembersDTO allMembersDTO) { Page pager = new Page(allMembersDTO.getPageNum(), allMembersDTO.getPageSize()); @@ -100,10 +77,6 @@ public class MemberDictServiceImpl extends ServiceImpl() - .lambda() - .eq(MemberTeamMappingDO::getMemberId, addMemberDTO.getId())); - workstationMemberMappingMapper.delete(new QueryWrapper() .lambda() .eq(WorkstationMemberMappingDO::getMemberId, addMemberDTO.getId())); @@ -112,22 +85,6 @@ public class MemberDictServiceImpl extends ServiceImpl teamDictDOS = teamDictMapper.selectList(new QueryWrapper() - .lambda() - .eq(TeamDictDO::getMemberId, addMemberDTO.getId())); - - for (TeamDictDO teamDictDO : teamDictDOS) { - teamDictMapper.noLeader(teamDictDO.getId()); - } - - //历史 - MemberUpdateHistoryDO memberUpdateHistoryDO = new MemberUpdateHistoryDO(); - memberUpdateHistoryDO.setAdministerId(addMemberDTO.getUserId()); - memberUpdateHistoryDO.setModule(addMemberDTO.getModule()); - memberUpdateHistoryDO.setMemberId(addMemberDTO.getId()); - memberUpdateHistoryDO.setOpr("删除了该成员"); - memberUpdateHistoryMapper.insert(memberUpdateHistoryDO); return ConstantUtils.DELETE_SUCCESS; } @@ -144,16 +101,7 @@ public class MemberDictServiceImpl extends ServiceImpl positionIds = addMemberDTO.getPositionIds(); for (Long positionId : positionIds) { @@ -163,29 +111,13 @@ public class MemberDictServiceImpl extends ServiceImpl memberCollegeVOS = new ArrayList<>(); - List memberCollegeMappingDOS = memberCollegeMappingMapper.selectList(new QueryWrapper() - .lambda() - .eq(MemberCollegeMappingDO::getMemberId, memberDictDO1.getId())); - for (MemberCollegeMappingDO mcmd : memberCollegeMappingDOS) { - MemberCollegeVO memberCollegeVO = new MemberCollegeVO(); - BeanUtils.copyProperties(mcmd, memberCollegeVO); - LibCollegeDO libCollegeDO = libCollegeMapper.selectById(mcmd.getCollegeId()); - memberCollegeVO.setCollege(libCollegeDO.getCollege()); - - LibMajorDO libMajorDO = libMajorMapper.selectById(mcmd.getMajorId()); - memberCollegeVO.setMajor(libMajorDO.getMajor()); - memberCollegeVOS.add(memberCollegeVO); - } - oneMemberVO.setMemberCollegeVOS(memberCollegeVOS); - //就业信息 - List memberJobInfoVOS = new ArrayList(); List memberJobInfoDOS = memberJobInfoMapper.selectList(new QueryWrapper() .lambda() .eq(MemberJobInfoDO::getMemberId, memberDictDO1.getId()) .orderByDesc(MemberJobInfoDO::getStartDate)); - for (MemberJobInfoDO memberJobInfoDO : memberJobInfoDOS) { - MemberJobInfoVO memberJobInfoVO = new MemberJobInfoVO(); - BeanUtils.copyProperties(memberJobInfoDO, memberJobInfoVO); - - CompanyDictDO companyDictDO = companyDictMapper.selectById(memberJobInfoDO.getCompanyId()); - memberJobInfoVO.setCompanyName(companyDictDO.getCompanyName()); - memberJobInfoVOS.add(memberJobInfoVO); - } - oneMemberVO.setMemberJobInfoVOS(memberJobInfoVOS); + oneMemberVO.setMemberJobInfoVOS(memberJobInfoDOS); //专业技能信息 List memberPositions = memberPositionsMapper.memberPositions(memberDictDO.getId()); oneMemberVO.setPositionDictDOS(memberPositions); - //专业证书信息 - List memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper() - .lambda() - .eq(MemberCertsDO::getMemberId, memberDictDO1.getId())); - oneMemberVO.setMemberCertsDOS(memberCertsDOS); - //培训信息 - List memberTrainInfoVOS = new ArrayList<>(); List memberTrainInfoDOS = memberTrainInfoMapper.selectList(new QueryWrapper() .lambda() .eq(MemberTrainInfoDO::getMemberId, memberDictDO1.getId())); + oneMemberVO.setMemberTrainInfoVOS(memberTrainInfoDOS); - for (MemberTrainInfoDO mtid : memberTrainInfoDOS) { - MemberTrainInfoVO memberTrainInfoVO = new MemberTrainInfoVO(); - BeanUtils.copyProperties(mtid, memberTrainInfoVO); - - //技能 - List positionDictDOS = memberTrainPositionsMapper.positions(mtid.getId()); - memberTrainInfoVO.setPositionDictDOS(positionDictDOS); - memberTrainInfoVOS.add(memberTrainInfoVO); - } - oneMemberVO.setMemberTrainInfoVOS(memberTrainInfoVOS); - - + //专业证书信息 + List memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper() + .lambda() + .eq(MemberCertsDO::getMemberId, memberDictDO1.getId())); + oneMemberVO.setMemberCertsDOS(memberCertsDOS); return oneMemberVO; } public String updateMember(UpdateMemberDTO updateMemberDTO) { - MemberDictDO memberDictDO1 = this.baseMapper.selectById(updateMemberDTO.getId()); - MemberDictDO memberDictDO = new MemberDictDO(); BeanUtils.copyProperties(updateMemberDTO, memberDictDO); this.baseMapper.updateById(memberDictDO); List memberJobInfoVOS = updateMemberDTO.getMemberJobInfoVOS(); - StringBuffer stringBuffer = new StringBuffer(); - stringBuffer.append("变更了“"); - if (null != memberJobInfoVOS) { memberJobInfoMapper.delete(new QueryWrapper() .lambda() @@ -291,7 +169,6 @@ public class MemberDictServiceImpl extends ServiceImpl positionDictDOS = this.baseMapper.memberPositions(memberDictDO.getId()); memberCardVO.setPositionDictDOS(positionDictDOS); - String age = ""; + int age = 0; //计算年龄,性别 if (StringUtils.isNotEmpty(memberDictDO1.getIdCard())) { @@ -403,9 +228,9 @@ public class MemberDictServiceImpl extends ServiceImpl memberTrainInfoVOS = new ArrayList<>(); List memberTrainInfoDOS = memberTrainInfoMapper.selectList(new QueryWrapper() .lambda() .eq(MemberTrainInfoDO::getMemberId, memberDictDO1.getId())); - for (MemberTrainInfoDO mtid : memberTrainInfoDOS) { - MemberTrainInfoVO memberTrainInfoVO = new MemberTrainInfoVO(); - BeanUtils.copyProperties(mtid, memberTrainInfoVO); - - //技能 - List positionDictDOS1 = memberTrainPositionsMapper.positions(mtid.getId()); - memberTrainInfoVO.setPositionDictDOS(positionDictDOS1); - memberTrainInfoVOS.add(memberTrainInfoVO); - } - memberCardVO.setMemberTrainInfoVOS(memberTrainInfoVOS); + memberCardVO.setMemberTrainInfoVOS(memberTrainInfoDOS); //技能证书 List memberCertsDOS = memberCertsMapper.selectList(new QueryWrapper() @@ -457,9 +272,6 @@ public class MemberDictServiceImpl extends ServiceImpl failMembers = new ArrayList<>(); - List importMemberDTOS = ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile); - for (ImportMemberDTO importMemberDTO : importMemberDTOS) { - - totalCount++; - if (null == importMemberDTO.getIdCard()) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("身份证号不能为空"); - failMembers.add(importMemberVO); - continue; - } - - if (null == importMemberDTO.getUserName()) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("姓名不能为空"); - failMembers.add(importMemberVO); - continue; - } + List importMemberDTOS = ExcelUtil.readExcelWithoutTitle(null, ImportMemberDTO.class, multipartFile); + for (ImportMemberDTO importMemberDTO : importMemberDTOS) { + + totalCount++; + if (null == importMemberDTO.getIdCard()) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("身份证号不能为空"); + failMembers.add(importMemberVO); + continue; + } - if (null == importMemberDTO.getProvince()) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("省不能为空"); - failMembers.add(importMemberVO); - continue; - } + if (null == importMemberDTO.getUserName()) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("姓名不能为空"); + failMembers.add(importMemberVO); + continue; + } - if (null == importMemberDTO.getCity()) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("市不能为空"); - failMembers.add(importMemberVO); - continue; - } + if (null == importMemberDTO.getProvince()) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("省不能为空"); + failMembers.add(importMemberVO); + continue; + } - if (null == importMemberDTO.getCounty()) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("县不能为空"); - failMembers.add(importMemberVO); - continue; - } + if (null == importMemberDTO.getCity()) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("市不能为空"); + failMembers.add(importMemberVO); + continue; + } - int count = libGeoLocationMapper.selectCount(new QueryWrapper() - .lambda() - .eq(LibGeoLocationDO::getProvince, importMemberDTO.getProvince()) - .eq(LibGeoLocationDO::getCity, importMemberDTO.getCity()) - .eq(LibGeoLocationDO::getCounty, importMemberDTO.getCounty())); - - if (count == 0) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("填写地址有误"); - failMembers.add(importMemberVO); - continue; - } + if (null == importMemberDTO.getCounty()) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("县不能为空"); + failMembers.add(importMemberVO); + continue; + } - MemberDictDO memberDictDO = this.baseMapper.selectOne(new QueryWrapper() - .lambda() - .eq(MemberDictDO::getIdCard, importMemberDTO.getIdCard())); - - if (null != memberDictDO) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("该身份证已存在"); - failMembers.add(importMemberVO); - continue; - } + int count = libGeoLocationMapper.selectCount(new QueryWrapper() + .lambda() + .eq(LibGeoLocationDO::getProvince, importMemberDTO.getProvince()) + .eq(LibGeoLocationDO::getCity, importMemberDTO.getCity()) + .eq(LibGeoLocationDO::getCounty, importMemberDTO.getCounty())); + + if (count == 0) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("填写地址有误"); + failMembers.add(importMemberVO); + continue; + } + MemberDictDO memberDictDO = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MemberDictDO::getIdCard, importMemberDTO.getIdCard())); + + if (null != memberDictDO) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("该身份证已存在"); + failMembers.add(importMemberVO); + continue; + } - String[] majors = importMemberDTO.getMajor().split(","); - List memberPositionsDOS = new ArrayList(); - for (String fullName : majors) { - //技能 - PositionDictDO positionDictDO = positionDictMapper.selectOne(new QueryWrapper() - .lambda() - .eq(PositionDictDO::getFullName, fullName)); - if (null != positionDictDO) { - MemberPositionsDO memberPositionsDO = new MemberPositionsDO(); - memberPositionsDO.setPositionId(positionDictDO.getId()); - memberPositionsDOS.add(memberPositionsDO); - } - } - if (majors.length != memberPositionsDOS.size()) { - ImportMemberVO importMemberVO = new ImportMemberVO(); - BeanUtils.copyProperties(importMemberDTO, importMemberVO); - importMemberVO.setIndex(totalCount + 2); - importMemberVO.setFailReason("该技能不存在"); - failMembers.add(importMemberVO); - continue; + String[] majors = importMemberDTO.getMajor().split(","); + List memberPositionsDOS = new ArrayList(); + for (String fullName : majors) { + //技能 + PositionDictDO positionDictDO = positionDictMapper.selectOne(new QueryWrapper() + .lambda() + .eq(PositionDictDO::getFullName, fullName)); + if (null != positionDictDO) { + MemberPositionsDO memberPositionsDO = new MemberPositionsDO(); + memberPositionsDO.setPositionId(positionDictDO.getId()); + memberPositionsDOS.add(memberPositionsDO); } + } + if (majors.length != memberPositionsDOS.size()) { + ImportMemberVO importMemberVO = new ImportMemberVO(); + BeanUtils.copyProperties(importMemberDTO, importMemberVO); + importMemberVO.setIndex(totalCount + 2); + importMemberVO.setFailReason("该技能不存在"); + failMembers.add(importMemberVO); + continue; + } - MemberDictDO memberDictDO1 = new MemberDictDO(); - BeanUtils.copyProperties(importMemberDTO, memberDictDO1); - memberDictDO1.setIdCardType("身份证"); - if (StringUtils.isNotEmpty(workstationId)) { - WorkstationDictDO workstationDictDO = workstationDictMapper.selectById(workstationId); - memberDictDO1.setInfoOrigin(workstationDictDO.getWorkstationName()); - } else { - memberDictDO1.setInfoOrigin("自然人数据库"); - } - this.baseMapper.insert(memberDictDO1); + MemberDictDO memberDictDO1 = new MemberDictDO(); + BeanUtils.copyProperties(importMemberDTO, memberDictDO1); + memberDictDO1.setIdCardType("身份证"); + this.baseMapper.insert(memberDictDO1); - memberPositionsDOS.stream().forEach(x -> { - x.setMemberId(memberDictDO1.getId()); - memberPositionsMapper.insert(x); - }); + memberPositionsDOS.stream().forEach(x -> { + x.setMemberId(memberDictDO1.getId()); + memberPositionsMapper.insert(x); + }); - if (StringUtils.isNotEmpty(teamId)) { - MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO(); - memberTeamMappingDO.setTeamId(Long.valueOf(teamId)); - memberTeamMappingDO.setMemberId(memberDictDO1.getId()); - memberTeamMappingMapper.insert(memberTeamMappingDO); - } - if (StringUtils.isNotEmpty(workstationId)) { - WorkstationMemberMappingDO workstationMemberMappingDO = new WorkstationMemberMappingDO(); - workstationMemberMappingDO.setStationId(Long.valueOf(workstationId)); - workstationMemberMappingDO.setMemberId(memberDictDO1.getId()); - workstationMemberMappingMapper.insert(workstationMemberMappingDO); - } - rightCount++; + if (StringUtils.isNotEmpty(workstationId)) { + WorkstationMemberMappingDO workstationMemberMappingDO = new WorkstationMemberMappingDO(); + workstationMemberMappingDO.setStationId(Long.valueOf(workstationId)); + workstationMemberMappingDO.setMemberId(memberDictDO1.getId()); + workstationMemberMappingMapper.insert(workstationMemberMappingDO); } + rightCount++; + } importMemberDictVO.setImportMemberVOS(failMembers); importMemberDictVO.setRightCount(rightCount); @@ -621,11 +420,26 @@ public class MemberDictServiceImpl extends ServiceImpl importMemberVOS = downloadErrorDataDTO.getImportMemberVOS(); - ExcelUtil.writeExcel(importMemberVOS, ImportMemberVO.class); + return ConstantUtils.SUCCESS_DOWNLOAD; + } + public String downloadUsers(MemberManagementDTO memberManagementDTO) { + Page pager = new Page(1, -1); + //查看某个人所在的工作站 +// List workstationIds = workstationAdministersMapper.administerStations(memberManagementDTO.getUserId()); + IPage memberManagementVOIPage = workstationMemberMappingMapper.memberManagement(pager, memberManagementDTO.getUserName(), memberManagementDTO.getStationId(), memberManagementDTO.getPositionId(), + memberManagementDTO.getProvince(), memberManagementDTO.getCity(), memberManagementDTO.getCounty(), memberManagementDTO.getTown(), memberManagementDTO.getVillage(), memberManagementDTO.getGender(), + memberManagementDTO.getMaxAge(), memberManagementDTO.getMinAge(), memberManagementDTO.getIsParty(), memberManagementDTO.getEducation(), memberManagementDTO.getHealth(), + memberManagementDTO.getProvinceNow(), memberManagementDTO.getCityNow(), memberManagementDTO.getCountyNow(), memberManagementDTO.getTownNow(), memberManagementDTO.getIsPoor(), + memberManagementDTO.getMonitorType(), memberManagementDTO.getIsMigration(), memberManagementDTO.getMigrationType(), memberManagementDTO.getFisherman(), memberManagementDTO.getInsured(), + memberManagementDTO.getPensionInsurance(), memberManagementDTO.getInsurePlace(), memberManagementDTO.getMemberType(), memberManagementDTO.getLaborAbility(), memberManagementDTO.getJobStatus(), + memberManagementDTO.getJobType(), memberManagementDTO.getProvinceJob(), memberManagementDTO.getCityJob(), memberManagementDTO.getCountyJob(), memberManagementDTO.getTownJob(), + memberManagementDTO.getJobDestination(), memberManagementDTO.getJobsStartDate(), memberManagementDTO.getJobsEndDate(), memberManagementDTO.getBusinessId(), + memberManagementDTO.getMaxAverageSalary(), memberManagementDTO.getMinAverageSalary(), memberManagementDTO.getMaxJobAge(), memberManagementDTO.getMinJobAge(), memberManagementDTO.getEmploymentWillingness(), + memberManagementDTO.getProvinceEmployment(), memberManagementDTO.getCityEmployment(), memberManagementDTO.getWillingBusinessId(), memberManagementDTO.getEmploymentTrainingWillingness(), memberManagementDTO.getHomecoming(), memberManagementDTO.getUserId(), memberManagementDTO.getTrainType()); + ExcelUtil.writeExcel(memberManagementVOIPage.getRecords(), MemberManagementVO.class); return ConstantUtils.SUCCESS_DOWNLOAD; } @@ -653,9 +467,51 @@ public class MemberDictServiceImpl extends ServiceImpl roster(RosterDTO rosterDTO){ + public IPage roster(RosterDTO rosterDTO) { return null; } + public Long checkLogin(MemberDictDO memberDictDO) { + + int count = this.baseMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDictDO::getUserName, memberDictDO.getUserName())); + + if (count == 0) { + throw new HttpException(40002); + } + + MemberDictDO memberDictDO1 = this.baseMapper.selectOne(new QueryWrapper() + .lambda() + .eq(MemberDictDO::getUserName, memberDictDO.getUserName()) + .eq(MemberDictDO::getIdCard, memberDictDO.getIdCard())); + + if (null == memberDictDO1) { + throw new HttpException(40003); + } + + return memberDictDO1.getId(); + } + + public TokenLoginVO tokenLogin(MemberDictDO memberDictDO) { + + TokenLoginVO tokenLoginVO = new TokenLoginVO(); + + tokenLoginVO.setIdCard(memberDictDO.getIdCard()); + tokenLoginVO.setTimestamp(System.currentTimeMillis()); + + + //鉴权逻辑 对不对 + String preAuthen = "appId=9a79cda9ef6f4a5ha1" + + "&idCard=" + memberDictDO.getIdCard() + + "×tamp=" + tokenLoginVO.getTimestamp() + + "&appSecret=552a4147db2d4026bc4e9021acd61ka1"; + String sign = SecretUtils.getMD5String(preAuthen); + tokenLoginVO.setSign(sign); + + return tokenLoginVO; + } + + } diff --git a/src/main/java/com/laowu/service/impl/MemberJobInfoServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberJobInfoServiceImpl.java index be37e76..fa70551 100644 --- a/src/main/java/com/laowu/service/impl/MemberJobInfoServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/MemberJobInfoServiceImpl.java @@ -1,11 +1,9 @@ package com.laowu.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.laowu.common.exception.HttpException; -import com.laowu.model.MemberJobInfoDO; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.laowu.mapper.MemberJobInfoMapper; +import com.laowu.model.MemberJobInfoDO; import com.laowu.service.MemberJobInfoService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.laowu.util.ConstantUtils; import org.springframework.stereotype.Service; @@ -22,33 +20,12 @@ public class MemberJobInfoServiceImpl extends ServiceImpl() - .lambda() - .eq(MemberJobInfoDO::getMemberId, memberJobInfoDO.getMemberId()) - .eq(MemberJobInfoDO::getCompanyId, memberJobInfoDO.getCompanyId())); - - if (count > 0) { - throw new HttpException(70001); - } - this.baseMapper.insert(memberJobInfoDO); return ConstantUtils.ADD_SUCCESS; } public String updateJob(MemberJobInfoDO memberJobInfoDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberJobInfoDO::getMemberId, memberJobInfoDO.getMemberId()) - .eq(MemberJobInfoDO::getCompanyId, memberJobInfoDO.getCompanyId()) - .ne(MemberJobInfoDO::getId, memberJobInfoDO.getId())); - - if (count > 0){ - throw new HttpException(70001); - } - this.baseMapper.updateById(memberJobInfoDO); return ConstantUtils.SUCCESS_UPDATE; } diff --git a/src/main/java/com/laowu/service/impl/MemberTeamMappingServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberTeamMappingServiceImpl.java deleted file mode 100644 index 2bbd5c2..0000000 --- a/src/main/java/com/laowu/service/impl/MemberTeamMappingServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.laowu.service.impl; - -import com.laowu.model.MemberTeamMappingDO; -import com.laowu.mapper.MemberTeamMappingMapper; -import com.laowu.service.MemberTeamMappingService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 团队成员映射表 服务实现类 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@Service -public class MemberTeamMappingServiceImpl extends ServiceImpl implements MemberTeamMappingService { - -} diff --git a/src/main/java/com/laowu/service/impl/MemberTrainInfoServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberTrainInfoServiceImpl.java index 6c2c8bd..30d97f5 100644 --- a/src/main/java/com/laowu/service/impl/MemberTrainInfoServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/MemberTrainInfoServiceImpl.java @@ -1,21 +1,12 @@ package com.laowu.service.impl; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.laowu.dto.member.AddTrainDTO; import com.laowu.mapper.MemberTrainInfoMapper; -import com.laowu.mapper.MemberTrainPositionsMapper; import com.laowu.model.MemberTrainInfoDO; -import com.laowu.model.MemberTrainPositionsDO; import com.laowu.service.MemberTrainInfoService; import com.laowu.util.ConstantUtils; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.util.ArrayList; -import java.util.List; - /** *

* 学员培训信息 服务实现类 @@ -27,74 +18,18 @@ import java.util.List; @Service public class MemberTrainInfoServiceImpl extends ServiceImpl implements MemberTrainInfoService { - @Autowired - private MemberTrainPositionsMapper memberTrainPositionsMapper; - - public String addTrain(AddTrainDTO addTrainDTO) { - - MemberTrainInfoDO memberTrainInfoDO = new MemberTrainInfoDO(); - BeanUtils.copyProperties(addTrainDTO, memberTrainInfoDO); - + public String addTrain(MemberTrainInfoDO memberTrainInfoDO) { this.baseMapper.insert(memberTrainInfoDO); - - List positionIds = addTrainDTO.getPositionIds(); - for (Long positionId : positionIds) { - MemberTrainPositionsDO memberTrainPositionsDO = new MemberTrainPositionsDO(); - memberTrainPositionsDO.setMemberTrainId(memberTrainInfoDO.getId()); - memberTrainPositionsDO.setPositionId(positionId); - memberTrainPositionsMapper.insert(memberTrainPositionsDO); - } return ConstantUtils.ADD_SUCCESS; } public String deleteTrain(MemberTrainInfoDO memberTrainInfoDO) { - this.baseMapper.deleteById(memberTrainInfoDO.getId()); - - memberTrainPositionsMapper.delete(new QueryWrapper() - .lambda() - .eq(MemberTrainPositionsDO::getMemberTrainId, memberTrainInfoDO.getId())); - return ConstantUtils.DELETE_SUCCESS; } - public String updateTrain(AddTrainDTO addTrainDTO) { - - - MemberTrainInfoDO memberTrainInfoDO = new MemberTrainInfoDO(); - BeanUtils.copyProperties(addTrainDTO, memberTrainInfoDO); + public String updateTrain(MemberTrainInfoDO memberTrainInfoDO) { this.baseMapper.updateById(memberTrainInfoDO); - - //找到已经有的work - List oldIds = memberTrainPositionsMapper.positionIds(memberTrainInfoDO.getId()); - List newIds = addTrainDTO.getPositionIds(); - - List newIds2 = new ArrayList(); - for (Long id : newIds) { - newIds2.add(id); - } - - newIds.removeAll(oldIds); //新增的人在newIds里面 - - if (newIds.size() > 0) { - for (Long id : newIds) { - MemberTrainPositionsDO memberTrainPositionsDO = new MemberTrainPositionsDO(); - memberTrainPositionsDO.setMemberTrainId(addTrainDTO.getId()); - memberTrainPositionsDO.setPositionId(id); - memberTrainPositionsMapper.insert(memberTrainPositionsDO); - } - } - - oldIds.removeAll(newIds2);//删掉以前的 - if (oldIds.size() > 0) { - for (Long id : oldIds) { - memberTrainPositionsMapper.delete(new QueryWrapper() - .lambda() - .eq(MemberTrainPositionsDO::getMemberTrainId, addTrainDTO.getId()) - .eq(MemberTrainPositionsDO::getPositionId, id)); - } - } - return ConstantUtils.SUCCESS_UPDATE; } } diff --git a/src/main/java/com/laowu/service/impl/MemberTrainPositionsServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberTrainPositionsServiceImpl.java deleted file mode 100644 index 2f43bc1..0000000 --- a/src/main/java/com/laowu/service/impl/MemberTrainPositionsServiceImpl.java +++ /dev/null @@ -1,58 +0,0 @@ -package com.laowu.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.laowu.common.exception.HttpException; -import com.laowu.model.MemberTrainPositionsDO; -import com.laowu.mapper.MemberTrainPositionsMapper; -import com.laowu.service.MemberTrainPositionsService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.laowu.util.ConstantUtils; -import org.springframework.stereotype.Service; - -/** - *

- * 培训关联职业范围 服务实现类 - *

- * - * @author Tuyp - * @since 2023-04-12 - */ -@Service -public class MemberTrainPositionsServiceImpl extends ServiceImpl implements MemberTrainPositionsService { - - public String addPosition(MemberTrainPositionsDO memberTrainPositionsDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberTrainPositionsDO::getMemberTrainId, memberTrainPositionsDO.getMemberTrainId()) - .eq(MemberTrainPositionsDO::getPositionId, memberTrainPositionsDO.getPositionId())); - - if (count > 0) { - throw new HttpException(70001); - } - - this.baseMapper.insert(memberTrainPositionsDO); - return ConstantUtils.ADD_SUCCESS; - } - - public String deletePosition(MemberTrainPositionsDO memberTrainPositionsDO) { - this.baseMapper.deleteById(memberTrainPositionsDO.getId()); - return ConstantUtils.DELETE_SUCCESS; - } - - public String updatePosition(MemberTrainPositionsDO memberTrainPositionsDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .ne(MemberTrainPositionsDO::getId, memberTrainPositionsDO.getId()) - .eq(MemberTrainPositionsDO::getPositionId, memberTrainPositionsDO.getPositionId())); - - if (count > 0) { - throw new HttpException(70001); - } - - this.baseMapper.updateById(memberTrainPositionsDO); - return ConstantUtils.SUCCESS_UPDATE; - } - -} diff --git a/src/main/java/com/laowu/service/impl/MemberUpdateHistoryServiceImpl.java b/src/main/java/com/laowu/service/impl/MemberUpdateHistoryServiceImpl.java deleted file mode 100644 index 24b3eec..0000000 --- a/src/main/java/com/laowu/service/impl/MemberUpdateHistoryServiceImpl.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.laowu.service.impl; - -import com.laowu.model.MemberUpdateHistoryDO; -import com.laowu.mapper.MemberUpdateHistoryMapper; -import com.laowu.service.MemberUpdateHistoryService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import org.springframework.stereotype.Service; - -/** - *

- * 公司更新日志表 服务实现类 - *

- * - * @author Tuyp - * @since 2023-04-07 - */ -@Service -public class MemberUpdateHistoryServiceImpl extends ServiceImpl implements MemberUpdateHistoryService { - -} diff --git a/src/main/java/com/laowu/service/impl/TeamDictServiceImpl.java b/src/main/java/com/laowu/service/impl/TeamDictServiceImpl.java deleted file mode 100644 index 85e1ad6..0000000 --- a/src/main/java/com/laowu/service/impl/TeamDictServiceImpl.java +++ /dev/null @@ -1,334 +0,0 @@ -package com.laowu.service.impl; - -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; -import com.baomidou.mybatisplus.core.metadata.IPage; -import com.baomidou.mybatisplus.extension.plugins.pagination.Page; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.laowu.common.exception.HttpException; -import com.laowu.dto.team.*; -import com.laowu.mapper.*; -import com.laowu.model.*; -import com.laowu.service.TeamDictService; -import com.laowu.util.ConstantUtils; -import com.laowu.vo.job.RecentJobInfoVO; -import com.laowu.vo.team.*; -import org.springframework.beans.BeanUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.List; - -/** - *

- * 团队字典表 服务实现类 - *

- * - * @author Tuyp - * @since 2023-03-29 - */ -@Service -public class TeamDictServiceImpl extends ServiceImpl implements TeamDictService { - - @Autowired - private MemberDictMapper memberDictMapper; - - @Autowired - private MemberTeamMappingMapper memberTeamMappingMapper; - - @Autowired - private WorkstationDictMapper workstationDictMapper; - - @Autowired - private MemberJobInfoMapper memberJobInfoMapper; - - @Autowired - private RoleAdministerMappingMapper roleAdministerMappingMapper; - - @Autowired - private WorkstationAdministersMapper workstationAdministersMapper; - - @Autowired - private MemberPositionsMapper memberPositionsMapper; - - public IPage teams(TeamsDTO teamsDTO) { - Page pager = new Page(teamsDTO.getPageNum(), teamsDTO.getPageSize()); - return this.baseMapper.teams(pager, teamsDTO.getStationId(), teamsDTO.getTeamName(),teamsDTO.getProvince()); - } - - public TotalTeamsVO totalTeams(TeamDictDO teamDictDO) { - - TotalTeamsVO totalTeamsVO = new TotalTeamsVO(); - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(TeamDictDO::getStationId, teamDictDO.getStationId())); - - totalTeamsVO.setCount(count); - - return totalTeamsVO; - } - - public String deleteTeam(TeamDictDO teamDictDO) { - - this.baseMapper.deleteById(teamDictDO.getId()); - - //将该团队里的人的teamId置为空 - memberTeamMappingMapper.delete(new QueryWrapper() - .lambda() - .eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId())); - - return ConstantUtils.DELETE_SUCCESS; - } - - public String addTeam(TeamDictDO teamDictDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(TeamDictDO::getStationId, teamDictDO.getStationId()) - .eq(TeamDictDO::getTeamName, teamDictDO.getTeamName())); - - if (count > 0) { - throw new HttpException(70001); - } - - this.baseMapper.insert(teamDictDO); - - if (null != teamDictDO.getMemberId()) { - int cnt = memberTeamMappingMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberTeamMappingDO::getMemberId, teamDictDO.getMemberId()) - .eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId())); - if (cnt == 0) { - MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO(); - memberTeamMappingDO.setTeamId(teamDictDO.getId()); - memberTeamMappingDO.setMemberId(teamDictDO.getMemberId()); - memberTeamMappingMapper.insert(memberTeamMappingDO); - } - } - return ConstantUtils.ADD_SUCCESS; - } - - public String updateTeam(TeamDictDO teamDictDO) { - - int count = this.baseMapper.selectCount(new QueryWrapper() - .lambda() - .eq(TeamDictDO::getStationId, teamDictDO.getStationId()) - .eq(TeamDictDO::getTeamName, teamDictDO.getTeamName()) - .ne(TeamDictDO::getId, teamDictDO.getId())); - - if (count > 0) { - throw new HttpException(70001); - } - - this.baseMapper.updateById(teamDictDO); - - if (null != teamDictDO.getMemberId()) { - int cnt = memberTeamMappingMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberTeamMappingDO::getMemberId, teamDictDO.getMemberId()) - .eq(MemberTeamMappingDO::getTeamId, teamDictDO.getId())); - if (cnt == 0) { - MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO(); - memberTeamMappingDO.setTeamId(teamDictDO.getId()); - memberTeamMappingDO.setMemberId(teamDictDO.getMemberId()); - memberTeamMappingMapper.insert(memberTeamMappingDO); - } - } - - return ConstantUtils.SUCCESS_UPDATE; - } - - public IPage teamMember(TeamMemberDTO teamMemberDTO) { - Page pager = new Page(teamMemberDTO.getPageNum(), teamMemberDTO.getPageSize()); - return memberTeamMappingMapper.teamMembers(pager, teamMemberDTO.getTeamId()); - } - - public OneTeamInfoVO oneTeamInfo(TeamDictDO teamDictDO) { - - OneTeamInfoVO oneTeamInfoVO = new OneTeamInfoVO(); - TeamDictDO teamDictDO1 = this.baseMapper.selectById(teamDictDO.getId()); - BeanUtils.copyProperties(teamDictDO1, oneTeamInfoVO); - - Page pager = new Page(1, -1); - List memberDictDOS = memberTeamMappingMapper.teamMembers(pager, teamDictDO.getId()).getRecords(); - oneTeamInfoVO.setMemberDictDOS(memberDictDOS); - - //团队带头人 - if (null != teamDictDO1.getMemberId()){ - MemberDictDO teamMember = memberDictMapper.selectById(teamDictDO1.getMemberId()); - if (null != teamMember){ - oneTeamInfoVO.setUserName(teamMember.getUserName()); - } - } - - //团队人数 - int count = memberTeamMappingMapper.selectCount(new QueryWrapper() - .lambda() - .eq(MemberTeamMappingDO::getTeamId,teamDictDO.getId())); - oneTeamInfoVO.setCt(String.valueOf(count)); - - return oneTeamInfoVO; - } - - public IPage noTeamMembers(TeamMemberDTO teamMemberDTO) { - Page pager = new Page(teamMemberDTO.getPageNum(), teamMemberDTO.getPageSize()); - return memberTeamMappingMapper.noTeamMembers(pager, teamMemberDTO.getTeamId(), teamMemberDTO.getUserName()); - } - - public String updateMembers(UpdateTeamMembersDTO updateTeamMembersDTO) { - - //找到已存在的成员 - List oldIds = memberDictMapper.members(updateTeamMembersDTO.getTeamId()); - List newIds = updateTeamMembersDTO.getMemberIds(); - - List newIds2 = new ArrayList(); - for (Long id : newIds) { - newIds2.add(id); - } - - newIds.removeAll(oldIds); //新增的人在newIds里面 - - if (newIds.size() > 0) { - for (Long id : newIds) { - MemberTeamMappingDO memberTeamMappingDO = new MemberTeamMappingDO(); - memberTeamMappingDO.setMemberId(id); - memberTeamMappingDO.setTeamId(updateTeamMembersDTO.getTeamId()); - memberTeamMappingMapper.insert(memberTeamMappingDO); - } - } - - oldIds.removeAll(newIds2);//删掉以前的 - if (oldIds.size() > 0) { - for (Long id : oldIds) { - memberTeamMappingMapper.delete(new QueryWrapper() - .lambda() - .eq(MemberTeamMappingDO::getMemberId, id) - .eq(MemberTeamMappingDO::getTeamId, updateTeamMembersDTO.getTeamId())); - } - } - return ConstantUtils.SUCCESS_UPDATE; - } - - public IPage leaderMembers(LeaderMembersDTO leaderMembersDTO) { - Page pager = new Page(leaderMembersDTO.getPageNum(), leaderMembersDTO.getPageSize()); - return this.baseMapper.leaderMembers(pager, leaderMembersDTO.getStationId(), leaderMembersDTO.getUserName()); - } - - public TotalTeamsVO leaderMemberCounts(TeamDictDO teamDictDO) { - TotalTeamsVO totalTeamsVO = new TotalTeamsVO(); - totalTeamsVO.setCount(this.baseMapper.leaderMemberCounts(teamDictDO.getStationId())); - return totalTeamsVO; - } - - public List provinceStationTeam(ProvinceStationTeamDTO provinceStationTeamDTO) { - - //判断该角色是管理员还是站长 - int count = roleAdministerMappingMapper.selectCount(new QueryWrapper() - .lambda() - .eq(RoleAdministerMappingDO::getAdministerId,provinceStationTeamDTO.getUserId()) - .eq(RoleAdministerMappingDO::getRoleId,1)); - - List provinceStationTeamVOS = new ArrayList<>(); - List provinces = workstationDictMapper.provinces(); - - if (count>0){ - //先查出所有省 - - for (String province : provinces) { - - ProvinceStationTeamVO provinceStationTeamVO = new ProvinceStationTeamVO(); - //工作站 - List workstationDictDOS = workstationDictMapper.selectList(new QueryWrapper() - .lambda() - .eq(WorkstationDictDO::getProvince, province)); - - List workstationDictVOS = new ArrayList<>(); - - for (WorkstationDictDO workstationDictDO : workstationDictDOS) { - WorkstationDictVO workstationDictVO = new WorkstationDictVO(); - BeanUtils.copyProperties(workstationDictDO, workstationDictVO); - - List teamDictDOS = this.baseMapper.selectList(new QueryWrapper() - .lambda() - .eq(TeamDictDO::getStationId, workstationDictDO.getId())); - workstationDictVO.setTeamDictDOS(teamDictDOS); - workstationDictVOS.add(workstationDictVO); - provinceStationTeamVO.setWorkstationDictVOS(workstationDictVOS); - } - provinceStationTeamVO.setProvince(province); - provinceStationTeamVOS.add(provinceStationTeamVO); - } - }else { - //站长 - for (String province : provinces) { - - ProvinceStationTeamVO provinceStationTeamVO = new ProvinceStationTeamVO(); - - List workstationDictDOS = workstationDictMapper.administerProvinceStations(province,provinceStationTeamDTO.getUserId()); - - List workstationDictVOS = new ArrayList<>(); - - for (WorkstationDictDO workstationDictDO : workstationDictDOS) { - WorkstationDictVO workstationDictVO = new WorkstationDictVO(); - BeanUtils.copyProperties(workstationDictDO, workstationDictVO); - - List teamDictDOS = this.baseMapper.selectList(new QueryWrapper() - .lambda() - .eq(TeamDictDO::getStationId, workstationDictDO.getId())); - workstationDictVO.setTeamDictDOS(teamDictDOS); - workstationDictVOS.add(workstationDictVO); - provinceStationTeamVO.setWorkstationDictVOS(workstationDictVOS); - } - provinceStationTeamVO.setProvince(province); - provinceStationTeamVOS.add(provinceStationTeamVO); - - } - } - - return provinceStationTeamVOS; - } - - - public IPage memberManagement(MemberManagementDTO memberManagementDTO) { - - Page pager = new Page(memberManagementDTO.getPageNum(), memberManagementDTO.getPageSize()); - - //查看某个人所在的工作站 - List workstationIds = workstationAdministersMapper.administerStations(memberManagementDTO.getUserId()); - - IPage memberManagementVOIPage = this.baseMapper.memberManagement(pager, memberManagementDTO.getTeamId(), memberManagementDTO.getStationId(), memberManagementDTO.getProvince(), memberManagementDTO.getJobStatus(), memberManagementDTO.getUserName(),workstationIds,memberManagementDTO.getPositionId()); - - List memberManagementVOS = memberManagementVOIPage.getRecords(); - - for (MemberManagementVO memberManagementVO : memberManagementVOS) { - - RecentJobInfoVO recentJobInfoVO = memberJobInfoMapper.recentJobInfo(memberManagementVO.getId()); - - if (null != recentJobInfoVO) { - //就业单位 - memberManagementVO.setCompanyName(recentJobInfoVO.getCompanyName()); - //就业月数 - memberManagementVO.setJobMonth(recentJobInfoVO.getJobMonth()); - //月均收入 - memberManagementVO.setSalary(recentJobInfoVO.getSalary()); - memberManagementVO.setCompanyProvince(recentJobInfoVO.getProvince()); - memberManagementVO.setCompanyCity(recentJobInfoVO.getCity()); - memberManagementVO.setCompanyCounty(recentJobInfoVO.getCounty()); - memberManagementVO.setCompanyAddress(recentJobInfoVO.getAddress()); - } - - //技能信息 - List positionDictDOS = memberDictMapper.memberPositions(memberManagementVO.getId()); - memberManagementVO.setPositionDictDOList(positionDictDOS); - } - return memberManagementVOIPage; - } - - public TotalTeamsVO memberManagementCount(MemberManagementDTO memberManagementDTO) { - TotalTeamsVO totalTeamsVO = new TotalTeamsVO(); - totalTeamsVO.setCount(this.baseMapper.memberManagementCount(memberManagementDTO.getTeamId(), memberManagementDTO.getStationId(), memberManagementDTO.getProvince(), memberManagementDTO.getJobStatus(),memberManagementDTO.getPositionId())); - return totalTeamsVO; - } - -} diff --git a/src/main/java/com/laowu/service/impl/WorkstationDictServiceImpl.java b/src/main/java/com/laowu/service/impl/WorkstationDictServiceImpl.java index 9d980b1..4673123 100644 --- a/src/main/java/com/laowu/service/impl/WorkstationDictServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/WorkstationDictServiceImpl.java @@ -9,23 +9,18 @@ import com.laowu.dto.station.ProvinceStationsDTO; import com.laowu.dto.station.StationAccountDTO; import com.laowu.dto.station.StationsDTO; import com.laowu.dto.station.UpdateAdministerDTO; -import com.laowu.mapper.AdministerMapper; -import com.laowu.mapper.RoleAdministerMappingMapper; -import com.laowu.mapper.WorkstationAdministersMapper; -import com.laowu.mapper.WorkstationDictMapper; -import com.laowu.model.AdministerDO; -import com.laowu.model.RoleAdministerMappingDO; -import com.laowu.model.WorkstationAdministersDO; -import com.laowu.model.WorkstationDictDO; +import com.laowu.mapper.*; +import com.laowu.model.*; import com.laowu.service.WorkstationDictService; import com.laowu.util.ConstantUtils; +import com.laowu.util.MathUtil; import com.laowu.vo.station.*; -import com.laowu.vo.team.HomepageVO; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; +import java.util.Calendar; import java.util.List; /** @@ -48,6 +43,12 @@ public class WorkstationDictServiceImpl extends ServiceImpl stations(StationsDTO stationsDTO) { Page pager = new Page(stationsDTO.getPageNum(), stationsDTO.getPageSize()); @@ -122,14 +123,14 @@ public class WorkstationDictServiceImpl extends ServiceImpl() - .lambda() - .eq(RoleAdministerMappingDO::getAdministerId,provinceStationsDTO.getUserId()) - .eq(RoleAdministerMappingDO::getRoleId,1)); + .lambda() + .eq(RoleAdministerMappingDO::getAdministerId, provinceStationsDTO.getUserId()) + .eq(RoleAdministerMappingDO::getRoleId, 1)); List provinceStationsVOS = new ArrayList<>(); //先查出所有省 List provinces = this.baseMapper.provinces(); - if (count > 0){ + if (count > 0) { //管理员 //省下面的工作站 for (String province : provinces) { @@ -142,13 +143,13 @@ public class WorkstationDictServiceImpl extends ServiceImpl workstationDictDOS = this.baseMapper.administerProvinceStations(province,provinceStationsDTO.getUserId()); + List workstationDictDOS = this.baseMapper.administerProvinceStations(province, provinceStationsDTO.getUserId()); provinceStationsVO.setWorkstationDictDOS(workstationDictDOS); provinceStationsVOS.add(provinceStationsVO); } @@ -209,6 +210,8 @@ public class WorkstationDictServiceImpl extends ServiceImpl() + .lambda() + .eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince()) + .eq(MemberDictDO::getCity, libGeoLocationDO.getCity())); + + //市/县劳动能力总数 + Integer totalLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, null); + screen1VO.setTotalLaborCnt(totalLaborCnt); + //取整数 四舍五入 + screen1VO.setTotalLaborPercent(MathUtil.round(totalLaborCnt, count)); + + //市脱贫劳动力 + Integer poorLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "是"); + screen1VO.setPoorLaborCnt(poorLaborCnt); + screen1VO.setPoorLaborPercent(MathUtil.round(poorLaborCnt, count)); + + //三类人员 + Integer monitorTypeCnt = memberDictMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince()) + .eq(MemberDictDO::getCity, libGeoLocationDO.getCity()) + .isNotNull(MemberDictDO::getMonitorType)); + screen1VO.setMonitorTypeCnt(monitorTypeCnt); + screen1VO.setMonitorTypePercent(MathUtil.round(monitorTypeCnt, count)); + + return screen1VO; + } + + public Screen2VO screen2(LibGeoLocationDO libGeoLocationDO) { + + Screen2VO screen2VO = new Screen2VO(); + + //在沪就业人数:现居or就业都在上海的 + Integer cityEmployeeCnt = memberDictMapper.cityEmployeeCnt(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity()); + screen2VO.setCityEmployeeCnt(cityEmployeeCnt); + + //2023年转移人数:isMigration 是 并且现居or就业是上海市的 + Integer migrationCnt = memberDictMapper.migrationCnt(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), "是"); + screen2VO.setMigrationCnt(migrationCnt); + + //持证人数: 主要持有一个证就算是持证 + Integer memberCertCnt = memberDictMapper.memberCertCnt(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity()); + screen2VO.setCertCnt(memberCertCnt); + +// //市总人数 +// int count = memberDictMapper.selectCount(new QueryWrapper() +// .lambda() +// .eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince()) +// .eq(MemberDictDO::getCity, libGeoLocationDO.getCity())); + //持证人数占比 + screen2VO.setCertPercent(MathUtil.round(memberCertCnt, cityEmployeeCnt)); + + //就业行业占比 businessId + List businessTop7VOS = memberDictMapper.businessTop7(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity()); + + businessTop7VOS.stream().forEach(x -> { + x.setPercent(MathUtil.round(x.getCnt(), cityEmployeeCnt)); + }); + screen2VO.setBusinessTop7VOS(businessTop7VOS); + + //薪酬情况中位数:年薪/12 排名中间的那个人 + List salaries = memberDictMapper.middleSalary(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity()); + if (salaries.size() > 0) { + double middleSalary = salaries.get(salaries.size() / 2); + screen2VO.setMiddleSalary(middleSalary); + } else { + screen2VO.setMiddleSalary(0.00); + } + + //区域 + +// //学历情况:初中学历,高中学历,大专及以上,其他 +// //初中学历 +// Integer chuzhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "初中", "上海市"); +// screen2VO.setChuzhongCnt(chuzhongCnt); +// +// //高中学历 +// Integer gaozhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "高中", "上海市"); +// screen2VO.setGaozhongCnt(gaozhongCnt); +// +// //大专及以上 +// Integer daxueCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), null, "大学专科及以上", "上海市"); +// screen2VO.setDaxueCnt(daxueCnt); + + //其他 +// Integer otherCnt = cityEmployeeCnt - chuzhongCnt - gaozhongCnt - daxueCnt; +// screen2VO.setOtherCnt(otherCnt); + + return screen2VO; + } + + + public List screen3(LibGeoLocationDO libGeoLocationDO) { + + List screen3VOS = new ArrayList<>(); + + //查看省下面的县,做遍历 + List counties = libGeoLocationMapper.county(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity()); + + for (String county : counties) { + + Screen3VO screen3VO = new Screen3VO(); + screen3VO.setCounty(county); + + //市劳动能力总数 + Integer totalLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, null); + screen3VO.setTotalLaborCnt(totalLaborCnt); + + //市脱贫劳动力 + Integer poorLaborCnt = memberDictMapper.laborAbility(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "是"); + screen3VO.setPoorLaborCnt(poorLaborCnt); + screen3VO.setPoorLaborPercent(MathUtil.round(poorLaborCnt, totalLaborCnt)); + + //三类人员 + Integer monitorTypeCnt = memberDictMapper.selectCount(new QueryWrapper() + .lambda() + .eq(MemberDictDO::getProvince, libGeoLocationDO.getProvince()) + .eq(MemberDictDO::getCity, libGeoLocationDO.getCity()) + .eq(MemberDictDO::getCounty, county) + .isNotNull(MemberDictDO::getMonitorType)); + screen3VO.setMonitorTypeCnt(monitorTypeCnt); + screen3VO.setMonitorTypePercent(MathUtil.round(monitorTypeCnt, totalLaborCnt)); + + //16-45岁劳动力 + Integer ageLabor = memberDictMapper.ageLabor(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, 16, 45); + screen3VO.setAgeLaborCnt(ageLabor); + screen3VO.setAgeLaborPercent(MathUtil.round(ageLabor, totalLaborCnt)); + + //学历情况 + //学历情况:初中学历,高中学历,大专及以上,其他 + //初中学历 + Integer chuzhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "初中", null); + screen3VO.setChuzhongCnt(chuzhongCnt); + + //高中学历 + Integer gaozhongCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "高中", null); + screen3VO.setGaozhongCnt(gaozhongCnt); + + //大专及以上 + Integer daxueCnt = memberDictMapper.education(libGeoLocationDO.getProvince(), libGeoLocationDO.getCity(), county, "大学专科及以上", null); + screen3VO.setDaxueCnt(daxueCnt); + + //其他 + Integer otherCnt = totalLaborCnt - chuzhongCnt - gaozhongCnt - daxueCnt; + screen3VO.setOtherCnt(otherCnt); + screen3VOS.add(screen3VO); + } + return screen3VOS; + } + + public String ageGender() { + + List memberDictDOS = memberDictMapper.selectList(new QueryWrapper() + .lambda() + .isNull(MemberDictDO::getAge)); + for (MemberDictDO memberDictDO : memberDictDOS) { + int age = 0; + //年龄 + if (null != memberDictDO.getIdCard()) { + Calendar cal = Calendar.getInstance(); + try { + int yearNow = cal.get(Calendar.YEAR); + int monthNow = cal.get(Calendar.MONTH) + 1; + int dayNow = cal.get(Calendar.DATE); + int year = Integer.valueOf(memberDictDO.getIdCard().substring(6, 10)); + int month = Integer.valueOf(memberDictDO.getIdCard().substring(10, 12)); + int day = Integer.valueOf(memberDictDO.getIdCard().substring(12, 14)); + int genderTmp = Integer.valueOf(memberDictDO.getIdCard().substring(16, 17)); + if ((month < monthNow) || (month == monthNow && day <= dayNow)) { + age = yearNow - year; + } else { + age = yearNow - year - 1; + } + if (genderTmp % 2 == 1) { + memberDictDO.setGender("男"); + } else { + memberDictDO.setGender("女"); + } + memberDictDO.setAge(age); + memberDictMapper.updateById(memberDictDO); + } catch (Exception e) { + e.printStackTrace(); + } + + } + + + } + + + return null; + } + } diff --git a/src/main/java/com/laowu/service/impl/WorkstationMemberMappingServiceImpl.java b/src/main/java/com/laowu/service/impl/WorkstationMemberMappingServiceImpl.java index 4d260bd..7911907 100644 --- a/src/main/java/com/laowu/service/impl/WorkstationMemberMappingServiceImpl.java +++ b/src/main/java/com/laowu/service/impl/WorkstationMemberMappingServiceImpl.java @@ -1,11 +1,22 @@ package com.laowu.service.impl; -import com.laowu.model.WorkstationMemberMappingDO; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.laowu.dto.member.MemberManagementDTO; +import com.laowu.mapper.MemberDictMapper; +import com.laowu.mapper.MemberJobInfoMapper; import com.laowu.mapper.WorkstationMemberMappingMapper; +import com.laowu.model.PositionDictDO; +import com.laowu.model.WorkstationMemberMappingDO; import com.laowu.service.WorkstationMemberMappingService; -import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.laowu.vo.job.RecentJobInfoVO; +import com.laowu.vo.member.MemberManagementVO; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.List; + /** *

* 学员--工作站映射关系 服务实现类 @@ -17,4 +28,42 @@ import org.springframework.stereotype.Service; @Service public class WorkstationMemberMappingServiceImpl extends ServiceImpl implements WorkstationMemberMappingService { + @Autowired + private MemberJobInfoMapper memberJobInfoMapper; + + @Autowired + private MemberDictMapper memberDictMapper; + + + public IPage memberManagement(MemberManagementDTO memberManagementDTO) { + + Page pager = new Page(memberManagementDTO.getPageNum(), memberManagementDTO.getPageSize()); + + IPage memberManagementVOIPage = this.baseMapper.memberManagement(pager,memberManagementDTO.getUserName(), memberManagementDTO.getStationId(),memberManagementDTO.getPositionId(),memberManagementDTO.getProvince(),memberManagementDTO.getCity(),memberManagementDTO.getCounty(),memberManagementDTO.getTown(),memberManagementDTO.getVillage(),memberManagementDTO.getGender(), + memberManagementDTO.getMaxAge(),memberManagementDTO.getMinAge(),memberManagementDTO.getIsParty(),memberManagementDTO.getEducation(),memberManagementDTO.getHealth(), + memberManagementDTO.getProvinceNow(),memberManagementDTO.getCityNow(),memberManagementDTO.getCountyNow(),memberManagementDTO.getTownNow(),memberManagementDTO.getIsPoor(), + memberManagementDTO.getMonitorType(),memberManagementDTO.getIsMigration(),memberManagementDTO.getMigrationType(),memberManagementDTO.getFisherman(),memberManagementDTO.getInsured(), + memberManagementDTO.getPensionInsurance(),memberManagementDTO.getInsurePlace(),memberManagementDTO.getMemberType(),memberManagementDTO.getLaborAbility(),memberManagementDTO.getJobStatus(), + memberManagementDTO.getJobType(),memberManagementDTO.getProvinceJob(),memberManagementDTO.getCityJob(),memberManagementDTO.getCountyJob(),memberManagementDTO.getTownJob(), + memberManagementDTO.getJobDestination(),memberManagementDTO.getJobsStartDate(),memberManagementDTO.getJobsEndDate(),memberManagementDTO.getBusinessId(), + memberManagementDTO.getMaxAverageSalary(),memberManagementDTO.getMinAverageSalary(),memberManagementDTO.getMaxJobAge(),memberManagementDTO.getMinJobAge(),memberManagementDTO.getEmploymentWillingness(), + memberManagementDTO.getProvinceEmployment(),memberManagementDTO.getCityEmployment(),memberManagementDTO.getWillingBusinessId(),memberManagementDTO.getEmploymentTrainingWillingness(),memberManagementDTO.getHomecoming(),memberManagementDTO.getUserId(),memberManagementDTO.getTrainType()); + + List memberManagementVOS = memberManagementVOIPage.getRecords(); + + for (MemberManagementVO memberManagementVO : memberManagementVOS) { + + RecentJobInfoVO recentJobInfoVO = memberJobInfoMapper.recentJobInfo(memberManagementVO.getId()); + if (null != recentJobInfoVO){ + memberManagementVO.setRecentStartDate(recentJobInfoVO.getStartDate()); + memberManagementVO.setRecentEndDate(recentJobInfoVO.getEndDate()); + memberManagementVO.setRecentMonth(recentJobInfoVO.getJobMonth()); + } + //技能信息 + List positionDictDOS = memberDictMapper.memberPositions(memberManagementVO.getId()); + memberManagementVO.setPositionDictDOList(positionDictDOS); + } + return memberManagementVOIPage; + } + } diff --git a/src/main/java/com/laowu/util/Base64Util.java b/src/main/java/com/laowu/util/Base64Util.java new file mode 100644 index 0000000..25dbb63 --- /dev/null +++ b/src/main/java/com/laowu/util/Base64Util.java @@ -0,0 +1,87 @@ +package com.laowu.util; + +import sun.misc.BASE64Decoder; +import sun.misc.BASE64Encoder; + +import javax.imageio.stream.FileImageInputStream; +import java.io.ByteArrayOutputStream; +import java.io.File; +import java.io.IOException; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +class Base64Util { + /** + * 字符串转图片 + * @param base64Str + * @return + */ + public static byte[] decode(String base64Str){ + byte[] b = null; + BASE64Decoder decoder = new BASE64Decoder(); + try { + b = decoder.decodeBuffer(replaceEnter(base64Str)); + } catch (IOException e) { + e.printStackTrace(); + } + return b; + } + + /** + * 图片转字符串 + * @param image + * @return + */ + public static String encode(byte[] image){ + BASE64Encoder decoder = new BASE64Encoder(); + return replaceEnter(decoder.encode(image)); + } + + public static void main(String[] args) { + System.out.println(encode("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg")); + } + + public static String encode(String uri){ + BASE64Encoder encoder = new BASE64Encoder(); + return replaceEnter(encoder.encode(uri.getBytes())); + } + + /** + * + * @path 图片路径 + * @return + */ + + public static byte[] imageTobyte(String path){ + byte[] data = null; + FileImageInputStream input = null; + try { + input = new FileImageInputStream(new File(path)); + ByteArrayOutputStream output = new ByteArrayOutputStream(); + byte[] buf = new byte[1024]; + int numBytesRead = 0; + while((numBytesRead = input.read(buf)) != -1){ + output.write(buf, 0, numBytesRead); + } + data = output.toByteArray(); + output.close(); + input.close(); + + } catch (Exception e) { + e.printStackTrace(); + } + + return data; + } + + + + public static String replaceEnter(String str){ + String reg ="[\n-\r]"; + Pattern p = Pattern.compile(reg); + Matcher m = p.matcher(str); + return m.replaceAll(""); + } + + +} \ No newline at end of file diff --git a/src/main/java/com/laowu/util/MathUtil.java b/src/main/java/com/laowu/util/MathUtil.java index a2a4f8d..d6934af 100644 --- a/src/main/java/com/laowu/util/MathUtil.java +++ b/src/main/java/com/laowu/util/MathUtil.java @@ -9,8 +9,6 @@ public class MathUtil { /** * 4位自增字符 */ - - public static String getRandomCode(int randomLength) { StringBuilder str = new StringBuilder(); Random random = new Random(); @@ -176,4 +174,9 @@ public class MathUtil { } return retStr; } + + public static String round(Integer a,Integer b){ + return Math.round((double) a*100 / (double) b)+""; + } + } diff --git a/src/main/java/com/laowu/util/OSSUtils.java b/src/main/java/com/laowu/util/OSSUtils.java new file mode 100644 index 0000000..db1605d --- /dev/null +++ b/src/main/java/com/laowu/util/OSSUtils.java @@ -0,0 +1,119 @@ +package com.laowu.util; + +import cn.hutool.core.codec.Base64; +import cn.hutool.core.date.DateTime; +import com.aliyun.oss.OSS; +import com.aliyun.oss.OSSClientBuilder; + +import java.io.ByteArrayInputStream; +import java.io.ByteArrayOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.net.HttpURLConnection; +import java.net.URL; +import java.util.UUID; + +public class OSSUtils { + + // @Value("${aliyun.oss.accessKeyId}") + private static String accessKeyId = "LTAI5tPAH7P7WQVeowo517BE"; + + // @Value("${aliyun.oss.accessKeySecret}") + private static String secretAccessKey = "0ueqhIfdAZyw5lWlBVSLpAxTtx37RY"; + + // @Value("${aliyun.oss.endpoint}") + private static String endPoint = "oss-cn-beijing.aliyuncs.com"; + + // @Value("${aliyun.oss.bucketName}") + private static String bucketName = "laowu-pro"; + + public static String uploadOneFile(String file) throws IOException { + + // 创建OSSClient实例。 + OSS ossClient = new OSSClientBuilder().build(endPoint, accessKeyId, secretAccessKey); + + // 设置文件名 + String fileName = new DateTime().toString("yyyy-MM-dd") + + UUID.randomUUID().toString() + ".jpg"; + + // 获取文件后缀名 +// int originalFilenameStartIndex = file.indexOf('/'); +// int originalFilenameEndIndex = file.indexOf(';'); +// String originalFilename = file.substring(originalFilenameStartIndex+1,originalFilenameEndIndex); + + // 获取base64的文件 +// file = file.split(",")[1]; + + byte[] bytesFile = Base64.decode(file); + try { + // 创建PutObject请求。 + InputStream inputStream = new ByteArrayInputStream(bytesFile); + ossClient.putObject(bucketName, fileName, inputStream); + + String url = "http://" + bucketName + "." + endPoint + "/" + fileName+"?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg"; + // System.out.println(url); + return url; + } catch (Exception e) { + e.printStackTrace(); + return null; + } finally { + if (ossClient != null) { + ossClient.shutdown(); + } + } + } + + + public static String image2Base64(String imgUrl) { + URL url = null; + InputStream is = null; + ByteArrayOutputStream outStream = null; + HttpURLConnection httpUrl = null; + + try { + url = new URL(imgUrl); + httpUrl = (HttpURLConnection) url.openConnection(); + httpUrl.connect(); + httpUrl.getInputStream(); + is = httpUrl.getInputStream(); + outStream = new ByteArrayOutputStream(); + // 创建一个Buffer字符串 + byte[] buffer = new byte[1024]; + // 每次读取的字符串长度,如果为-1,代表全部读取完毕 + int len = 0; + // 使用一个输入流从buffer里把数据读取出来 + while ((len = is.read(buffer)) != -1) { + // 用输出流往buffer里写入数据,中间参数代表从哪个位置开始读,len代表读取的长度 + outStream.write(buffer, 0, len); + } + // 对字节数组Base64编码 + return Base64Util.encode(outStream.toByteArray()); + } catch (Exception e) { + e.printStackTrace(); + } finally { + if (is != null) { + try { + is.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (outStream != null) { + try { + outStream.close(); + } catch (IOException e) { + e.printStackTrace(); + } + } + if (httpUrl != null) { + httpUrl.disconnect(); + } + } + return imgUrl; + } + + public static void main(String[] args) { +// System.out.println(image2Base64("https://shixischool.oss-cn-beijing.aliyuncs.com/2022-12-219df5b721-99b7-48c4-916e-e474a4eca946.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg")); + System.out.println(image2Base64("http://ykhl-bigger.oss-cn-beijing.aliyuncs.com/2023-02-1618cb936b-4825-429c-9fdd-dd9d0de97ed7.jpg?x-oss-process=image/auto-orient,1/resize,m_pad,w_500,h_500/quality,Q_100/format,jpg")); + } +} diff --git a/src/main/java/com/laowu/util/RandomUtil.java b/src/main/java/com/laowu/util/RandomUtil.java new file mode 100644 index 0000000..54ae49b --- /dev/null +++ b/src/main/java/com/laowu/util/RandomUtil.java @@ -0,0 +1,34 @@ +package com.laowu.util; + +import cn.hutool.core.lang.UUID; + +import java.util.Random; + +public class RandomUtil { + + public static int getCode() { + return (int)((Math.random() * 9 + 1) * 100000); + } + + public static String getRandomCode(int randomLength) { + StringBuilder str = new StringBuilder(); + Random random = new Random(); + for (int i = 0; i < randomLength; i++) { + str.append(random.nextInt(10)); + } + return str.toString(); + } + + + /** + * 随机生成订单号 + */ + public static String randomOrderNumber(){ + return UUID.fastUUID().toString().replace("-","").substring(0,29); + } + + public static void main(String[] args) { + System.out.println(randomOrderNumber()); + } + +} diff --git a/src/main/java/com/laowu/util/SecretUtils.java b/src/main/java/com/laowu/util/SecretUtils.java new file mode 100644 index 0000000..eb10095 --- /dev/null +++ b/src/main/java/com/laowu/util/SecretUtils.java @@ -0,0 +1,158 @@ +package com.laowu.util; + +import org.apache.commons.codec.digest.DigestUtils; +import org.apache.commons.lang3.StringUtils; + +import java.nio.charset.StandardCharsets; +import java.security.MessageDigest; +import java.util.Arrays; +import java.util.Random; +import java.util.UUID; + +public class SecretUtils { + + /** + * 对用户登录密码进行MD5加密 + * + * @param str + * @return + */ + + public static String getMD5String(String str) { + try { + // 生成一个MD5加密计算摘要 + return DigestUtils.md5Hex(str).toUpperCase(); + // MessageDigest md = MessageDigest.getInstance("MD5"); + // 计算md5函数 +// md.update(str.getBytes("utf-8")); + // digest()最后确定返回md5 hash值,返回值为8位字符串。因为md5 hash值是16位的hex值,实际上就是8位的字符 + // BigInteger函数则将8位的字符串转换成16位hex值,用字符串来表示;得到字符串形式的hash值 + //一个byte是八位二进制,也就是2位十六进制字符(2的8次方等于16的2次方) +// byte[] digest = md.digest(str.getBytes("utf-8")); +// return new BigInteger(1, digest).toString(16); + } catch (Exception e) { + e.printStackTrace(); + return null; + } + } + + /** + * 对字符串进行SHA加密 + * + * @param + */ + public static String getSHAString(String str) { + try { + MessageDigest sha = MessageDigest.getInstance("SHA-1"); + + byte[] byteArray = str.getBytes(StandardCharsets.UTF_8); + byte[] md5Bytes = sha.digest(byteArray); + StringBuffer hexValue = new StringBuffer(); + for (int i = 0; i < md5Bytes.length; i++) { + int val = ((int) md5Bytes[i]) & 0xff; + if (val < 16) { + hexValue.append("0"); + } + hexValue.append(Integer.toHexString(val)); + } + + return hexValue.toString(); + } catch (Exception e) { + return null; + } + + } + + /** + * Q学友SHA加密 + * @param arr + * @return + */ + public static String gen(String... arr) { + if (StringUtils.isAnyEmpty(arr)) { + throw new IllegalArgumentException("非法请求参数,有部分参数为空 : " + Arrays.toString(arr)); + } else { + Arrays.sort(arr); + StringBuilder sb = new StringBuilder(); + String[] var2 = arr; + int var3 = arr.length; + + for (int var4 = 0; var4 < var3; ++var4) { + String a = var2[var4]; + sb.append(a); + } + + return DigestUtils.sha1Hex(sb.toString()); + } + } + + public static String getNonce(int length) { + String val = ""; + Random random = new Random(); + //参数length,表示生成几位随机数 + for (int i = 0; i < length; i++) { + val += String.valueOf(random.nextInt(10)); + } + return val; + } + + private static byte[] md5(String s) + { + MessageDigest algorithm; + try + { + algorithm = MessageDigest.getInstance("MD5"); + algorithm.reset(); + algorithm.update(s.getBytes(StandardCharsets.UTF_8)); + byte[] messageDigest = algorithm.digest(); + return messageDigest; + } + catch (Exception e) + { + + } + return null; + } + + private static final String toHex(byte[] hash) + { + if (hash == null) + { + return null; + } + StringBuffer buf = new StringBuffer(hash.length * 2); + int i; + + for (i = 0; i < hash.length; i++) + { + if ((hash[i] & 0xff) < 0x10) + { + buf.append("0"); + } + buf.append(Long.toString(hash[i] & 0xff, 16)); + } + return buf.toString(); + } + + public static String hash(String s) + { + try + { + return new String(toHex(md5(s)).getBytes(StandardCharsets.UTF_8), StandardCharsets.UTF_8); + } + catch (Exception e) + { + return s; + } + } + + + + + public static void main(String[] args) { + String uuid = UUID.randomUUID().toString(); + System.out.println(uuid.replace("-","")); +// System.out.println(hash(uuid+"ixihs")); +// System.out.println(System.currentTimeMillis()); + } +} \ No newline at end of file diff --git a/src/main/java/com/laowu/vo/image/CheckResultVO.java b/src/main/java/com/laowu/vo/image/CheckResultVO.java new file mode 100644 index 0000000..556e599 --- /dev/null +++ b/src/main/java/com/laowu/vo/image/CheckResultVO.java @@ -0,0 +1,18 @@ +package com.laowu.vo.image; + +import lombok.Data; + +@Data +public class CheckResultVO { + + private String code; + + private String msg; + + private String bizSeqNo; + + private ResultVO result; + + private String transactionTime; + +} diff --git a/src/main/java/com/laowu/vo/image/GetMemberCheckDetailVO.java b/src/main/java/com/laowu/vo/image/GetMemberCheckDetailVO.java new file mode 100644 index 0000000..2235750 --- /dev/null +++ b/src/main/java/com/laowu/vo/image/GetMemberCheckDetailVO.java @@ -0,0 +1,18 @@ +package com.laowu.vo.image; + +import lombok.Data; + +@Data +public class GetMemberCheckDetailVO { + + private Long id; + + private String occurredTime; + + private String photo; + + private Double similarity; + + private String result; + +} diff --git a/src/main/java/com/laowu/vo/image/IdCardAccessTokenVO.java b/src/main/java/com/laowu/vo/image/IdCardAccessTokenVO.java new file mode 100644 index 0000000..26ec5b7 --- /dev/null +++ b/src/main/java/com/laowu/vo/image/IdCardAccessTokenVO.java @@ -0,0 +1,19 @@ +package com.laowu.vo.image; + +import lombok.Data; + +@Data +public class IdCardAccessTokenVO { + + private String code; + + private String msg; + + private String transactionTime; + + private String access_token; + + private String expire_time; + + private String expire_in; +} diff --git a/src/main/java/com/laowu/vo/image/IdCardSignTicketVO.java b/src/main/java/com/laowu/vo/image/IdCardSignTicketVO.java new file mode 100644 index 0000000..6f116ce --- /dev/null +++ b/src/main/java/com/laowu/vo/image/IdCardSignTicketVO.java @@ -0,0 +1,18 @@ +package com.laowu.vo.image; + +import lombok.Data; + +import java.util.List; + +@Data +public class IdCardSignTicketVO { + + private String code; + + private String msg; + + private String transactionTime; + + private List tickets; + +} diff --git a/src/main/java/com/laowu/vo/image/IdCardTicketsVO.java b/src/main/java/com/laowu/vo/image/IdCardTicketsVO.java new file mode 100644 index 0000000..02e0175 --- /dev/null +++ b/src/main/java/com/laowu/vo/image/IdCardTicketsVO.java @@ -0,0 +1,14 @@ +package com.laowu.vo.image; + +import lombok.Data; + +@Data +public class IdCardTicketsVO { + + private String value; + + private String expire_in; + + private String expire_time; + +} diff --git a/src/main/java/com/laowu/vo/image/ResultVO.java b/src/main/java/com/laowu/vo/image/ResultVO.java new file mode 100644 index 0000000..e03e741 --- /dev/null +++ b/src/main/java/com/laowu/vo/image/ResultVO.java @@ -0,0 +1,31 @@ +package com.laowu.vo.image; + +import lombok.Data; + +import java.util.List; + +@Data +public class ResultVO { + + private String orderNo; + + private String liveRate; + + private String similarity; + + private String occurredTime; + + private String appId; + + private String photo; + + private String video; + + private String bizSeqNo; + + private String sdkVersion; + + private String trtcFlag; + + private List photoList; +} diff --git a/src/main/java/com/laowu/vo/image/SendIdCardInfoVO.java b/src/main/java/com/laowu/vo/image/SendIdCardInfoVO.java new file mode 100644 index 0000000..79ea6aa --- /dev/null +++ b/src/main/java/com/laowu/vo/image/SendIdCardInfoVO.java @@ -0,0 +1,18 @@ +package com.laowu.vo.image; + +import lombok.Data; + +@Data +public class SendIdCardInfoVO { + + private String code; + + private String msg; + + private String bizSeqNo; + + private SendResultVO result; + + private String transactionTime; + +} diff --git a/src/main/java/com/laowu/vo/image/SendResultVO.java b/src/main/java/com/laowu/vo/image/SendResultVO.java new file mode 100644 index 0000000..65b1e26 --- /dev/null +++ b/src/main/java/com/laowu/vo/image/SendResultVO.java @@ -0,0 +1,30 @@ +package com.laowu.vo.image; + +import lombok.Data; + +@Data +public class SendResultVO { + + private String bizSeqNo; + + private String transactionTime; + + private String orderNo; + + private String h5faceId; + + private String optimalDomain; + + private Boolean success; + + private String wbAppId; + + private String nonce; + + private Long userId; + + private String sign; + + private String faceId; + +} diff --git a/src/main/java/com/laowu/vo/job/RecentJobInfoVO.java b/src/main/java/com/laowu/vo/job/RecentJobInfoVO.java index 8d5d04a..0c34a17 100644 --- a/src/main/java/com/laowu/vo/job/RecentJobInfoVO.java +++ b/src/main/java/com/laowu/vo/job/RecentJobInfoVO.java @@ -5,11 +5,9 @@ import lombok.Data; @Data public class RecentJobInfoVO { - private String companyName; +// private Long id; - private String jobMonth; - - private String salary; + private Long memberId; private String province; @@ -17,5 +15,17 @@ public class RecentJobInfoVO { private String county; - private String address; + private String town; + + private String village; + + private String jobDestination; + + private String startDate; + + private String endDate; + + private String jobMonth; + + private String salary; } diff --git a/src/main/java/com/laowu/vo/member/MemberCardVO.java b/src/main/java/com/laowu/vo/member/MemberCardVO.java index 4dff4af..81dd81d 100644 --- a/src/main/java/com/laowu/vo/member/MemberCardVO.java +++ b/src/main/java/com/laowu/vo/member/MemberCardVO.java @@ -2,6 +2,7 @@ package com.laowu.vo.member; import com.laowu.model.MemberCertsDO; import com.laowu.model.MemberDictDO; +import com.laowu.model.MemberTrainInfoDO; import com.laowu.model.PositionDictDO; import lombok.Data; @@ -12,14 +13,12 @@ public class MemberCardVO extends MemberDictDO { private List positionDictDOS; - private List memberTrainInfoVOS; + private List memberTrainInfoVOS; private List memberCertsDOS; private List memberJobInfoVOS; - private String age; - private String starValue; private String jobValue; diff --git a/src/main/java/com/laowu/vo/member/MemberCollegeVO.java b/src/main/java/com/laowu/vo/member/MemberCollegeVO.java deleted file mode 100644 index 424c1b7..0000000 --- a/src/main/java/com/laowu/vo/member/MemberCollegeVO.java +++ /dev/null @@ -1,13 +0,0 @@ -package com.laowu.vo.member; - -import com.laowu.model.MemberCollegeMappingDO; -import lombok.Data; - -@Data -public class MemberCollegeVO extends MemberCollegeMappingDO { - - private String college; - - private String major; - -} diff --git a/src/main/java/com/laowu/vo/member/MemberManagementVO.java b/src/main/java/com/laowu/vo/member/MemberManagementVO.java new file mode 100644 index 0000000..e64cb23 --- /dev/null +++ b/src/main/java/com/laowu/vo/member/MemberManagementVO.java @@ -0,0 +1,195 @@ +package com.laowu.vo.member; + +import com.laowu.model.PositionDictDO; +import com.laowu.util.ExcelColumnUtil; +import lombok.Data; + +import java.util.List; + +@Data +public class MemberManagementVO { + + private Long id; + + @ExcelColumnUtil(value = "姓名", col = 2) + private String userName; + + @ExcelColumnUtil(value = "个人证件", col = 2) + private String idCardType; + + @ExcelColumnUtil(value = "证件号码", col = 2) + private String idCard; + + @ExcelColumnUtil(value = "手机号", col = 2) + private String telephone; + + @ExcelColumnUtil(value = "户主姓名", col = 2) + private String hostUserName; + + @ExcelColumnUtil(value = "户主证件", col = 2) + private String hostIdCardType; + + @ExcelColumnUtil(value = "户主证件号码", col = 2) + private String hostIdCard; + + @ExcelColumnUtil(value = "(户籍所在地)省", col = 2) + private String province; + + @ExcelColumnUtil(value = "(户籍所在地)市", col = 2) + private String city; + + @ExcelColumnUtil(value = "(户籍所在地)县", col = 2) + private String county; + + @ExcelColumnUtil(value = "(户籍所在地)镇", col = 2) + private String town; + + @ExcelColumnUtil(value = "(户籍所在地)村", col = 2) + private String village; + + @ExcelColumnUtil(value = "(户籍所在地)组", col = 2) + private String team; + + @ExcelColumnUtil(value = "(户籍所在地)地址", col = 2) + private String address; + + @ExcelColumnUtil(value = "(现居所在地)省", col = 2) + private String provinceNow; + + @ExcelColumnUtil(value = "(现居所在地)市", col = 2) + private String cityNow; + + @ExcelColumnUtil(value = "(现居所在地)县", col = 2) + private String countyNow; + + @ExcelColumnUtil(value = "(现居所在地)镇", col = 2) + private String townNow; + + @ExcelColumnUtil(value = "(现居所在地)村", col = 2) + private String villageNow; + + @ExcelColumnUtil(value = "(现居所在地)地址", col = 2) + private String addressNow; + + @ExcelColumnUtil(value = "家庭人口数", col = 2) + private String familyCnt; + + @ExcelColumnUtil(value = "与户主关系", col = 2) + private String hostRelation; + + @ExcelColumnUtil(value = "性别", col = 2) + private String gender; + + @ExcelColumnUtil(value = "年龄", col = 2) + private String age; + + @ExcelColumnUtil(value = "民族", col = 2) + private String nation; + + @ExcelColumnUtil(value = "政治面貌", col = 2) + private String isParty; + + @ExcelColumnUtil(value = "文化程(最高学历)", col = 2) + private String education; + + @ExcelColumnUtil(value = "健康状况", col = 2) + private String health; + + @ExcelColumnUtil(value = "是否脱贫户", col = 2) + private String isPoor; + + @ExcelColumnUtil(value = "检测对象类型", col = 2) + private String monitorType; + + @ExcelColumnUtil(value = "是否搬迁对象", col = 2) + private String isMigration; + + @ExcelColumnUtil(value = "搬迁类型", col = 2) + private String migrationType; + + @ExcelColumnUtil(value = "搬迁点名称", col = 2) + private String migrationName; + + @ExcelColumnUtil(value = "是否渔民", col = 2) + private String fisherman; + + @ExcelColumnUtil(value = "是否参保", col = 2) + private String insured; + + @ExcelColumnUtil(value = "养老保险参保情况", col = 2) + private String pensionInsurance; + + @ExcelColumnUtil(value = "当前参保地", col = 2) + private String insurePlace; + + @ExcelColumnUtil(value = "人员类别", col = 2) + private String memberType; + + @ExcelColumnUtil(value = "劳动能力", col = 2) + private String laborAbility; + + @ExcelColumnUtil(value = "是否就业", col = 2) + private String jobStatus; + + @ExcelColumnUtil(value = "就业类型", col = 2) + private String jobType; + + private Long businessId; + + @ExcelColumnUtil(value = "(现居所在地)地址", col = 2) + private String business; + + @ExcelColumnUtil(value = "工龄", col = 2) + private String jobAge; + + private String recentStartDate; + + private String recentEndDate; + + private String recentMonth; + + @ExcelColumnUtil(value = "本年内务工月数", col = 2) + private String yearJobMonth; + + @ExcelColumnUtil(value = "年平均收入", col = 2) + private String averageSalary; + + @ExcelColumnUtil(value = "收入情况说明", col = 2) + private String incomeStatement; + + @ExcelColumnUtil(value = "就业意愿", col = 2) + private String employmentWillingness; + + @ExcelColumnUtil(value = "就业意愿省", col = 2) + private String provinceEmployment; + + @ExcelColumnUtil(value = "就业意愿市/地区", col = 2) + private String cityEmployment; + + @ExcelColumnUtil(value = "就业培训意愿", col = 2) + private String employmentTrainingWillingness; + + @ExcelColumnUtil(value = "是否返乡", col = 2) + private String homecoming; + + @ExcelColumnUtil(value = "返乡时间", col = 2) + private String homecomingDate; + + @ExcelColumnUtil(value = "返乡原因", col = 2) + private String homecomingReason; + + @ExcelColumnUtil(value = "备注(异常原因)", col = 2) + private String comment; + + @ExcelColumnUtil(value = "户最后更新时间", col = 2) + private String hostLastUpdate; + + @ExcelColumnUtil(value = "基础信息更新时间", col = 2) + private String baseLastUpdate; + + @ExcelColumnUtil(value = "就业信息更新时间", col = 2) + private String employmentLastUpdate; + + private List positionDictDOList; + +} diff --git a/src/main/java/com/laowu/vo/member/MemberTrainInfoVO.java b/src/main/java/com/laowu/vo/member/MemberTrainInfoVO.java deleted file mode 100644 index 40eb780..0000000 --- a/src/main/java/com/laowu/vo/member/MemberTrainInfoVO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.laowu.vo.member; - -import com.laowu.model.MemberTrainInfoDO; -import com.laowu.model.PositionDictDO; -import lombok.Data; - -import java.util.List; - -@Data -public class MemberTrainInfoVO extends MemberTrainInfoDO { - - private List positionDictDOS; - -} diff --git a/src/main/java/com/laowu/vo/member/OneMemberVO.java b/src/main/java/com/laowu/vo/member/OneMemberVO.java index 20ec033..498fe8e 100644 --- a/src/main/java/com/laowu/vo/member/OneMemberVO.java +++ b/src/main/java/com/laowu/vo/member/OneMemberVO.java @@ -1,8 +1,6 @@ package com.laowu.vo.member; -import com.laowu.model.MemberCertsDO; -import com.laowu.model.MemberDictDO; -import com.laowu.model.PositionDictDO; +import com.laowu.model.*; import lombok.Data; import java.util.List; @@ -10,18 +8,27 @@ import java.util.List; @Data public class OneMemberVO extends MemberDictDO { - private String college; + /** + * 户主姓名 + */ + private String hostUserName; - private String major; + /** + * 户主证件 + */ + private String hostIdCardType; - private List memberJobInfoVOS; + /** + * 户主证件号码 + */ + private String hostIdCard; - private List memberCollegeVOS; + private List memberJobInfoVOS; private List positionDictDOS; private List memberCertsDOS; - private List memberTrainInfoVOS; + private List memberTrainInfoVOS; } diff --git a/src/main/java/com/laowu/vo/member/TokenLoginVO.java b/src/main/java/com/laowu/vo/member/TokenLoginVO.java new file mode 100644 index 0000000..a6e1a10 --- /dev/null +++ b/src/main/java/com/laowu/vo/member/TokenLoginVO.java @@ -0,0 +1,14 @@ +package com.laowu.vo.member; + +import lombok.Data; + +@Data +public class TokenLoginVO { + + private Long timestamp; + + private String idCard; + + private String sign; + +} diff --git a/src/main/java/com/laowu/vo/station/BusinessTop7VO.java b/src/main/java/com/laowu/vo/station/BusinessTop7VO.java new file mode 100644 index 0000000..2e49d43 --- /dev/null +++ b/src/main/java/com/laowu/vo/station/BusinessTop7VO.java @@ -0,0 +1,14 @@ +package com.laowu.vo.station; + +import lombok.Data; + +@Data +public class BusinessTop7VO { + + private String business; + + private Integer cnt; + + private String percent; + +} diff --git a/src/main/java/com/laowu/vo/station/HomepageVO.java b/src/main/java/com/laowu/vo/station/HomepageVO.java new file mode 100644 index 0000000..2a8edd6 --- /dev/null +++ b/src/main/java/com/laowu/vo/station/HomepageVO.java @@ -0,0 +1,26 @@ +package com.laowu.vo.station; + +import lombok.Data; + +@Data +public class HomepageVO { + + private String workstationName; + + private String province; + + private String city; + + private String county; + + private String memberCnt; + + private String leaderCnt; + + private String teamCnt; + + private String companyCnt; + + private String requireCnt; + +} diff --git a/src/main/java/com/laowu/vo/station/Screen1VO.java b/src/main/java/com/laowu/vo/station/Screen1VO.java new file mode 100644 index 0000000..75d85e7 --- /dev/null +++ b/src/main/java/com/laowu/vo/station/Screen1VO.java @@ -0,0 +1,19 @@ +package com.laowu.vo.station; + +import lombok.Data; + +@Data +public class Screen1VO { + + private Integer totalLaborCnt; + + private String totalLaborPercent; + + private Integer poorLaborCnt; + + private String poorLaborPercent; + + private Integer monitorTypeCnt; + + private String monitorTypePercent; +} diff --git a/src/main/java/com/laowu/vo/station/Screen2VO.java b/src/main/java/com/laowu/vo/station/Screen2VO.java new file mode 100644 index 0000000..eddb4f2 --- /dev/null +++ b/src/main/java/com/laowu/vo/station/Screen2VO.java @@ -0,0 +1,38 @@ +package com.laowu.vo.station; + +import lombok.Data; + +import java.util.List; + +@Data +public class Screen2VO { + + private Integer cityEmployeeCnt; + + private Integer migrationCnt; + + private Integer certCnt; + + private String certPercent; + + private List businessTop7VOS; + + private Double middleSalary; + + private Integer chuzhongCnt; + +// private String chuzhongPercent; + + private Integer gaozhongCnt; + +// private String gaozhongPercent; + + private Integer daxueCnt; + +// private String daxuePercent; + + private Integer otherCnt; + +// private String otherPercent; + +} diff --git a/src/main/java/com/laowu/vo/station/Screen3VO.java b/src/main/java/com/laowu/vo/station/Screen3VO.java new file mode 100644 index 0000000..9b86157 --- /dev/null +++ b/src/main/java/com/laowu/vo/station/Screen3VO.java @@ -0,0 +1,43 @@ +package com.laowu.vo.station; + +import lombok.Data; + +@Data +public class Screen3VO { + + private String county; + + private Integer totalLaborCnt; + +// private String totalLaborPercent; + + private Integer poorLaborCnt; + + private String poorLaborPercent; + + private Integer monitorTypeCnt; + + private String monitorTypePercent; + + private Integer ageLaborCnt; + + private String ageLaborPercent; + + + private Integer chuzhongCnt; + +// private String chuzhongPercent; + + private Integer gaozhongCnt; + +// private String gaozhongPercent; + + private Integer daxueCnt; + +// private String daxuePercent; + + private Integer otherCnt; + +// private String otherPercent; + +} diff --git a/src/main/java/com/laowu/vo/station/TotalTeamsVO.java b/src/main/java/com/laowu/vo/station/TotalTeamsVO.java new file mode 100644 index 0000000..3631d5b --- /dev/null +++ b/src/main/java/com/laowu/vo/station/TotalTeamsVO.java @@ -0,0 +1,10 @@ +package com.laowu.vo.station; + +import lombok.Data; + +@Data +public class TotalTeamsVO { + + private Integer count; + +} diff --git a/src/main/java/com/laowu/vo/team/HomepageVO.java b/src/main/java/com/laowu/vo/team/HomepageVO.java deleted file mode 100644 index 2a15420..0000000 --- a/src/main/java/com/laowu/vo/team/HomepageVO.java +++ /dev/null @@ -1,26 +0,0 @@ -package com.laowu.vo.team; - -import lombok.Data; - -@Data -public class HomepageVO { - - private String workstationName; - - private String province; - - private String city; - - private String county; - - private String memberCnt; - - private String leaderCnt; - - private String teamCnt; - - private String companyCnt; - - private String requireCnt; - -} diff --git a/src/main/java/com/laowu/vo/team/LeaderMembersVO.java b/src/main/java/com/laowu/vo/team/LeaderMembersVO.java deleted file mode 100644 index 829447f..0000000 --- a/src/main/java/com/laowu/vo/team/LeaderMembersVO.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.laowu.vo.team; - -import lombok.Data; - -@Data -public class LeaderMembersVO { - - private Long id; - - private String userName; - - private String telephone; - - private String idCardType; - - private String idCard; - - private String teamCnt; - - private String teamTotalCnt; - -} diff --git a/src/main/java/com/laowu/vo/team/MemberManagementVO.java b/src/main/java/com/laowu/vo/team/MemberManagementVO.java deleted file mode 100644 index a871e48..0000000 --- a/src/main/java/com/laowu/vo/team/MemberManagementVO.java +++ /dev/null @@ -1,57 +0,0 @@ -package com.laowu.vo.team; - -import com.laowu.model.PositionDictDO; -import lombok.Data; - -import java.util.List; - -@Data -public class MemberManagementVO { - - private Long id; - - private String userName; - - private String jobStatus; - - private String telephone; - - private String idCardType; - - private String idCard; - - private String province; - - private String city; - - private String county; - - private String address; - - private String startDate; - - private String endDate; - - private String isPoor; - - private String isMigration; - - private String isParty; - - private String companyName; - - private String jobMonth; - - private String salary; - - private String companyProvince; - - private String companyCity; - - private String companyCounty; - - private String companyAddress; - - private List positionDictDOList; - -} diff --git a/src/main/java/com/laowu/vo/team/OneTeamInfoVO.java b/src/main/java/com/laowu/vo/team/OneTeamInfoVO.java deleted file mode 100644 index 3328089..0000000 --- a/src/main/java/com/laowu/vo/team/OneTeamInfoVO.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.laowu.vo.team; - -import com.laowu.model.MemberDictDO; -import com.laowu.model.TeamDictDO; -import lombok.Data; - -import java.util.List; - -@Data -public class OneTeamInfoVO extends TeamDictDO { - - private List memberDictDOS; - - private String ct; - - private String userName; -} diff --git a/src/main/java/com/laowu/vo/team/ProvinceStationTeamVO.java b/src/main/java/com/laowu/vo/team/ProvinceStationTeamVO.java deleted file mode 100644 index 45294e8..0000000 --- a/src/main/java/com/laowu/vo/team/ProvinceStationTeamVO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.laowu.vo.team; - -import lombok.Data; - -import java.util.List; - -@Data -public class ProvinceStationTeamVO { - - private String province; - - private List workstationDictVOS; - -} diff --git a/src/main/java/com/laowu/vo/team/TeamsVO.java b/src/main/java/com/laowu/vo/team/TeamsVO.java deleted file mode 100644 index 49ad18f..0000000 --- a/src/main/java/com/laowu/vo/team/TeamsVO.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.laowu.vo.team; - -import lombok.Data; - -@Data -public class TeamsVO { - - private Long id; - - private String teamName; - - private String ct; - - private String userName; - - private String comment; - -} diff --git a/src/main/java/com/laowu/vo/team/TotalTeamsVO.java b/src/main/java/com/laowu/vo/team/TotalTeamsVO.java deleted file mode 100644 index 6b64341..0000000 --- a/src/main/java/com/laowu/vo/team/TotalTeamsVO.java +++ /dev/null @@ -1,10 +0,0 @@ -package com.laowu.vo.team; - -import lombok.Data; - -@Data -public class TotalTeamsVO { - - private Integer count; - -} diff --git a/src/main/java/com/laowu/vo/team/WorkstationDictVO.java b/src/main/java/com/laowu/vo/team/WorkstationDictVO.java deleted file mode 100644 index b15ee25..0000000 --- a/src/main/java/com/laowu/vo/team/WorkstationDictVO.java +++ /dev/null @@ -1,14 +0,0 @@ -package com.laowu.vo.team; - -import com.laowu.model.TeamDictDO; -import com.laowu.model.WorkstationDictDO; -import lombok.Data; - -import java.util.List; - -@Data -public class WorkstationDictVO extends WorkstationDictDO { - - private List teamDictDOS; - -} diff --git a/src/main/resources/application-ceshi.properties b/src/main/resources/application-ceshi.properties new file mode 100644 index 0000000..fa9fe0e --- /dev/null +++ b/src/main/resources/application-ceshi.properties @@ -0,0 +1,33 @@ +# 本地环境配置 +spring.server.port=34567 + +# 数据源配置 +spring.datasource.url=jdbc:mysql://rm-uf6n8b2503cv42z232o.mysql.rds.aliyuncs.com:3306/laowu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.type=com.alibaba.druid.pool.DruidDataSource +spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver +spring.datasource.username=ykhl +spring.datasource.password=ykhladmin123= + +spring.datasource.druid.initialSize=5 +spring.datasource.druid.minIdle=5 +spring.datasource.druid.maxActive=200 +spring.datasource.druid.maxWait=60000 +spring.datasource.druid.timeBetweenEvictionRunsMillis=60000 +spring.datasource.druid.minEvictableIdleTimeMillis=300000 +spring.datasource.druid.validationQuery=SELECT 1 FROM DUAL +spring.datasource.druid.testWhileIdle=true +spring.datasource.druid.testOnBorrow=false +spring.datasource.druid.testOnReturn=false +spring.datasource.druid.poolPreparedStatements=true +spring.datasource.druid.maxPoolPreparedStatementPerConnectionSize=20 +spring.datasource.druid.useGlobalDataSourceStat=true + +# 控制台日志打印 +mybatis-plus.configuration.log-impl=org.apache.ibatis.logging.stdout.StdOutImpl + +spring.redis.host=47.97.19.66 +spring.redis.password=Ykhl@208 +spring.redis.port=6389 +spring.redis.lettuce.pool.max-idle=16 +spring.redis.lettuce.pool.max-active=32 +spring.redis.lettuce.pool.min-idle=8 diff --git a/src/main/resources/application-dev.properties b/src/main/resources/application-dev.properties index ee85a4f..57e7393 100644 --- a/src/main/resources/application-dev.properties +++ b/src/main/resources/application-dev.properties @@ -2,14 +2,11 @@ spring.server.port=34567 # 数据源配置 -spring.datasource.url=jdbc:mysql://116.62.57.92:3306/laowu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 -#spring.datasource.url=jdbc:mysql://rm-uf6rab73w0qg843opxo.mysql.rds.aliyuncs.com:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 +spring.datasource.url=jdbc:mysql://139.224.253.21:3306/laowu?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.type=com.alibaba.druid.pool.DruidDataSource spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver -#spring.datasource.username=ykadmin_new -#spring.datasource.password=youkedb608@good -spring.datasource.username=devloper -spring.datasource.password=dev@1553$ +spring.datasource.username=root +spring.datasource.password=ykhladmin302 spring.datasource.druid.initialSize=5 spring.datasource.druid.minIdle=5 diff --git a/src/main/resources/code.properties b/src/main/resources/code.properties index 231cd09..7ccb0df 100644 --- a/src/main/resources/code.properties +++ b/src/main/resources/code.properties @@ -7,6 +7,9 @@ laowu.code-message[20001]=该目录已存在 laowu.code-message[30001]=该公司已存在 laowu.code-message[40001]=该用户已存在 +laowu.code-message[40002]=工友信息不存在 +laowu.code-message[40003]=工友信息不匹配 +laowu.code-message[40004]=人脸识别失败 laowu.code-message[50001]=账号或密码错误 @@ -14,3 +17,4 @@ laowu.code-message[60001]=该经营范围已存在 laowu.code-message[70001]=该记录已存在 +meishu.code-message[80001]=已超过当日验证次数上线 diff --git a/src/main/resources/mapper/AccessTokenMapper.xml b/src/main/resources/mapper/AccessTokenMapper.xml new file mode 100644 index 0000000..b030765 --- /dev/null +++ b/src/main/resources/mapper/AccessTokenMapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + create_date, + update_date, + delete_date, + id, access_token + + + diff --git a/src/main/resources/mapper/CompanyDictMapper.xml b/src/main/resources/mapper/CompanyDictMapper.xml index 7ad554e..3288609 100644 --- a/src/main/resources/mapper/CompanyDictMapper.xml +++ b/src/main/resources/mapper/CompanyDictMapper.xml @@ -2,17 +2,6 @@ - - - - - - - - - - - create_date, diff --git a/src/main/resources/mapper/ImageCheckRecordMapper.xml b/src/main/resources/mapper/ImageCheckRecordMapper.xml new file mode 100644 index 0000000..1603b5e --- /dev/null +++ b/src/main/resources/mapper/ImageCheckRecordMapper.xml @@ -0,0 +1,5 @@ + + + + + diff --git a/src/main/resources/mapper/LibGeoLocationMapper.xml b/src/main/resources/mapper/LibGeoLocationMapper.xml index 3c98d29..bc10818 100644 --- a/src/main/resources/mapper/LibGeoLocationMapper.xml +++ b/src/main/resources/mapper/LibGeoLocationMapper.xml @@ -30,7 +30,6 @@ WHERE t.delete_date IS NULL AND t.province IS NOT NULL - order by t.order_no + + + + + + + + + + + + + + + + diff --git a/src/main/resources/mapper/MemberJobInfoMapper.xml b/src/main/resources/mapper/MemberJobInfoMapper.xml index 4461520..7149f5f 100644 --- a/src/main/resources/mapper/MemberJobInfoMapper.xml +++ b/src/main/resources/mapper/MemberJobInfoMapper.xml @@ -33,19 +33,22 @@ - SELECT - t2.* - FROM - member_team_mapping t - LEFT JOIN member_dict t2 ON t.member_id = t2.id - WHERE - t.delete_date IS NULL - AND t2.delete_date IS NULL - and t.team_id = #{teamId} - - - - - diff --git a/src/main/resources/mapper/MemberTrainPositionsMapper.xml b/src/main/resources/mapper/MemberTrainPositionsMapper.xml deleted file mode 100644 index 837f435..0000000 --- a/src/main/resources/mapper/MemberTrainPositionsMapper.xml +++ /dev/null @@ -1,45 +0,0 @@ - - - - - - - - - - - - - - - - - create_date, - update_date, - delete_date, - id, member_train_id, position_id - - - - - - - diff --git a/src/main/resources/mapper/MemberUpdateHistoryMapper.xml b/src/main/resources/mapper/MemberUpdateHistoryMapper.xml deleted file mode 100644 index 9c41f43..0000000 --- a/src/main/resources/mapper/MemberUpdateHistoryMapper.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - - - - - - - - create_date, - update_date, - delete_date, - id, company_id, administer_id, opr, module - - - diff --git a/src/main/resources/mapper/TeamDictMapper.xml b/src/main/resources/mapper/TeamDictMapper.xml deleted file mode 100644 index 314bac7..0000000 --- a/src/main/resources/mapper/TeamDictMapper.xml +++ /dev/null @@ -1,228 +0,0 @@ - - - - - - create_date, - update_date, - delete_date, - id, station_id, team_name, comment, administer_id - - - - - - - - - - - - - - update team_dict set member_id = null where id = #{id} - - - diff --git a/src/main/resources/mapper/WorkstationAdministersMapper.xml b/src/main/resources/mapper/WorkstationAdministersMapper.xml index 83cbe45..0dd6018 100644 --- a/src/main/resources/mapper/WorkstationAdministersMapper.xml +++ b/src/main/resources/mapper/WorkstationAdministersMapper.xml @@ -36,7 +36,9 @@ - SELECT t1.workstation_name, t1.province, diff --git a/src/main/resources/mapper/WorkstationMemberMappingMapper.xml b/src/main/resources/mapper/WorkstationMemberMappingMapper.xml index e566f7b..23db1f4 100644 --- a/src/main/resources/mapper/WorkstationMemberMappingMapper.xml +++ b/src/main/resources/mapper/WorkstationMemberMappingMapper.xml @@ -2,22 +2,243 @@ - - - - - - - - - + - - - create_date, - update_date, - delete_date, - id, member_id, station_id - -- libgit2 0.25.0