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
f23d238c
Commit
f23d238c
authored
Nov 06, 2020
by
wujj
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
appid方法修改
parent
12f58816
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
15 deletions
+33
-15
CategoryAction.java
src/main/java/net/mingsoft/cms/action/CategoryAction.java
+1
-1
ContentAction.java
src/main/java/net/mingsoft/cms/action/ContentAction.java
+2
-2
GeneraterAction.java
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
+6
-2
ContentAction.java
src/main/java/net/mingsoft/cms/action/web/ContentAction.java
+1
-1
MCmsAction.java
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
+4
-2
ContentBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
+16
-6
CmsParserUtil.java
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
+3
-1
No files found.
src/main/java/net/mingsoft/cms/action/CategoryAction.java
View file @
f23d238c
...
@@ -96,7 +96,7 @@ public class CategoryAction extends BaseAction {
...
@@ -96,7 +96,7 @@ public class CategoryAction extends BaseAction {
*/
*/
@GetMapping
(
"/form"
)
@GetMapping
(
"/form"
)
public
String
form
(
@ModelAttribute
CategoryEntity
category
,
HttpServletResponse
response
,
HttpServletRequest
request
,
ModelMap
model
){
public
String
form
(
@ModelAttribute
CategoryEntity
category
,
HttpServletResponse
response
,
HttpServletRequest
request
,
ModelMap
model
){
model
.
addAttribute
(
"appId"
,
BasicUtil
.
getAppId
());
model
.
addAttribute
(
"appId"
,
BasicUtil
.
getApp
().
getApp
Id
());
return
"/cms/category/form"
;
return
"/cms/category/form"
;
}
}
...
...
src/main/java/net/mingsoft/cms/action/ContentAction.java
View file @
f23d238c
...
@@ -98,7 +98,7 @@ public class ContentAction extends BaseAction {
...
@@ -98,7 +98,7 @@ public class ContentAction extends BaseAction {
*/
*/
@GetMapping
(
"/form"
)
@GetMapping
(
"/form"
)
public
String
form
(
@ModelAttribute
ContentEntity
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
ModelMap
model
){
public
String
form
(
@ModelAttribute
ContentEntity
content
,
HttpServletResponse
response
,
HttpServletRequest
request
,
ModelMap
model
){
model
.
addAttribute
(
"appId"
,
BasicUtil
.
getAppId
());
model
.
addAttribute
(
"appId"
,
BasicUtil
.
getApp
().
getApp
Id
());
return
"/cms/content/form"
;
return
"/cms/content/form"
;
}
}
...
@@ -176,7 +176,7 @@ public class ContentAction extends BaseAction {
...
@@ -176,7 +176,7 @@ public class ContentAction extends BaseAction {
}
}
/**
/**
* @param content 文章实体
* @param content
s
文章实体
*/
*/
@ApiOperation
(
value
=
"批量删除文章列表接口"
)
@ApiOperation
(
value
=
"批量删除文章列表接口"
)
@PostMapping
(
"/delete"
)
@PostMapping
(
"/delete"
)
...
...
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
f23d238c
...
@@ -182,7 +182,9 @@ public class GeneraterAction extends BaseAction {
...
@@ -182,7 +182,9 @@ public class GeneraterAction extends BaseAction {
}
}
//获取模板中列表标签中的条件
//获取模板中列表标签中的条件
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
PageBean
page
=
new
PageBean
();
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
...
@@ -238,7 +240,9 @@ public class GeneraterAction extends BaseAction {
...
@@ -238,7 +240,9 @@ public class GeneraterAction extends BaseAction {
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
<>();
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
PageBean
page
=
new
PageBean
();
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
...
...
src/main/java/net/mingsoft/cms/action/web/ContentAction.java
View file @
f23d238c
...
@@ -132,7 +132,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
...
@@ -132,7 +132,7 @@ public class ContentAction extends net.mingsoft.cms.action.BaseAction{
entity
.
setContentId
(
content
.
getId
());
entity
.
setContentId
(
content
.
getId
());
entity
.
setCreateDate
(
new
Date
());
entity
.
setCreateDate
(
new
Date
());
historyLogBiz
.
saveEntity
(
entity
);
historyLogBiz
.
saveEntity
(
entity
);
if
(
content
.
getAppId
()
==
null
||
content
.
getAppId
()
!=
BasicUtil
.
getAppId
()){
if
(
content
.
getAppId
()
==
null
||
content
.
getAppId
()
!=
BasicUtil
.
getApp
().
getApp
Id
()){
return
"document.write(0)"
;
return
"document.write(0)"
;
}
}
return
"document.write("
+
content
.
getContentHit
()
+
")"
;
return
"document.write("
+
content
.
getContentHit
()
+
")"
;
...
...
src/main/java/net/mingsoft/cms/action/web/MCmsAction.java
View file @
f23d238c
...
@@ -396,10 +396,12 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
...
@@ -396,10 +396,12 @@ public class MCmsAction extends net.mingsoft.cms.action.BaseAction {
});
});
//查询数量
//查询数量
int
count
=
contentBiz
.
getSearchCount
(
contentModel
,
fieldValueList
,
searchMap
,
BasicUtil
.
getAppId
(),
categoryIds
);
int
count
=
contentBiz
.
getSearchCount
(
contentModel
,
fieldValueList
,
searchMap
,
BasicUtil
.
getApp
().
getApp
Id
(),
categoryIds
);
map
.
put
(
ParserUtil
.
URL
,
url
);
map
.
put
(
ParserUtil
.
URL
,
url
);
map
.
put
(
SEARCH
,
searchMap
);
map
.
put
(
SEARCH
,
searchMap
);
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
PAGE
,
page
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
//动态解析
//动态解析
...
...
src/main/java/net/mingsoft/cms/biz/impl/ContentBizImpl.java
View file @
f23d238c
...
@@ -83,7 +83,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -83,7 +83,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
@Override
@Override
public
List
<
CategoryBean
>
queryIdsByCategoryIdForParser
(
ContentBean
contentBean
)
{
public
List
<
CategoryBean
>
queryIdsByCategoryIdForParser
(
ContentBean
contentBean
)
{
contentBean
.
setAppId
(
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
contentBean
.
setAppId
(
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
return
this
.
contentDao
.
queryIdsByCategoryIdForParser
(
contentBean
);
return
this
.
contentDao
.
queryIdsByCategoryIdForParser
(
contentBean
);
}
}
...
@@ -103,7 +105,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -103,7 +105,7 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
try
{
try
{
//将任务采集传过来的appId导入到线程变量中
//将任务采集传过来的appId导入到线程变量中
//当前线程使用appId时优先使用此数据
//当前线程使用appId时优先使用此数据
DataHolder
.
set
(
net
.
mingsoft
.
basic
.
constant
.
Const
.
APP_ID
,
appId
);
DataHolder
.
set
(
ParserUtil
.
APP_ID
,
appId
);
//调用三种静态化
//调用三种静态化
genernateColumn
();
genernateColumn
();
generaterIndex
(
tmpFileName
,
generateFileName
);
generaterIndex
(
tmpFileName
,
generateFileName
);
...
@@ -127,7 +129,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -127,7 +129,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
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
<>();
map
.
put
(
net
.
mingsoft
.
basic
.
constant
.
Const
.
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
PageBean
page
=
new
PageBean
();
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
...
@@ -166,7 +170,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -166,7 +170,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
List
<
CategoryEntity
>
columns
=
new
ArrayList
<>();
List
<
CategoryEntity
>
columns
=
new
ArrayList
<>();
// 获取所有的内容管理栏目
// 获取所有的内容管理栏目
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
CategoryEntity
categoryEntity
=
new
CategoryEntity
();
categoryEntity
.
setAppId
(
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
categoryEntity
.
setAppId
(
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
columns
=
categoryDao
.
query
(
categoryEntity
);
columns
=
categoryDao
.
query
(
categoryEntity
);
List
<
CategoryBean
>
articleIdList
=
null
;
List
<
CategoryBean
>
articleIdList
=
null
;
// 1、设置模板文件夹路径
// 1、设置模板文件夹路径
...
@@ -183,7 +189,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -183,7 +189,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
}
}
//获取模板中列表标签中的条件
//获取模板中列表标签中的条件
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
net
.
mingsoft
.
basic
.
constant
.
Const
.
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
PageBean
page
=
new
PageBean
();
PageBean
page
=
new
PageBean
();
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
map
.
put
(
ParserUtil
.
URL
,
BasicUtil
.
getUrl
());
...
@@ -237,7 +245,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
...
@@ -237,7 +245,9 @@ public class ContentBizImpl extends BaseBizImpl<IContentDao, ContentEntity> imp
//设置生成的路径
//设置生成的路径
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
map
.
put
(
ParserUtil
.
HTML
,
ParserUtil
.
HTML
);
//设置站点编号
//设置站点编号
map
.
put
(
Const
.
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
map
.
put
(
ParserUtil
.
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
String
read
=
ParserUtil
.
read
(
templatePath
,
map
);
String
read
=
ParserUtil
.
read
(
templatePath
,
map
);
FileUtil
.
writeString
(
read
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
net
.
mingsoft
.
base
.
constant
.
Const
.
UTF8
);
FileUtil
.
writeString
(
read
,
ParserUtil
.
buildHtmlPath
(
targetPath
),
net
.
mingsoft
.
base
.
constant
.
Const
.
UTF8
);
}
}
...
...
src/main/java/net/mingsoft/cms/util/CmsParserUtil.java
View file @
f23d238c
...
@@ -96,7 +96,9 @@ public class CmsParserUtil extends ParserUtil {
...
@@ -96,7 +96,9 @@ public class CmsParserUtil extends ParserUtil {
parserParams
.
put
(
FIELD
,
column
);
parserParams
.
put
(
FIELD
,
column
);
parserParams
.
put
(
IS_DO
,
false
);
parserParams
.
put
(
IS_DO
,
false
);
parserParams
.
put
(
HTML
,
HTML
);
parserParams
.
put
(
HTML
,
HTML
);
parserParams
.
put
(
APP_ID
,
BasicUtil
.
getAppId
());
if
(
BasicUtil
.
getWebsiteApp
()
!=
null
){
parserParams
.
put
(
APP_ID
,
BasicUtil
.
getWebsiteApp
().
getAppId
());
}
if
(
contentModel
!=
null
)
{
if
(
contentModel
!=
null
)
{
// 将自定义模型编号设置为key值
// 将自定义模型编号设置为key值
parserParams
.
put
(
TABLE_NAME
,
contentModel
.
getModelTableName
());
parserParams
.
put
(
TABLE_NAME
,
contentModel
.
getModelTableName
());
...
...
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