Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gs1-office-web-sit
Overview
Overview
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
吴迪
gs1-office-web-sit
Commits
185ac902
Commit
185ac902
authored
Jan 22, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】修改文件
parent
ecb3b3a4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
1 deletions
+5
-1
NewsServiceImpl.java
...o/office/modules/manage/service/impl/NewsServiceImpl.java
+5
-1
No files found.
src/main/java/io/office/modules/manage/service/impl/NewsServiceImpl.java
View file @
185ac902
...
@@ -49,7 +49,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -49,7 +49,7 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
news
.
setStartdate
(
new
Date
());
news
.
setStartdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
news
.
setPublicdate
(
new
Date
());
//二级栏目不为空时 classid取值二级栏目id值
//二级栏目不为空时 classid取值二级栏目id值
if
(
news
.
getCclassid
()
!=
null
)
{
if
(
news
.
getCclassid
()
!=
null
&&
StringUtils
.
isNotBlank
(
news
.
getCclassid
().
toString
())
)
{
news
.
setClassid
(
news
.
getCclassid
());
news
.
setClassid
(
news
.
getCclassid
());
}
}
int
insert
=
baseMapper
.
insert
(
news
);
int
insert
=
baseMapper
.
insert
(
news
);
...
@@ -65,6 +65,10 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
...
@@ -65,6 +65,10 @@ public class NewsServiceImpl extends ServiceImpl<NewsDao, NewsEntity> implements
if
(
news
.
getId
()
==
null
)
{
if
(
news
.
getId
()
==
null
)
{
return
R
.
error
(
"id不能为空!"
);
return
R
.
error
(
"id不能为空!"
);
}
}
if
(
news
.
getCclassid
()!=
null
&&
StringUtils
.
isNotBlank
(
news
.
getCclassid
().
toString
())){
news
.
setClassid
(
news
.
getCclassid
());
}
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
QueryWrapper
<
NewsEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
newsEntityQueryWrapper
.
eq
(
"id"
,
news
.
getId
());
news
.
setEditor
(
user
.
getUsername
());
news
.
setEditor
(
user
.
getUsername
());
...
...
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