Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
smart_gov_platform
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
smart_gov_platform
Commits
9212d73f
Commit
9212d73f
authored
7 months ago
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交配置校验
parent
ceb304d6
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
12 additions
and
21 deletions
+12
-21
portal-manager/pom.xml
portal-manager/pom.xml
+0
-1
portal-manager/src/main/java/com/mortals/xhx/base/framework/filter/SameSiteCookieFilter.java
...rtals/xhx/base/framework/filter/SameSiteCookieFilter.java
+2
-2
portal-manager/src/main/java/com/mortals/xhx/base/system/resource/model/ResourceQuery.java
...mortals/xhx/base/system/resource/model/ResourceQuery.java
+0
-1
portal-manager/src/main/java/com/mortals/xhx/base/system/resource/service/impl/ResourceServiceImpl.java
...ase/system/resource/service/impl/ResourceServiceImpl.java
+7
-16
portal-manager/src/main/java/com/mortals/xhx/base/system/resource/web/ResourceController.java
...tals/xhx/base/system/resource/web/ResourceController.java
+3
-1
No files found.
portal-manager/pom.xml
View file @
9212d73f
...
...
@@ -96,7 +96,6 @@
<profiles.active>
yanyuan
</profiles.active>
<profiles.nacos.server-addr>
172.16.30.245:8848
</profiles.nacos.server-addr>
<profiles.trustedReferer>
127.0.0.1,localhost,10.233.82.175,172.16.30.245,172.16.30.246,172.16.30.247,172.16.30.248
</profiles.trustedReferer>
<profiles.req.json.check>
true
</profiles.req.json.check>
</properties>
</profile>
...
...
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/framework/filter/SameSiteCookieFilter.java
View file @
9212d73f
...
...
@@ -19,8 +19,8 @@ import java.net.URL;
import
java.util.*
;
@Slf4j
@Component
@Profile
({
"yanyuan"
})
//
@Component
//
@Profile({"yanyuan"})
public
class
SameSiteCookieFilter
implements
Filter
{
...
...
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/resource/model/ResourceQuery.java
View file @
9212d73f
...
...
@@ -7,7 +7,6 @@
*/
package
com.mortals.xhx.base.system.resource.model
;
import
java.util.List
;
/**
* <p>Title: 资源信息</p>
...
...
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/resource/service/impl/ResourceServiceImpl.java
View file @
9212d73f
...
...
@@ -19,11 +19,11 @@ import com.mortals.xhx.base.system.resource.dao.ResourceDao;
import
com.mortals.xhx.base.system.resource.model.ResourceEntity
;
import
com.mortals.xhx.base.system.resource.model.ResourceQuery
;
import
com.mortals.xhx.base.system.resource.service.ResourceService
;
import
com.mortals.xhx.base.system.role.model.RoleAuthEntity
;
import
com.mortals.xhx.base.system.role.model.RoleAuthQuery
;
import
com.mortals.xhx.base.system.role.service.RoleAuthService
;
import
com.mortals.xhx.common.key.RedisKey
;
import
com.mortals.xhx.common.utils.ControllerScanUtil
;
import
com.mortals.xhx.module.role.model.RoleAuthEntity
;
import
com.mortals.xhx.module.role.model.RoleAuthQuery
;
import
com.mortals.xhx.module.role.service.RoleAuthService
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.context.annotation.Lazy
;
import
org.springframework.stereotype.Service
;
...
...
@@ -73,14 +73,7 @@ public class ResourceServiceImpl extends AbstractCRUDServiceImpl<ResourceDao, Re
@Override
public
Set
<
String
>
findUrlSetByUserId
(
Long
userId
)
throws
AppException
{
Set
<
String
>
urls
=
new
HashSet
<>();
List
<
ResourceEntity
>
resList
=
new
ArrayList
<>();
if
(
1L
==
userId
)
{
//管理员
resList
=
this
.
find
(
new
ResourceQuery
());
}
else
{
resList
=
this
.
findListByUserId
(
userId
);
}
List
<
ResourceEntity
>
resList
=
this
.
findListByUserId
(
userId
);
for
(
ResourceEntity
res
:
resList
)
{
String
url
=
res
.
getUrl
();
if
(
StringUtils
.
isEmpty
(
url
))
{
...
...
@@ -101,7 +94,7 @@ public class ResourceServiceImpl extends AbstractCRUDServiceImpl<ResourceDao, Re
public
Rest
<
String
>
refreshResourceUrl
(
String
packageName
,
Context
context
)
{
List
<
Class
<?>>
classList
=
ControllerScanUtil
.
getAllClassByPackageName
(
packageName
);
//System.out.println(classList); //获取到了所有的类
List
<
ResourceEntity
>
newResourcelist
=
ControllerScanUtil
.
getAnnotationInfo
(
classList
).
stream
().
filter
(
f
->
!
ObjectUtils
.
isEmpty
(
f
.
getUrl
())).
collect
(
Collectors
.
toList
());
List
<
ResourceEntity
>
newResourcelist
=
ControllerScanUtil
.
getAnnotationInfo
(
classList
).
stream
().
filter
(
f
->
!
ObjectUtils
.
isEmpty
(
f
.
getUrl
())).
collect
(
Collectors
.
toList
());
Map
<
String
,
List
<
ResourceEntity
>>
localResourceMap
=
this
.
find
(
new
ResourceQuery
()).
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getName
()));
Map
<
String
,
List
<
ResourceEntity
>>
newResourceMap
=
newResourcelist
.
stream
().
collect
(
Collectors
.
groupingBy
(
x
->
x
.
getName
()));
...
...
@@ -191,14 +184,12 @@ public class ResourceServiceImpl extends AbstractCRUDServiceImpl<ResourceDao, Re
}
private
void
updateUserMenuUrlCache
()
{
cacheService
.
del
(
RedisKey
.
KEY_USER_MENU_CACHE
);
/* //更新用户菜单
//更新用户菜单
Set
<
String
>
hkeys
=
cacheService
.
hkeys
(
RedisKey
.
KEY_USER_MENU_CACHE
);
for
(
String
userId
:
hkeys
)
{
Set
<
String
>
urls
=
this
.
findUrlSetByUserId
(
DataUtil
.
converStr2Long
(
userId
,
0L
));
String
menuUrlCode
=
generateMenuUrlCode
(
urls
);
cacheService
.
hset
(
RedisKey
.
KEY_USER_MENU_CACHE
,
userId
,
menuUrlCode
);
}
*/
}
}
}
\ No newline at end of file
This diff is collapsed.
Click to expand it.
portal-manager/src/main/java/com/mortals/xhx/base/system/resource/web/ResourceController.java
View file @
9212d73f
...
...
@@ -8,6 +8,7 @@ import com.mortals.framework.common.Rest;
import
com.mortals.framework.common.code.UserType
;
import
com.mortals.framework.exception.AppException
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.OrderCol
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.resource.model.ResourceEntity
;
import
com.mortals.xhx.base.system.resource.service.ResourceService
;
...
...
@@ -19,6 +20,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Arrays
;
import
java.util.HashMap
;
import
java.util.Map
;
...
...
@@ -67,7 +69,7 @@ public class ResourceController extends BaseCRUDJsonBodyMappingController<Resour
@Override
protected
void
doListBefore
(
ResourceEntity
query
,
Map
<
String
,
Object
>
model
,
Context
context
)
throws
AppException
{
query
.
setOrderColList
(
Arrays
.
asList
(
new
OrderCol
(
"sourceType"
)));
super
.
doListBefore
(
query
,
model
,
context
);
}
...
...
This diff is collapsed.
Click to expand it.
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