Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
MCMS
Commits
631574fe
Commit
631574fe
authored
Nov 25, 2020
by
xierz
Browse files
Merge remote-tracking branch 'origin/master'
parents
7146a2e1
a6436015
Changes
8
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
631574fe
...
@@ -36,7 +36,6 @@ import net.mingsoft.cms.biz.ICategoryBiz;
...
@@ -36,7 +36,6 @@ import net.mingsoft.cms.biz.ICategoryBiz;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.bean.AttributeBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.util.ParserUtil
;
import
net.mingsoft.mdiy.util.ParserUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
...
@@ -173,6 +172,7 @@ public class GeneraterAction extends BaseAction {
...
@@ -173,6 +172,7 @@ public class GeneraterAction extends BaseAction {
for
(
CategoryEntity
column
:
columns
)
{
for
(
CategoryEntity
column
:
columns
)
{
ContentBean
contentBean
=
new
ContentBean
();
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setCategoryId
(
column
.
getId
());
contentBean
.
setCategoryId
(
column
.
getId
());
// 分类是列表
// 分类是列表
if
(
column
.
getCategoryType
().
equals
(
"1"
))
{
if
(
column
.
getCategoryType
().
equals
(
"1"
))
{
// 判断模板文件是否存在
// 判断模板文件是否存在
...
@@ -189,13 +189,6 @@ public class GeneraterAction extends BaseAction {
...
@@ -189,13 +189,6 @@ public class GeneraterAction extends BaseAction {
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
PAGE
,
page
);
AttributeBean
attributeBean
=
new
AttributeBean
();
// 获取文章列表模板标签属性
ParserUtil
.
read
(
column
.
getCategoryListUrl
(),
map
,
page
,
attributeBean
);
contentBean
.
setFlag
(
attributeBean
.
getFlag
());
contentBean
.
setNoflag
(
attributeBean
.
getNoflag
());
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
}
}
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
// 判断列表类型
// 判断列表类型
...
@@ -236,7 +229,6 @@ public class GeneraterAction extends BaseAction {
...
@@ -236,7 +229,6 @@ public class GeneraterAction extends BaseAction {
// 网站风格物理路径
// 网站风格物理路径
List
<
CategoryBean
>
articleIdList
=
null
;
List
<
CategoryBean
>
articleIdList
=
null
;
List
<
CategoryEntity
>
categoryList
=
null
;
List
<
CategoryEntity
>
categoryList
=
null
;
AttributeBean
attributeBean
=
new
AttributeBean
();
ContentBean
contentBean
=
new
ContentBean
();
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setBeginTime
(
dateTime
);
contentBean
.
setBeginTime
(
dateTime
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -260,12 +252,7 @@ public class GeneraterAction extends BaseAction {
...
@@ -260,12 +252,7 @@ public class GeneraterAction extends BaseAction {
LOG
.
error
(
"模板不存在:{}"
,
category
.
getCategoryUrl
());
LOG
.
error
(
"模板不存在:{}"
,
category
.
getCategoryUrl
());
continue
;
continue
;
}
}
// 获取文章列表表属性
ParserUtil
.
read
(
category
.
getCategoryListUrl
(),
map
,
page
,
attributeBean
);
contentBean
.
setFlag
(
attributeBean
.
getFlag
());
contentBean
.
setNoflag
(
attributeBean
.
getNoflag
());
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
}
}
//将文章列表标签中的中的参数
//将文章列表标签中的中的参数
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
...
@@ -285,11 +272,6 @@ public class GeneraterAction extends BaseAction {
...
@@ -285,11 +272,6 @@ public class GeneraterAction extends BaseAction {
LOG
.
error
(
"模板不存在:{}"
,
category
.
getCategoryUrl
());
LOG
.
error
(
"模板不存在:{}"
,
category
.
getCategoryUrl
());
return
ResultData
.
build
().
error
(
getResString
(
"templet.file"
));
return
ResultData
.
build
().
error
(
getResString
(
"templet.file"
));
}
}
ParserUtil
.
read
(
category
.
getCategoryListUrl
(),
map
,
page
,
attributeBean
);
contentBean
.
setFlag
(
attributeBean
.
getFlag
());
contentBean
.
setNoflag
(
attributeBean
.
getNoflag
());
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
}
}
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParser
(
contentBean
);
// 有符合条件的就更新
// 有符合条件的就更新
...
...
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
631574fe
...
@@ -38,7 +38,6 @@ import net.mingsoft.cms.biz.IContentBiz;
...
@@ -38,7 +38,6 @@ import net.mingsoft.cms.biz.IContentBiz;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.bean.AttributeBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.biz.IModelBiz
;
import
net.mingsoft.mdiy.biz.IModelBiz
;
import
net.mingsoft.mdiy.biz.IPageBiz
;
import
net.mingsoft.mdiy.biz.IPageBiz
;
...
@@ -409,8 +408,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
...
@@ -409,8 +408,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
//设置动态请求的模块路径
//设置动态请求的模块路径
map
.
put
(
ParserUtil
.
MODEL_NAME
,
"mcms"
);
map
.
put
(
ParserUtil
.
MODEL_NAME
,
"mcms"
);
searchMap
.
put
(
ParserUtil
.
PAGE_NO
,
0
);
searchMap
.
put
(
ParserUtil
.
PAGE_NO
,
0
);
AttributeBean
attributeBean
=
new
AttributeBean
();
ParserUtil
.
read
(
SEARCH
+
ParserUtil
.
HTM_SUFFIX
,
map
,
page
);
ParserUtil
.
read
(
SEARCH
+
ParserUtil
.
HTM_SUFFIX
,
map
,
page
,
attributeBean
);
int
total
=
PageUtil
.
totalPage
(
count
,
page
.
getSize
());
int
total
=
PageUtil
.
totalPage
(
count
,
page
.
getSize
());
int
pageNo
=
BasicUtil
.
getInt
(
ParserUtil
.
PAGE_NO
,
1
);
int
pageNo
=
BasicUtil
.
getInt
(
ParserUtil
.
PAGE_NO
,
1
);
if
(
pageNo
>=
total
&&
total
!=
0
)
{
if
(
pageNo
>=
total
&&
total
!=
0
)
{
...
...
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
View file @
631574fe
...
@@ -34,7 +34,6 @@ import net.mingsoft.cms.dao.ICategoryDao;
...
@@ -34,7 +34,6 @@ import net.mingsoft.cms.dao.ICategoryDao;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.cms.util.CmsParserUtil
;
import
net.mingsoft.mdiy.bean.AttributeBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
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
net.mingsoft.mdiy.util.ParserUtil
;
...
@@ -122,7 +121,6 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -122,7 +121,6 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
// 网站风格物理路径
// 网站风格物理路径
List
<
CategoryBean
>
articleIdList
=
null
;
List
<
CategoryBean
>
articleIdList
=
null
;
List
<
CategoryEntity
>
categoryList
=
null
;
List
<
CategoryEntity
>
categoryList
=
null
;
AttributeBean
attributeBean
=
new
AttributeBean
();
ContentBean
contentBean
=
new
ContentBean
();
ContentBean
contentBean
=
new
ContentBean
();
contentBean
.
setBeginTime
(
dateTime
);
contentBean
.
setBeginTime
(
dateTime
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
...
@@ -145,12 +143,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -145,12 +143,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
LOG
.
error
(
"模板不存在:{}"
,
category
.
getCategoryUrl
());
LOG
.
error
(
"模板不存在:{}"
,
category
.
getCategoryUrl
());
continue
;
continue
;
}
}
// 获取文章列表表属性
ParserUtil
.
read
(
category
.
getCategoryListUrl
(),
map
,
page
,
attributeBean
);
contentBean
.
setFlag
(
attributeBean
.
getFlag
());
contentBean
.
setNoflag
(
attributeBean
.
getNoflag
());
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
}
}
articleIdList
=
queryIdsByCategoryIdForParser
(
contentBean
);
articleIdList
=
queryIdsByCategoryIdForParser
(
contentBean
);
// 有符合条件的就更新
// 有符合条件的就更新
...
@@ -190,13 +183,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -190,13 +183,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
PAGE
,
page
);
AttributeBean
attributeBean
=
new
AttributeBean
();
// 获取文章列表模板标签属性
ParserUtil
.
read
(
column
.
getCategoryListUrl
(),
map
,
page
,
attributeBean
);
contentBean
.
setFlag
(
attributeBean
.
getFlag
());
contentBean
.
setNoflag
(
attributeBean
.
getNoflag
());
contentBean
.
setOrder
(
attributeBean
.
getOrder
());
contentBean
.
setOrderBy
(
attributeBean
.
getOrderby
());
}
}
articleIdList
=
contentDao
.
queryIdsByCategoryIdForParser
(
contentBean
);
articleIdList
=
contentDao
.
queryIdsByCategoryIdForParser
(
contentBean
);
// 判断列表类型
// 判断列表类型
...
...
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
View file @
631574fe
...
@@ -391,14 +391,6 @@ private static final long serialVersionUID = 1574925152750L;
...
@@ -391,14 +391,6 @@ private static final long serialVersionUID = 1574925152750L;
* 获取栏目图片 (标签使用)
* 获取栏目图片 (标签使用)
*/
*/
public
String
getTypelitpic
()
{
public
String
getTypelitpic
()
{
if
(
StrUtil
.
isNotBlank
(
categoryImg
)){
return
categoryImg
;
try
{
JSONArray
objects
=
JSON
.
parseArray
(
categoryImg
);
return
objects
.
getJSONObject
(
0
).
getString
(
"path"
);
}
catch
(
Exception
e
){
}
}
return
""
;
}
}
}
}
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
631574fe
...
@@ -11,7 +11,6 @@ import net.mingsoft.basic.util.BasicUtil;
...
@@ -11,7 +11,6 @@ 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
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.mdiy.bean.AttributeBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.bean.PageBean
;
import
net.mingsoft.mdiy.biz.IModelBiz
;
import
net.mingsoft.mdiy.biz.IModelBiz
;
import
net.mingsoft.mdiy.biz.impl.ModelBizImpl
;
import
net.mingsoft.mdiy.biz.impl.ModelBizImpl
;
...
@@ -108,8 +107,7 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -108,8 +107,7 @@ public class CmsParserUtil extends ParserUtil {
parserParams
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
parserParams
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
}
}
parserParams
.
put
(
ParserUtil
.
PAGE
,
page
);
parserParams
.
put
(
ParserUtil
.
PAGE
,
page
);
AttributeBean
attributeBean
=
new
AttributeBean
();
ParserUtil
.
read
(
File
.
separator
+
column
.
getCategoryListUrl
(),
parserParams
,
page
);
ParserUtil
.
read
(
File
.
separator
+
column
.
getCategoryListUrl
(),
parserParams
,
page
,
attributeBean
);
int
totalPageSize
=
PageUtil
.
totalPage
(
articleIdTotal
,
page
.
getSize
());
int
totalPageSize
=
PageUtil
.
totalPage
(
articleIdTotal
,
page
.
getSize
());
page
.
setTotal
(
totalPageSize
);
page
.
setTotal
(
totalPageSize
);
//文章列表页没有写文章列表标签,总数为0
//文章列表页没有写文章列表标签,总数为0
...
...
src/main/webapp/WEB-INF/manager/cms/content/index.ftl
View file @
631574fe
...
@@ -122,7 +122,7 @@
...
@@ -122,7 +122,7 @@
#index .left-tree
{
#index .left-tree
{
min-height
:
100
vh
;
min-height
:
100
vh
;
background
:
#
fff
;
background
:
#
fff
;
width
:
18
0
px
;
width
:
22
0
px
;
border-right
:
solid
1
px
#
e6e6e6
;
border-right
:
solid
1
px
#
e6e6e6
;
}
}
...
...
src/main/webapp/WEB-INF/manager/cms/content/main.ftl
View file @
631574fe
...
@@ -68,7 +68,7 @@
...
@@ -68,7 +68,7 @@
</el-popover>
</el-popover>
</template>
</template>
</el-table-column>
</el-table-column>
<el-table-column label="栏目名" align="left" prop="categoryId" :formatter="contentCategoryIdFormat" width="1
0
0">
<el-table-column label="栏目名" align="left" prop="categoryId" :formatter="contentCategoryIdFormat" width="1
8
0">
</el-table-column>
</el-table-column>
<el-table-column label="文章标题" align="left" prop="contentTitle" show-overflow-tooltip>
<el-table-column label="文章标题" align="left" prop="contentTitle" show-overflow-tooltip>
</el-table-column>
</el-table-column>
...
...
src/main/webapp/WEB-INF/manager/index.ftl
View file @
631574fe
...
@@ -328,7 +328,8 @@
...
@@ -328,7 +328,8 @@
})
})
if
(
sub
.syncStoreUrl
)
{
if
(
sub
.syncStoreUrl
)
{
sub
.modelUrl
=
sub
.syncStoreUrl
//
sub
.modelUrl
=
"http://store.web.i.mingsoft.net/#/?client=localhost:8080//ms"
;
sub
.modelUrl
=
sub
.syncStoreUrl
;
sub
.modelTitle
=
'
mstore
';
sub
.modelTitle
=
'
mstore
';
sub
.isStore
=
true
;
sub
.isStore
=
true
;
!
result
?
this
.editableTabs.push
(
sub
)
:
""
!
result
?
this
.editableTabs.push
(
sub
)
:
""
...
...
Write
Preview
Supports
Markdown
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