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
09ee994b
Commit
09ee994b
authored
Nov 14, 2022
by
mingsoft
Browse files
up::5.2.10
Signed-off-by:
mingsoft
<
killfen@126.com
>
parent
c86c7b92
Changes
23
Expand all
Hide whitespace changes
Inline
Side-by-side
pom.xml
View file @
09ee994b
...
@@ -10,14 +10,14 @@
...
@@ -10,14 +10,14 @@
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mcms
</artifactId>
<artifactId>
ms-mcms
</artifactId>
<version>
5.2.
9
</version>
<version>
5.2.
10
</version>
<name>
${project.groupId}:${project.artifactId}
</name>
<name>
${project.groupId}:${project.artifactId}
</name>
<!-- 打包war包,注意不启用(resources》resource》excludes的配置并注释掉maven-assembly-plugin 插件配置 -->
<!-- 打包war包,注意不启用(resources》resource》excludes的配置并注释掉maven-assembly-plugin 插件配置 -->
<!--<packaging>war</packaging>-->
<!--<packaging>war</packaging>-->
<properties>
<properties>
<java.version>
1.8
</java.version>
<java.version>
1.8
</java.version>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<project.build.sourceEncoding>
UTF-8
</project.build.sourceEncoding>
<log4j.version>
2.1
8
.0
</log4j.version>
<log4j.version>
2.1
9
.0
</log4j.version>
</properties>
</properties>
<repositories>
<repositories>
<repository>
<repository>
...
@@ -44,24 +44,24 @@
...
@@ -44,24 +44,24 @@
<dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-base
</artifactId>
<artifactId>
ms-base
</artifactId>
<version>
2.1.1
4.1
</version>
<version>
2.1.1
5
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-basic
</artifactId>
<artifactId>
ms-basic
</artifactId>
<version>
2.1.1
4.1
</version>
<version>
2.1.1
5
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
ms-mdiy
</artifactId>
<artifactId>
ms-mdiy
</artifactId>
<version>
2.1.1
4.1
</version>
<version>
2.1.1
5
</version>
</dependency>
</dependency>
<!--store入口依赖(源码不开发),如果不需要MStore可以直接去掉依赖-->
<!--store入口依赖(源码不开发),如果不需要MStore可以直接去掉依赖-->
<dependency>
<dependency>
<groupId>
net.mingsoft
</groupId>
<groupId>
net.mingsoft
</groupId>
<artifactId>
store-client
</artifactId>
<artifactId>
store-client
</artifactId>
<version>
2.1.1
4
</version>
<version>
2.1.1
5
</version>
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.github.oshi
</groupId>
<groupId>
com.github.oshi
</groupId>
...
...
src/main/java/net/mingsoft/MSApplication.java
View file @
09ee994b
...
@@ -25,12 +25,6 @@ import org.mybatis.spring.annotation.MapperScan;
...
@@ -25,12 +25,6 @@ import org.mybatis.spring.annotation.MapperScan;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.boot.web.servlet.ServletComponentScan
;
import
org.springframework.cache.annotation.EnableCaching
;
import
org.springframework.context.annotation.ComponentScan
;
import
springfox.documentation.swagger2.annotations.EnableSwagger2
;
import
java.util.Locale
;
@SpringBootApplication
(
scanBasePackages
=
{
"net.mingsoft"
})
@SpringBootApplication
(
scanBasePackages
=
{
"net.mingsoft"
})
@MapperScan
(
basePackages
={
"**.dao"
,
"com.baomidou.**.mapper"
})
@MapperScan
(
basePackages
={
"**.dao"
,
"com.baomidou.**.mapper"
})
...
...
src/main/java/net/mingsoft/cms/action/BaseAction.java
View file @
09ee994b
...
@@ -18,27 +18,27 @@
...
@@ -18,27 +18,27 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.action
;
package
net.mingsoft.cms.action
;
import
java.util.MissingResourceException
;
import
java.util.MissingResourceException
;
/**
/**
* @Author: 铭飞开源团队--huise
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:47
* @Date: 2019/8/9 20:47
*/
*/
public
class
BaseAction
extends
net
.
mingsoft
.
basic
.
action
.
BaseAction
{
public
class
BaseAction
extends
net
.
mingsoft
.
basic
.
action
.
BaseAction
{
@Override
@Override
protected
String
getResString
(
String
key
)
{
protected
String
getResString
(
String
key
)
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
String
str
=
""
;
String
str
=
""
;
try
{
try
{
str
=
super
.
getResString
(
key
);
str
=
super
.
getResString
(
key
);
}
catch
(
MissingResourceException
e
)
{
}
catch
(
MissingResourceException
e
)
{
str
=
getLocaleString
(
key
,
net
.
mingsoft
.
cms
.
constant
.
Const
.
RESOURCES
);
str
=
getLocaleString
(
key
,
net
.
mingsoft
.
cms
.
constant
.
Const
.
RESOURCES
);
}
}
return
str
;
return
str
;
}
}
}
}
src/main/java/net/mingsoft/cms/action/CategoryAction.java
View file @
09ee994b
...
@@ -70,6 +70,7 @@ public class CategoryAction extends BaseAction {
...
@@ -70,6 +70,7 @@ public class CategoryAction extends BaseAction {
* @return
* @return
*/
*/
@GetMapping
(
"/index"
)
@GetMapping
(
"/index"
)
@RequiresPermissions
(
"cms:category:view"
)
public
String
index
(){
public
String
index
(){
return
"/cms/category/index"
;
return
"/cms/category/index"
;
}
}
...
@@ -86,7 +87,6 @@ public class CategoryAction extends BaseAction {
...
@@ -86,7 +87,6 @@ public class CategoryAction extends BaseAction {
})
})
@RequestMapping
(
value
=
"/list"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@RequestMapping
(
value
=
"/list"
,
method
=
{
RequestMethod
.
GET
,
RequestMethod
.
POST
})
@ResponseBody
@ResponseBody
@RequiresPermissions
(
"cms:category:view"
)
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
BasicUtil
.
startPage
();
BasicUtil
.
startPage
();
List
categoryList
=
categoryBiz
.
query
(
category
);
List
categoryList
=
categoryBiz
.
query
(
category
);
...
...
src/main/java/net/mingsoft/cms/action/ContentAction.java
View file @
09ee994b
...
@@ -27,11 +27,11 @@ import io.swagger.annotations.ApiImplicitParam;
...
@@ -27,11 +27,11 @@ import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.base.util.SqlInjectionUtil
;
import
net.mingsoft.basic.annotation.LogAnn
;
import
net.mingsoft.basic.annotation.LogAnn
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.constant.e.BusinessTypeEnum
;
import
net.mingsoft.basic.constant.e.BusinessTypeEnum
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.base.util.SqlInjectionUtil
;
import
net.mingsoft.basic.util.StringUtil
;
import
net.mingsoft.basic.util.StringUtil
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
...
@@ -45,13 +45,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
...
@@ -45,13 +45,10 @@ import org.apache.shiro.authz.annotation.RequiresPermissions;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletResponse
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
...
@@ -219,9 +216,6 @@ public class ContentAction extends BaseAction {
...
@@ -219,9 +216,6 @@ public class ContentAction extends BaseAction {
if
(
StringUtil
.
isBlank
(
content
.
getContentDatetime
())){
if
(
StringUtil
.
isBlank
(
content
.
getContentDatetime
())){
return
ResultData
.
build
().
error
(
getResString
(
"err.empty"
,
this
.
getResString
(
"content.datetime"
)));
return
ResultData
.
build
().
error
(
getResString
(
"err.empty"
,
this
.
getResString
(
"content.datetime"
)));
}
}
if
(!
StringUtil
.
checkLength
(
content
.
getContentUrl
()+
""
,
0
,
200
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"content.url"
),
"0"
,
"200"
));
}
contentBiz
.
save
(
content
);
contentBiz
.
save
(
content
);
return
ResultData
.
build
().
success
(
content
);
return
ResultData
.
build
().
success
(
content
);
}
}
...
@@ -307,9 +301,6 @@ public class ContentAction extends BaseAction {
...
@@ -307,9 +301,6 @@ public class ContentAction extends BaseAction {
if
(
StringUtil
.
isBlank
(
content
.
getContentDatetime
())){
if
(
StringUtil
.
isBlank
(
content
.
getContentDatetime
())){
return
ResultData
.
build
().
error
(
getResString
(
"err.empty"
,
this
.
getResString
(
"content.datetime"
)));
return
ResultData
.
build
().
error
(
getResString
(
"err.empty"
,
this
.
getResString
(
"content.datetime"
)));
}
}
if
(!
StringUtil
.
checkLength
(
content
.
getContentUrl
()+
""
,
0
,
200
)){
return
ResultData
.
build
().
error
(
getResString
(
"err.length"
,
this
.
getResString
(
"content.url"
),
"0"
,
"200"
));
}
contentBiz
.
saveOrUpdate
(
content
);
contentBiz
.
saveOrUpdate
(
content
);
return
ResultData
.
build
().
success
(
content
);
return
ResultData
.
build
().
success
(
content
);
}
}
...
...
src/main/java/net/mingsoft/cms/action/GeneraterAction.java
View file @
09ee994b
...
@@ -250,6 +250,7 @@ public class GeneraterAction extends BaseAction {
...
@@ -250,6 +250,7 @@ public class GeneraterAction extends BaseAction {
}
}
contentBean
.
setCategoryId
(
category
.
getId
());
contentBean
.
setCategoryId
(
category
.
getId
());
contentBean
.
setCategoryType
(
category
.
getCategoryType
());
contentBean
.
setCategoryType
(
category
.
getCategoryType
());
contentBean
.
setOrderBy
(
"date"
);
//将文章列表标签中的中的参数
//将文章列表标签中的中的参数
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParserAndNotCover
(
contentBean
);
articleIdList
=
contentBiz
.
queryIdsByCategoryIdForParserAndNotCover
(
contentBean
);
// 分类是列表
// 分类是列表
...
...
src/main/java/net/mingsoft/cms/action/web/CategoryAction.java
View file @
09ee994b
/**
/**
* The MIT License (MIT)
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.action.web
;
package
net.mingsoft.cms.action.web
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.validation.BindingResult
;
import
springfox.documentation.annotations.ApiIgnore
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.List
;
/**
import
javax.servlet.http.HttpServletRequest
;
* 分类管理控制层
import
javax.servlet.http.HttpServletResponse
;
* @author 铭飞开发团队
import
java.util.List
;
* 创建日期:2019-11-28 15:12:32<br/>
/**
* 历史修订:<br/>
* 分类管理控制层
*/
* @author 铭飞开发团队
@Api
(
tags
={
"前端-内容模块接口"
})
* 创建日期:2019-11-28 15:12:32<br/>
@Controller
(
"WebcmsCategoryAction"
)
* 历史修订:<br/>
@RequestMapping
(
"/cms/category"
)
*/
public
class
CategoryAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
@Api
(
tags
={
"前端-内容模块接口"
})
@Controller
(
"WebcmsCategoryAction"
)
@RequestMapping
(
"/cms/category"
)
/**
public
class
CategoryAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
* 注入分类业务层
*/
@Autowired
/**
private
ICategoryBiz
categoryBiz
;
* 注入分类业务层
*/
/**
@Autowired
* 查询分类列表
private
ICategoryBiz
categoryBiz
;
* @param category 分类实体
*/
/**
@ApiOperation
(
value
=
"查询分类列表接口"
)
* 查询分类列表
@ApiImplicitParams
({
* @param category 分类实体
@ApiImplicitParam
(
name
=
"categoryTitle"
,
value
=
"栏目管理名称"
,
required
=
false
,
paramType
=
"query"
),
*/
})
@ApiOperation
(
value
=
"查询分类列表接口"
)
@PostMapping
(
value
=
"/list"
)
@ApiImplicitParams
({
@ResponseBody
@ApiImplicitParam
(
name
=
"categoryTitle"
,
value
=
"栏目管理名称"
,
required
=
false
,
paramType
=
"query"
),
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
})
BasicUtil
.
startPage
();
@PostMapping
(
value
=
"/list"
)
List
categoryList
=
categoryBiz
.
query
(
category
);
@ResponseBody
return
ResultData
.
build
().
success
(
new
EUListBean
(
categoryList
,(
int
)
BasicUtil
.
endPage
(
categoryList
).
getTotal
()));
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
)
{
}
BasicUtil
.
startPage
();
List
categoryList
=
categoryBiz
.
query
(
category
);
return
ResultData
.
build
().
success
(
new
EUListBean
(
categoryList
,(
int
)
BasicUtil
.
endPage
(
categoryList
).
getTotal
()));
/**
}
* 获取分类
* @param category 分类实体
*/
/**
@ApiOperation
(
value
=
"获取分类列表接口"
)
* 获取分类
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
* @param category 分类实体
@GetMapping
(
"/get"
)
*/
@ResponseBody
@ApiOperation
(
value
=
"获取分类列表接口"
)
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
){
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
if
(
category
.
getId
()==
null
)
{
@GetMapping
(
"/get"
)
return
ResultData
.
build
().
error
();
@ResponseBody
}
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
CategoryEntity
category
){
CategoryEntity
_category
=
(
CategoryEntity
)
categoryBiz
.
getById
(
category
.
getId
());
if
(
category
.
getId
()==
null
)
{
return
ResultData
.
build
().
success
(
_category
);
return
ResultData
.
build
().
error
();
}
}
CategoryEntity
_category
=
(
CategoryEntity
)
categoryBiz
.
getById
(
category
.
getId
());
}
return
ResultData
.
build
().
success
(
_category
);
}
}
src/main/java/net/mingsoft/cms/action/web/ContentAction.java
View file @
09ee994b
/**
/**
* The MIT License (MIT)
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.action.web
;
package
net.mingsoft.cms.action.web
;
import
cn.hutool.core.util.ObjectUtil
;
import
cn.hutool.core.util.ObjectUtil
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.base.entity.ResultData
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.bean.EUListBean
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.bean.ContentBean
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.biz.IContentBiz
;
import
net.mingsoft.cms.biz.IHistoryLogBiz
;
import
net.mingsoft.cms.biz.IHistoryLogBiz
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
net.mingsoft.cms.entity.HistoryLogEntity
;
import
net.mingsoft.cms.entity.HistoryLogEntity
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.stereotype.Controller
;
import
org.springframework.ui.ModelMap
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.validation.BindingResult
;
import
springfox.documentation.annotations.ApiIgnore
;
import
org.springframework.web.bind.annotation.*
;
import
springfox.documentation.annotations.ApiIgnore
;
import
java.util.Date
;
import
java.util.List
;
import
javax.servlet.http.HttpServletRequest
;
/**
import
javax.servlet.http.HttpServletResponse
;
* 文章管理控制层
import
java.util.Date
;
* @author 铭飞开发团队
import
java.util.List
;
* 创建日期:2019-11-28 15:12:32<br/>
/**
* 历史修订:<br/>
* 文章管理控制层
*/
* @author 铭飞开发团队
@Api
(
tags
={
"前端-内容模块接口"
})
* 创建日期:2019-11-28 15:12:32<br/>
@Controller
(
"WebcmsContentAction"
)
* 历史修订:<br/>
@RequestMapping
(
"/cms/content"
)
*/
public
class
ContentAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
@Api
(
tags
={
"前端-内容模块接口"
})
@Controller
(
"WebcmsContentAction"
)
@RequestMapping
(
"/cms/content"
)
/**
public
class
ContentAction
extends
net
.
mingsoft
.
cms
.
action
.
BaseAction
{
* 注入文章业务层
*/
@Autowired
/**
private
IContentBiz
contentBiz
;
* 注入文章业务层
*/
@Autowired
@Autowired
private
IHistoryLogBiz
historyLogBiz
;
private
IContentBiz
contentBiz
;
/**
@Autowired
* 查询文章列表接口
private
IHistoryLogBiz
historyLogBiz
;
* @param content 文章
* @return
/**
*/
* 查询文章列表接口
@ApiOperation
(
value
=
"查询文章列表接口"
)
* @param content 文章
@ApiImplicitParams
({
* @return
@ApiImplicitParam
(
name
=
"contentTitle"
,
value
=
"文章标题"
,
required
=
false
,
paramType
=
"query"
),
*/
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiOperation
(
value
=
"查询文章列表接口"
)
@ApiImplicitParam
(
name
=
"contentType"
,
value
=
"文章类型"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"contentDisplay"
,
value
=
"是否显示"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentTitle"
,
value
=
"文章标题"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentAuthor"
,
value
=
"文章作者"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"categoryId"
,
value
=
"所属栏目"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentSource"
,
value
=
"文章来源"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentType"
,
value
=
"文章类型"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentDatetime"
,
value
=
"发布时间"
,
required
=
false
,
paramType
=
"query"
),
@ApiImplicitParam
(
name
=
"contentDisplay"
,
value
=
"是否显示"
,
required
=
false
,
paramType
=
"query"
),
})
@ApiImplicitParam
(
name
=
"contentAuthor"
,
value
=
"文章作者"
,
required
=
false
,
paramType
=
"query"
),
@PostMapping
(
"/list"
)
@ApiImplicitParam
(
name
=
"contentSource"
,
value
=
"文章来源"
,
required
=
false
,
paramType
=
"query"
),
@ResponseBody
@ApiImplicitParam
(
name
=
"contentDatetime"
,
value
=
"发布时间"
,
required
=
false
,
paramType
=
"query"
),
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
ContentBean
content
)
{
})
BasicUtil
.
startPage
();
@PostMapping
(
"/list"
)
List
contentList
=
contentBiz
.
query
(
content
);
@ResponseBody
return
ResultData
.
build
().
success
(
new
EUListBean
(
contentList
,(
int
)
BasicUtil
.
endPage
(
contentList
).
getTotal
()));
public
ResultData
list
(
@ModelAttribute
@ApiIgnore
ContentBean
content
)
{
}
BasicUtil
.
startPage
();
List
contentList
=
contentBiz
.
query
(
content
);
return
ResultData
.
build
().
success
(
new
EUListBean
(
contentList
,(
int
)
BasicUtil
.
endPage
(
contentList
).
getTotal
()));
/**
}
* 获取文章列表接口
* @param content 文章
* @return
/**
*/
* 获取文章列表接口
@ApiOperation
(
value
=
"获取文章列表接口"
)
* @param content 文章
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
* @return
@GetMapping
(
"/get"
)
*/
@ResponseBody
@ApiOperation
(
value
=
"获取文章列表接口"
)
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
ContentEntity
content
){
@ApiImplicitParam
(
name
=
"id"
,
value
=
"编号"
,
required
=
true
,
paramType
=
"query"
)
if
(
content
.
getId
()==
null
)
{
@GetMapping
(
"/get"
)
return
ResultData
.
build
().
error
();
@ResponseBody
}
public
ResultData
get
(
@ModelAttribute
@ApiIgnore
ContentEntity
content
){
ContentEntity
_content
=
(
ContentEntity
)
contentBiz
.
getById
(
content
.
getId
());;
if
(
content
.
getId
()==
null
)
{
return
ResultData
.
build
().
success
(
_content
);
return
ResultData
.
build
().
error
();
}
}
ContentEntity
_content
=
(
ContentEntity
)
contentBiz
.
getById
(
content
.
getId
());;
/**
return
ResultData
.
build
().
success
(
_content
);
* 查看文章点击数
}
* @param contentId 文章编号
* @return
/**
*/
* 查看文章点击数
@ApiOperation
(
value
=
"查看文章点击数"
)
* @param contentId 文章编号
@ApiImplicitParam
(
name
=
"contentId"
,
value
=
"文章编号"
,
required
=
true
,
paramType
=
"path"
)
* @return
@GetMapping
(
value
=
"/{contentId}/hit"
)
*/
@ResponseBody
@ApiOperation
(
value
=
"查看文章点击数"
)
public
String
hit
(
@PathVariable
@ApiIgnore
String
contentId
)
{
@ApiImplicitParam
(
name
=
"contentId"
,
value
=
"文章编号"
,
required
=
true
,
paramType
=
"path"
)
if
(
StringUtils
.
isEmpty
(
contentId
)){
@GetMapping
(
value
=
"/{contentId}/hit"
)
return
"document.write(0)"
;
@ResponseBody
}
public
String
hit
(
@PathVariable
@ApiIgnore
String
contentId
)
{
//获取ip
if
(
StringUtils
.
isEmpty
(
contentId
)){
String
ip
=
BasicUtil
.
getIp
();
return
"document.write(0)"
;
//获取端口(移动/web..)
}
boolean
isMobileDevice
=
BasicUtil
.
isMobileDevice
();
//获取ip
String
ip
=
BasicUtil
.
getIp
();
ContentEntity
content
=
contentBiz
.
getById
(
contentId
);
//获取端口(移动/web..)
if
(
content
==
null
){
boolean
isMobileDevice
=
BasicUtil
.
isMobileDevice
();
return
"document.write(0)"
;
}
ContentEntity
content
=
contentBiz
.
getById
(
contentId
);
//浏览数+1
if
(
content
==
null
){
if
(
ObjectUtil
.
isNotEmpty
(
content
.
getContentHit
())){
return
"document.write(0)"
;
content
.
setContentHit
(
content
.
getContentHit
()+
1
);
}
}
else
{
//浏览数+1
content
.
setContentHit
(
1
);
if
(
ObjectUtil
.
isNotEmpty
(
content
.
getContentHit
())){
}
content
.
setContentHit
(
content
.
getContentHit
()+
1
);
contentBiz
.
updateById
(
content
);
}
else
{
content
.
setContentHit
(
1
);
// cms_history 增加相应记录
}
HistoryLogEntity
entity
=
new
HistoryLogEntity
();
contentBiz
.
updateEntity
(
content
);
entity
.
setHlIsMobile
(
isMobileDevice
);
entity
.
setHlIp
(
ip
);
// cms_history 增加相应记录
entity
.
setContentId
(
content
.
getId
());
HistoryLogEntity
entity
=
new
HistoryLogEntity
();
entity
.
setCreateDate
(
new
Date
());
entity
.
setHlIsMobile
(
isMobileDevice
);
historyLogBiz
.
saveEntity
(
entity
);
entity
.
setHlIp
(
ip
);
entity
.
setContentId
(
content
.
getId
());
return
"document.write("
+
content
.
getContentHit
()
+
")"
;
entity
.
setCreateDate
(
new
Date
());
}
historyLogBiz
.
saveEntity
(
entity
);
}
return
"document.write("
+
content
.
getContentHit
()
+
")"
;
}
}
src/main/java/net/mingsoft/cms/bean/CategoryBean.java
View file @
09ee994b
...
@@ -18,33 +18,33 @@
...
@@ -18,33 +18,33 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.bean
;
package
net.mingsoft.cms.bean
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
/**
/**
* 文章实体
* 文章实体
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
public
class
CategoryBean
extends
CategoryEntity
{
public
class
CategoryBean
extends
CategoryEntity
{
/**
/**
* 文章编号
* 文章编号
*/
*/
private
String
articleId
;
private
String
articleId
;
public
String
getArticleId
()
{
public
String
getArticleId
()
{
return
articleId
;
return
articleId
;
}
}
public
void
setArticleId
(
String
articleId
)
{
public
void
setArticleId
(
String
articleId
)
{
this
.
articleId
=
articleId
;
this
.
articleId
=
articleId
;
}
}
}
}
src/main/java/net/mingsoft/cms/bean/ContentBean.java
View file @
09ee994b
/**
/**
* The MIT License (MIT)
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.bean
;
package
net.mingsoft.cms.bean
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
net.mingsoft.cms.entity.ContentEntity
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
net.mingsoft.cms.entity.ContentEntity
;
/**
import
org.springframework.format.annotation.DateTimeFormat
;
* 文章实体bean
*/
import
java.util.Date
;
public
class
ContentBean
extends
ContentEntity
{
/**
// /**
* 文章实体bean
// * 静态化地址
*/
// */
public
class
ContentBean
extends
ContentEntity
{
// private String staticUrl;
// /**
/**
// * 静态化地址
* 开始时间
// */
*/
// private String staticUrl;
private
String
beginTime
;
/**
/**
* 开始时间
* 结束时间
*/
*/
private
String
beginTime
;
private
String
endTime
;
/**
/**
* 结束时间
* 属性标记
*/
*/
private
String
endTime
;
private
String
flag
;
/**
/**
* 属性标记
* 不包含属性标记
*/
*/
private
String
flag
;
private
String
noflag
;
/**
/**
* 不包含属性标记
* 栏目类型,用于筛选文章列表
*/
*/
private
String
noflag
;
private
String
categoryType
;
/**
/**
* 栏目类型,用于筛选文章列表
* 栏目属性,用于筛选文章列表
*/
*/
private
String
categoryType
;
private
String
categoryFlag
;
/**
public
String
getCategoryType
()
{
* 栏目属性,用于筛选文章列表
return
categoryType
;
*/
}
private
String
categoryFlag
;
public
void
setCategoryType
(
String
categoryType
)
{
public
String
getCategoryType
()
{
this
.
categoryType
=
categoryType
;
return
categoryType
;
}
}
public
String
getCategoryFlag
()
{
public
void
setCategoryType
(
String
categoryType
)
{
return
categoryFlag
;
this
.
categoryType
=
categoryType
;
}
}
public
void
setCategoryFlag
(
String
categoryFlag
)
{
public
String
getCategoryFlag
()
{
this
.
categoryFlag
=
categoryFlag
;
return
categoryFlag
;
}
}
public
String
getBeginTime
()
{
public
void
setCategoryFlag
(
String
categoryFlag
)
{
return
beginTime
;
this
.
categoryFlag
=
categoryFlag
;
}
}
public
void
setBeginTime
(
String
beginTime
)
{
public
String
getBeginTime
()
{
this
.
beginTime
=
beginTime
;
return
beginTime
;
}
}
public
String
getEndTime
()
{
public
void
setBeginTime
(
String
beginTime
)
{
return
endTime
;
this
.
beginTime
=
beginTime
;
}
}
public
void
setEndTime
(
String
endTime
)
{
public
String
getEndTime
()
{
this
.
endTime
=
endTime
;
return
endTime
;
}
}
public
String
getFlag
()
{
public
void
setEndTime
(
String
endTime
)
{
return
flag
;
this
.
endTime
=
endTime
;
}
}
public
void
setFlag
(
String
flag
)
{
public
String
getFlag
()
{
this
.
flag
=
flag
;
return
flag
;
}
}
public
String
getNoflag
()
{
public
void
setFlag
(
String
flag
)
{
return
noflag
;
this
.
flag
=
flag
;
}
}
public
void
setNoflag
(
String
noflag
)
{
public
String
getNoflag
()
{
this
.
noflag
=
noflag
;
return
noflag
;
}
}
}
public
void
setNoflag
(
String
noflag
)
{
this
.
noflag
=
noflag
;
}
}
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
View file @
09ee994b
...
@@ -18,44 +18,44 @@
...
@@ -18,44 +18,44 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.biz
;
package
net.mingsoft.cms.biz
;
import
net.mingsoft.base.biz.IBaseBiz
;
import
net.mingsoft.base.biz.IBaseBiz
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 分类业务
* 分类业务
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
public
interface
ICategoryBiz
extends
IBaseBiz
<
CategoryEntity
>
{
public
interface
ICategoryBiz
extends
IBaseBiz
<
CategoryEntity
>
{
/**
/**
* 查询当前分类下的所有子分类,包含自身
* 查询当前分类下的所有子分类,包含自身
* @param category 通过setId指定栏目id
* @param category 通过setId指定栏目id
* @return
* @return
*/
*/
List
<
CategoryEntity
>
queryChildren
(
CategoryEntity
category
);
List
<
CategoryEntity
>
queryChildren
(
CategoryEntity
category
);
void
saveEntity
(
CategoryEntity
entity
);
void
saveEntity
(
CategoryEntity
entity
);
/**更新父级及子集
/**更新父级及子集
* @param entity
* @param entity
*/
*/
void
updateEntity
(
CategoryEntity
entity
);
void
updateEntity
(
CategoryEntity
entity
);
/**只更新自身
/**只更新自身
* @param entity
* @param entity
*/
*/
void
update
(
CategoryEntity
entity
);
void
update
(
CategoryEntity
entity
);
void
delete
(
String
categoryId
);
void
delete
(
String
categoryId
);
void
copyCategory
(
CategoryEntity
entity
);
void
copyCategory
(
CategoryEntity
entity
);
}
}
src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java
View file @
09ee994b
...
@@ -18,19 +18,19 @@
...
@@ -18,19 +18,19 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.biz
;
package
net.mingsoft.cms.biz
;
import
net.mingsoft.base.biz.IBaseBiz
;
import
net.mingsoft.base.biz.IBaseBiz
;
/**
/**
* 文章浏览记录业务
* 文章浏览记录业务
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
public
interface
IHistoryLogBiz
extends
IBaseBiz
{
public
interface
IHistoryLogBiz
extends
IBaseBiz
{
}
}
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
09ee994b
This diff is collapsed.
Click to expand it.
src/main/java/net/mingsoft/cms/biz/impl/HistoryLogBizImpl.java
View file @
09ee994b
/**
/**
* The MIT License (MIT)
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.biz.impl
;
package
net.mingsoft.cms.biz.impl
;
import
net.mingsoft.
cms
.biz.
IHistoryLogBiz
;
import
net.mingsoft.
base
.biz.
impl.BaseBizImpl
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
net.mingsoft.base.dao.IBaseDao
;
import
org.springframework.stereotype.Service
;
import
net.mingsoft.cms.biz.IHistoryLogBiz
;
import
net.mingsoft.
base.biz.impl.BaseBizImpl
;
import
net.mingsoft.
cms.dao.ICmsHistoryLogDao
;
import
net.mingsoft.base.dao.IBaseDao
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
net.mingsoft.cms.dao.ICmsHistoryLogDao
;
import
org.springframework.stereotype.Service
;
/**
/**
* 文章浏览记录管理持久化层
* 文章浏览记录管理持久化层
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
@Service
(
"cmshistoryLogBizImpl"
)
@Service
(
"cmshistoryLogBizImpl"
)
public
class
HistoryLogBizImpl
extends
BaseBizImpl
implements
IHistoryLogBiz
{
public
class
HistoryLogBizImpl
extends
BaseBizImpl
implements
IHistoryLogBiz
{
@Autowired
@Autowired
private
ICmsHistoryLogDao
historyLogDao
;
private
ICmsHistoryLogDao
historyLogDao
;
@Override
@Override
protected
IBaseDao
getDao
()
{
protected
IBaseDao
getDao
()
{
// TODO Auto-generated method stub
// TODO Auto-generated method stub
return
historyLogDao
;
return
historyLogDao
;
}
}
}
}
src/main/java/net/mingsoft/cms/constant/Const.java
View file @
09ee994b
...
@@ -18,17 +18,17 @@
...
@@ -18,17 +18,17 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.constant
;
package
net.mingsoft.cms.constant
;
/**
/**
* @Author: 铭飞开源团队--huise
* @Author: 铭飞开源团队--huise
* @Date: 2019/8/9 20:51
* @Date: 2019/8/9 20:51
*/
*/
public
class
Const
{
public
class
Const
{
/**
/**
* 资源文件
* 资源文件
*/
*/
public
final
static
String
RESOURCES
=
"net.mingsoft.cms.resources.resources"
;
public
final
static
String
RESOURCES
=
"net.mingsoft.cms.resources.resources"
;
}
}
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
View file @
09ee994b
...
@@ -18,30 +18,30 @@
...
@@ -18,30 +18,30 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.dao
;
package
net.mingsoft.cms.dao
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
import
java.util.List
;
import
java.util.List
;
/**
/**
* 分类持久层
* 分类持久层
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
@Component
(
"cmsCategoryDao"
)
@Component
(
"cmsCategoryDao"
)
public
interface
ICategoryDao
extends
IBaseDao
<
CategoryEntity
>
{
public
interface
ICategoryDao
extends
IBaseDao
<
CategoryEntity
>
{
/**
/**
* 查询当前分类下面的所有子分类
* 查询当前分类下面的所有子分类
* @param category 必须存在categoryId categoryParentId
* @param category 必须存在categoryId categoryParentId
* @return
* @return
*/
*/
public
List
<
CategoryEntity
>
queryChildren
(
CategoryEntity
category
);
public
List
<
CategoryEntity
>
queryChildren
(
CategoryEntity
category
);
}
}
src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java
View file @
09ee994b
...
@@ -18,17 +18,17 @@
...
@@ -18,17 +18,17 @@
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.dao
;
package
net.mingsoft.cms.dao
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.base.dao.IBaseDao
;
/**
/**
* 文章浏览记录持久层
* 文章浏览记录持久层
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-12-23 9:24:03<br/>
* 创建日期:2019-12-23 9:24:03<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
public
interface
ICmsHistoryLogDao
extends
IBaseDao
{
public
interface
ICmsHistoryLogDao
extends
IBaseDao
{
}
}
src/main/java/net/mingsoft/cms/dao/IContentDao.xml
View file @
09ee994b
...
@@ -16,7 +16,7 @@
...
@@ -16,7 +16,7 @@
<result
column=
"content_description"
property=
"contentDescription"
/>
<!--描述 -->
<result
column=
"content_description"
property=
"contentDescription"
/>
<!--描述 -->
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_
url
"
property=
"content
Url
"
/>
<!--文章跳转链接地址 -->
<result
column=
"content_
out_link
"
property=
"content
OutLink
"
/>
<!--文章跳转链接地址 -->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
<result
column=
"create_date"
property=
"createDate"
/>
<!--创建时间 -->
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
<result
column=
"content_description"
property=
"contentDescription"
/>
<!--描述 -->
<result
column=
"content_description"
property=
"contentDescription"
/>
<!--描述 -->
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_keyword"
property=
"contentKeyword"
/>
<!--关键字 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_details"
property=
"contentDetails"
/>
<!--文章内容 -->
<result
column=
"content_
url
"
property=
"content
Url
"
/>
<!--文章跳转链接地址 -->
<result
column=
"content_
out_link
"
property=
"content
OutLink
"
/>
<!--文章跳转链接地址 -->
<!-- <result column="static_url" property="staticUrl" /><!–静态地址 –>-->
<!-- <result column="static_url" property="staticUrl" /><!–静态地址 –>-->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"content_hit"
property=
"contentHit"
/>
<!--点击次数 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
<result
column=
"create_by"
property=
"createBy"
/>
<!--创建人 -->
...
@@ -91,7 +91,7 @@
...
@@ -91,7 +91,7 @@
<if
test=
"contentDescription != null and contentDescription != ''"
>
content_description,
</if>
<if
test=
"contentDescription != null and contentDescription != ''"
>
content_description,
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
content_keyword,
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
content_keyword,
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
content_details,
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
content_details,
</if>
<if
test=
"content
Url
!= null and content
Url
!= ''"
>
content_
url
,
</if>
<if
test=
"content
OutLink
!= null and content
OutLink
!= ''"
>
content_
out_link
,
</if>
<if
test=
"contentHit != null"
>
content_hit,
</if>
<if
test=
"contentHit != null"
>
content_hit,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createBy > 0"
>
create_by,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
<if
test=
"createDate != null"
>
create_date,
</if>
...
@@ -138,7 +138,7 @@
...
@@ -138,7 +138,7 @@
<if
test=
"contentDescription != null "
>
content_description=#{contentDescription},
</if>
<if
test=
"contentDescription != null "
>
content_description=#{contentDescription},
</if>
<if
test=
"contentKeyword != null "
>
content_keyword=#{contentKeyword},
</if>
<if
test=
"contentKeyword != null "
>
content_keyword=#{contentKeyword},
</if>
<if
test=
"contentDetails != null "
>
content_details=#{contentDetails},
</if>
<if
test=
"contentDetails != null "
>
content_details=#{contentDetails},
</if>
<if
test=
"content
Url
!= null and content
Url
!= ''"
>
content_
url
=#{content
Url
},
</if>
<if
test=
"content
OutLink
!= null and content
OutLink
!= ''"
>
content_
out_link
=#{content
OutLink
},
</if>
<if
test=
"contentHit != null"
>
content_hit=#{contentHit},
</if>
<if
test=
"contentHit != null"
>
content_hit=#{contentHit},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createBy > 0"
>
create_by=#{createBy},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
<if
test=
"createDate != null"
>
create_date=#{createDate},
</if>
...
@@ -171,7 +171,7 @@
...
@@ -171,7 +171,7 @@
<if
test=
"contentDescription != null and contentDescription != ''"
>
and content_description=#{contentDescription}
</if>
<if
test=
"contentDescription != null and contentDescription != ''"
>
and content_description=#{contentDescription}
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"content
Url
!= null and content
Url
!= ''"
>
and content_
url
=#{content
Url
}
</if>
<if
test=
"content
OutLink
!= null and content
OutLink
!= ''"
>
and content_
out_link
=#{content
OutLink
}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createBy > 0"
>
and create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
<if
test=
"createDate != null"
>
and create_date=#{createDate}
</if>
...
@@ -236,7 +236,7 @@
...
@@ -236,7 +236,7 @@
<if
test=
"contentDescription != null and contentDescription != ''"
>
and content_description=#{contentDescription}
</if>
<if
test=
"contentDescription != null and contentDescription != ''"
>
and content_description=#{contentDescription}
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"content
Url
!= null and content
Url
!= ''"
>
and content_
url
=#{content
Url
}
</if>
<if
test=
"content
OutLink
!= null and content
OutLink
!= ''"
>
and content_
out_link
=#{content
OutLink
}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"createBy > 0"
>
and ct.create_by=#{createBy}
</if>
<if
test=
"createBy > 0"
>
and ct.create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and ct.create_date=#{createDate}
</if>
<if
test=
"createDate != null"
>
and ct.create_date=#{createDate}
</if>
...
@@ -273,7 +273,7 @@
...
@@ -273,7 +273,7 @@
<if
test=
"contentDescription != null and contentDescription != ''"
>
and content_description=#{contentDescription}
</if>
<if
test=
"contentDescription != null and contentDescription != ''"
>
and content_description=#{contentDescription}
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<if
test=
"contentKeyword != null and contentKeyword != ''"
>
and content_keyword=#{contentKeyword}
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"contentDetails != null and contentDetails != ''"
>
and content_details=#{contentDetails}
</if>
<if
test=
"content
Url
!= null and content
Url
!= ''"
>
and content_
url
=#{content
Url
}
</if>
<if
test=
"content
OutLink
!= null and content
OutLink
!= ''"
>
and content_
out_link
=#{content
OutLink
}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"contentHit != null"
>
and content_hit=#{contentHit}
</if>
<if
test=
"createBy > 0"
>
and ct.create_by=#{createBy}
</if>
<if
test=
"createBy > 0"
>
and ct.create_by=#{createBy}
</if>
<if
test=
"createDate != null"
>
and ct.create_date=#{createDate}
</if>
<if
test=
"createDate != null"
>
and ct.create_date=#{createDate}
</if>
...
@@ -287,10 +287,10 @@
...
@@ -287,10 +287,10 @@
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合 -->
<select
id=
"queryIdsByCategoryIdForParser"
resultMap=
"resultBean"
>
<select
id=
"queryIdsByCategoryIdForParser"
resultMap=
"resultBean"
>
select
select
ct.id article_id,c.*
ct.id article_id,
ct.content_img litpic,
c.*
FROM cms_content ct
FROM cms_content ct
LEFT JOIN cms_category c ON ct.category_id = c.id
LEFT JOIN cms_category c ON ct.category_id = c.id
where ct.del=0
where ct.del=0
and ct.content_display=0
<!-- 查询子栏目数据 -->
<!-- 查询子栏目数据 -->
<if
test=
"categoryId!=null and categoryId!='' and categoryType==1"
>
<if
test=
"categoryId!=null and categoryId!='' and categoryType==1"
>
...
@@ -345,7 +345,7 @@
...
@@ -345,7 +345,7 @@
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合,不包括单篇 -->
<!-- 根据站点编号、开始、结束时间和栏目编号查询文章编号集合,不包括单篇 -->
<select
id=
"queryIdsByCategoryIdForParserAndNotCover"
resultMap=
"resultBean"
>
<select
id=
"queryIdsByCategoryIdForParserAndNotCover"
resultMap=
"resultBean"
>
select
select
ct.id article_id,c.*
ct.id article_id,
ct.content_img litpic,
c.*
FROM cms_content ct
FROM cms_content ct
LEFT JOIN cms_category c ON ct.category_id = c.id
LEFT JOIN cms_category c ON ct.category_id = c.id
where ct.del=0
where ct.del=0
...
...
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
View file @
09ee994b
...
@@ -22,11 +22,7 @@
...
@@ -22,11 +22,7 @@
package
net.mingsoft.cms.entity
;
package
net.mingsoft.cms.entity
;
import
com.baomidou.mybatisplus.annotation.FieldStrategy
;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.base.entity.BaseEntity
;
/**
/**
...
...
src/main/java/net/mingsoft/cms/entity/ContentEntity.java
View file @
09ee994b
/**
/**
* The MIT License (MIT)
* The MIT License (MIT)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Copyright (c) 2012-2022 铭软科技(mingsoft.net)
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including without limitation the rights to
* the Software without restriction, including without limitation the rights to
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
* the Software, and to permit persons to whom the Software is furnished to do so,
* the Software, and to permit persons to whom the Software is furnished to do so,
* subject to the following conditions:
* subject to the following conditions:
* The above copyright notice and this permission notice shall be included in all
* The above copyright notice and this permission notice shall be included in all
* copies or substantial portions of the Software.
* copies or substantial portions of the Software.
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
*/
package
net.mingsoft.cms.entity
;
package
net.mingsoft.cms.entity
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.alibaba.fastjson.annotation.JSONField
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableField
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.base.entity.BaseEntity
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
org.springframework.format.annotation.DateTimeFormat
;
import
java.util.Date
;
import
java.util.Date
;
/**
/**
* 文章实体
* 文章实体
* @author 铭飞开发团队
* @author 铭飞开发团队
* 创建日期:2019-11-28 15:12:32<br/>
* 创建日期:2019-11-28 15:12:32<br/>
* 历史修订:<br/>
* 历史修订:<br/>
*/
*/
@TableName
(
"cms_content"
)
@TableName
(
"cms_content"
)
public
class
ContentEntity
extends
BaseEntity
{
public
class
ContentEntity
extends
BaseEntity
{
private
static
final
long
serialVersionUID
=
1574925152617L
;
private
static
final
long
serialVersionUID
=
1574925152617L
;
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
@TableId
(
type
=
IdType
.
ASSIGN_ID
)
private
String
id
;
private
String
id
;
@Override
@Override
public
String
getId
()
{
public
String
getId
()
{
return
id
;
return
id
;
}
}
@Override
@Override
public
void
setId
(
String
id
)
{
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
this
.
id
=
id
;
}
}
/**
/**
* 文章标题
* 文章标题
*/
*/
private
String
contentTitle
;
private
String
contentTitle
;
/**
/**
* 所属栏目
* 所属栏目
*/
*/
private
String
categoryId
;
private
String
categoryId
;
/**
/**
* 文章类型
* 文章类型
*/
*/
private
String
contentType
;
private
String
contentType
;
/**
/**
* 是否显示
* 是否显示
*/
*/
private
String
contentDisplay
;
private
String
contentDisplay
;
/**
/**
* 文章作者
* 文章作者
*/
*/
private
String
contentAuthor
;
private
String
contentAuthor
;
/**
/**
* 文章来源
* 文章来源
*/
*/
private
String
contentSource
;
private
String
contentSource
;
/**
/**
* 发布时间
* 发布时间
*/
*/
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
@JSONField
(
format
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@DateTimeFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
@JsonFormat
(
timezone
=
"GMT+8"
,
pattern
=
"yyyy-MM-dd HH:mm:ss"
)
private
Date
contentDatetime
;
private
Date
contentDatetime
;
/**
/**
* 自定义顺序
* 自定义顺序
*/
*/
private
Integer
contentSort
;
private
Integer
contentSort
;
/**
/**
* 文章缩略图
* 文章缩略图
*/
*/
private
String
contentImg
;
private
String
contentImg
;
/**
/**
* 描述
* 描述
*/
*/
private
String
contentDescription
;
private
String
contentDescription
;
/**
/**
* 关键字
* 关键字
*/
*/
private
String
contentKeyword
;
private
String
contentKeyword
;
/**
/**
* 文章内容
* 文章内容
*/
*/
private
String
contentDetails
;
private
String
contentDetails
;
/**
/**
* 文章跳转链接地址
* 文章跳转链接地址
*/
*/
private
String
contentOutLink
;
private
String
contentUrl
;
/**
/**
* 点击次数
* 点击次数
*/
*/
private
Integer
contentHit
;
private
Integer
contentHit
;
public
Integer
getContentHit
()
{
public
Integer
getContentHit
()
{
return
contentHit
;
return
contentHit
;
}
}
public
void
setContentHit
(
Integer
contentHit
)
{
public
void
setContentHit
(
Integer
contentHit
)
{
this
.
contentHit
=
contentHit
;
this
.
contentHit
=
contentHit
;
}
}
/**
/**
* 设置文章标题
* 设置文章标题
*/
*/
public
void
setContentTitle
(
String
contentTitle
)
{
public
void
setContentTitle
(
String
contentTitle
)
{
this
.
contentTitle
=
contentTitle
;
this
.
contentTitle
=
contentTitle
;
}
}
/**
/**
* 获取文章标题
* 获取文章标题
*/
*/
public
String
getContentTitle
()
{
public
String
getContentTitle
()
{
return
this
.
contentTitle
;
return
this
.
contentTitle
;
}
}
public
String
getCategoryId
()
{
public
String
getCategoryId
()
{
return
categoryId
;
return
categoryId
;
}
}
public
void
setCategoryId
(
String
categoryId
)
{
public
void
setCategoryId
(
String
categoryId
)
{
this
.
categoryId
=
categoryId
;
this
.
categoryId
=
categoryId
;
}
}
/**
/**
* 设置文章类型
* 设置文章类型
*/
*/
public
void
setContentType
(
String
contentType
)
{
public
void
setContentType
(
String
contentType
)
{
this
.
contentType
=
contentType
;
this
.
contentType
=
contentType
;
}
}
/**
/**
* 获取文章类型
* 获取文章类型
*/
*/
public
String
getContentType
()
{
public
String
getContentType
()
{
return
this
.
contentType
;
return
this
.
contentType
;
}
}
/**
/**
* 设置是否显示
* 设置是否显示
*/
*/
public
void
setContentDisplay
(
String
contentDisplay
)
{
public
void
setContentDisplay
(
String
contentDisplay
)
{
this
.
contentDisplay
=
contentDisplay
;
this
.
contentDisplay
=
contentDisplay
;
}
}
/**
/**
* 获取是否显示
* 获取是否显示
*/
*/
public
String
getContentDisplay
()
{
public
String
getContentDisplay
()
{
return
this
.
contentDisplay
;
return
this
.
contentDisplay
;
}
}
/**
/**
* 设置文章作者
* 设置文章作者
*/
*/
public
void
setContentAuthor
(
String
contentAuthor
)
{
public
void
setContentAuthor
(
String
contentAuthor
)
{
this
.
contentAuthor
=
contentAuthor
;
this
.
contentAuthor
=
contentAuthor
;
}
}
/**
/**
* 获取文章作者
* 获取文章作者
*/
*/
public
String
getContentAuthor
()
{
public
String
getContentAuthor
()
{
return
this
.
contentAuthor
;
return
this
.
contentAuthor
;
}
}
/**
/**
* 设置文章来源
* 设置文章来源
*/
*/
public
void
setContentSource
(
String
contentSource
)
{
public
void
setContentSource
(
String
contentSource
)
{
this
.
contentSource
=
contentSource
;
this
.
contentSource
=
contentSource
;
}
}
/**
/**
* 获取文章来源
* 获取文章来源
*/
*/
public
String
getContentSource
()
{
public
String
getContentSource
()
{
return
this
.
contentSource
;
return
this
.
contentSource
;
}
}
/**
/**
* 设置发布时间
* 设置发布时间
*/
*/
public
void
setContentDatetime
(
Date
contentDatetime
)
{
public
void
setContentDatetime
(
Date
contentDatetime
)
{
this
.
contentDatetime
=
contentDatetime
;
this
.
contentDatetime
=
contentDatetime
;
}
}
/**
/**
* 获取发布时间
* 获取发布时间
*/
*/
public
Date
getContentDatetime
()
{
public
Date
getContentDatetime
()
{
return
this
.
contentDatetime
;
return
this
.
contentDatetime
;
}
}
/**
/**
* 设置自定义顺序
* 设置自定义顺序
*/
*/
public
void
setContentSort
(
Integer
contentSort
)
{
public
void
setContentSort
(
Integer
contentSort
)
{
this
.
contentSort
=
contentSort
;
this
.
contentSort
=
contentSort
;
}
}
/**
/**
* 获取自定义顺序
* 获取自定义顺序
*/
*/
public
Integer
getContentSort
()
{
public
Integer
getContentSort
()
{
return
this
.
contentSort
;
return
this
.
contentSort
;
}
}
/**
/**
* 设置文章缩略图
* 设置文章缩略图
*/
*/
public
void
setContentImg
(
String
contentImg
)
{
public
void
setContentImg
(
String
contentImg
)
{
this
.
contentImg
=
contentImg
;
this
.
contentImg
=
contentImg
;
}
}
/**
/**
* 获取文章缩略图
* 获取文章缩略图
*/
*/
public
String
getContentImg
()
{
public
String
getContentImg
()
{
return
this
.
contentImg
;
return
this
.
contentImg
;
}
}
/**
/**
* 设置描述
* 设置描述
*/
*/
public
void
setContentDescription
(
String
contentDescription
)
{
public
void
setContentDescription
(
String
contentDescription
)
{
this
.
contentDescription
=
contentDescription
;
this
.
contentDescription
=
contentDescription
;
}
}
/**
/**
* 获取描述
* 获取描述
*/
*/
public
String
getContentDescription
()
{
public
String
getContentDescription
()
{
return
this
.
contentDescription
;
return
this
.
contentDescription
;
}
}
/**
/**
* 设置关键字
* 设置关键字
*/
*/
public
void
setContentKeyword
(
String
contentKeyword
)
{
public
void
setContentKeyword
(
String
contentKeyword
)
{
this
.
contentKeyword
=
contentKeyword
;
this
.
contentKeyword
=
contentKeyword
;
}
}
/**
/**
* 获取关键字
* 获取关键字
*/
*/
public
String
getContentKeyword
()
{
public
String
getContentKeyword
()
{
return
this
.
contentKeyword
;
return
this
.
contentKeyword
;
}
}
/**
/**
* 设置文章内容
* 设置文章内容
*/
*/
public
void
setContentDetails
(
String
contentDetails
)
{
public
void
setContentDetails
(
String
contentDetails
)
{
this
.
contentDetails
=
contentDetails
;
this
.
contentDetails
=
contentDetails
;
}
}
/**
/**
* 获取文章内容
* 获取文章内容
*/
*/
public
String
getContentDetails
()
{
public
String
getContentDetails
()
{
return
this
.
contentDetails
;
return
this
.
contentDetails
;
}
}
/**
/**
* 设置文章跳转链接地址
* 设置文章跳转链接地址
*/
*/
public
void
setContentOutLink
(
String
contentOutLink
)
{
public
void
setContentUrl
(
String
contentUrl
)
{
this
.
contentOutLink
=
contentOutLink
;
this
.
contentUrl
=
contentUrl
;
}
}
/**
/**
* 获取文章跳转链接地址
* 获取文章跳转链接地址
*/
*/
public
String
getContentOutLink
()
{
public
String
getContentUrl
()
{
return
this
.
contentOutLink
;
return
this
.
contentUrl
;
}
}
}
}
Prev
1
2
Next
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