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
6b4f5b0b
Commit
6b4f5b0b
authored
Feb 15, 2022
by
吴迪
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
【新增】修改新增时候的代码
parent
2e31656d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
9 deletions
+6
-9
RetailpictureServiceImpl.java
...modules/manage/service/impl/RetailpictureServiceImpl.java
+6
-9
No files found.
src/main/java/io/office/modules/manage/service/impl/RetailpictureServiceImpl.java
View file @
6b4f5b0b
...
...
@@ -40,18 +40,15 @@ public class RetailpictureServiceImpl extends ServiceImpl<RetailpictureDao, Reta
@Override
public
R
insertPicture
(
RetailpictureEntity
picture
,
SysUserEntity
user
)
{
if
(
picture
.
getPictureid
()
==
null
){
return
R
.
error
(
"id不能为空!"
);
}
QueryWrapper
<
RetailpictureEntity
>
newsEntityQueryWrapper
=
new
QueryWrapper
<>();
newsEntityQueryWrapper
.
eq
(
"pictureid"
,
picture
.
getPictureid
());
picture
.
setEditor
(
user
.
getUsername
());
picture
.
setLasteditor
(
user
.
getUsername
());
int
update
=
baseMapper
.
update
(
picture
,
newsEntityQueryWrapper
);
if
(
update
>
0
){
return
R
.
ok
(
"修改成功!"
);
picture
.
setInputdate
(
new
Date
());
picture
.
setStatus
(
0
);
int
insert
=
baseMapper
.
insert
(
picture
);
if
(
insert
>
0
){
return
R
.
ok
(
"新增成功!"
);
}
else
{
return
R
.
error
(
"
修改
失败!"
);
return
R
.
error
(
"
新增
失败!"
);
}
}
...
...
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