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
dc63d6dd
Commit
dc63d6dd
authored
Jun 23, 2020
by
vip
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
重复新增封面栏目bug
parent
a866cd37
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
11 deletions
+16
-11
CategoryBizImpl.java
src/main/java/net/mingsoft/cms/biz/impl/CategoryBizImpl.java
+10
-10
application.yml
src/main/resources/application.yml
+1
-0
form.ftl
src/main/webapp/WEB-INF/manager/cms/content/form.ftl
+5
-1
No files found.
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
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