Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
guns-vip
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
chenjunxiong
guns-vip
Commits
29b418b0
Commit
29b418b0
authored
Jun 26, 2019
by
fengshuonan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加顶部广告的开关并且修改常量的查询方法
parent
ee3d965a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
16 deletions
+37
-16
guns-base/src/main/java/cn/stylefeng/guns/base/consts/ConstantsContext.java
+17
-0
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/consts/mapper/mapping/SysConfigMapper.xml
+18
-16
guns-sys/src/main/webapp/pages/common/_header.html
+2
-0
No files found.
guns-base/src/main/java/cn/stylefeng/guns/base/consts/ConstantsContext.java
View file @
29b418b0
...
@@ -124,4 +124,21 @@ public class ConstantsContext {
...
@@ -124,4 +124,21 @@ public class ConstantsContext {
return
oauth2Prefix
;
return
oauth2Prefix
;
}
}
}
}
/**
* 获取顶部导航条是否开启
*/
public
static
Boolean
getDefaultAdvert
()
{
String
gunsDefaultAdvert
=
(
String
)
CONSTNTS_HOLDER
.
get
(
"GUNS_DEFAULT_ADVERT"
);
if
(
ToolUtil
.
isEmpty
(
gunsDefaultAdvert
))
{
log
.
error
(
"系统常量存在空值!常量名称:GUNS_DEFAULT_ADVERT,采用默认值:true"
);
return
true
;
}
else
{
if
(
CommonStatus
.
ENABLE
.
getCode
().
equalsIgnoreCase
(
gunsDefaultAdvert
))
{
return
true
;
}
else
{
return
false
;
}
}
}
}
}
guns-sys/src/main/java/cn/stylefeng/guns/sys/modular/consts/mapper/mapping/SysConfigMapper.xml
View file @
29b418b0
...
@@ -4,17 +4,17 @@
...
@@ -4,17 +4,17 @@
<!-- 通用查询映射结果 -->
<!-- 通用查询映射结果 -->
<resultMap
id=
"BaseResultMap"
type=
"cn.stylefeng.guns.sys.modular.consts.entity.SysConfig"
>
<resultMap
id=
"BaseResultMap"
type=
"cn.stylefeng.guns.sys.modular.consts.entity.SysConfig"
>
<id
column=
"id"
property=
"id"
/>
<id
column=
"id"
property=
"id"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"name"
property=
"name"
/>
<result
column=
"code"
property=
"code"
/>
<result
column=
"code"
property=
"code"
/>
<result
column=
"dict_flag"
property=
"dictFlag"
/>
<result
column=
"dict_flag"
property=
"dictFlag"
/>
<result
column=
"dict_type_id"
property=
"dictTypeId"
/>
<result
column=
"dict_type_id"
property=
"dictTypeId"
/>
<result
column=
"value"
property=
"value"
/>
<result
column=
"value"
property=
"value"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"remark"
property=
"remark"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_time"
property=
"createTime"
/>
<result
column=
"create_user"
property=
"createUser"
/>
<result
column=
"create_user"
property=
"createUser"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_time"
property=
"updateTime"
/>
<result
column=
"update_user"
property=
"updateUser"
/>
<result
column=
"update_user"
property=
"updateUser"
/>
</resultMap>
</resultMap>
<!-- 通用查询结果列 -->
<!-- 通用查询结果列 -->
...
@@ -62,19 +62,21 @@
...
@@ -62,19 +62,21 @@
<select
id=
"customPageList"
resultType=
"cn.stylefeng.guns.sys.modular.consts.model.result.SysConfigResult"
parameterType=
"cn.stylefeng.guns.sys.modular.consts.model.params.SysConfigParam"
>
<select
id=
"customPageList"
resultType=
"cn.stylefeng.guns.sys.modular.consts.model.result.SysConfigResult"
parameterType=
"cn.stylefeng.guns.sys.modular.consts.model.params.SysConfigParam"
>
select
select
<include
refid=
"Base_Column_List"
/>
<include
refid=
"Base_Column_List"
/>
from sys_config where 1 = 1
from sys_config
<where>
<if
test=
"paramCondition.name != null and paramCondition.name != ''"
>
<if
test=
"paramCondition.name != null and paramCondition.name != ''"
>
and
name like CONCAT('%',#{paramCondition.name},'%')
name like CONCAT('%',#{paramCondition.name},'%')
</if>
</if>
<if
test=
"paramCondition.code != null and paramCondition.code != ''"
>
<if
test=
"paramCondition.code != null and paramCondition.code != ''"
>
and
code like CONCAT('%',#{paramCondition.code},'%')
or
code like CONCAT('%',#{paramCondition.code},'%')
</if>
</if>
<if
test=
"paramCondition.value != null and paramCondition.value != ''"
>
<if
test=
"paramCondition.value != null and paramCondition.value != ''"
>
and
value like CONCAT('%',#{paramCondition.value},'%')
or
value like CONCAT('%',#{paramCondition.value},'%')
</if>
</if>
<if
test=
"paramCondition.remark != null and paramCondition.remark != ''"
>
<if
test=
"paramCondition.remark != null and paramCondition.remark != ''"
>
and
remark like CONCAT('%',#{paramCondition.remark},'%')
or
remark like CONCAT('%',#{paramCondition.remark},'%')
</if>
</if>
</where>
</select>
</select>
<select
id=
"customPageMapList"
resultType=
"map"
parameterType=
"cn.stylefeng.guns.sys.modular.consts.model.params.SysConfigParam"
>
<select
id=
"customPageMapList"
resultType=
"map"
parameterType=
"cn.stylefeng.guns.sys.modular.consts.model.params.SysConfigParam"
>
...
...
guns-sys/src/main/webapp/pages/common/_header.html
View file @
29b418b0
...
@@ -12,6 +12,7 @@
...
@@ -12,6 +12,7 @@
<li
class=
"layui-nav-item"
lay-unselect
>
<li
class=
"layui-nav-item"
lay-unselect
>
<a
ew-event=
"refresh"
title=
"刷新"
><i
class=
"layui-icon layui-icon-refresh-3"
></i></a>
<a
ew-event=
"refresh"
title=
"刷新"
><i
class=
"layui-icon layui-icon-refresh-3"
></i></a>
</li>
</li>
@if(constants.getDefaultAdvert()){
<li
class=
"layui-nav-item"
lay-unselect
>
<li
class=
"layui-nav-item"
lay-unselect
>
<a
href=
"https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=p4kqz45e"
target=
"_blank"
>
阿里云5折优惠券,点我领取
</a>
<a
href=
"https://promotion.aliyun.com/ntms/yunparter/invite.html?userCode=p4kqz45e"
target=
"_blank"
>
阿里云5折优惠券,点我领取
</a>
</li>
</li>
...
@@ -21,6 +22,7 @@
...
@@ -21,6 +22,7 @@
<li
class=
"layui-nav-item"
lay-unselect
>
<li
class=
"layui-nav-item"
lay-unselect
>
<a
style=
"color: #fe7300;"
href=
"https://gitee.com/stylefeng/guns"
target=
"_blank"
>
请star支持一下Guns
</a>
<a
style=
"color: #fe7300;"
href=
"https://gitee.com/stylefeng/guns"
target=
"_blank"
>
请star支持一下Guns
</a>
</li>
</li>
@}
</ul>
</ul>
<ul
class=
"layui-nav layui-layout-right"
>
<ul
class=
"layui-nav layui-layout-right"
>
<li
class=
"layui-nav-item"
lay-unselect
>
<li
class=
"layui-nav-item"
lay-unselect
>
...
...
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