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
b03361cd
Commit
b03361cd
authored
Dec 02, 2019
by
sgjj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复标签
parent
765bfd55
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
152 additions
and
54 deletions
+152
-54
CategoryAction.java
src/main/java/net/mingsoft/cms/action/CategoryAction.java
+4
-0
ContentAction.java
src/main/java/net/mingsoft/cms/action/ContentAction.java
+4
-11
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+22
-24
MCmsAction.java
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
+5
-5
ColumnArticleIdBean.java
src/main/java/net/mingsoft/cms/bean/ColumnArticleIdBean.java
+2
-1
ICategoryBiz.java
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
+14
-0
CategoryBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
+42
-1
ICategoryDao.java
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
+11
-0
ICategoryDao.xml
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
+36
-1
IContentDao.xml
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
+6
-6
ContentEntity.java
src/main/java/net/mingsoft/cms/entity/ContentEntity.java
+6
-5
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+0
-0
tree.js
src/main/webapp/static/plugins/tree-select/tree.js
+0
-0
index.htm
src/main/webapp/templets/1/default/index.htm
+0
-0
No files found.
src/main/java/net/mingsoft/cms/action/CategoryAction.java
View file @
b03361cd
...
...
@@ -102,6 +102,7 @@ public class CategoryAction extends BaseAction{
@RequestMapping
(
"/list"
)
@ResponseBody
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
,
HttpServletResponse
response
,
HttpServletRequest
request
,
@ApiIgnore
ModelMap
model
,
BindingResult
result
)
{
category
.
setAppId
(
BasicUtil
.
getAppId
());
BasicUtil
.
startPage
();
List
categoryList
=
categoryBiz
.
query
(
category
);
return
ResultData
.
build
().
success
(
new
EUListBean
(
categoryList
,(
int
)
BasicUtil
.
endPage
(
categoryList
).
getTotal
()));
...
...
@@ -131,6 +132,7 @@ public class CategoryAction extends BaseAction{
if
(
category
.
getId
()==
null
)
{
return
ResultData
.
build
().
error
();
}
category
.
setAppId
(
BasicUtil
.
getAppId
());
CategoryEntity
_category
=
(
CategoryEntity
)
categoryBiz
.
getEntity
(
Integer
.
parseInt
(
category
.
getId
()));
return
ResultData
.
build
().
success
(
_category
);
}
...
...
@@ -188,6 +190,7 @@ public class CategoryAction extends BaseAction{
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryParentId
()+
""
,
1
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.parent.id"
),
"1"
,
"100"
));
}
category
.
setAppId
(
BasicUtil
.
getAppId
());
categoryBiz
.
saveEntity
(
category
);
return
ResultData
.
build
().
success
(
category
);
}
...
...
@@ -262,6 +265,7 @@ public class CategoryAction extends BaseAction{
if
(!
StringUtil
.
checkLength
(
category
.
getCategoryParentId
()+
""
,
0
,
100
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"category.parent.id"
),
"1"
,
"100"
));
}
category
.
setAppId
(
BasicUtil
.
getAppId
());
categoryBiz
.
updateEntity
(
category
);
return
ResultData
.
build
().
success
(
category
);
}
...
...
src/main/java/net/mingsoft/cms/action/ContentAction.java
View file @
b03361cd
package
net
.
mingsoft
.
cms
.
action
;
import
java.util.List
;
import
java.io.File
;
import
java.util.ArrayList
;
import
java.util.Map
;
import
java.util.regex.Matcher
;
import
java.util.regex.Pattern
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
com.alibaba.fastjson.JSON
;
import
net.mingsoft.base.entity.ResultData
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.validation.BindingResult
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.ui.ModelMap
;
...
...
@@ -20,19 +13,15 @@ import org.springframework.stereotype.Controller;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.ModelAttribute
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.base.util.JSONObject
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.StringUtil
;
import
net.mingsoft.base.filter.DateValueFilter
;
import
net.mingsoft.base.filter.DoubleValueFilter
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.annotation.LogAnn
;
import
net.mingsoft.basic.constant.e.BusinessTypeEnum
;
...
...
@@ -105,6 +94,7 @@ public class ContentAction extends BaseAction{
@RequestMapping
(
"/list"
)
@ResponseBody
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
ContentEntity
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
@ApiIgnore
ModelMap
model
,
BindingResult
result
)
{
content
.
setAppId
(
BasicUtil
.
getAppId
());
BasicUtil
.
startPage
();
List
contentList
=
contentBiz
.
query
(
content
);
return
ResultData
.
build
().
success
(
new
EUListBean
(
contentList
,(
int
)
BasicUtil
.
endPage
(
contentList
).
getTotal
()));
...
...
@@ -134,6 +124,7 @@ public class ContentAction extends BaseAction{
if
(
content
.
getId
()==
null
)
{
return
ResultData
.
build
().
error
();
}
content
.
setAppId
(
BasicUtil
.
getAppId
());
ContentEntity
_content
=
(
ContentEntity
)
contentBiz
.
getEntity
(
Integer
.
parseInt
(
content
.
getId
()));
return
ResultData
.
build
().
success
(
_content
);
}
...
...
@@ -191,6 +182,7 @@ public class ContentAction extends BaseAction{
if
(!
StringUtil
.
checkLength
(
content
.
getContentUrl
()+
""
,
0
,
200
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"content.url"
),
"0"
,
"200"
));
}
content
.
setAppId
(
BasicUtil
.
getAppId
());
contentBiz
.
saveEntity
(
content
);
return
ResultData
.
build
().
success
(
content
);
}
...
...
@@ -265,6 +257,7 @@ public class ContentAction extends BaseAction{
if
(!
StringUtil
.
checkLength
(
content
.
getContentUrl
()+
""
,
0
,
200
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"content.url"
),
"0"
,
"200"
));
}
content
.
setAppId
(
BasicUtil
.
getAppId
());
contentBiz
.
updateEntity
(
content
);
return
ResultData
.
build
().
success
(
content
);
}
...
...
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
b03361cd
...
...
@@ -24,7 +24,6 @@ package net.mingsoft.cms.action;
import
java.io.File
;
import
java.io.IOException
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
...
...
@@ -32,6 +31,9 @@ import javax.servlet.http.HttpServletResponse;
import
cn.hutool.core.bean.BeanUtil
;
import
cn.hutool.core.bean.copier.CopyOptions
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -42,13 +44,9 @@ import org.springframework.web.bind.annotation.PathVariable;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
com.alibaba.fastjson.JSONArray
;
import
net.mingsoft.basic.action.BaseAction
;
import
net.mingsoft.basic.biz.IColumnBiz
;
import
net.mingsoft.basic.biz.IModelBiz
;
import
net.mingsoft.basic.entity.AppEntity
;
import
net.mingsoft.basic.entity.CategoryEntity
;
import
net.mingsoft.basic.entity.ColumnEntity
;
import
net.mingsoft.cms.bean.ColumnArticleIdBean
;
import
net.mingsoft.cms.biz.IArticleBiz
;
import
net.mingsoft.cms.constant.ModelCode
;
...
...
@@ -84,7 +82,7 @@ public class GeneraterAction extends BaseAction {
* 栏目管理业务层
*/
@Autowired
private
IC
olumnBiz
column
Biz
;
private
IC
ategoryBiz
category
Biz
;
/**
* 模块管理业务层
...
...
@@ -155,40 +153,42 @@ public class GeneraterAction extends BaseAction {
* @param response
* @param columnId
*/
@RequestMapping
(
"/{
column
Id}/genernateColumn"
)
@RequestMapping
(
"/{
Category
Id}/genernateColumn"
)
@RequiresPermissions
(
"cms:generate:column"
)
@ResponseBody
public
void
genernateColumn
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
int
column
Id
)
{
public
void
genernateColumn
(
HttpServletRequest
request
,
HttpServletResponse
response
,
@PathVariable
String
Category
Id
)
{
// 获取站点id
AppEntity
app
=
BasicUtil
.
getApp
();
List
<
C
olumnEntity
>
columns
=
new
ArrayList
<
Column
Entity
>();
List
<
C
ategoryEntity
>
columns
=
new
ArrayList
<
Category
Entity
>();
// 如果栏目id小于0则更新所有的栏目,否则只更新选中的栏目
int
modelId
=
BasicUtil
.
getModelCodeId
(
ModelCode
.
CMS_COLUMN
);
// 查询当前模块编号
if
(
columnId
>
0
)
{
List
<
CategoryEntity
>
categorys
=
columnBiz
.
queryChildrenCategory
(
columnId
,
app
.
getAppId
(),
modelId
);
for
(
CategoryEntity
c
:
categorys
)
{
columns
.
add
((
ColumnEntity
)
columnBiz
.
getEntity
(
c
.
getCategoryId
()));
}
if
(
StringUtils
.
isNotBlank
(
CategoryId
))
{
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryEntity
.
setId
(
CategoryId
);
categoryEntity
.
setAppId
(
app
.
getAppId
());
columns
=
categoryBiz
.
queryChilds
(
categoryEntity
);
}
else
{
// 获取所有的内容管理栏目
columns
=
columnBiz
.
queryAll
(
app
.
getAppId
(),
modelId
);
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryEntity
.
setAppId
(
app
.
getAppId
());
columns
=
categoryBiz
.
query
(
categoryEntity
);
}
List
<
ColumnArticleIdBean
>
articleIdList
=
null
;
try
{
// 1、设置模板文件夹路径
// 获取栏目列表模版
for
(
C
olumn
Entity
column
:
columns
)
{
for
(
C
ategory
Entity
column
:
columns
)
{
// 判断模板文件是否存在
if
(!
FileUtil
.
exist
(
ParserUtil
.
buildTempletPath
(
column
.
getC
olumn
Url
())))
{
if
(!
FileUtil
.
exist
(
ParserUtil
.
buildTempletPath
(
column
.
getC
ategory
Url
())))
{
continue
;
}
articleIdList
=
articleBiz
.
queryIdsByCategoryIdForParser
(
column
.
getCategoryId
(
),
null
,
null
);
articleIdList
=
articleBiz
.
queryIdsByCategoryIdForParser
(
Integer
.
parseInt
(
column
.
getCategoryId
()
),
null
,
null
);
// 判断列表类型
switch
(
column
.
getColumnType
())
{
case
ColumnEntity
.
COLUMN_TYPE_LIST
:
// 列表
switch
(
column
.
getCategoryType
())
{
//TODO 暂时先用字符串代替
case
"1"
:
// 列表
CmsParserUtil
.
generateList
(
column
,
articleIdList
.
size
());
break
;
case
ColumnEntity
.
COLUMN_TYPE_COVER
:
// 单页
case
"2"
:
// 单页
if
(
articleIdList
.
size
()==
0
){
ColumnArticleIdBean
columnArticleIdBean
=
new
ColumnArticleIdBean
();
CopyOptions
copyOptions
=
CopyOptions
.
create
();
...
...
@@ -198,8 +198,6 @@ public class GeneraterAction extends BaseAction {
}
CmsParserUtil
.
generateBasic
(
articleIdList
);
break
;
default
:
throw
new
IllegalStateException
(
"Unexpected value: "
+
column
.
getColumnType
());
}
}
}
catch
(
IOException
e
)
{
...
...
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
b03361cd
...
...
@@ -196,7 +196,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
String
content
=
""
;
try
{
//根据模板路径,参数生成
content
=
CmsParserUtil
.
generate
(
columnArticles
.
get
(
0
).
getC
olumn
ListUrl
(),
map
,
isMobileDevice
(
req
));
content
=
CmsParserUtil
.
generate
(
columnArticles
.
get
(
0
).
getC
ategory
ListUrl
(),
map
,
isMobileDevice
(
req
));
}
catch
(
TemplateNotFoundException
e
)
{
e
.
printStackTrace
();
}
catch
(
MalformedTemplateNameException
e
)
{
...
...
@@ -251,20 +251,20 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
continue
;
}
// 文章的栏目路径
String
articleColumnPath
=
articleIdList
.
get
(
artId
).
getC
olumn
Path
();
String
articleColumnPath
=
articleIdList
.
get
(
artId
).
getC
ategory
Path
();
// 文章的栏目模型编号
int
columnContentModelId
=
articleIdList
.
get
(
artId
).
getColumnContent
ModelId
();
String
columnContentModelId
=
articleIdList
.
get
(
artId
).
getMdiy
ModelId
();
Map
<
String
,
Object
>
parserParams
=
new
HashMap
<
String
,
Object
>();
parserParams
.
put
(
ParserUtil
.
COLUMN
,
articleIdList
.
get
(
artId
));
// 判断当前栏目是否有自定义模型
if
(
columnContentModelId
>
0
)
{
if
(
StringUtils
.
isNotBlank
(
columnContentModelId
)
)
{
// 通过当前栏目的模型编号获取,自定义模型表名
if
(
contentModelMap
.
containsKey
(
columnContentModelId
))
{
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
getCmTableName
());
}
else
{
// 通过栏目模型编号获取自定义模型实体
contentModel
=
(
ContentModelEntity
)
SpringUtil
.
getBean
(
IContentModelBiz
.
class
)
.
getEntity
(
columnContentModelId
);
.
getEntity
(
Integer
.
parseInt
(
columnContentModelId
)
);
// 将自定义模型编号设置为key值
contentModelMap
.
put
(
columnContentModelId
,
contentModel
.
getCmTableName
());
parserParams
.
put
(
ParserUtil
.
TABLE_NAME
,
contentModel
.
getCmTableName
());
...
...
src/main/java/net/mingsoft/cms/bean/ColumnArticleIdBean.java
View file @
b03361cd
...
...
@@ -22,13 +22,14 @@ The MIT License (MIT) * Copyright (c) 2016 铭飞科技(mingsoft.net)
package
net
.
mingsoft
.
cms
.
bean
;
import
net.mingsoft.basic.entity.ColumnEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
/**
* 文章解析生成
* @author 铭飞开源团队
* @date 2018年12月13日
*/
public
class
ColumnArticleIdBean
extends
C
olumnEntity
{
public
class
ColumnArticleIdBean
extends
C
ategoryEntity
{
/**
* 文章编号
*/
...
...
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
View file @
b03361cd
package
net
.
mingsoft
.
cms
.
biz
;
import
net.mingsoft.base.biz.IBaseBiz
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
java.util.List
;
/**
...
...
@@ -11,4 +14,14 @@ import net.mingsoft.base.biz.IBaseBiz;
*/
public
interface
ICategoryBiz
extends
IBaseBiz
{
/**
* 查询当前分类下的所有子分类
* @param category
* @return
*/
List
<
CategoryEntity
>
queryChilds
(
CategoryEntity
category
);
int
saveEntity
(
CategoryEntity
entity
);
void
updateEntity
(
CategoryEntity
entity
);
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
b03361cd
...
...
@@ -21,12 +21,15 @@ The MIT License (MIT) * Copyright (c) 2019 铭飞科技
package
net
.
mingsoft
.
cms
.
biz
.
impl
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
net.mingsoft.base.biz.impl.BaseBizImpl
;
import
net.mingsoft.base.dao.IBaseDao
;
import
java.util.*
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.dao.ICategoryDao
;
...
...
@@ -49,4 +52,41 @@ public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
// TODO Auto-generated method stub
return
categoryDao
;
}
@Override
public
List
<
CategoryEntity
>
queryChilds
(
CategoryEntity
category
)
{
// TODO Auto-generated method stub
return
categoryDao
.
queryChildren
(
category
);
}
@Override
public
int
saveEntity
(
CategoryEntity
categoryEntity
)
{
// TODO Auto-generated method stub
setParentId
(
categoryEntity
);
return
super
.
saveEntity
(
categoryEntity
);
}
private
void
setParentId
(
CategoryEntity
categoryEntity
)
{
if
(
StringUtils
.
isNotEmpty
(
categoryEntity
.
getCategoryId
())&&
Integer
.
parseInt
(
categoryEntity
.
getCategoryId
())>
0
)
{
CategoryEntity
category
=
(
CategoryEntity
)
categoryDao
.
getEntity
(
Integer
.
parseInt
(
categoryEntity
.
getCategoryId
()));
if
(
StringUtils
.
isEmpty
(
category
.
getCategoryParentId
()))
{
categoryEntity
.
setCategoryParentId
(
categoryEntity
.
getCategoryId
());
}
else
{
categoryEntity
.
setCategoryParentId
(
category
.
getCategoryParentId
()+
","
+
categoryEntity
.
getCategoryParentId
());
}
}
}
@Override
public
void
updateEntity
(
CategoryEntity
entity
)
{
List
<
CategoryEntity
>
categoryEntities
=
queryChilds
(
entity
);
setParentId
(
entity
);
super
.
updateEntity
(
entity
);
categoryEntities
.
forEach
(
x
->{
setParentId
(
x
);
if
(!
x
.
getId
().
equals
(
entity
.
getId
())){
super
.
updateEntity
(
x
);
}
});
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
View file @
b03361cd
...
...
@@ -2,7 +2,9 @@ package net.mingsoft.cms.dao;
import
net.mingsoft.base.dao.IBaseDao
;
import
java.util.*
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.apache.ibatis.annotations.Param
;
import
org.springframework.stereotype.Component
;
/**
...
...
@@ -13,4 +15,12 @@ import org.springframework.stereotype.Component;
*/
@Component
(
"cmsCategoryDao"
)
public
interface
ICategoryDao
extends
IBaseDao
{
/**
* 查询当前分类下面的所有子分类
* @param category 必须存在categoryId categoryParentId
* @return
*/
public
List
<
net
.
mingsoft
.
cms
.
entity
.
CategoryEntity
>
queryChildren
(
CategoryEntity
category
);
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/dao/ICategoryDao.xml
View file @
b03361cd
...
...
@@ -90,7 +90,7 @@
update cms_category
<set>
<if
test=
"categoryTitle != null and categoryTitle != ''"
>
category_title=#{categoryTitle},
</if>
<if
test=
"categoryId != null and categoryId != ''"
>
category_id=#{categoryId},
</if>
category_id=#{categoryId},
<if
test=
"categoryType != null and categoryType != ''"
>
category_type=#{categoryType},
</if>
<if
test=
"categorySort != null"
>
category_sort=#{categorySort},
</if>
<if
test=
"categoryListUrl != null and categoryListUrl != ''"
>
category_list_url=#{categoryListUrl},
</if>
...
...
@@ -151,6 +151,41 @@
</where>
limit 0,1
</select>
<sql
id=
"queryWhereCategoryId"
databaseId=
"mysql"
>
find_in_set('${id}',CATEGORY_PARENT_ID)
</sql>
<sql
id=
"queryWhereCategoryId"
databaseId=
"oracle"
>
instr(','||'${id}'||',', ','||CATEGORY_PARENT_ID||',')>0
</sql>
<sql
id=
"queryWhereCategoryId"
databaseId=
"sqlServer"
>
CHARINDEX(','+'${id}'+',' , ','+CATEGORY_PARENT_ID +',')>0
</sql>
<!-- 模糊查询开始 -->
<select
id=
"queryChildren"
resultMap=
"resultMap"
>
select * from cms_category
<where>
<if
test=
"appId > 0"
>
and app_id=#{appId}
</if>
<if
test=
"dictId > 0"
>
and dict_id=#{dictId}
</if>
and
(
<if
test=
"categoryParentId != null and categoryParentId!=''"
>
CATEGORY_PARENT_ID like '%${categoryParentId}%'
</if>
<if
test=
"categoryParentId == null or categoryParentId ==''"
>
<include
refid=
"queryWhereCategoryId"
></include>
</if>
<if
test=
"id != null"
>
or id=#{id}
</if>
)
and del=0
</where>
</select>
<!--删除-->
...
...
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
b03361cd
...
...
@@ -18,7 +18,7 @@
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_url"
property=
"contentUrl"
/>
<!--文章跳转链接地址 -->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"app
id"
property=
"appi
d"
/>
<!--文章管理的应用id -->
<result
column=
"app
_id"
property=
"appI
d"
/>
<!--文章管理的应用id -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
<result
column=
"update_by"
property=
"updateBy"
/>
<!--修改人 -->
...
...
@@ -45,7 +45,7 @@
<if
test=
"contentDetails != null and contentDetails != ''"
>
content_details,
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
content_url,
</if>
<if
test=
"contentHit != null"
>
content_hit,
</if>
<if
test=
"app
id != null"
>
app
id,
</if>
<if
test=
"app
Id != null"
>
app_
id,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
<if
test=
"updateBy > 0"
>
update_by,
</if>
...
...
@@ -67,7 +67,7 @@
<if
test=
"contentDetails != null and contentDetails != ''"
>
#{contentDetails},
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
#{contentUrl},
</if>
<if
test=
"contentHit != null"
>
#{contentHit},
</if>
<if
test=
"app
id != null"
>
#{appi
d},
</if>
<if
test=
"app
Id != null"
>
#{appI
d},
</if>
<if
test=
"createBy > 0"
>
#{createBy},
</if>
<if
test=
"createDate != null"
>
#{createDate},
</if>
<if
test=
"updateBy > 0"
>
#{updateBy},
</if>
...
...
@@ -94,7 +94,7 @@
<if
test=
"contentDetails != null and contentDetails != ''"
>
content_details=#{contentDetails},
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
content_url=#{contentUrl},
</if>
<if
test=
"contentHit != null"
>
content_hit=#{contentHit},
</if>
<if
test=
"app
id != null"
>
appid=#{appi
d},
</if>
<if
test=
"app
Id != null"
>
app_id=#{appI
d},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
<if
test=
"updateBy > 0"
>
update_by=#{updateBy},
</if>
...
...
@@ -127,7 +127,7 @@
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
and content_url=#{contentUrl}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"app
id != null"
>
and appid=#{appi
d}
</if>
<if
test=
"app
Id != null"
>
and app_id=#{appI
d}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and update_by=#{updateBy}
</if>
...
...
@@ -173,7 +173,7 @@
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"contentUrl != null and contentUrl != ''"
>
and content_url=#{contentUrl}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"app
id != null"
>
and appid=#{appi
d}
</if>
<if
test=
"app
Id != null"
>
and app_id=#{appI
d}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"updateBy > 0"
>
and update_by=#{updateBy}
</if>
...
...
src/main/java/net/mingsoft/cms/entity/ContentEntity.java
View file @
b03361cd
...
...
@@ -73,7 +73,7 @@ private static final long serialVersionUID = 1574925152617L;
/**
* 文章管理的应用id
*/
private
Integer
app
i
d
;
private
Integer
app
I
d
;
/**
* 点击次数
*/
...
...
@@ -259,14 +259,14 @@ private static final long serialVersionUID = 1574925152617L;
/**
* 设置文章管理的应用id
*/
public
void
setApp
id
(
Integer
appi
d
)
{
this
.
app
id
=
appi
d
;
public
void
setApp
Id
(
Integer
appI
d
)
{
this
.
app
Id
=
appI
d
;
}
/**
* 获取文章管理的应用id
*/
public
Integer
getApp
i
d
()
{
return
this
.
app
i
d
;
public
Integer
getApp
I
d
()
{
return
this
.
app
I
d
;
}
}
\ No newline at end of file
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
b03361cd
This diff is collapsed.
Click to expand it.
src/main/webapp/static/plugins/tree-select/tree.js
View file @
b03361cd
This diff is collapsed.
Click to expand it.
src/main/webapp/templets/1/default/index.htm
View file @
b03361cd
This diff is collapsed.
Click to expand it.
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