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
dc63d6dd
Commit
dc63d6dd
authored
Jun 23, 2020
by
vip
Browse files
重复新增封面栏目bug
parent
a866cd37
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
View file @
dc63d6dd
...
...
@@ -22,21 +22,18 @@ The MIT License (MIT) * Copyright (c) 2019 铭飞科技
package
net.mingsoft.cms.biz.impl
;
import
cn.hutool.core.util.ObjectUtil
;
import
net.mingsoft.base.entity.BaseEntity
;
import
net.mingsoft.base.biz.impl.BaseBizImpl
;
import
net.mingsoft.base.dao.IBaseDao
;
import
net.mingsoft.basic.util.BasicUtil
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.dao.ICategoryDao
;
import
net.mingsoft.cms.entity.CategoryEntity
;
import
net.mingsoft.cms.util.PinYinUtil
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
net.mingsoft.base.biz.impl.BaseBizImpl
;
import
net.mingsoft.base.dao.IBaseDao
;
import
java.io.File
;
import
java.util.*
;
import
net.mingsoft.cms.biz.ICategoryBiz
;
import
net.mingsoft.cms.dao.ICategoryDao
;
import
java.util.List
;
/**
* 分类管理持久化层
...
...
@@ -78,9 +75,12 @@ public class CategoryBizImpl extends BaseBizImpl implements ICategoryBiz {
if
(
categoryBizEntity
!=
null
){
categoryEntity
.
setCategoryPinyin
(
pingYin
+
categoryEntity
.
getId
());
}
CategoryEntity
parentCategory
=
(
CategoryEntity
)
categoryDao
.
getEntity
(
Integer
.
parseInt
(
categoryEntity
.
getCategoryId
()));
CategoryEntity
parentCategory
=
null
;
if
(
StringUtils
.
isNotBlank
(
categoryEntity
.
getCategoryId
()))
{
parentCategory
=
(
CategoryEntity
)
categoryDao
.
getEntity
(
Integer
.
parseInt
(
categoryEntity
.
getCategoryId
()));
}
//保存链接地址
String
path
=
ObjectUtil
.
isNotNull
(
parentCategory
)?
categoryEntit
y
.
getCategoryPath
():
""
;
String
path
=
ObjectUtil
.
isNotNull
(
parentCategory
)?
parentCategor
y
.
getCategoryPath
():
""
;
categoryEntity
.
setCategoryPath
(
path
+
"/"
+
categoryEntity
.
getCategoryPinyin
());
super
.
updateEntity
(
categoryEntity
);
}
...
...
src/main/resources/application.yml
View file @
dc63d6dd
...
...
@@ -19,6 +19,7 @@ ms:
chcek-code
:
true
#默认开启验证码验证,false验证码不验证
upload
:
template
:
template
path
:
upload
#文件上传路径,可以根据实际写绝对路径
mapping
:
/upload/**
#修改需要谨慎,系统第一次部署可以随意修改,如果已经有了上传数据,再次修改会导致之前上传的文件404
denied
:
.exe,.jsp
...
...
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
View file @
dc63d6dd
...
...
@@ -369,7 +369,7 @@
var
data
=
JSON
.parse
(
JSON
.stringify
(
that
.form
))
;
if
(
data
.contentType
!=
null
)
{
if
(
data
.contentType
)
{
data
.contentType
=
data
.contentType.join
(
'
,
'
)
;
}
...
...
@@ -390,7 +390,11 @@
if
(
that
.returnIsShow
)
{
javascript
:
history
.go
(
-1
)
;
}
else
{
//如果是顶级封面或封面,则重新拿到当前封面
id
,
避免重复保存
that
.list
(
that
.form.contentCategoryId
)
;
}
}
else
{
that
.
$notify
({
title
:
'失败'
,
...
...
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