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
52d6f85f
Commit
52d6f85f
authored
Dec 22, 2020
by
xierz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into oracle
parents
38ba5875
b19dccc6
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
61 additions
and
95 deletions
+61
-95
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-dev.yml
src/main/resources/application-dev.yml
+10
-10
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 @
52d6f85f
...
...
@@ -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_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`
;
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 @
52d6f85f
...
...
@@ -10,7 +10,7 @@
<modelVersion>
4.0.0
</modelVersion>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mcms
</artifactId>
<version>
5.2.
0
-SNAPSHOT
</version>
<version>
5.2.
1
-SNAPSHOT
</version>
<name>
ms-mcms
</name>
<!-- 打包jar包 -->
<packaging>
jar
</packaging>
...
...
src/main/java/net/mingsoft/cms/biz/ICacheBiz.java
deleted
100644 → 0
View file @
38ba5875
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 @
52d6f85f
...
...
@@ -22,37 +22,23 @@
package
net
.
mingsoft
.
cms
.
biz
.
impl
;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
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.base.biz.impl.BaseBizImpl
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.cms.bean.CategoryBean
;
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.
entity.CategoryEntity
;
import
net.mingsoft.cms.
dao.IContentDao
;
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.util.ParserUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
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
net.mingsoft.cms.dao.IContentDao
;
import
java.util.List
;
import
java.util.Map
;
/**
* 文章管理持久化层
...
...
src/main/java/net/mingsoft/cms/biz/impl/EhcacheBizImpl.java
deleted
100644 → 0
View file @
38ba5875
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 @
52d6f85f
...
...
@@ -20,7 +20,6 @@
*/
package
net
.
mingsoft
.
cms
.
dao
;
import
com.baomidou.mybatisplus.annotation.SqlParser
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.springframework.stereotype.Component
;
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
52d6f85f
...
...
@@ -307,13 +307,13 @@
and FIND_IN_SET(a.category_id,#{ids})>0
</if>
<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
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
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
test=
"map.content_type!=null"
>
and
<foreach
item=
"item"
index=
"index"
collection=
"map.content_type.split(',')"
open=
"("
separator=
"or"
close=
")"
>
...
...
@@ -321,13 +321,13 @@
</foreach>
</if>
<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
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
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
test=
"map.content_datetime_start!=null and map.content_datetime_end!=null"
>
<if
test=
"_databaseId == 'mysql'"
>
...
...
@@ -341,7 +341,7 @@
<if
test=
"tableName!=null and tableName!='' and diyMap!=null"
>
<foreach
item=
"item"
index=
"index"
collection=
"diyList"
open=
""
separator=
""
close=
""
>
and d.${field.key} like CONCAT(CONCAT(
"%",#{item.value}),"%"
)
and d.${field.key} like CONCAT(CONCAT(
'%',#{item.value}),'%'
)
</foreach>
</if>
</where>
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
52d6f85f
...
...
@@ -27,7 +27,6 @@ import freemarker.core.ParseException;
import
freemarker.template.MalformedTemplateNameException
;
import
freemarker.template.TemplateNotFoundException
;
import
net.mingsoft.base.constant.Const
;
import
net.mingsoft.basic.holder.DataHolder
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.SpringUtil
;
import
net.mingsoft.cms.bean.CategoryBean
;
...
...
src/main/resources/application-dev.yml
View file @
52d6f85f
#spring:
# datasource:
# url: jdbc:mysql://192.168.0.8:3316/mcms-dev-5.2-8?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
# username: mcms
# password: mcms
# filters: wall,mergeStat
# type: com.alibaba.druid.pool.DruidDataSource
spring
:
datasource
:
driver-class-name
:
oracle.jdbc.driver.OracleDriver
url
:
jdbc:oracle:thin:@192.168.0.7:1521:helowin
url
:
jdbc:mysql://192.168.0.8:3316/mcms-dev-5.2-8?useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&autoReconnect=true&allowMultiQueries=true&useSSL=true
username
:
mcms
password
:
mcms
filters
:
wall,mergeStat
type
:
com.alibaba.druid.pool.DruidDataSource
#spring:
# datasource:
# driver-class-name: oracle.jdbc.driver.OracleDriver
# url: jdbc:oracle:thin:@192.168.0.7:1521:helowin
# username: mcms
# password: mcms
# filters: wall,mergeStat
# type: com.alibaba.druid.pool.DruidDataSource
src/main/resources/application.yml
View file @
52d6f85f
...
...
@@ -96,6 +96,6 @@ mybatis-plus:
db-config
:
id-type
:
auto
configuration
:
database-id
:
oracle
database-id
:
mysql
cache-enabled
:
true
jdbc-type-for-null
:
'
null'
#注意:单引号
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
52d6f85f
...
...
@@ -11,7 +11,7 @@
<el-header
class=
"ms-header"
height=
"50px"
>
<el-col
:span=
"12"
>
<
@
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
name=
"cms:content:del"
>
<el-button
type=
"danger"
icon=
"el-icon-delete"
size=
"mini"
@
click=
"del(selectionList)"
:disabled=
"!selectionList.length"
>
删除
</el-button>
...
...
@@ -368,13 +368,18 @@
},
//新增
save
:
function
(
id
)
{
//id有值时编辑
if
(
id
)
{
location
.
href
=
this
.
manager
+
"/cms/content/form.do?id="
+
id
;
}
else
if
(
id
==
0
){
//在全部栏目下新增文章
location
.
href
=
this
.
manager
+
"/cms/content/form.do"
;
}
else
{
location
.
href
=
this
.
manager
+
"/cms/content/form.do?categoryId="
+
this
.
form
.
categoryId
;
}
else
{
//根据当前栏目新增时自动选中栏目
var
categoryId
=
this
.
form
.
categoryId
;
if
(
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