Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
F
fill-system
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
廖旭伟
fill-system
Commits
3eff261c
Commit
3eff261c
authored
Apr 25, 2025
by
赵啸非
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加新的菜单权限模块
parent
56287fc9
Pipeline
#2947
failed with stages
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
0 deletions
+49
-0
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
...m/mortals/xhx/base/system/param/service/ParamService.java
+7
-0
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
.../xhx/base/system/param/service/impl/ParamServiceImpl.java
+26
-0
fill-manager/src/main/resources/sqlmap/base/system/MenuMapperExt.xml
...r/src/main/resources/sqlmap/base/system/MenuMapperExt.xml
+16
-0
No files found.
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/ParamService.java
View file @
3eff261c
...
...
@@ -44,4 +44,11 @@ public interface ParamService extends ICRUDCacheService<ParamEntity, Long>, IPar
*/
Map
<
String
,
String
>
getParamBySecondOrganize
(
String
firstOrganize
,
String
secondOrganize
,
String
...
excludeParamKeys
);
/**
* 通过Key设置参数值 value
* @param key
* @param value
* @return
*/
void
setValueByKey
(
String
key
,
String
value
);
}
\ No newline at end of file
fill-manager/src/main/java/com/mortals/xhx/base/system/param/service/impl/ParamServiceImpl.java
View file @
3eff261c
...
...
@@ -13,6 +13,7 @@ import com.mortals.xhx.base.system.param.service.ParamService;
import
org.springframework.stereotype.Service
;
import
java.util.Arrays
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
...
...
@@ -190,4 +191,29 @@ public class ParamServiceImpl extends AbstractCRUDCacheServiceImpl<ParamDao, Par
}
}
@Override
public
void
setValueByKey
(
String
key
,
String
value
)
{
List
<
ParamEntity
>
list
=
this
.
getCacheList
();
ParamEntity
entity
=
null
;
for
(
ParamEntity
paramEntity:
list
){
if
(
key
.
equals
(
paramEntity
.
getParamKey
())){
entity
=
paramEntity
;
break
;
}
}
if
(
entity
!=
null
){
entity
.
setParamValue
(
String
.
valueOf
(
value
));
this
.
update
(
entity
);
}
else
{
entity
=
new
ParamEntity
();
entity
.
setParamValue
(
String
.
valueOf
(
value
));
entity
.
setParamKey
(
key
);
entity
.
setName
(
"key"
);
entity
.
setCreateTime
(
new
Date
());
entity
.
setCreateUserId
(
1
l
);
entity
.
setCreateUserName
(
"系统管理员"
);
this
.
save
(
entity
);
}
}
}
\ No newline at end of file
fill-manager/src/main/resources/sqlmap/base/system/MenuMapperExt.xml
0 → 100644
View file @
3eff261c
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper
namespace=
"com.mortals.xhx.base.system.menu.dao.ibatis.MenuDaoImpl"
>
<!-- 获取列表 -->
<select
id=
"getListByUserId"
parameterType=
"paramDto"
resultMap=
"MenuEntity-Map"
>
select
<include
refid=
"_columns"
/>
from mortals_xhx_menu as a
where a.authType in(0,1,2) or a.id IN
(select menuId
from mortals_xhx_role_auth as b
left join mortals_xhx_role_user as c
on b.roleId=c.roleId
where c.userId=#{condition.userId})
</select>
</mapper>
\ No newline at end of file
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