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
644f0bdc
Commit
644f0bdc
authored
Dec 15, 2022
by
msgroup
Committed by
mingsoft
Dec 15, 2022
Browse files
fix:待发布版本
Signed-off-by:
mingsoft
<
killfen@126.com
>
parent
f66c6298
Changes
12
Expand all
Show whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/action/BaseAction.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/action/CategoryAction.java
View file @
644f0bdc
This diff is collapsed.
Click to expand it.
src/main/java/net/mingsoft/cms/bean/CategoryBean.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/biz/ICategoryBiz.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/biz/IHistoryLogBiz.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/constant/Const.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/dao/ICategoryDao.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/dao/ICmsHistoryLogDao.java
View file @
644f0bdc
src/main/java/net/mingsoft/cms/entity/CategoryEntity.java
View file @
644f0bdc
...
@@ -7,10 +7,10 @@
...
@@ -7,10 +7,10 @@
* 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:
* <p>
* 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.
* <p>
* 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
...
@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity;
...
@@ -24,6 +24,11 @@ package net.mingsoft.cms.entity;
import
com.baomidou.mybatisplus.annotation.*
;
import
com.baomidou.mybatisplus.annotation.*
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.config.MSProperties
;
import
net.mingsoft.mdiy.util.ConfigUtil
;
import
java.io.File
;
/**
/**
* 分类实体
* 分类实体
...
@@ -131,6 +136,21 @@ public class CategoryEntity extends BaseEntity {
...
@@ -131,6 +136,21 @@ public class CategoryEntity extends BaseEntity {
*/
*/
private
String
topId
;
private
String
topId
;
/**
* 路径url
*/
@TableField
(
exist
=
false
)
private
String
url
;
/**
* 设置url路径
*
* @param url 路径的字符串
*/
public
void
setUrl
(
String
url
)
{
this
.
url
=
url
;
}
public
Boolean
getLeaf
()
{
public
Boolean
getLeaf
()
{
return
leaf
;
return
leaf
;
}
}
...
@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity {
...
@@ -419,7 +439,8 @@ public class CategoryEntity extends BaseEntity {
* 获取栏目Id(标签使用)
* 获取栏目Id(标签使用)
*/
*/
public
Boolean
getTypeleaf
()
{
public
Boolean
getTypeleaf
()
{
return
this
.
leaf
;
}
return
this
.
leaf
;
}
/**
/**
...
@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity {
...
@@ -431,6 +452,7 @@ public class CategoryEntity extends BaseEntity {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
typepath
;
private
String
typepath
;
/**
/**
* 获取栏目图片 (标签使用)
* 获取栏目图片 (标签使用)
*/
*/
...
@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity {
...
@@ -462,4 +484,22 @@ public class CategoryEntity extends BaseEntity {
this
.
childsize
=
childsize
;
this
.
childsize
=
childsize
;
}
}
/**
* 获取url路径
*
* @return url路径的字符串
*/
public
String
getUrl
()
{
String
appDir
=
""
;
String
htmlDir
=
MSProperties
.
diy
.
htmlDir
;
String
categoryPath
=
this
.
getCategoryPath
();
String
categoryPinyin
=
this
.
getCategoryPinyin
();
if
(!(
ConfigUtil
.
getBoolean
(
"短链配置"
,
"shortLinkSwitch"
,
false
)))
{
//未开启短链
appDir
=
"/"
+
BasicUtil
.
getApp
().
getAppDir
();
return
url
=
"/"
+
htmlDir
+
appDir
+
categoryPath
+
"/index.html"
;
}
//开启短链后的url拼接
return
url
=
"/"
+
htmlDir
+
appDir
+
"/"
+
categoryPinyin
+
".html"
;
}
}
}
src/main/java/net/mingsoft/config/WebConfig.java
View file @
644f0bdc
...
@@ -132,7 +132,8 @@ public class WebConfig implements WebMvcConfigurer {
...
@@ -132,7 +132,8 @@ public class WebConfig implements WebMvcConfigurer {
@Bean
@Bean
public
FilterRegistrationBean
xssFilterRegistration
(
@Value
(
"${ms.xss.enable:true}"
)
boolean
xssEnable
,
public
FilterRegistrationBean
xssFilterRegistration
(
@Value
(
"${ms.xss.enable:true}"
)
boolean
xssEnable
,
@Value
(
"${ms.xss.filter-url}"
)
String
filterUrl
,
@Value
(
"${ms.xss.filter-url}"
)
String
filterUrl
,
@Value
(
"${ms.xss.exclude-url}"
)
String
excludeUrl
)
{
@Value
(
"${ms.xss.exclude-url}"
)
String
excludeUrl
,
@Value
(
"${ms.xss.exclude-filed}"
)
String
excludeFiled
)
{
XSSEscapeFilter
xssFilter
=
new
XSSEscapeFilter
();
XSSEscapeFilter
xssFilter
=
new
XSSEscapeFilter
();
Map
<
String
,
String
>
initParameters
=
new
HashMap
();
Map
<
String
,
String
>
initParameters
=
new
HashMap
();
FilterRegistrationBean
registration
=
new
FilterRegistrationBean
();
FilterRegistrationBean
registration
=
new
FilterRegistrationBean
();
...
@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer {
...
@@ -149,6 +150,9 @@ public class WebConfig implements WebMvcConfigurer {
}
else
{
}
else
{
xssFilter
.
excludes
.
add
(
MSProperties
.
manager
.
path
+
"/**"
);
xssFilter
.
excludes
.
add
(
MSProperties
.
manager
.
path
+
"/**"
);
}
}
if
(
excludeFiled
!=
null
&&
StrUtil
.
isNotBlank
(
excludeFiled
))
{
xssFilter
.
excludesFiled
.
addAll
(
Arrays
.
asList
(
excludeFiled
.
split
(
","
)));
}
initParameters
.
put
(
"isIncludeRichText"
,
"false"
);
initParameters
.
put
(
"isIncludeRichText"
,
"false"
);
registration
.
setInitParameters
(
initParameters
);
registration
.
setInitParameters
(
initParameters
);
registration
.
setFilter
(
xssFilter
);
registration
.
setFilter
(
xssFilter
);
...
...
src/main/webapp/template/1/default/news-detail.htm
View file @
644f0bdc
...
@@ -92,7 +92,6 @@
...
@@ -92,7 +92,6 @@
},
},
},
},
created
()
{
created
()
{
this
.
likeTotal
()
}
}
})
})
</script>
</script>
...
...
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