Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
R
ruoyi
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
范晓龙
ruoyi
Commits
b5300e74
提交
b5300e74
authored
10月 31, 2022
作者:
dingtalk_nnkplh
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
新闻增加背景颜色字段
上级
4515baeb
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
8 个修改的文件
包含
39 行增加
和
14 行删除
+39
-14
application-dev.yml
ruoyi-admin/src/main/resources/application-dev.yml
+3
-3
application-pro.yml
ruoyi-admin/src/main/resources/application-pro.yml
+2
-2
application.yml
ruoyi-admin/src/main/resources/application.yml
+2
-2
jscolor.js
ruoyi-admin/src/main/resources/static/js/jscolor.js
+0
-0
add.html
...admin/src/main/resources/templates/business/news/add.html
+8
-0
edit.html
...dmin/src/main/resources/templates/business/news/edit.html
+7
-0
TbNews.java
...-system/src/main/java/com/ruoyi/system/domain/TbNews.java
+10
-0
TbNewsMapper.xml
...-system/src/main/resources/mapper/system/TbNewsMapper.xml
+7
-7
没有找到文件。
ruoyi-admin/src/main/resources/application-dev.yml
浏览文件 @
b5300e74
...
@@ -78,9 +78,9 @@ spring:
...
@@ -78,9 +78,9 @@ spring:
druid
:
druid
:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://
39.105.118.63:3306
/overseas_study?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://
localhost:3307
/overseas_study?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
ewglobal_cn
username
:
overseas_study
password
:
F5pjz48sjbisaEwy
password
:
EarthWisdom@329301
# 从库数据源
# 从库数据源
slave
:
slave
:
# 从数据源开关/默认关闭
# 从数据源开关/默认关闭
...
...
ruoyi-admin/src/main/resources/application-pro.yml
浏览文件 @
b5300e74
...
@@ -79,8 +79,8 @@ spring:
...
@@ -79,8 +79,8 @@ spring:
# 主库数据源
# 主库数据源
master
:
master
:
url
:
jdbc:mysql://39.105.118.63:3306/overseas_study?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
url
:
jdbc:mysql://39.105.118.63:3306/overseas_study?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8
username
:
ewglobal_cn
username
:
overseas_study
password
:
F5pjz48sjbisaEwy
password
:
EarthWisdom@329301
# 从库数据源
# 从库数据源
slave
:
slave
:
# 从数据源开关/默认关闭
# 从数据源开关/默认关闭
...
...
ruoyi-admin/src/main/resources/application.yml
浏览文件 @
b5300e74
spring
:
spring
:
profiles
:
profiles
:
active
:
dev
active
:
pro
\ No newline at end of file
\ No newline at end of file
ruoyi-admin/src/main/resources/static/js/jscolor.js
0 → 100644
浏览文件 @
b5300e74
差异被折叠。
点击展开。
ruoyi-admin/src/main/resources/templates/business/news/add.html
浏览文件 @
b5300e74
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<head>
<head>
<th:block
th:include=
"include :: header('新增新闻与活动')"
/>
<th:block
th:include=
"include :: header('新增新闻与活动')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<script
type=
"text/javascript"
src=
"/js/jscolor.js"
></script>
</head>
</head>
<body
class=
"white-bg"
>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
@@ -47,6 +48,12 @@
...
@@ -47,6 +48,12 @@
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
封面背景颜色:
</label>
<div
class=
"col-sm-8"
>
<input
type=
"text"
value=
"#FFFFFF"
data-jscolor=
"{}"
name=
"backgroundColor"
id=
"backgroundColor"
>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label is-required"
>
新闻内容:
</label>
<label
class=
"col-sm-2 control-label is-required"
>
新闻内容:
</label>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
<script
id=
"editor"
name=
"newsContent"
type=
"text/plain"
style=
"height: 300px;"
></script>
<script
id=
"editor"
name=
"newsContent"
type=
"text/plain"
style=
"height: 300px;"
></script>
...
@@ -93,6 +100,7 @@
...
@@ -93,6 +100,7 @@
function
submitHandler
()
{
function
submitHandler
()
{
if
(
$
.
validate
.
form
())
{
if
(
$
.
validate
.
form
())
{
alert
(
$
(
"#backgroundColor"
).
val
());
var
text
=
getContentTxt
();
var
text
=
getContentTxt
();
if
(
text
==
''
||
text
.
length
==
0
)
{
if
(
text
==
''
||
text
.
length
==
0
)
{
$
.
modal
.
alertWarning
(
"请输入新闻内容!"
);
$
.
modal
.
alertWarning
(
"请输入新闻内容!"
);
...
...
ruoyi-admin/src/main/resources/templates/business/news/edit.html
浏览文件 @
b5300e74
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
<head>
<head>
<th:block
th:include=
"include :: header('修改新闻与活动')"
/>
<th:block
th:include=
"include :: header('修改新闻与活动')"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<th:block
th:include=
"include :: bootstrap-fileinput-css"
/>
<script
type=
"text/javascript"
src=
"/js/jscolor.js"
></script>
</head>
</head>
<body
class=
"white-bg"
>
<body
class=
"white-bg"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
<div
class=
"wrapper wrapper-content animated fadeInRight ibox-content"
>
...
@@ -20,6 +21,12 @@
...
@@ -20,6 +21,12 @@
<input
name=
"newsSummary"
th:field=
"*{newsSummary}"
class=
"form-control"
type=
"text"
required
>
<input
name=
"newsSummary"
th:field=
"*{newsSummary}"
class=
"form-control"
type=
"text"
required
>
</div>
</div>
</div>
</div>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label"
>
封面背景颜色:
</label>
<div
class=
"col-sm-8"
>
<input
type=
"text"
data-jscolor=
"{}"
th:field=
"*{backgroundColor}"
id=
"backgroundColor"
>
</div>
</div>
<div
class=
"form-group"
>
<div
class=
"form-group"
>
<label
class=
"col-sm-2 control-label is-required"
>
新闻内容:
</label>
<label
class=
"col-sm-2 control-label is-required"
>
新闻内容:
</label>
<div
class=
"col-sm-10"
>
<div
class=
"col-sm-10"
>
...
...
ruoyi-system/src/main/java/com/ruoyi/system/domain/TbNews.java
浏览文件 @
b5300e74
...
@@ -26,6 +26,8 @@ public class TbNews extends BaseEntity
...
@@ -26,6 +26,8 @@ public class TbNews extends BaseEntity
@Excel
(
name
=
"新闻摘要"
)
@Excel
(
name
=
"新闻摘要"
)
private
String
newsSummary
;
private
String
newsSummary
;
private
String
backgroundColor
;
/** 新闻内容 */
/** 新闻内容 */
@Excel
(
name
=
"新闻内容"
)
@Excel
(
name
=
"新闻内容"
)
private
String
newsContent
;
private
String
newsContent
;
...
@@ -92,6 +94,14 @@ public class TbNews extends BaseEntity
...
@@ -92,6 +94,14 @@ public class TbNews extends BaseEntity
this
.
newsSummary
=
newsSummary
;
this
.
newsSummary
=
newsSummary
;
}
}
public
String
getBackgroundColor
()
{
return
backgroundColor
;
}
public
void
setBackgroundColor
(
String
backgroundColor
)
{
this
.
backgroundColor
=
backgroundColor
;
}
public
String
getNewsContent
()
{
public
String
getNewsContent
()
{
return
newsContent
;
return
newsContent
;
}
}
...
...
ruoyi-system/src/main/resources/mapper/system/TbNewsMapper.xml
浏览文件 @
b5300e74
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -8,6 +8,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result
property=
"id"
column=
"id"
/>
<result
property=
"id"
column=
"id"
/>
<result
property=
"newsTitle"
column=
"news_title"
/>
<result
property=
"newsTitle"
column=
"news_title"
/>
<result
property=
"newsSummary"
column=
"news_summary"
/>
<result
property=
"newsSummary"
column=
"news_summary"
/>
<result
property=
"backgroundColor"
column=
"background_color"
/>
<result
property=
"newsContent"
column=
"news_content"
/>
<result
property=
"newsContent"
column=
"news_content"
/>
<result
property=
"newsCover"
column=
"news_cover"
/>
<result
property=
"newsCover"
column=
"news_cover"
/>
<result
property=
"status"
column=
"status"
/>
<result
property=
"status"
column=
"status"
/>
...
@@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -19,7 +20,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
</resultMap>
<sql
id=
"selectTbNewsVo"
>
<sql
id=
"selectTbNewsVo"
>
select id, news_title, news_summary, news_content, news_cover, status, creator, create_time,
select id, news_title, news_summary,
background_color,
news_content, news_cover, status, creator, create_time,
modified_by, update_time, remark from tb_news
modified_by, update_time, remark from tb_news
</sql>
</sql>
...
@@ -41,17 +42,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -41,17 +42,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
news_title,news_summary,news_content,news_cover,status,
news_title,news_summary,news_content,news_cover,status,
<if
test=
"remark != null"
>
remark,
</if>
<if
test=
"remark != null"
>
remark,
</if>
creator,create_time
creator,create_time
,background_color
</trim>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"newsTitle != null and newsTitle != ''"
>
#{newsTitle},
</if>
<if
test=
"newsTitle != null and newsTitle != ''"
>
#{newsTitle},
</if>
<if
test=
"newsSummary != null and newsSummary != '' "
>
#{newsSummary},
</if>
<if
test=
"newsSummary != null and newsSummary != '' "
>
#{newsSummary},
</if>
<if
test=
"newsContent != null and newsContent != ''"
>
#{newsContent},
</if>
<if
test=
"newsContent != null and newsContent != ''"
>
#{newsContent},
</if>
<if
test=
"newsCover != null and newsCover != ''"
>
#{newsCover},
</if>
<if
test=
"newsCover != null and newsCover != ''"
>
#{newsCover},
</if>
<if
test=
"status != null"
>
#{status},
</if>
#{status},
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"remark != null"
>
#{remark},
</if>
<if
test=
"creator != null"
>
#{creator},
</if>
#{creator},#{createTime},#{backgroundColor}
<if
test=
"createTime != null"
>
#{createTime},
</if>
</trim>
</trim>
</insert>
</insert>
...
@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -66,6 +66,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if
test=
"modifiedBy != null"
>
modified_by = #{modifiedBy},
</if>
<if
test=
"modifiedBy != null"
>
modified_by = #{modifiedBy},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"remark != null"
>
remark = #{remark},
</if>
<if
test=
"backgroundColor != null"
>
background_color=#{backgroundColor},
</if>
</trim>
</trim>
where id = #{id}
where id = #{id}
</update>
</update>
...
@@ -81,4 +82,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
...
@@ -81,4 +82,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</foreach>
</foreach>
</delete>
</delete>
</mapper>
</mapper>
\ No newline at end of file
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论