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
3b8fb103
Commit
3b8fb103
authored
Dec 22, 2020
by
xierz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into adaptive-oracle-mysql
parents
b2d5a442
b19dccc6
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
51 additions
and
85 deletions
+51
-85
5.2-patch.sql
doc/5.2-patch.sql
+25
-0
pom.xml
pom.xml
+1
-1
ICacheBiz.java
src/main/java/net/mingsoft/cms/biz/ICacheBiz.java
+0
-12
ContentBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
+6
-20
EhcacheBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/EhcacheBizImpl.java
+0
-36
ICategoryDao.java
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
+0
-1
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+7
-7
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+0
-1
application.yml
src/main/resources/application.yml
+1
-1
main.ftl
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
+11
-6
No files found.
doc/5.2-patch.sql
View file @
3b8fb103
...
@@ -203,3 +203,28 @@ ALTER TABLE `log`
...
@@ -203,3 +203,28 @@ ALTER TABLE `log`
MODIFY
COLUMN
`log_error_msg`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'错误消息'
AFTER
`id`
,
MODIFY
COLUMN
`log_error_msg`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'错误消息'
AFTER
`id`
,
MODIFY
COLUMN
`log_result`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'返回参数'
AFTER
`log_error_msg`
,
MODIFY
COLUMN
`log_result`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'返回参数'
AFTER
`log_error_msg`
,
MODIFY
COLUMN
`log_param`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'请求参数'
AFTER
`log_result`
;
MODIFY
COLUMN
`log_param`
text
CHARACTER
SET
utf8
COLLATE
utf8_general_ci
NULL
COMMENT
'请求参数'
AFTER
`log_result`
;
alter
table
log
rename
to
logger
;
ALTER
TABLE
`role`
ADD
COLUMN
`create_by`
int
(
10
)
NULL
COMMENT
'创建人'
,
ADD
COLUMN
`create_date`
datetime
(
0
)
NULL
COMMENT
'创建时间'
,
ADD
COLUMN
`update_by`
int
(
10
)
NULL
COMMENT
'更新人'
,
ADD
COLUMN
`update_date`
datetime
(
0
)
NULL
COMMENT
'更新时间'
,
ADD
COLUMN
`del`
int
(
1
)
NULL
COMMENT
'删除标识'
;
ALTER
TABLE
`model`
ADD
COLUMN
`create_by`
int
(
10
)
NULL
COMMENT
'创建人'
,
ADD
COLUMN
`create_date`
datetime
(
0
)
NULL
COMMENT
'创建时间'
,
ADD
COLUMN
`update_by`
int
(
10
)
NULL
COMMENT
'更新人'
,
ADD
COLUMN
`update_date`
datetime
(
0
)
NULL
COMMENT
'更新时间'
,
ADD
COLUMN
`del`
int
(
1
)
NULL
COMMENT
'删除标识'
;
ALTER
TABLE
`people`
ADD
COLUMN
`create_by`
int
(
10
)
NULL
COMMENT
'创建人'
,
ADD
COLUMN
`create_date`
datetime
(
0
)
NULL
COMMENT
'创建时间'
,
ADD
COLUMN
`update_by`
int
(
10
)
NULL
COMMENT
'更新人'
,
ADD
COLUMN
`update_date`
datetime
(
0
)
NULL
COMMENT
'更新时间'
,
ADD
COLUMN
`del`
int
(
1
)
NULL
COMMENT
'删除标识'
;
pom.xml
View file @
3b8fb103
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mcms
</artifactId>
<artifactId>
ms-mcms
</artifactId>
<version>
5.2.
0
-SNAPSHOT
</version>
<version>
5.2.
1
-SNAPSHOT
</version>
<name>
ms-mcms
</name>
<name>
ms-mcms
</name>
<!-- 打包jar包 -->
<!-- 打包jar包 -->
<packaging>
jar
</packaging>
<packaging>
jar
</packaging>
...
...
src/main/java/net/mingsoft/cms/biz/ICacheBiz.java
deleted
100644 → 0
View file @
b2d5a442
package
net
.
mingsoft
.
cms
.
biz
;
public
interface
ICacheBiz
{
void
set
(
String
cacheName
,
String
key
,
Object
value
);
<
T
>
T
get
(
String
cacheName
,
String
key
,
Class
<
T
>
cls
);
void
del
(
String
cacheName
,
String
key
);
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
View file @
3b8fb103
...
@@ -22,37 +22,23 @@
...
@@ -22,37 +22,23 @@
package
net
.
mingsoft
.
cms
.
biz
.
impl
;
package
net
.
mingsoft
.
cms
.
biz
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
net.mingsoft.base.biz.impl.BaseBizImpl
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
net.mingsoft.base.dao.IBaseDao
;
import
cn.hutool.core.date.DateUtil
;
import
cn.hutool.core.io.FileUtil
;
import
net.mingsoft.basic.constant.Const
;
import
net.mingsoft.basic.holder.DataHolder
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.cms.bean.CategoryBean
;
import
net.mingsoft.cms.bean.CategoryBean
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.
constant.e.CategoryTypeEnum
;
import
net.mingsoft.cms.
biz.IContentBiz
;
import
net.mingsoft.cms.dao.ICategoryDao
;
import
net.mingsoft.cms.dao.ICategoryDao
;
import
net.mingsoft.cms.
entity.CategoryEntity
;
import
net.mingsoft.cms.
dao.IContentDao
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.entity.ModelEntity
;
import
net.mingsoft.mdiy.entity.ModelEntity
;
import
net.mingsoft.mdiy.util.ParserUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
net.mingsoft.base.biz.impl.BaseBizImpl
;
import
net.mingsoft.base.dao.IBaseDao
;
import
java.io.IOException
;
import
java.util.*
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
java.util.List
;
import
net.mingsoft.cms.dao.IContentDao
;
import
java.util.Map
;
/**
/**
* 文章管理持久化层
* 文章管理持久化层
...
...
src/main/java/net/mingsoft/cms/biz/impl/EhcacheBizImpl.java
deleted
100644 → 0
View file @
b2d5a442
package
net
.
mingsoft
.
cms
.
biz
.
impl
;
import
com.alibaba.fastjson.JSONObject
;
import
net.mingsoft.cms.biz.ICacheBiz
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.cache.CacheManager
;
import
org.springframework.stereotype.Service
;
@Service
(
"abc"
)
public
class
EhcacheBizImpl
implements
ICacheBiz
{
@Autowired
private
CacheManager
cacheManager
;
@Override
public
void
set
(
String
cacheName
,
String
key
,
Object
value
)
{
this
.
cacheManager
.
getCache
(
cacheName
).
put
(
key
,
JSONObject
.
toJSONString
(
value
));
}
@Override
public
<
T
>
T
get
(
String
cacheName
,
String
key
,
Class
<
T
>
cls
)
{
String
str
=
this
.
cacheManager
.
getCache
(
cacheName
).
get
(
key
,
String
.
class
);
if
(
StringUtils
.
isBlank
(
str
))
{
return
null
;
}
return
JSONObject
.
parseObject
(
str
,
cls
);
}
@Override
public
void
del
(
String
cacheName
,
String
key
)
{
this
.
cacheManager
.
getCache
(
cacheName
).
evictIfPresent
(
key
);
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
View file @
3b8fb103
...
@@ -20,7 +20,6 @@
...
@@ -20,7 +20,6 @@
*/
*/
package
net
.
mingsoft
.
cms
.
dao
;
package
net
.
mingsoft
.
cms
.
dao
;
import
com.baomidou.mybatisplus.annotation.SqlParser
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
3b8fb103
...
@@ -307,13 +307,13 @@
...
@@ -307,13 +307,13 @@
and FIND_IN_SET(a.category_id,#{ids})>0
and FIND_IN_SET(a.category_id,#{ids})>0
</if>
</if>
<if
test=
"map.content_title!=null"
>
<if
test=
"map.content_title!=null"
>
and a.content_title like CONCAT(CONCAT(
"%",#{map.content_title}),"%"
)
and a.content_title like CONCAT(CONCAT(
'%',#{map.content_title}),'%'
)
</if>
</if>
<if
test=
"map.content_author!=null"
>
<if
test=
"map.content_author!=null"
>
and a.content_author like CONCAT(CONCAT(
"%",#{map.content_author}),"%"
)
and a.content_author like CONCAT(CONCAT(
'%',#{map.content_author}),'%'
)
</if>
</if>
<if
test=
"map.content_source!=null"
>
<if
test=
"map.content_source!=null"
>
and a.content_source like CONCAT(CONCAT(
"%",#{map.content_source}),"%"
)
and a.content_source like CONCAT(CONCAT(
'%',#{map.content_source}),'%'
)
</if>
</if>
<if
test=
"map.content_type!=null"
>
<if
test=
"map.content_type!=null"
>
and
<foreach
item=
"item"
index=
"index"
collection=
"map.content_type.split(',')"
open=
"("
separator=
"or"
close=
")"
>
and
<foreach
item=
"item"
index=
"index"
collection=
"map.content_type.split(',')"
open=
"("
separator=
"or"
close=
")"
>
...
@@ -321,13 +321,13 @@
...
@@ -321,13 +321,13 @@
</foreach>
</foreach>
</if>
</if>
<if
test=
"map.content_description!=null"
>
<if
test=
"map.content_description!=null"
>
and a.content_description like CONCAT(CONCAT(
"%",#{map.content_description}),"%"
)
and a.content_description like CONCAT(CONCAT(
'%',#{map.content_description}),'%'
)
</if>
</if>
<if
test=
"map.content_keyword!=null"
>
<if
test=
"map.content_keyword!=null"
>
and a.content_keyword like CONCAT(CONCAT(
"%",#{map.content_keyword}),"%"
)
and a.content_keyword like CONCAT(CONCAT(
'%',#{map.content_keyword}),'%'
)
</if>
</if>
<if
test=
"map.content_details!=null"
>
<if
test=
"map.content_details!=null"
>
and a.content_details like CONCAT(CONCAT(
"%",#{map.content_details}),"%"
)
and a.content_details like CONCAT(CONCAT(
'%',#{map.content_details}),'%'
)
</if>
</if>
<if
test=
"map.content_datetime_start!=null and map.content_datetime_end!=null"
>
<if
test=
"map.content_datetime_start!=null and map.content_datetime_end!=null"
>
<if
test=
"_databaseId == 'mysql'"
>
<if
test=
"_databaseId == 'mysql'"
>
...
@@ -341,7 +341,7 @@
...
@@ -341,7 +341,7 @@
<if
test=
"tableName!=null and tableName!='' and diyMap!=null"
>
<if
test=
"tableName!=null and tableName!='' and diyMap!=null"
>
<foreach
item=
"item"
index=
"index"
collection=
"diyList"
open=
""
<foreach
item=
"item"
index=
"index"
collection=
"diyList"
open=
""
separator=
""
close=
""
>
separator=
""
close=
""
>
and d.${field.key} like CONCAT(CONCAT(
"%",#{item.value}),"%"
)
and d.${field.key} like CONCAT(CONCAT(
'%',#{item.value}),'%'
)
</foreach>
</foreach>
</if>
</if>
</where>
</where>
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
3b8fb103
...
@@ -27,7 +27,6 @@ import freemarker.core.ParseException;
...
@@ -27,7 +27,6 @@ import freemarker.core.ParseException;
import
freemarker.template.MalformedTemplateNameException
;
import
freemarker.template.MalformedTemplateNameException
;
import
freemarker.template.TemplateNotFoundException
;
import
freemarker.template.TemplateNotFoundException
;
import
net.mingsoft.base.constant.Const
;
import
net.mingsoft.base.constant.Const
;
import
net.mingsoft.basic.holder.DataHolder
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.SpringUtil
;
import
net.mingsoft.basic.util.SpringUtil
;
import
net.mingsoft.cms.bean.CategoryBean
;
import
net.mingsoft.cms.bean.CategoryBean
;
...
...
src/main/resources/application.yml
View file @
3b8fb103
...
@@ -96,6 +96,6 @@ mybatis-plus:
...
@@ -96,6 +96,6 @@ mybatis-plus:
db-config
:
db-config
:
id-type
:
auto
id-type
:
auto
configuration
:
configuration
:
database-id
:
oracle
database-id
:
mysql
cache-enabled
:
true
cache-enabled
:
true
jdbc-type-for-null
:
'
null'
#注意:单引号
jdbc-type-for-null
:
'
null'
#注意:单引号
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
3b8fb103
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<el-header
class=
"ms-header"
height=
"50px"
>
<el-header
class=
"ms-header"
height=
"50px"
>
<el-col
:span=
"12"
>
<el-col
:span=
"12"
>
<
@
shiro
.
hasPermission
name=
"cms:content:save"
>
<
@
shiro
.
hasPermission
name=
"cms:content:save"
>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"save(
0
)"
>
新增
</el-button>
<el-button
type=
"primary"
icon=
"el-icon-plus"
size=
"mini"
@
click=
"save()"
>
新增
</el-button>
</
@
shiro
.hasPermission
>
</
@
shiro
.hasPermission
>
<
@
shiro
.
hasPermission
name=
"cms:content:del"
>
<
@
shiro
.
hasPermission
name=
"cms:content:del"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"del(selectionList)"
:disabled=
"!selectionList.length"
>
删除
</el-button>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"del(selectionList)"
:disabled=
"!selectionList.length"
>
删除
</el-button>
...
@@ -368,13 +368,18 @@
...
@@ -368,13 +368,18 @@
},
},
//新增
//新增
save
:
function
(
id
)
{
save
:
function
(
id
)
{
//id有值时编辑
if
(
id
)
{
if
(
id
)
{
location
.
href
=
this
.
manager
+
"/cms/content/form.do?id="
+
id
;
location
.
href
=
this
.
manager
+
"/cms/content/form.do?id="
+
id
;
}
else
if
(
id
==
0
){
}
else
{
//在全部栏目下新增文章
//根据当前栏目新增时自动选中栏目
location
.
href
=
this
.
manager
+
"/cms/content/form.do"
;
var
categoryId
=
this
.
form
.
categoryId
;
}
else
{
if
(
categoryId
)
{
location
.
href
=
this
.
manager
+
"/cms/content/form.do?categoryId="
+
this
.
form
.
categoryId
;
location
.
href
=
this
.
manager
+
"/cms/content/form.do?categoryId="
+
this
.
form
.
categoryId
;
}
else
{
//如果栏目id没有值就单纯的新增,不自动选定栏目
location
.
href
=
this
.
manager
+
"/cms/content/form.do"
;
}
}
}
},
},
//表格数据转换
//表格数据转换
...
...
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