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
4cebaff0
Commit
4cebaff0
authored
Dec 02, 2020
by
guwd
Browse files
1、生成修改html/编号问题,增加app_dir
2、针对app_dir调整解析器 3、模板交互增加
parent
05bb1bd7
Changes
4
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
4cebaff0
...
...
@@ -223,7 +223,7 @@ public class GeneraterAction extends BaseAction {
contentBean
.
setBeginTime
(
dateTime
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
)
{
map
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
map
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
...
...
@@ -277,7 +277,7 @@ public class GeneraterAction extends BaseAction {
public
String
viewIndex
(
HttpServletRequest
request
,
@PathVariable
String
position
,
HttpServletResponse
response
)
{
AppEntity
app
=
BasicUtil
.
getApp
();
// 组织主页预览地址
String
indexPosition
=
app
.
getAppHostUrl
()
+
File
.
separator
+
ParserUtil
.
HTML
+
File
.
separator
+
app
.
getApp
Id
()
String
indexPosition
=
app
.
getAppHostUrl
()
+
File
.
separator
+
ParserUtil
.
HTML
+
File
.
separator
+
app
.
getApp
Dir
()
+
File
.
separator
+
position
+
ParserUtil
.
HTML_SUFFIX
;
return
"redirect:"
+
indexPosition
;
}
...
...
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
4cebaff0
...
...
@@ -427,7 +427,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
params
.
put
(
ParserUtil
.
URL
,
url
);
params
.
put
(
SEARCH
,
searchMap
);
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
)
{
params
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
params
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
params
.
put
(
ParserUtil
.
PAGE
,
page
);
params
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
...
...
@@ -470,7 +470,7 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
params
.
put
(
ParserUtil
.
URL
,
url
);
params
.
put
(
SEARCH
,
searchMap
);
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
)
{
params
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
params
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
params
.
put
(
ParserUtil
.
PAGE
,
page
);
params
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
...
...
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
View file @
4cebaff0
...
...
@@ -125,7 +125,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
contentBean
.
setBeginTime
(
dateTime
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
map
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
...
...
@@ -177,7 +177,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
//获取模板中列表标签中的条件
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
map
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
...
...
@@ -227,7 +227,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
//设置站点编号
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
map
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
String
read
=
ParserUtil
.
rendering
(
templatePath
,
map
);
FileUtil
.
writeString
(
read
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
net
.
mingsoft
.
base
.
constant
.
Const
.
UTF8
);
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
4cebaff0
...
...
@@ -83,7 +83,7 @@ public class CmsParserUtil extends ParserUtil {
//获取模板中列表标签中的条件
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
)
{
map
.
put
(
ParserUtil
.
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
map
.
put
(
ParserUtil
.
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
...
...
@@ -107,7 +107,7 @@ public class CmsParserUtil extends ParserUtil {
parserParams
.
put
(
IS_DO
,
false
);
parserParams
.
put
(
HTML
,
HTML
);
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
parserParams
.
put
(
APP_
I
D
,
BasicUtil
.
getWebsiteApp
().
getApp
Id
());
parserParams
.
put
(
APP_D
IR
,
BasicUtil
.
getWebsiteApp
().
getApp
Dir
());
}
if
(
contentModel
!=
null
)
{
// 将自定义模型编号设置为key值
...
...
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