Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
cms_sys
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
西魏
cms_sys
Commits
61162d0b
Commit
61162d0b
authored
Nov 21, 2020
by
wujj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
静态文章地址
parent
fcd1ac1e
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
14 deletions
+32
-14
5.2-patch.sql
doc/5.2-patch.sql
+17
-0
ContentBean.java
src/main/java/net/mingsoft/cms/bean/ContentBean.java
+11
-11
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+3
-2
application-dev.yml
src/main/resources/application-dev.yml
+1
-1
No files found.
doc/5.2-patch.sql
View file @
61162d0b
...
@@ -46,6 +46,8 @@ ALTER TABLE `cms_content`
...
@@ -46,6 +46,8 @@ ALTER TABLE `cms_content`
CHANGE
COLUMN
`content_category_id`
`category_id`
bigint
(
20
)
UNSIGNED
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
CHANGE
COLUMN
`content_category_id`
`category_id`
bigint
(
20
)
UNSIGNED
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
ALTER
TABLE
`cms_content`
ALTER
TABLE
`cms_content`
ADD
CONSTRAINT
`fk_category_id`
FOREIGN
KEY
(
`category_id`
)
REFERENCES
`cms_category`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ADD
CONSTRAINT
`fk_category_id`
FOREIGN
KEY
(
`category_id`
)
REFERENCES
`cms_category`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`cms_content`
DROP
COLUMN
`app_id`
;
ALTER
TABLE
`cms_category`
ALTER
TABLE
`cms_category`
MODIFY
COLUMN
`category_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
MODIFY
COLUMN
`category_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
...
@@ -53,6 +55,16 @@ ALTER TABLE `cms_category`
...
@@ -53,6 +55,16 @@ ALTER TABLE `cms_category`
DROP
COLUMN
`category_manager_id`
;
DROP
COLUMN
`category_manager_id`
;
ALTER
TABLE
`cms_category`
ALTER
TABLE
`cms_category`
DROP
COLUMN
`app_id`
;
DROP
COLUMN
`app_id`
;
ALTER
TABLE
`cms_category`
MODIFY
COLUMN
`category_id`
bigint
(
20
)
ZEROFILL
NULL
DEFAULT
NULL
COMMENT
'所属栏目'
AFTER
`id`
,
MODIFY
COLUMN
`mdiy_model_id`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'栏目管理的内容模型id'
AFTER
`dict_id`
;
ALTER
TABLE
`cms_category`
MODIFY
COLUMN
`mdiy_model_id`
int
(
11
)
NULL
DEFAULT
NULL
COMMENT
'栏目管理的内容模型id'
AFTER
`dict_id`
;
#
注意这里改了类型
,
原有空的数据需要
set
null
ALTER
TABLE
`cms_category`
MODIFY
COLUMN
`category_id`
bigint
(
20
)
NULL
DEFAULT
NULL
COMMENT
'所属栏目'
AFTER
`id`
;
ALTER
TABLE
`app`
ALTER
TABLE
`app`
DROP
COLUMN
`app_mobile_style`
,
DROP
COLUMN
`app_mobile_style`
,
...
@@ -131,6 +143,11 @@ ALTER TABLE `mdiy_tag_sql` DROP FOREIGN KEY `mdiy_tag_sql_ibfk_1`;
...
@@ -131,6 +143,11 @@ ALTER TABLE `mdiy_tag_sql` DROP FOREIGN KEY `mdiy_tag_sql_ibfk_1`;
ALTER
TABLE
`mdiy_tag_sql`
ALTER
TABLE
`mdiy_tag_sql`
ADD
CONSTRAINT
`fk_tag_id`
FOREIGN
KEY
(
`tag_id`
)
REFERENCES
`mdiy_tag`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ADD
CONSTRAINT
`fk_tag_id`
FOREIGN
KEY
(
`tag_id`
)
REFERENCES
`mdiy_tag`
(
`id`
)
ON
DELETE
CASCADE
ON
UPDATE
NO
ACTION
;
ALTER
TABLE
`mdiy_model`
MODIFY
COLUMN
`model_type`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'自定义模型类型,自定义表单不用该字段'
AFTER
`model_name`
,
MODIFY
COLUMN
`model_field`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'模型字段'
AFTER
`create_by`
,
MODIFY
COLUMN
`model_custom_type`
varchar
(
255
)
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
DEFAULT
NULL
COMMENT
'类型,自定义表单:post,自定义模型:model'
AFTER
`model_field`
;
ALTER
TABLE
`mdiy_tag_sql`
ALTER
TABLE
`mdiy_tag_sql`
RENAME
INDEX
`fk_mdiy_tag_id`
TO
`fk_ts_tag_id`
;
RENAME
INDEX
`fk_mdiy_tag_id`
TO
`fk_ts_tag_id`
;
...
...
src/main/java/net/mingsoft/cms/bean/ContentBean.java
View file @
61162d0b
...
@@ -12,10 +12,10 @@ import java.util.Date;
...
@@ -12,10 +12,10 @@ import java.util.Date;
*/
*/
public
class
ContentBean
extends
ContentEntity
{
public
class
ContentBean
extends
ContentEntity
{
/**
//
/**
* 静态化地址
//
* 静态化地址
*/
//
*/
private
String
staticUrl
;
//
private String staticUrl;
/**
/**
* 开始时间
* 开始时间
...
@@ -37,13 +37,13 @@ public class ContentBean extends ContentEntity {
...
@@ -37,13 +37,13 @@ public class ContentBean extends ContentEntity {
*/
*/
private
String
noflag
;
private
String
noflag
;
public
String
getStaticUrl
()
{
//
public String getStaticUrl() {
return
staticUrl
;
//
return staticUrl;
}
//
}
//
public
void
setStaticUrl
(
String
staticUrl
)
{
//
public void setStaticUrl(String staticUrl) {
this
.
staticUrl
=
staticUrl
;
//
this.staticUrl = staticUrl;
}
//
}
public
String
getBeginTime
()
{
public
String
getBeginTime
()
{
return
beginTime
;
return
beginTime
;
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
61162d0b
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_url"
property=
"contentUrl"
/>
<!--文章跳转链接地址 -->
<result
column=
"content_url"
property=
"contentUrl"
/>
<!--文章跳转链接地址 -->
<result
column=
"static_url"
property=
"staticUrl"
/>
<!--静态地址
-->
<!-- <result column="static_url" property="staticUrl" /><!–静态地址 –>
-->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
...
@@ -211,7 +211,8 @@
...
@@ -211,7 +211,8 @@
</select>
</select>
<!--条件查询-->
<!--条件查询-->
<select
id=
"query"
resultMap=
"resultContentMap"
>
<select
id=
"query"
resultMap=
"resultContentMap"
>
select ct.*,CONCAT('/html/',ct.app_id,category_path,'/',ct.id,'.html') AS static_url from (
<!--,CONCAT('/html/',ct.app_id,category_path,'/',ct.id,'.html') AS static_url-->
select ct.* from (
select ct.*,cc.category_path from cms_content ct
select ct.*,cc.category_path from cms_content ct
join cms_category cc on ct.category_id=cc.id
join cms_category cc on ct.category_id=cc.id
<where>
<where>
...
...
src/main/resources/application-dev.yml
View file @
61162d0b
spring
:
spring
:
datasource
:
datasource
:
url
:
jdbc:mysql://192.168.0.8:3316/mcms-
dev-5.2-4
?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
url
:
jdbc:mysql://192.168.0.8:3316/mcms-
5.2
?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
username
:
mcms
username
:
mcms
password
:
mcms
password
:
mcms
filters
:
wall,mergeStat
filters
:
wall,mergeStat
...
...
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