Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-mvp
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fangxinjiang
yifu-mvp
Commits
6f43d9c5
Commit
6f43d9c5
authored
May 26, 2022
by
fangxinjiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
0e381407
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
33 additions
and
60 deletions
+33
-60
YifuAuthApplication.java
...com/yifu.cloud.plus.v1/yifu/auth/YifuAuthApplication.java
+1
-3
LogAutoConfiguration.java
...u.cloud.plus.v1/yifu/common/log/LogAutoConfiguration.java
+2
-4
SysLogListener.java
...u.cloud.plus.v1/yifu/common/log/event/SysLogListener.java
+2
-4
YifuAppUserDetailsServiceImpl.java
...ommon/security/service/YifuAppUserDetailsServiceImpl.java
+2
-3
YifuUserDetailsServiceImpl.java
...u/common/security/service/YifuUserDetailsServiceImpl.java
+1
-4
pom.xml
yifu-upms/yifu-upms-api/pom.xml
+2
-2
RemoteDeptService.java
...cloud.plus.v1/yifu/admin/api/feign/RemoteDeptService.java
+1
-3
RemoteDictService.java
...cloud.plus.v1/yifu/admin/api/feign/RemoteDictService.java
+1
-3
RemoteLogService.java
....cloud.plus.v1/yifu/admin/api/feign/RemoteLogService.java
+1
-3
RemoteParamService.java
...loud.plus.v1/yifu/admin/api/feign/RemoteParamService.java
+1
-3
RemoteTokenService.java
...loud.plus.v1/yifu/admin/api/feign/RemoteTokenService.java
+1
-3
RemoteUserService.java
...cloud.plus.v1/yifu/admin/api/feign/RemoteUserService.java
+1
-3
spring.factories.txt
...upms-api/src/main/resources/META-INF/spring.factories.txt
+0
-0
pom.xml
yifu-upms/yifu-upms-biz/pom.xml
+4
-4
YifuAdminApplication.java
...m/yifu.cloud.plus.v1/yifu/admin/YifuAdminApplication.java
+2
-5
TokenController.java
....cloud.plus.v1/yifu/admin/controller/TokenController.java
+3
-5
application.yml
yifu-upms/yifu-upms-biz/src/main/resources/application.yml
+8
-8
No files found.
yifu-auth/src/main/java/com/yifu.cloud.plus.v1/yifu/auth/YifuAuthApplication.java
View file @
6f43d9c5
...
@@ -16,16 +16,14 @@
...
@@ -16,16 +16,14 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
auth
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
auth
;
import
com.yifu.cloud.plus.v1.yifu.common.feign.annotation.EnableYifuFeignClients
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
/**
/**
* @author lengleng
* @author lengleng
* @date 2018年06月21日 认证授权中心
* @date 2018年06月21日 认证授权中心
*/
*/
@EnableYifuFeignClients
//
@EnableYifuFeignClients
@SpringBootApplication
@SpringBootApplication
public
class
YifuAuthApplication
{
public
class
YifuAuthApplication
{
...
...
yifu-common/yifu-common-log/src/main/java/com/yifu.cloud.plus.v1/yifu/common/log/LogAutoConfiguration.java
View file @
6f43d9c5
...
@@ -16,9 +16,7 @@
...
@@ -16,9 +16,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
log
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
log
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.feign.RemoteLogService
;
import
com.yifu.cloud.plus.v1.yifu.common.log.aspect.SysLogAspect
;
import
com.yifu.cloud.plus.v1.yifu.common.log.aspect.SysLogAspect
;
import
com.yifu.cloud.plus.v1.yifu.common.log.event.SysLogListener
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
import
org.springframework.boot.autoconfigure.condition.ConditionalOnWebApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.context.annotation.Bean
;
...
@@ -35,10 +33,10 @@ import org.springframework.scheduling.annotation.EnableAsync;
...
@@ -35,10 +33,10 @@ import org.springframework.scheduling.annotation.EnableAsync;
@Configuration
(
proxyBeanMethods
=
false
)
@Configuration
(
proxyBeanMethods
=
false
)
public
class
LogAutoConfiguration
{
public
class
LogAutoConfiguration
{
@Bean
/*
@Bean
public SysLogListener sysLogListener(RemoteLogService remoteLogService) {
public SysLogListener sysLogListener(RemoteLogService remoteLogService) {
return new SysLogListener(remoteLogService);
return new SysLogListener(remoteLogService);
}
}
*/
@Bean
@Bean
public
SysLogAspect
sysLogAspect
()
{
public
SysLogAspect
sysLogAspect
()
{
...
...
yifu-common/yifu-common-log/src/main/java/com/yifu.cloud.plus.v1/yifu/common/log/event/SysLogListener.java
View file @
6f43d9c5
...
@@ -17,8 +17,6 @@
...
@@ -17,8 +17,6 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
log
.
event
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
log
.
event
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.feign.RemoteLogService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.context.event.EventListener
;
import
org.springframework.context.event.EventListener
;
...
@@ -32,14 +30,14 @@ import org.springframework.scheduling.annotation.Async;
...
@@ -32,14 +30,14 @@ import org.springframework.scheduling.annotation.Async;
@RequiredArgsConstructor
@RequiredArgsConstructor
public
class
SysLogListener
{
public
class
SysLogListener
{
private
final
RemoteLogService
remoteLogService
;
//
private final RemoteLogService remoteLogService;
@Async
@Async
@Order
@Order
@EventListener
(
SysLogEvent
.
class
)
@EventListener
(
SysLogEvent
.
class
)
public
void
saveSysLog
(
SysLogEvent
event
)
{
public
void
saveSysLog
(
SysLogEvent
event
)
{
SysLog
sysLog
=
(
SysLog
)
event
.
getSource
();
SysLog
sysLog
=
(
SysLog
)
event
.
getSource
();
remoteLogService
.
saveLog
(
sysLog
,
SecurityConstants
.
FROM_IN
);
//
remoteLogService.saveLog(sysLog, SecurityConstants.FROM_IN);
}
}
}
}
yifu-common/yifu-common-security/src/main/java/com/yifu.cloud.plus.v1/yifu/common/security/service/YifuAppUserDetailsServiceImpl.java
View file @
6f43d9c5
...
@@ -17,7 +17,6 @@
...
@@ -17,7 +17,6 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
security
.
service
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
security
.
service
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.feign.RemoteUserService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
...
@@ -37,7 +36,7 @@ import org.springframework.security.core.userdetails.UserDetails;
...
@@ -37,7 +36,7 @@ import org.springframework.security.core.userdetails.UserDetails;
@RequiredArgsConstructor
@RequiredArgsConstructor
public
class
YifuAppUserDetailsServiceImpl
implements
YifuUserDetailsService
{
public
class
YifuAppUserDetailsServiceImpl
implements
YifuUserDetailsService
{
private
final
RemoteUserService
remoteUserService
;
//
private final RemoteUserService remoteUserService;
private
final
CacheManager
cacheManager
;
private
final
CacheManager
cacheManager
;
...
@@ -54,7 +53,7 @@ public class YifuAppUserDetailsServiceImpl implements YifuUserDetailsService {
...
@@ -54,7 +53,7 @@ public class YifuAppUserDetailsServiceImpl implements YifuUserDetailsService {
return
(
YifuUser
)
cache
.
get
(
phone
).
get
();
return
(
YifuUser
)
cache
.
get
(
phone
).
get
();
}
}
R
<
UserInfo
>
result
=
remoteUserService
.
infoByMobile
(
phone
,
SecurityConstants
.
FROM_IN
);
R
<
UserInfo
>
result
=
null
;
//
remoteUserService.infoByMobile(phone, SecurityConstants.FROM_IN);
UserDetails
userDetails
=
getUserDetails
(
result
);
UserDetails
userDetails
=
getUserDetails
(
result
);
if
(
cache
!=
null
)
{
if
(
cache
!=
null
)
{
...
...
yifu-common/yifu-common-security/src/main/java/com/yifu.cloud.plus.v1/yifu/common/security/service/YifuUserDetailsServiceImpl.java
View file @
6f43d9c5
...
@@ -17,16 +17,13 @@
...
@@ -17,16 +17,13 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
security
.
service
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
common
.
security
.
service
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.feign.RemoteUserService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.CacheConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.config.DaprUpmsProperties
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
com.yifu.cloud.plus.v1.yifu.common.dapr.util.HttpDaprUtil
;
import
lombok.RequiredArgsConstructor
;
import
lombok.RequiredArgsConstructor
;
import
lombok.SneakyThrows
;
import
lombok.SneakyThrows
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.boot.context.properties.EnableConfigurationProperties
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.Cache
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.cache.CacheManager
;
...
@@ -44,7 +41,7 @@ import org.springframework.security.core.userdetails.UserDetails;
...
@@ -44,7 +41,7 @@ import org.springframework.security.core.userdetails.UserDetails;
@RequiredArgsConstructor
@RequiredArgsConstructor
public
class
YifuUserDetailsServiceImpl
implements
YifuUserDetailsService
{
public
class
YifuUserDetailsServiceImpl
implements
YifuUserDetailsService
{
private
final
RemoteUserService
remoteUserService
;
//
private final RemoteUserService remoteUserService;
private
final
CacheManager
cacheManager
;
private
final
CacheManager
cacheManager
;
...
...
yifu-upms/yifu-upms-api/pom.xml
View file @
6f43d9c5
...
@@ -42,11 +42,11 @@
...
@@ -42,11 +42,11 @@
<artifactId>
swagger-annotations
</artifactId>
<artifactId>
swagger-annotations
</artifactId>
</dependency>
</dependency>
<!--feign 注解依赖-->
<!--feign 注解依赖-->
<dependency>
<
!--<
dependency>
<groupId>org.springframework.cloud</groupId>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<artifactId>spring-cloud-openfeign-core</artifactId>
<optional>true</optional>
<optional>true</optional>
</dependency>
</dependency>
-->
<!--mybatis 依赖-->
<!--mybatis 依赖-->
<dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/feign/RemoteDeptService.java
View file @
6f43d9c5
...
@@ -17,9 +17,7 @@
...
@@ -17,9 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ServiceNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestHeader
;
...
@@ -29,7 +27,7 @@ import java.util.List;
...
@@ -29,7 +27,7 @@ import java.util.List;
/**
/**
* @author hccake
* @author hccake
*/
*/
@FeignClient
(
contextId
=
"remoteDeptService"
,
value
=
ServiceNameConstants
.
UMPS_SERVICE
)
//
@FeignClient(contextId = "remoteDeptService", value = ServiceNameConstants.UMPS_SERVICE)
public
interface
RemoteDeptService
{
public
interface
RemoteDeptService
{
/**
/**
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/feign/RemoteDictService.java
View file @
6f43d9c5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysDictItem
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ServiceNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
...
@@ -15,7 +13,7 @@ import java.util.List;
...
@@ -15,7 +13,7 @@ import java.util.List;
* <p>
* <p>
* 查询参数相关
* 查询参数相关
*/
*/
@FeignClient
(
contextId
=
"remoteDictService"
,
value
=
ServiceNameConstants
.
UMPS_SERVICE
)
//
@FeignClient(contextId = "remoteDictService", value = ServiceNameConstants.UMPS_SERVICE)
public
interface
RemoteDictService
{
public
interface
RemoteDictService
{
/**
/**
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/feign/RemoteLogService.java
View file @
6f43d9c5
...
@@ -18,9 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.feign;
...
@@ -18,9 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.feign;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.entity.SysLog
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ServiceNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestHeader
;
...
@@ -29,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
...
@@ -29,7 +27,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
* @author lengleng
* @author lengleng
* @date 2019/2/1
* @date 2019/2/1
*/
*/
@FeignClient
(
contextId
=
"remoteLogService"
,
value
=
ServiceNameConstants
.
UMPS_SERVICE
)
//
@FeignClient(contextId = "remoteLogService", value = ServiceNameConstants.UMPS_SERVICE)
public
interface
RemoteLogService
{
public
interface
RemoteLogService
{
/**
/**
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/feign/RemoteParamService.java
View file @
6f43d9c5
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ServiceNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestHeader
;
...
@@ -14,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
...
@@ -14,7 +12,7 @@ import org.springframework.web.bind.annotation.RequestHeader;
* <p>
* <p>
* 查询参数相关
* 查询参数相关
*/
*/
@FeignClient
(
contextId
=
"remoteParamService"
,
value
=
ServiceNameConstants
.
UMPS_SERVICE
)
//
@FeignClient(contextId = "remoteParamService", value = ServiceNameConstants.UMPS_SERVICE)
public
interface
RemoteParamService
{
public
interface
RemoteParamService
{
/**
/**
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/feign/RemoteTokenService.java
View file @
6f43d9c5
...
@@ -17,9 +17,7 @@
...
@@ -17,9 +17,7 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
api
.
feign
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ServiceNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -28,7 +26,7 @@ import java.util.Map;
...
@@ -28,7 +26,7 @@ import java.util.Map;
* @author lengleng
* @author lengleng
* @date 2019/2/1
* @date 2019/2/1
*/
*/
@FeignClient
(
contextId
=
"remoteTokenService"
,
value
=
ServiceNameConstants
.
AUTH_SERVICE
)
//
@FeignClient(contextId = "remoteTokenService", value = ServiceNameConstants.AUTH_SERVICE)
public
interface
RemoteTokenService
{
public
interface
RemoteTokenService
{
/**
/**
...
...
yifu-upms/yifu-upms-api/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/api/feign/RemoteUserService.java
View file @
6f43d9c5
...
@@ -18,9 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.feign;
...
@@ -18,9 +18,7 @@ package com.yifu.cloud.plus.v1.yifu.admin.api.feign;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.dto.UserInfo
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.ServiceNameConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestHeader
;
import
org.springframework.web.bind.annotation.RequestHeader
;
...
@@ -33,7 +31,7 @@ import java.util.Set;
...
@@ -33,7 +31,7 @@ import java.util.Set;
* @author lengleng
* @author lengleng
* @date 2019/2/1
* @date 2019/2/1
*/
*/
@FeignClient
(
contextId
=
"remoteUserService"
,
value
=
ServiceNameConstants
.
UMPS_SERVICE
)
//
@FeignClient(contextId = "remoteUserService", value = ServiceNameConstants.UMPS_SERVICE)
public
interface
RemoteUserService
{
public
interface
RemoteUserService
{
/**
/**
...
...
yifu-upms/yifu-upms-api/src/main/resources/META-INF/spring.factories
→
yifu-upms/yifu-upms-api/src/main/resources/META-INF/spring.factories
.txt
View file @
6f43d9c5
File moved
yifu-upms/yifu-upms-biz/pom.xml
View file @
6f43d9c5
...
@@ -41,10 +41,10 @@
...
@@ -41,10 +41,10 @@
<artifactId>
oss-spring-boot-starter
</artifactId>
<artifactId>
oss-spring-boot-starter
</artifactId>
</dependency>
</dependency>
<!--feign 调用-->
<!--feign 调用-->
<dependency>
<
!--<
dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-feign</artifactId>
<artifactId>yifu-common-feign</artifactId>
</dependency>
</dependency>
-->
<!--安全模块-->
<!--安全模块-->
<dependency>
<dependency>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
<groupId>
com.yifu.cloud.plus.v1
</groupId>
...
@@ -56,10 +56,10 @@
...
@@ -56,10 +56,10 @@
<artifactId>
yifu-common-log
</artifactId>
<artifactId>
yifu-common-log
</artifactId>
</dependency>
</dependency>
<!--接口文档-->
<!--接口文档-->
<dependency>
<
!--<
dependency>
<groupId>com.yifu.cloud.plus.v1</groupId>
<groupId>com.yifu.cloud.plus.v1</groupId>
<artifactId>yifu-common-swagger</artifactId>
<artifactId>yifu-common-swagger</artifactId>
</dependency>
</dependency>
-->
<!-- orm 模块-->
<!-- orm 模块-->
<dependency>
<dependency>
<groupId>
com.baomidou
</groupId>
<groupId>
com.baomidou
</groupId>
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/YifuAdminApplication.java
View file @
6f43d9c5
...
@@ -16,20 +16,17 @@
...
@@ -16,20 +16,17 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
;
import
com.yifu.cloud.plus.v1.yifu.common.feign.annotation.EnableYifuFeignClients
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer
;
import
com.yifu.cloud.plus.v1.yifu.common.security.annotation.EnableYifuResourceServer
;
import
com.yifu.cloud.plus.v1.yifu.common.swagger.annotation.EnableYifuDoc
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.cloud.client.discovery.EnableDiscoveryClient
;
/**
/**
* @author lengleng
* @author lengleng
* @date 2018年06月21日 用户统一管理系统
* @date 2018年06月21日 用户统一管理系统
*/
*/
@EnableYifuDoc
//
@EnableYifuDoc
@EnableYifuResourceServer
@EnableYifuResourceServer
@EnableYifuFeignClients
//
@EnableYifuFeignClients
@SpringBootApplication
@SpringBootApplication
public
class
YifuAdminApplication
{
public
class
YifuAdminApplication
{
...
...
yifu-upms/yifu-upms-biz/src/main/java/com/yifu.cloud.plus.v1/yifu/admin/controller/TokenController.java
View file @
6f43d9c5
...
@@ -16,8 +16,6 @@
...
@@ -16,8 +16,6 @@
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
controller
;
package
com
.
yifu
.
cloud
.
plus
.
v1
.
yifu
.
admin
.
controller
;
import
com.yifu.cloud.plus.v1.yifu.admin.api.feign.RemoteTokenService
;
import
com.yifu.cloud.plus.v1.yifu.common.core.constant.SecurityConstants
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
com.yifu.cloud.plus.v1.yifu.common.core.util.R
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.security.SecurityRequirement
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
import
io.swagger.v3.oas.annotations.tags.Tag
;
...
@@ -39,7 +37,7 @@ import java.util.Map;
...
@@ -39,7 +37,7 @@ import java.util.Map;
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
@SecurityRequirement
(
name
=
HttpHeaders
.
AUTHORIZATION
)
public
class
TokenController
{
public
class
TokenController
{
private
final
RemoteTokenService
remoteTokenService
;
//
private final RemoteTokenService remoteTokenService;
/**
/**
* 分页token 信息
* 分页token 信息
...
@@ -48,7 +46,7 @@ public class TokenController {
...
@@ -48,7 +46,7 @@ public class TokenController {
*/
*/
@GetMapping
(
"/page"
)
@GetMapping
(
"/page"
)
public
R
token
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
public
R
token
(
@RequestParam
Map
<
String
,
Object
>
params
)
{
return
remoteTokenService
.
getTokenPage
(
params
,
SecurityConstants
.
FROM_IN
);
return
null
;
//
remoteTokenService.getTokenPage(params, SecurityConstants.FROM_IN);
}
}
/**
/**
...
@@ -59,7 +57,7 @@ public class TokenController {
...
@@ -59,7 +57,7 @@ public class TokenController {
@DeleteMapping
(
"/{id}"
)
@DeleteMapping
(
"/{id}"
)
@PreAuthorize
(
"@pms.hasPermission('sys_token_del')"
)
@PreAuthorize
(
"@pms.hasPermission('sys_token_del')"
)
public
R
<
Boolean
>
delete
(
@PathVariable
String
id
)
{
public
R
<
Boolean
>
delete
(
@PathVariable
String
id
)
{
return
remoteTokenService
.
removeToken
(
id
,
SecurityConstants
.
FROM_IN
);
return
null
;
//
remoteTokenService.removeToken(id, SecurityConstants.FROM_IN);
}
}
}
}
yifu-upms/yifu-upms-biz/src/main/resources/application.yml
View file @
6f43d9c5
...
@@ -66,14 +66,14 @@ oss:
...
@@ -66,14 +66,14 @@ oss:
secretKey
:
lengleng
secretKey
:
lengleng
bucket-name
:
tmp
bucket-name
:
tmp
# swagger 配置
# swagger 配置
swagger
:
#
swagger:
enabled
:
true
#
enabled: true
title
:
Yifu Swagger API
#
title: Yifu Swagger API
gateway
:
http://${GATEWAY_HOST:yifu-gateway}:${GATEWAY-PORT:9999}
#
gateway: http://${GATEWAY_HOST:yifu-gateway}:${GATEWAY-PORT:9999}
token-url
:
${swagger.gateway}/auth/oauth/token
#
token-url: ${swagger.gateway}/auth/oauth/token
services
:
#
services:
yifu-upms-biz
:
admin
#
yifu-upms-biz: admin
yifu-codegen
:
gen
#
yifu-codegen: gen
# Spring 相关
# Spring 相关
spring
:
spring
:
application
:
application
:
...
...
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