Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
J
jty-wsxt
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aye
jty-wsxt
Commits
fd3da40a
Commit
fd3da40a
authored
Jun 20, 2019
by
aye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码提交
parent
b9da2c02
Hide whitespace changes
Inline
Side-by-side
Showing
134 changed files
with
370 additions
and
336 deletions
+370
-336
auth-server/src/main/java/com/jty/wsxt/AuthServerApplication.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/application/ApplicationRegistry.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/application/package-info.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/application/service/AuthAuthorityService.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/application/service/AuthRoleServer.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/application/service/AuthUserServer.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/application/service/NrscAuthorityServer.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/application/service/NrscTeacherService.java
+2
-3
auth-server/src/main/java/com/jty/wsxt/application/service/impl/AuthAuthorityServiceImpl.java
+6
-6
auth-server/src/main/java/com/jty/wsxt/application/service/impl/AuthRoleServerImpl.java
+5
-8
auth-server/src/main/java/com/jty/wsxt/application/service/impl/AuthUserServerImpl.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/application/service/impl/NrscAuthorityServerImple.java
+4
-4
auth-server/src/main/java/com/jty/wsxt/application/service/impl/NrscTeacherServiceImpl.java
+10
-13
auth-server/src/main/java/com/jty/wsxt/domain/DomainRegistry.java
+10
-11
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/authority/AuthAuthority.java
+3
-4
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/authority/AuthAuthorityRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/authority/nrsc/NrscAuthority.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/authority/nrsc/NrscAuthorityRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/client/AuthClient.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/client/ClientRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/history/AuthUserHistory.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/history/AuthUserHistoryRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/history/DisableUserSubscriber.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/history/EnableUserSubscriber.java
+2
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/history/ManagerId.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/history/OperatorId.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/role/AuthRole.java
+5
-6
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/role/RoleRepository.java
+1
-2
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/user/AuthUser.java
+5
-6
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/user/DisableUserEvent.java
+2
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/user/EnableUserEvent.java
+2
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/user/UserRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/user/nrsc/NrscTeacher.java
+7
-8
auth-server/src/main/java/com/jty/wsxt/domain/model/auth/user/nrsc/NrscTeacherRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/stage/BasicStage.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/stage/BasicStageRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/model/subject/BasicSubject.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/domain/model/subject/BasicSubjectRepository.java
+1
-2
auth-server/src/main/java/com/jty/wsxt/domain/package-info.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/domain/shared/EntityObject.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/shared/IdentifiedDomainObject.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/shared/IdentifiedEntityObject.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/shared/IdentifiedValueObject.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/shared/MapJson.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/domain/shared/ValueObject.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/ApplicationCloseListener.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/DomainEvent.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/DomainEventPublisher.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/DomainEventSubscriber.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/BodyReaderHttpServletRequestWrapper.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/HttpHelper.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCode.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeBeanConfig.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeController.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeException.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeFilter.java
+4
-4
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeGenerator.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeProcessor.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeProcessorHolder.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeRepository.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeSecurityConfig.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/ValidateCodeType.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/image/ImageCode.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/image/ImageCodeGenerator.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/image/ImageCodeProcessor.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/impl/AbstractValidateCodeProcessor.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/impl/RedisValidateCodeRepository.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/sms/DefaultSmsCodeSender.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/sms/SmsCodeGenerator.java
+4
-4
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/sms/SmsCodeProcessor.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/sms/SmsCodeSender.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/code/sms/SmsUtil.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/config/AuthorizationServerConfigurer.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/config/FeignConfig.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/config/ResourceConfigurer.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/infrastructure/config/SecurityCoreConfig.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/config/WebSecurityConfigurer.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/AlibabaConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/CommonConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/ElasticsearchConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/InterfaceConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/PaperConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/RabbitMqQueueConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/SchoolConfigConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/constants/TableConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/package-info.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/properties/ImageCodeProperties.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/properties/SecurityConstants.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/properties/SecurityProperties.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/properties/SmsCodeProperties.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/properties/ValidateCodeProperties.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/AuthenticationBean.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/CustomAuthenticationFilter.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/CustomTokenFilter.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/MyClientDetailService.java
+5
-5
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/MyRedisTokenStore.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/MyUserDetail.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/MyUserDetailService.java
+6
-6
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/RefreshTokenBean.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/SecurityController.java
+4
-4
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/authentication/AuthenticationBeanConfig.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/authentication/DefaultUserDetailsService.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/authentication/FormAuthenticationConfig.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/authentication/JtyAuthenticationFailureHandler.java
+4
-4
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/authentication/JtyAuthenticationSuccessHandler.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/embed/EmbedAuthenticationConfig.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/embed/EmbedAuthenticationFilter.java
+8
-8
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/embed/EmbedAuthenticationProvider.java
+3
-3
auth-server/src/main/java/com/jty/wsxt/infrastructure/security/embed/EmbedAuthenticationToken.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/support/BusinessException.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/support/GlobalExceptionHandler.java
+2
-2
auth-server/src/main/java/com/jty/wsxt/infrastructure/support/MyPasswordEncoder.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/support/Result.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/support/ResultCode.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/util/HeadUtils.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/util/PoCastUtils.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/infrastructure/util/TransferCharactor.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/Assembler.java
+8
-8
auth-server/src/main/java/com/jty/wsxt/interfaces/controller/AuthRoleController.java
+6
-7
auth-server/src/main/java/com/jty/wsxt/interfaces/controller/AuthUserController.java
+8
-9
auth-server/src/main/java/com/jty/wsxt/interfaces/controller/NrscAuthorityController.java
+6
-6
auth-server/src/main/java/com/jty/wsxt/interfaces/controller/NrscTeacherController.java
+13
-15
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/AuthAuthorityDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/AuthRoleDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/AuthUserHistoryDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/ChangePasswordDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/NrscRoleDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/NrscTeacherDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/NrscTeacherSearchDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/OperatorDto.java
+1
-1
auth-server/src/main/java/com/jty/wsxt/interfaces/dto/PageableDto.java
+1
-1
eruka-server/src/main/java/com/jty/wsxt/EurekaServerApplication.java
+1
-1
gateway-server/src/main/java/com/jty/wsxt/WebGatewayApplication.java
+21
-0
gateway-server/src/main/resources/application.yml
+34
-0
No files found.
auth-server/src/main/java/com
.jty.nrsc
/AuthServerApplication.java
→
auth-server/src/main/java/com
/jty/wsxt
/AuthServerApplication.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
;
package
com
.
jty
.
wsxt
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/ApplicationRegistry.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/ApplicationRegistry.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
;
package
com
.
jty
.
wsxt
.
application
;
import
com.jty.
nrsc
.application.service.AuthRoleServer
;
import
com.jty.
nrsc
.application.service.AuthUserServer
;
import
com.jty.
nrsc
.application.service.NrscAuthorityServer
;
import
com.jty.
nrsc
.application.service.NrscTeacherService
;
import
com.jty.
wsxt
.application.service.AuthRoleServer
;
import
com.jty.
wsxt
.application.service.AuthUserServer
;
import
com.jty.
wsxt
.application.service.NrscAuthorityServer
;
import
com.jty.
wsxt
.application.service.NrscTeacherService
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/package-info.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/package-info.java
View file @
fd3da40a
...
...
@@ -7,6 +7,6 @@
* 对内 调用领域层(领域对象或领域服务)完成各种业务逻辑任务(task)。
* 这一层也很适合写一些任务处理,日志监控
**/
package
com
.
jty
.
nrsc
.
application
;
package
com
.
jty
.
wsxt
.
application
;
auth-server/src/main/java/com
.jty.nrsc
/application/service/AuthAuthorityService.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/AuthAuthorityService.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
;
package
com
.
jty
.
wsxt
.
application
.
service
;
import
org.springframework.security.core.GrantedAuthority
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/AuthRoleServer.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/AuthRoleServer.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
;
package
com
.
jty
.
wsxt
.
application
.
service
;
import
com.jty.
nrsc
.domain.model.auth.role.AuthRole
;
import
com.jty.
wsxt
.domain.model.auth.role.AuthRole
;
import
com.jty.nrsc.interfaces.dto.AuthRoleDto
;
import
org.springframework.data.domain.Page
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/AuthUserServer.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/AuthUserServer.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
;
package
com
.
jty
.
wsxt
.
application
.
service
;
import
com.jty.
nrsc
.domain.model.auth.history.AuthUserHistory
;
import
com.jty.
wsxt
.domain.model.auth.history.AuthUserHistory
;
import
com.jty.nrsc.interfaces.dto.AuthUserHistoryDto
;
import
com.jty.nrsc.interfaces.dto.OperatorDto
;
import
org.springframework.data.domain.Page
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/NrscAuthorityServer.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/NrscAuthorityServer.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
;
package
com
.
jty
.
wsxt
.
application
.
service
;
import
com.jty.
nrsc
.domain.model.auth.authority.nrsc.NrscAuthority
;
import
com.jty.
wsxt
.domain.model.auth.authority.nrsc.NrscAuthority
;
import
java.util.List
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/NrscTeacherService.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/NrscTeacherService.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
;
package
com
.
jty
.
wsxt
.
application
.
service
;
import
com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.nrsc.interfaces.dto.ChangePasswordDto
;
import
com.jty.wsxt.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.nrsc.interfaces.dto.NrscTeacherDto
;
import
com.jty.nrsc.interfaces.dto.NrscTeacherSearchDto
;
import
com.jty.nrsc.interfaces.dto.OperatorDto
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/impl/AuthAuthorityServiceImpl.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/impl/AuthAuthorityServiceImpl.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
.
impl
;
package
com
.
jty
.
wsxt
.
application
.
service
.
impl
;
import
com.jty.
nrsc
.application.service.AuthAuthorityService
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
nrsc
.domain.model.auth.role.AuthRole
;
import
com.jty.
nrsc
.domain.model.auth.user.AuthUser
;
import
com.jty.
wsxt
.application.service.AuthAuthorityService
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
wsxt
.domain.model.auth.role.AuthRole
;
import
com.jty.
wsxt
.domain.model.auth.user.AuthUser
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.security.core.GrantedAuthority
;
import
org.springframework.security.core.authority.SimpleGrantedAuthority
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/impl/AuthRoleServerImpl.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/impl/AuthRoleServerImpl.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
.
impl
;
package
com
.
jty
.
wsxt
.
application
.
service
.
impl
;
import
com.jty.
nrsc
.application.service.AuthRoleServer
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
nrsc
.domain.model.auth.role.AuthRole
;
import
com.jty.
wsxt
.application.service.AuthRoleServer
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
wsxt
.domain.model.auth.role.AuthRole
;
import
com.jty.nrsc.infrastructure.support.BusinessException
;
import
com.jty.nrsc.infrastructure.support.ResultCode
;
import
com.jty.nrsc.interfaces.dto.AuthRoleDto
;
...
...
@@ -12,9 +12,6 @@ import org.springframework.data.domain.Example;
import
org.springframework.data.domain.Page
;
import
org.springframework.stereotype.Service
;
import
java.util.Iterator
;
import
java.util.List
;
/**
* AuthRoleServerImpl
*
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/impl/AuthUserServerImpl.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/impl/AuthUserServerImpl.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
.
impl
;
package
com
.
jty
.
wsxt
.
application
.
service
.
impl
;
import
com.jty.
nrsc
.application.service.AuthUserServer
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.model.auth.history.*
;
import
com.jty.
nrsc
.domain.model.auth.user.AuthUser
;
import
com.jty.
wsxt
.application.service.AuthUserServer
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.model.auth.history.*
;
import
com.jty.
wsxt
.domain.model.auth.user.AuthUser
;
import
com.jty.nrsc.infrastructure.DomainEventPublisher
;
import
com.jty.nrsc.infrastructure.support.BusinessException
;
import
com.jty.nrsc.infrastructure.support.ResultCode
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/impl/NrscAuthorityServerImple.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/impl/NrscAuthorityServerImple.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
.
impl
;
package
com
.
jty
.
wsxt
.
application
.
service
.
impl
;
import
com.jty.
nrsc
.application.service.NrscAuthorityServer
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.model.auth.authority.nrsc.NrscAuthority
;
import
com.jty.
wsxt
.application.service.NrscAuthorityServer
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.model.auth.authority.nrsc.NrscAuthority
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/application/service/impl/NrscTeacherServiceImpl.java
→
auth-server/src/main/java/com
/jty/wsxt
/application/service/impl/NrscTeacherServiceImpl.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
application
.
service
.
impl
;
import
com.jty.
nrsc
.application.ApplicationRegistry
;
import
com.jty.
nrsc
.application.service.NrscTeacherService
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.model.auth.role.AuthRole
;
import
com.jty.
nrsc
.domain.model.auth.user.AuthUser
;
import
com.jty.
nrsc
.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.
nrsc
.domain.model.stage.BasicStage
;
import
com.jty.
nrsc
.domain.model.subject.BasicSubject
;
package
com
.
jty
.
wsxt
.
application
.
service
.
impl
;
import
com.jty.
wsxt
.application.ApplicationRegistry
;
import
com.jty.
wsxt
.application.service.NrscTeacherService
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.model.auth.role.AuthRole
;
import
com.jty.
wsxt
.domain.model.auth.user.AuthUser
;
import
com.jty.
wsxt
.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.
wsxt
.domain.model.stage.BasicStage
;
import
com.jty.
wsxt
.domain.model.subject.BasicSubject
;
import
com.jty.nrsc.infrastructure.support.BusinessException
;
import
com.jty.nrsc.infrastructure.support.ResultCode
;
import
com.jty.nrsc.interfaces.dto.ChangePasswordDto
;
import
com.jty.nrsc.interfaces.dto.NrscTeacherDto
;
import
com.jty.nrsc.interfaces.dto.NrscTeacherSearchDto
;
import
com.jty.nrsc.interfaces.dto.OperatorDto
;
...
...
@@ -18,7 +17,6 @@ import org.apache.commons.collections.CollectionUtils;
import
org.apache.commons.lang.StringUtils
;
import
org.hibernate.query.criteria.internal.OrderImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Example
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.jpa.domain.Specification
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
...
...
@@ -26,7 +24,6 @@ import org.springframework.stereotype.Service;
import
javax.persistence.criteria.*
;
import
java.util.ArrayList
;
import
java.util.Iterator
;
import
java.util.List
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/DomainRegistry.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/DomainRegistry.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
;
package
com
.
jty
.
wsxt
.
domain
;
import
com.jty.nrsc.domain.model.auth.authority.AuthAuthorityRepository
;
import
com.jty.nrsc.domain.model.auth.authority.nrsc.NrscAuthorityRepository
;
import
com.jty.nrsc.domain.model.auth.client.ClientRepository
;
import
com.jty.nrsc.domain.model.auth.history.AuthUserHistoryRepository
;
import
com.jty.nrsc.domain.model.auth.role.RoleRepository
;
import
com.jty.nrsc.domain.model.auth.user.UserRepository
;
import
com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.nrsc.domain.model.auth.user.nrsc.NrscTeacherRepository
;
import
com.jty.nrsc.domain.model.stage.BasicStageRepository
;
import
com.jty.nrsc.domain.model.subject.BasicSubjectRepository
;
import
com.jty.wsxt.domain.model.auth.authority.AuthAuthorityRepository
;
import
com.jty.wsxt.domain.model.auth.authority.nrsc.NrscAuthorityRepository
;
import
com.jty.wsxt.domain.model.auth.client.ClientRepository
;
import
com.jty.wsxt.domain.model.auth.history.AuthUserHistoryRepository
;
import
com.jty.wsxt.domain.model.auth.role.RoleRepository
;
import
com.jty.wsxt.domain.model.auth.user.UserRepository
;
import
com.jty.wsxt.domain.model.auth.user.nrsc.NrscTeacherRepository
;
import
com.jty.wsxt.domain.model.stage.BasicStageRepository
;
import
com.jty.wsxt.domain.model.subject.BasicSubjectRepository
;
import
org.springframework.beans.BeansException
;
import
org.springframework.context.ApplicationContext
;
import
org.springframework.context.ApplicationContextAware
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/authority/AuthAuthority.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/authority/AuthAuthority.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
authority
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
authority
;
import
com.fasterxml.jackson.annotation.JsonIgnore
;
import
com.jty.nrsc.domain.model.auth.role.AuthRole
;
import
com.jty.nrsc.domain.shared.IdentifiedEntityObject
;
import
com.jty.nrsc.domain.shared.IdentifiedValueObject
;
import
com.jty.wsxt.domain.model.auth.role.AuthRole
;
import
com.jty.wsxt.domain.shared.IdentifiedEntityObject
;
import
lombok.Data
;
import
org.hibernate.annotations.NotFound
;
import
org.hibernate.annotations.NotFoundAction
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/authority/AuthAuthorityRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/authority/AuthAuthorityRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
authority
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
authority
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/authority/nrsc/NrscAuthority.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/authority/nrsc/NrscAuthority.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
authority
.
nrsc
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
authority
.
nrsc
;
import
com.jty.
nrsc
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
wsxt
.domain.model.auth.authority.AuthAuthority
;
import
lombok.Data
;
import
javax.persistence.DiscriminatorValue
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/authority/nrsc/NrscAuthorityRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/authority/nrsc/NrscAuthorityRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
authority
.
nrsc
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
authority
.
nrsc
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/client/AuthClient.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/client/AuthClient.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
client
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
client
;
import
com.jty.
nrsc
.domain.shared.IdentifiedEntityObject
;
import
com.jty.
wsxt
.domain.shared.IdentifiedEntityObject
;
import
lombok.Data
;
import
javax.persistence.Entity
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/client/ClientRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/client/ClientRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
client
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
client
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/history/AuthUserHistory.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/history/AuthUserHistory.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
history
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
history
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.shared.IdentifiedEntityObject
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.shared.IdentifiedEntityObject
;
import
lombok.Data
;
import
javax.persistence.Embedded
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/history/AuthUserHistoryRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/history/AuthUserHistoryRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
history
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
history
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/history/DisableUserSubscriber.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/history/DisableUserSubscriber.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
history
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
history
;
import
com.jty.
nrsc
.domain.DomainRegistry
;
import
com.jty.
nrsc
.domain.model.auth.user.DisableUserEvent
;
import
com.jty.
wsxt
.domain.DomainRegistry
;
import
com.jty.
wsxt
.domain.model.auth.user.DisableUserEvent
;
import
com.jty.nrsc.infrastructure.DomainEventSubscriber
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/history/EnableUserSubscriber.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/history/EnableUserSubscriber.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
history
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
history
;
import
com.jty.nrsc.domain.model.auth.user.DisableUserEvent
;
import
com.jty.nrsc.domain.model.auth.user.EnableUserEvent
;
import
com.jty.wsxt.domain.model.auth.user.EnableUserEvent
;
import
com.jty.nrsc.infrastructure.DomainEventSubscriber
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/history/ManagerId.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/history/ManagerId.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
history
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
history
;
import
com.jty.
nrsc
.domain.shared.ValueObject
;
import
com.jty.
wsxt
.domain.shared.ValueObject
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/history/OperatorId.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/history/OperatorId.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
history
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
history
;
import
com.jty.
nrsc
.domain.shared.ValueObject
;
import
com.jty.
wsxt
.domain.shared.ValueObject
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/role/AuthRole.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/role/AuthRole.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
role
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
role
;
import
com.jty.nrsc.domain.DomainRegistry
;
import
com.jty.nrsc.domain.model.auth.user.AuthUser
;
import
com.jty.nrsc.domain.model.auth.authority.AuthAuthority
;
import
com.jty.nrsc.domain.shared.IdentifiedEntityObject
;
import
com.jty.nrsc.domain.shared.IdentifiedValueObject
;
import
com.jty.wsxt.domain.DomainRegistry
;
import
com.jty.wsxt.domain.model.auth.user.AuthUser
;
import
com.jty.wsxt.domain.model.auth.authority.AuthAuthority
;
import
com.jty.wsxt.domain.shared.IdentifiedEntityObject
;
import
com.jty.nrsc.infrastructure.support.BusinessException
;
import
com.jty.nrsc.infrastructure.support.ResultCode
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/role/RoleRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/role/RoleRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
role
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
role
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
java.util.List
;
import
java.util.Optional
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/user/AuthUser.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/user/AuthUser.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
user
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
user
;
import
com.jty.nrsc.domain.DomainRegistry
;
import
com.jty.nrsc.domain.model.auth.role.AuthRole
;
import
com.jty.nrsc.domain.model.auth.history.ManagerId
;
import
com.jty.nrsc.domain.model.auth.history.OperatorId
;
import
com.jty.nrsc.domain.shared.IdentifiedEntityObject
;
import
com.jty.wsxt.domain.DomainRegistry
;
import
com.jty.wsxt.domain.model.auth.role.AuthRole
;
import
com.jty.wsxt.domain.model.auth.history.ManagerId
;
import
com.jty.wsxt.domain.shared.IdentifiedEntityObject
;
import
com.jty.nrsc.infrastructure.DomainEventPublisher
;
import
com.jty.nrsc.infrastructure.support.BusinessException
;
import
com.jty.nrsc.infrastructure.support.ResultCode
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/user/DisableUserEvent.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/user/DisableUserEvent.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
user
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
user
;
import
com.jty.nrsc.domain.model.auth.history.ManagerId
;
import
com.jty.nrsc.domain.model.auth.history.OperatorId
;
import
com.jty.wsxt.domain.model.auth.history.ManagerId
;
import
com.jty.nrsc.infrastructure.DomainEvent
;
import
com.jty.nrsc.interfaces.dto.OperatorDto
;
import
lombok.AllArgsConstructor
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/user/EnableUserEvent.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/user/EnableUserEvent.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
user
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
user
;
import
com.jty.nrsc.domain.model.auth.history.ManagerId
;
import
com.jty.nrsc.domain.model.auth.history.OperatorId
;
import
com.jty.wsxt.domain.model.auth.history.ManagerId
;
import
com.jty.nrsc.infrastructure.DomainEvent
;
import
com.jty.nrsc.interfaces.dto.OperatorDto
;
import
lombok.AllArgsConstructor
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/user/UserRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/user/UserRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
user
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
user
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/user/nrsc/NrscTeacher.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/user/nrsc/NrscTeacher.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
user
.
nrsc
;
import
com.jty.nrsc.domain.DomainRegistry
;
import
com.jty.nrsc.domain.model.auth.user.AuthUser
;
import
com.jty.nrsc.domain.model.stage.BasicStage
;
import
com.jty.nrsc.domain.model.subject.BasicSubject
;
import
com.jty.nrsc.domain.shared.IdentifiedEntityObject
;
import
com.jty.nrsc.infrastructure.constants.TableConstants
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
user
.
nrsc
;
import
com.jty.wsxt.domain.DomainRegistry
;
import
com.jty.wsxt.domain.model.auth.user.AuthUser
;
import
com.jty.wsxt.domain.model.stage.BasicStage
;
import
com.jty.wsxt.domain.model.subject.BasicSubject
;
import
com.jty.wsxt.domain.shared.IdentifiedEntityObject
;
import
com.jty.nrsc.infrastructure.support.BusinessException
;
import
com.jty.nrsc.infrastructure.support.ResultCode
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/auth/user/nrsc/NrscTeacherRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/auth/user/nrsc/NrscTeacherRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
auth
.
user
.
nrsc
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
auth
.
user
.
nrsc
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.jpa.repository.JpaSpecificationExecutor
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/stage/BasicStage.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/stage/BasicStage.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
stage
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
stage
;
import
com.jty.
nrsc
.domain.model.auth.user.AuthUser
;
import
com.jty.
nrsc
.domain.shared.IdentifiedEntityObject
;
import
com.jty.
wsxt
.domain.model.auth.user.AuthUser
;
import
com.jty.
wsxt
.domain.shared.IdentifiedEntityObject
;
import
lombok.Data
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/stage/BasicStageRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/stage/BasicStageRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
stage
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
stage
;
import
org.springframework.data.jpa.repository.JpaRepository
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/subject/BasicSubject.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/subject/BasicSubject.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
subject
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
subject
;
import
com.jty.
nrsc
.domain.model.auth.user.AuthUser
;
import
com.jty.
nrsc
.domain.shared.IdentifiedEntityObject
;
import
com.jty.
wsxt
.domain.model.auth.user.AuthUser
;
import
com.jty.
wsxt
.domain.shared.IdentifiedEntityObject
;
import
lombok.Data
;
import
org.hibernate.annotations.Cache
;
import
org.hibernate.annotations.CacheConcurrencyStrategy
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/model/subject/BasicSubjectRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/model/subject/BasicSubjectRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
model
.
subject
;
package
com
.
jty
.
wsxt
.
domain
.
model
.
subject
;
import
com.jty.nrsc.domain.model.stage.BasicStage
;
import
org.springframework.data.jpa.repository.JpaRepository
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/package-info.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/package-info.java
View file @
fd3da40a
...
...
@@ -11,4 +11,4 @@
* 工厂(Factories): 创建复杂对象,隐藏创建细节
* 仓储(Repository): 提供查找和持久化对象的方法
*/
package
com
.
jty
.
nrsc
.
domain
;
\ No newline at end of file
package
com
.
jty
.
wsxt
.
domain
;
\ No newline at end of file
auth-server/src/main/java/com
.jty.nrsc
/domain/shared/EntityObject.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/shared/EntityObject.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
shared
;
package
com
.
jty
.
wsxt
.
domain
.
shared
;
import
java.io.Serializable
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/shared/IdentifiedDomainObject.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/shared/IdentifiedDomainObject.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
shared
;
package
com
.
jty
.
wsxt
.
domain
.
shared
;
import
javax.persistence.Id
;
import
javax.persistence.MappedSuperclass
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/shared/IdentifiedEntityObject.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/shared/IdentifiedEntityObject.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
shared
;
package
com
.
jty
.
wsxt
.
domain
.
shared
;
import
lombok.Data
;
import
org.hibernate.annotations.CreationTimestamp
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/shared/IdentifiedValueObject.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/shared/IdentifiedValueObject.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
shared
;
package
com
.
jty
.
wsxt
.
domain
.
shared
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/shared/MapJson.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/shared/MapJson.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
shared
;
package
com
.
jty
.
wsxt
.
domain
.
shared
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
lombok.extern.slf4j.Slf4j
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/domain/shared/ValueObject.java
→
auth-server/src/main/java/com
/jty/wsxt
/domain/shared/ValueObject.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
domain
.
shared
;
package
com
.
jty
.
wsxt
.
domain
.
shared
;
import
java.io.Serializable
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/ApplicationCloseListener.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/ApplicationCloseListener.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
;
package
com
.
jty
.
wsxt
.
infrastructure
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.ApplicationListener
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/DomainEvent.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/DomainEvent.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
;
package
com
.
jty
.
wsxt
.
infrastructure
;
/**
* 领域事件超级父类
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/DomainEventPublisher.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/DomainEventPublisher.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
;
package
com
.
jty
.
wsxt
.
infrastructure
;
import
java.util.ArrayList
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/DomainEventSubscriber.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/DomainEventSubscriber.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
;
package
com
.
jty
.
wsxt
.
infrastructure
;
/**
* 领域事件订阅者
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/BodyReaderHttpServletRequestWrapper.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/BodyReaderHttpServletRequestWrapper.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
javax.servlet.ReadListener
;
import
javax.servlet.ServletInputStream
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/HttpHelper.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/HttpHelper.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
javax.servlet.ServletRequest
;
import
java.io.BufferedReader
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCode.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCode.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
java.io.Serializable
;
import
java.time.LocalDateTime
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeBeanConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeBeanConfig.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
com.jty.
nrsc
.infrastructure.code.image.ImageCodeGenerator
;
import
com.jty.
nrsc
.infrastructure.code.sms.DefaultSmsCodeSender
;
import
com.jty.
nrsc
.infrastructure.code.sms.SmsCodeSender
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityProperties
;
import
com.jty.
wsxt
.infrastructure.code.image.ImageCodeGenerator
;
import
com.jty.
wsxt
.infrastructure.code.sms.DefaultSmsCodeSender
;
import
com.jty.
wsxt
.infrastructure.code.sms.SmsCodeSender
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityProperties
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.annotation.Bean
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeController.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeController.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityConstants
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityConstants
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeException.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeException.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
org.springframework.security.core.AuthenticationException
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeFilter.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeFilter.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityProperties
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityProperties
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.InitializingBean
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -71,7 +71,7 @@ public class ValidateCodeFilter extends OncePerRequestFilter implements Initiali
/**
* 讲系统中配置的需要校验验证码的URL根据校验的类型放入map
*
*
* @param urlString
* @param type
*/
...
...
@@ -109,7 +109,7 @@ public class ValidateCodeFilter extends OncePerRequestFilter implements Initiali
/**
* 获取校验码的类型,如果当前请求不需要校验,则返回null
*
*
* @param request
* @return
*/
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeGenerator.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeGenerator.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
org.springframework.web.context.request.ServletWebRequest
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeProcessor.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeProcessor.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
org.springframework.web.context.request.ServletWebRequest
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeProcessorHolder.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeProcessorHolder.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
org.springframework.web.context.request.ServletWebRequest
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeSecurityConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeSecurityConfig.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/ValidateCodeType.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/ValidateCodeType.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityConstants
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityConstants
;
/**
* 验证码类型枚举
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/image/ImageCode.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/image/ImageCode.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
image
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
image
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCode
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCode
;
import
lombok.Data
;
import
java.awt.image.BufferedImage
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/image/ImageCodeGenerator.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/image/ImageCodeGenerator.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
image
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
image
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeGenerator
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityProperties
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeGenerator
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityProperties
;
import
lombok.Data
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.ServletRequestUtils
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/image/ImageCodeProcessor.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/image/ImageCodeProcessor.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
image
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
image
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.jty.
nrsc
.infrastructure.code.impl.AbstractValidateCodeProcessor
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.code.impl.AbstractValidateCodeProcessor
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.context.request.ServletWebRequest
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/impl/AbstractValidateCodeProcessor.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/impl/AbstractValidateCodeProcessor.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
impl
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
impl
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.jty.
nrsc
.infrastructure.code.*
;
import
com.jty.
wsxt
.infrastructure.code.*
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.ServletRequestBindingException
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/impl/RedisValidateCodeRepository.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/impl/RedisValidateCodeRepository.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
impl
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
impl
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCode
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeException
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeRepository
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeType
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCode
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeException
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeRepository
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeType
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.RedisTemplate
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/sms/DefaultSmsCodeSender.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/sms/DefaultSmsCodeSender.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
sms
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
sms
;
import
com.aliyuncs.exceptions.ClientException
;
import
com.jty.
nrsc
.infrastructure.support.BusinessException
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.infrastructure.support.BusinessException
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
lombok.extern.slf4j.Slf4j
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/sms/SmsCodeGenerator.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/sms/SmsCodeGenerator.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
sms
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
sms
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCode
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeGenerator
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityProperties
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCode
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeGenerator
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityProperties
;
import
org.apache.commons.lang.RandomStringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/sms/SmsCodeProcessor.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/sms/SmsCodeProcessor.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
sms
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
sms
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCode
;
import
com.jty.
nrsc
.infrastructure.code.impl.AbstractValidateCodeProcessor
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityConstants
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCode
;
import
com.jty.
wsxt
.infrastructure.code.impl.AbstractValidateCodeProcessor
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityConstants
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.bind.ServletRequestUtils
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/sms/SmsCodeSender.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/sms/SmsCodeSender.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
sms
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
sms
;
/**
* 短信验证码生成器
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/code/sms/SmsUtil.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/code/sms/SmsUtil.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
code
.
sms
;
package
com
.
jty
.
wsxt
.
infrastructure
.
code
.
sms
;
import
com.aliyuncs.DefaultAcsClient
;
import
com.aliyuncs.IAcsClient
;
...
...
@@ -9,7 +9,7 @@ import com.aliyuncs.dysmsapi.model.v20170525.SendSmsResponse;
import
com.aliyuncs.exceptions.ClientException
;
import
com.aliyuncs.profile.DefaultProfile
;
import
com.aliyuncs.profile.IClientProfile
;
import
com.jty.
nrsc
.infrastructure.constants.AlibabaConstants
;
import
com.jty.
wsxt
.infrastructure.constants.AlibabaConstants
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/config/AuthorizationServerConfigurer.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/config/AuthorizationServerConfigurer.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
config
;
package
com
.
jty
.
wsxt
.
infrastructure
.
config
;
import
com.jty.
nrsc
.infrastructure.security.MyClientDetailService
;
import
com.jty.
nrsc
.infrastructure.security.MyUserDetailService
;
import
com.jty.
wsxt
.infrastructure.security.MyClientDetailService
;
import
com.jty.
wsxt
.infrastructure.security.MyUserDetailService
;
import
org.springframework.context.annotation.Configuration
;
import
org.springframework.security.authentication.AuthenticationManager
;
import
org.springframework.security.oauth2.config.annotation.configurers.ClientDetailsServiceConfigurer
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/config/FeignConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/config/FeignConfig.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
config
;
package
com
.
jty
.
wsxt
.
infrastructure
.
config
;
import
feign.RequestInterceptor
;
import
feign.RequestTemplate
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/config/ResourceConfigurer.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/config/ResourceConfigurer.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
config
;
package
com
.
jty
.
wsxt
.
infrastructure
.
config
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeSecurityConfig
;
import
com.jty.
nrsc
.infrastructure.security.CustomAuthenticationFilter
;
import
com.jty.
nrsc
.infrastructure.security.CustomTokenFilter
;
import
com.jty.
nrsc
.infrastructure.security.embed.EmbedAuthenticationConfig
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeSecurityConfig
;
import
com.jty.
wsxt
.infrastructure.security.CustomAuthenticationFilter
;
import
com.jty.
wsxt
.infrastructure.security.CustomTokenFilter
;
import
com.jty.
wsxt
.infrastructure.security.embed.EmbedAuthenticationConfig
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/config/SecurityCoreConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/config/SecurityCoreConfig.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
config
;
package
com
.
jty
.
wsxt
.
infrastructure
.
config
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityProperties
;
import
com.jty.
nrsc
.infrastructure.security.MyRedisTokenStore
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityProperties
;
import
com.jty.
wsxt
.infrastructure.security.MyRedisTokenStore
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.context.annotation.Bean
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/config/WebSecurityConfigurer.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/config/WebSecurityConfigurer.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
config
;
package
com
.
jty
.
wsxt
.
infrastructure
.
config
;
import
com.jty.
nrsc
.infrastructure.security.embed.EmbedAuthenticationProvider
;
import
com.jty.
wsxt
.infrastructure.security.embed.EmbedAuthenticationProvider
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Configuration
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/AlibabaConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/AlibabaConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
* 阿里产品常量
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/CommonConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/CommonConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
* 通常常量
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/ElasticsearchConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/ElasticsearchConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
* Elasticsearch常量表
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/InterfaceConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/InterfaceConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
* TODO
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/PaperConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/PaperConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
*
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/RabbitMqQueueConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/RabbitMqQueueConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
* 资源文档类型
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/SchoolConfigConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/SchoolConfigConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/constants/TableConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/constants/TableConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
constants
;
package
com
.
jty
.
wsxt
.
infrastructure
.
constants
;
/**
* 表名静态常量
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/package-info.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/package-info.java
View file @
fd3da40a
...
...
@@ -7,4 +7,4 @@
* 为用户界面层 提供组件配置
* 基础设施层还能够通过架构框架来支持四个层次间的交互模式。
*/
package
com
.
jty
.
nrsc
.
infrastructure
;
\ No newline at end of file
package
com
.
jty
.
wsxt
.
infrastructure
;
\ No newline at end of file
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/properties/ImageCodeProperties.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/properties/ImageCodeProperties.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
properties
;
package
com
.
jty
.
wsxt
.
infrastructure
.
properties
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/properties/SecurityConstants.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/properties/SecurityConstants.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
properties
;
package
com
.
jty
.
wsxt
.
infrastructure
.
properties
;
public
interface
SecurityConstants
{
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/properties/SecurityProperties.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/properties/SecurityProperties.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
properties
;
package
com
.
jty
.
wsxt
.
infrastructure
.
properties
;
import
lombok.Data
;
import
org.springframework.boot.context.properties.ConfigurationProperties
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/properties/SmsCodeProperties.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/properties/SmsCodeProperties.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
properties
;
package
com
.
jty
.
wsxt
.
infrastructure
.
properties
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/properties/ValidateCodeProperties.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/properties/ValidateCodeProperties.java
View file @
fd3da40a
/**
*
*/
package
com
.
jty
.
nrsc
.
infrastructure
.
properties
;
package
com
.
jty
.
wsxt
.
infrastructure
.
properties
;
import
lombok.Data
;
...
...
@@ -13,7 +13,7 @@ import lombok.Data;
public
class
ValidateCodeProperties
{
private
ImageCodeProperties
image
=
new
ImageCodeProperties
();
private
SmsCodeProperties
sms
=
new
SmsCodeProperties
();
}
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/AuthenticationBean.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/AuthenticationBean.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
lombok.Getter
;
import
lombok.Setter
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/CustomAuthenticationFilter.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/CustomAuthenticationFilter.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
org.apache.commons.lang.StringUtils
;
...
...
@@ -31,7 +31,7 @@ public class CustomAuthenticationFilter extends UsernamePasswordAuthenticationFi
ObjectMapper
mapper
=
new
ObjectMapper
();
UsernamePasswordAuthenticationToken
authRequest
=
null
;
try
(
InputStream
is
=
request
.
getInputStream
()){
AuthenticationBean
authenticationBean
=
mapper
.
readValue
(
is
,
AuthenticationBean
.
class
);
AuthenticationBean
authenticationBean
=
mapper
.
readValue
(
is
,
AuthenticationBean
.
class
);
authRequest
=
new
UsernamePasswordAuthenticationToken
(
authenticationBean
.
getUsername
(),
authenticationBean
.
getPassword
());
}
catch
(
IOException
e
)
{
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/CustomTokenFilter.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/CustomTokenFilter.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.fasterxml.jackson.databind.PropertyNamingStrategy
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.util.HeadUtils
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.util.HeadUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/MyClientDetailService.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/MyClientDetailService.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
com.jty.
nrsc
.domain.model.auth.client.AuthClient
;
import
com.jty.
nrsc
.domain.model.auth.client.ClientRepository
;
import
com.jty.
nrsc
.infrastructure.support.BusinessException
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.domain.model.auth.client.AuthClient
;
import
com.jty.
wsxt
.domain.model.auth.client.ClientRepository
;
import
com.jty.
wsxt
.infrastructure.support.BusinessException
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.oauth2.provider.ClientDetails
;
import
org.springframework.security.oauth2.provider.ClientDetailsService
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/MyRedisTokenStore.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/MyRedisTokenStore.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
org.springframework.data.redis.connection.RedisConnection
;
import
org.springframework.data.redis.connection.RedisConnectionFactory
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/MyUserDetail.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/MyUserDetail.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
lombok.Data
;
import
org.springframework.security.core.GrantedAuthority
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/MyUserDetailService.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/MyUserDetailService.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
com.jty.
nrsc
.application.service.AuthAuthorityService
;
import
com.jty.
nrsc
.domain.model.auth.user.AuthUser
;
import
com.jty.
nrsc
.domain.model.auth.user.UserRepository
;
import
com.jty.
nrsc
.infrastructure.support.BusinessException
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.application.service.AuthAuthorityService
;
import
com.jty.
wsxt
.domain.model.auth.user.AuthUser
;
import
com.jty.
wsxt
.domain.model.auth.user.UserRepository
;
import
com.jty.
wsxt
.infrastructure.support.BusinessException
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.core.userdetails.UserDetails
;
import
org.springframework.security.core.userdetails.UserDetailsService
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/RefreshTokenBean.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/RefreshTokenBean.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/SecurityController.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/SecurityController.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
nrsc
.interfaces.dto.NrscTeacherDto
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.interfaces.dto.NrscTeacherDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.boot.autoconfigure.security.SecurityProperties
;
import
org.springframework.http.HttpStatus
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/authentication/AuthenticationBeanConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/authentication/AuthenticationBeanConfig.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
authentication
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
authentication
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean
;
import
org.springframework.context.annotation.Bean
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/authentication/DefaultUserDetailsService.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/authentication/DefaultUserDetailsService.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
authentication
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
authentication
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/authentication/FormAuthenticationConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/authentication/FormAuthenticationConfig.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
authentication
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
authentication
;
import
com.jty.
nrsc
.infrastructure.properties.SecurityConstants
;
import
com.jty.
wsxt
.infrastructure.properties.SecurityConstants
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.config.annotation.web.builders.HttpSecurity
;
import
org.springframework.security.web.authentication.AuthenticationFailureHandler
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/authentication/JtyAuthenticationFailureHandler.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/authentication/JtyAuthenticationFailureHandler.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
authentication
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
authentication
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.jty.
nrsc
.infrastructure.code.ValidateCodeException
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.infrastructure.code.ValidateCodeException
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
org.apache.commons.lang.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/authentication/JtyAuthenticationSuccessHandler.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/authentication/JtyAuthenticationSuccessHandler.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
authentication
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
authentication
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.util.HeadUtils
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.util.HeadUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/embed/EmbedAuthenticationConfig.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/embed/EmbedAuthenticationConfig.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
embed
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
embed
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.security.config.annotation.SecurityConfigurerAdapter
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/embed/EmbedAuthenticationFilter.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/embed/EmbedAuthenticationFilter.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
embed
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
embed
;
import
com.fasterxml.jackson.databind.ObjectMapper
;
import
com.jty.
nrsc
.infrastructure.code.BodyReaderHttpServletRequestWrapper
;
import
com.jty.
nrsc
.infrastructure.security.AuthenticationBean
;
import
com.jty.
nrsc
.infrastructure.support.BusinessException
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
nrsc
.infrastructure.util.HeadUtils
;
import
com.jty.
wsxt
.infrastructure.code.BodyReaderHttpServletRequestWrapper
;
import
com.jty.
wsxt
.infrastructure.security.AuthenticationBean
;
import
com.jty.
wsxt
.infrastructure.support.BusinessException
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.infrastructure.util.HeadUtils
;
import
org.apache.commons.collections.MapUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.InitializingBean
;
...
...
@@ -77,7 +77,7 @@ public class EmbedAuthenticationFilter extends OncePerRequestFilter implements I
||
StringUtils
.
equalsIgnoreCase
(
MediaType
.
APPLICATION_JSON_VALUE
,
request
.
getContentType
())){
try
(
InputStream
is
=
request
.
getInputStream
()){
ObjectMapper
mapper
=
new
ObjectMapper
();
AuthenticationBean
authenticationBean
=
mapper
.
readValue
(
is
,
AuthenticationBean
.
class
);
AuthenticationBean
authenticationBean
=
mapper
.
readValue
(
is
,
AuthenticationBean
.
class
);
userName
=
authenticationBean
.
getUsername
();
}
}
else
{
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/embed/EmbedAuthenticationProvider.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/embed/EmbedAuthenticationProvider.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
embed
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
embed
;
import
com.jty.
nrsc
.infrastructure.support.BusinessException
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.infrastructure.support.BusinessException
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.security.authentication.AuthenticationProvider
;
import
org.springframework.security.core.Authentication
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/security/embed/EmbedAuthenticationToken.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/security/embed/EmbedAuthenticationToken.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
security
.
embed
;
package
com
.
jty
.
wsxt
.
infrastructure
.
security
.
embed
;
import
org.springframework.security.authentication.AbstractAuthenticationToken
;
import
org.springframework.security.core.GrantedAuthority
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/support/BusinessException.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/support/BusinessException.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
support
;
package
com
.
jty
.
wsxt
.
infrastructure
.
support
;
import
lombok.Data
;
...
...
@@ -23,7 +23,7 @@ public class BusinessException extends RuntimeException{
* @param code
* @param message
*/
public
BusinessException
(
ResultCode
code
,
String
...
message
){
public
BusinessException
(
ResultCode
code
,
String
...
message
){
String
meg
=
code
.
message
();
code
.
setMessage
(
String
.
format
(
meg
,
message
));
this
.
code
=
code
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/support/GlobalExceptionHandler.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/support/GlobalExceptionHandler.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
support
;
package
com
.
jty
.
wsxt
.
infrastructure
.
support
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
@@ -33,7 +33,7 @@ public class GlobalExceptionHandler {
* @param ex
* @return //
*/
@ExceptionHandler
({
MissingServletRequestParameterException
.
class
,
BusinessException
.
class
})
@ExceptionHandler
({
MissingServletRequestParameterException
.
class
,
BusinessException
.
class
})
@ResponseStatus
(
HttpStatus
.
INTERNAL_SERVER_ERROR
)
public
Result
handleRuntimeException
(
BusinessException
ex
)
{
//logger.info("catch BusinessException:"+ ex.toString());
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/support/MyPasswordEncoder.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/support/MyPasswordEncoder.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
support
;
package
com
.
jty
.
wsxt
.
infrastructure
.
support
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/support/Result.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/support/Result.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
support
;
package
com
.
jty
.
wsxt
.
infrastructure
.
support
;
import
com.fasterxml.jackson.annotation.JsonView
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/support/ResultCode.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/support/ResultCode.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
support
;
package
com
.
jty
.
wsxt
.
infrastructure
.
support
;
import
lombok.Getter
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/util/HeadUtils.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/util/HeadUtils.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
util
;
package
com
.
jty
.
wsxt
.
infrastructure
.
util
;
import
org.springframework.security.authentication.BadCredentialsException
;
import
org.springframework.security.crypto.codec.Base64
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/util/PoCastUtils.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/util/PoCastUtils.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
util
;
package
com
.
jty
.
wsxt
.
infrastructure
.
util
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/infrastructure/util/TransferCharactor.java
→
auth-server/src/main/java/com
/jty/wsxt
/infrastructure/util/TransferCharactor.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
infrastructure
.
util
;
package
com
.
jty
.
wsxt
.
infrastructure
.
util
;
/**
* TODO
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/Assembler.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/Assembler.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
;
package
com
.
jty
.
wsxt
.
interfaces
;
import
com.jty.
nrsc
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
nrsc
.domain.model.auth.role.AuthRole
;
import
com.jty.
nrsc
.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.
nrsc
.interfaces.dto.AuthAuthorityDto
;
import
com.jty.
nrsc
.interfaces.dto.AuthRoleDto
;
import
com.jty.
nrsc
.interfaces.dto.NrscRoleDto
;
import
com.jty.
nrsc
.interfaces.dto.NrscTeacherDto
;
import
com.jty.
wsxt
.domain.model.auth.authority.AuthAuthority
;
import
com.jty.
wsxt
.domain.model.auth.role.AuthRole
;
import
com.jty.
wsxt
.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.
wsxt
.interfaces.dto.AuthAuthorityDto
;
import
com.jty.
wsxt
.interfaces.dto.AuthRoleDto
;
import
com.jty.
wsxt
.interfaces.dto.NrscRoleDto
;
import
com.jty.
wsxt
.interfaces.dto.NrscTeacherDto
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.modelmapper.ModelMapper
;
import
org.modelmapper.TypeToken
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/controller/AuthRoleController.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/controller/AuthRoleController.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
controller
;
package
com
.
jty
.
wsxt
.
interfaces
.
controller
;
import
com.jty.nrsc.application.ApplicationRegistry
;
import
com.jty.nrsc.domain.model.auth.role.AuthRole
;
import
com.jty.nrsc.infrastructure.support.Result
;
import
com.jty.nrsc.interfaces.Assembler
;
import
com.jty.nrsc.interfaces.dto.AuthRoleDto
;
import
com.jty.nrsc.interfaces.dto.NrscTeacherDto
;
import
com.jty.wsxt.application.ApplicationRegistry
;
import
com.jty.wsxt.domain.model.auth.role.AuthRole
;
import
com.jty.wsxt.infrastructure.support.Result
;
import
com.jty.wsxt.interfaces.Assembler
;
import
com.jty.wsxt.interfaces.dto.AuthRoleDto
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.security.access.prepost.PreAuthorize
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/controller/AuthUserController.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/controller/AuthUserController.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
controller
;
package
com
.
jty
.
wsxt
.
interfaces
.
controller
;
import
com.jty.
nrsc
.application.ApplicationRegistry
;
import
com.jty.
nrsc
.domain.model.auth.history.AuthUserHistory
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.util.PoCastUtils
;
import
com.jty.
nrsc
.interfaces.dto.AuthUserHistoryDto
;
import
com.jty.
wsxt
.application.ApplicationRegistry
;
import
com.jty.
wsxt
.domain.model.auth.history.AuthUserHistory
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.util.PoCastUtils
;
import
com.jty.
wsxt
.interfaces.dto.AuthUserHistoryDto
;
import
org.springframework.data.domain.Page
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
@@ -20,9 +19,9 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public
class
AuthUserController
{
@GetMapping
(
"/history/user/{userId}"
)
public
Result
getHistoryByManagerId
(
AuthUserHistoryDto
authUserHistoryDto
,
@PathVariable
Integer
userId
){
public
Result
getHistoryByManagerId
(
AuthUserHistoryDto
authUserHistoryDto
,
@PathVariable
Integer
userId
){
authUserHistoryDto
.
setManagerId
(
userId
);
Page
<
AuthUserHistory
>
userHistoryPage
=
ApplicationRegistry
.
authUserServer
().
findHistoryByManagerId
(
authUserHistoryDto
);
return
Result
.
success
(
PoCastUtils
.
poPageCastToDto
(
userHistoryPage
,
AuthUserHistoryDto
.
class
));
return
Result
.
success
(
PoCastUtils
.
poPageCastToDto
(
userHistoryPage
,
AuthUserHistoryDto
.
class
));
}
}
auth-server/src/main/java/com
.jty.nrsc
/interfaces/controller/NrscAuthorityController.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/controller/NrscAuthorityController.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
controller
;
package
com
.
jty
.
wsxt
.
interfaces
.
controller
;
import
com.jty.
nrsc
.application.ApplicationRegistry
;
import
com.jty.
nrsc
.domain.model.auth.authority.nrsc.NrscAuthority
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.interfaces.Assembler
;
import
com.jty.
nrsc
.interfaces.dto.AuthAuthorityDto
;
import
com.jty.
wsxt
.application.ApplicationRegistry
;
import
com.jty.
wsxt
.domain.model.auth.authority.nrsc.NrscAuthority
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.interfaces.Assembler
;
import
com.jty.
wsxt
.interfaces.dto.AuthAuthorityDto
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RestController
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/controller/NrscTeacherController.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/controller/NrscTeacherController.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
controller
;
package
com
.
jty
.
wsxt
.
interfaces
.
controller
;
import
com.jty.
nrsc
.application.ApplicationRegistry
;
import
com.jty.
nrsc
.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.
nrsc
.infrastructure.security.MyUserDetail
;
import
com.jty.
nrsc
.infrastructure.support.BusinessException
;
import
com.jty.
nrsc
.infrastructure.support.Result
;
import
com.jty.
nrsc
.infrastructure.support.ResultCode
;
import
com.jty.
nrsc
.interfaces.Assembler
;
import
com.jty.
nrsc
.interfaces.dto.ChangePasswordDto
;
import
com.jty.
nrsc
.interfaces.dto.NrscTeacherDto
;
import
com.jty.
nrsc
.interfaces.dto.NrscTeacherSearchDto
;
import
com.jty.
nrsc
.interfaces.dto.OperatorDto
;
import
com.jty.
wsxt
.application.ApplicationRegistry
;
import
com.jty.
wsxt
.domain.model.auth.user.nrsc.NrscTeacher
;
import
com.jty.
wsxt
.infrastructure.security.MyUserDetail
;
import
com.jty.
wsxt
.infrastructure.support.BusinessException
;
import
com.jty.
wsxt
.infrastructure.support.Result
;
import
com.jty.
wsxt
.infrastructure.support.ResultCode
;
import
com.jty.
wsxt
.interfaces.Assembler
;
import
com.jty.
wsxt
.interfaces.dto.ChangePasswordDto
;
import
com.jty.
wsxt
.interfaces.dto.NrscTeacherDto
;
import
com.jty.
wsxt
.interfaces.dto.NrscTeacherSearchDto
;
import
com.jty.
wsxt
.interfaces.dto.OperatorDto
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageImpl
;
import
org.springframework.security.access.prepost.PreAuthorize
;
import
org.springframework.security.core.annotation.AuthenticationPrincipal
;
import
org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder
;
import
org.springframework.security.crypto.password.PasswordEncoder
;
import
org.springframework.security.oauth2.provider.token.TokenStore
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
...
...
@@ -48,7 +46,7 @@ public class NrscTeacherController {
@PutMapping
(
"/user/{userId}"
)
@PreAuthorize
(
"hasAuthority('NRSC_MANAGE_USER')"
)
public
Result
updateTeacher
(
@PathVariable
Integer
userId
,
@RequestBody
NrscTeacherDto
nrscTeacherDto
){
public
Result
updateTeacher
(
@PathVariable
Integer
userId
,
@RequestBody
NrscTeacherDto
nrscTeacherDto
){
nrscTeacherDto
.
setId
(
userId
);
ApplicationRegistry
.
nrscTeacherService
().
updateNrscTeacher
(
nrscTeacherDto
);
return
Result
.
success
();
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/AuthAuthorityDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/AuthAuthorityDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/AuthRoleDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/AuthRoleDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/AuthUserHistoryDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/AuthUserHistoryDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/ChangePasswordDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/ChangePasswordDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/NrscRoleDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/NrscRoleDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/NrscTeacherDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/NrscTeacherDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/NrscTeacherSearchDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/NrscTeacherSearchDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.Length
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/OperatorDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/OperatorDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
...
...
auth-server/src/main/java/com
.jty.nrsc
/interfaces/dto/PageableDto.java
→
auth-server/src/main/java/com
/jty/wsxt
/interfaces/dto/PageableDto.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
.
interfaces
.
dto
;
package
com
.
jty
.
wsxt
.
interfaces
.
dto
;
import
lombok.Data
;
import
org.springframework.data.domain.PageRequest
;
...
...
eruka-server/src/main/java/com/jty/
nrsc
/EurekaServerApplication.java
→
eruka-server/src/main/java/com/jty/
wsxt
/EurekaServerApplication.java
View file @
fd3da40a
package
com
.
jty
.
nrsc
;
package
com
.
jty
.
wsxt
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
...
...
gateway-server/src/main/java/com/jty/wsxt/WebGatewayApplication.java
0 → 100644
View file @
fd3da40a
package
com
.
jty
.
wsxt
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.netflix.eureka.EnableEurekaClient
;
/**
* web站点网关服务器
*
* @author Jason
* @since 2018/12/20 10:42
*/
@SpringBootApplication
@EnableEurekaClient
public
class
WebGatewayApplication
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
WebGatewayApplication
.
class
,
args
);
}
}
gateway-server/src/main/resources/application.yml
0 → 100644
View file @
fd3da40a
server
:
port
:
9007
servlet
:
context-path
:
/v1/nrsc
eureka
:
client
:
serviceUrl
:
defaultZone
:
http://${EUREKA_HOST:localhost}:${EUREKA_PORT:8762}/eureka/
instance
:
prefer-ip-address
:
true
spring
:
application
:
name
:
web-gateway-v1
cloud
:
gateway
:
routes
:
-
id
:
auth-server
uri
:
lb://auth-server
predicates
:
-
Path=${server.servlet.context-path}/manage/**
filters
:
-
StripPrefix= 2
-
id
:
service-question
uri
:
lb://service-question
predicates
:
-
Path=${server.servlet.context-path}/service-question/**
filters
:
-
StripPrefix= 2
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment