Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
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
youjj
cloud-platform
Commits
e6d81eed
Commit
e6d81eed
authored
Apr 23, 2020
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-order' into dev
parents
eacf42c7
1dbfeb93
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
ActivityProductBiz.java
...va/com/xxfc/platform/activity/biz/ActivityProductBiz.java
+1
-1
ActivityProductSpecsBiz.java
...m/xxfc/platform/activity/biz/ActivityProductSpecsBiz.java
+1
-1
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityProductBiz.java
View file @
e6d81eed
...
...
@@ -63,7 +63,7 @@ public class ActivityProductBiz extends BaseBiz<ActivityProductMapper, ActivityP
ActivityProduct
oldValue
=
selectById
(
activityProduct
.
getId
());
if
(
oldValue
!=
null
)
{
//增加销量,减少库存
oldValue
.
setSales
(
oldValue
.
getSales
()
+
activityProduct
.
getSales
());
if
(
oldValue
.
getStock
()
>
0
)
{
if
(
oldValue
.
getStock
()
>
0
||
activityProduct
.
getSales
()
<
0
)
{
oldValue
.
setStock
(
oldValue
.
getStock
()
-
activityProduct
.
getSales
());
updateSelectiveByIdRe
(
oldValue
);
return
ObjectRestResponse
.
succ
(
oldValue
);
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityProductSpecsBiz.java
View file @
e6d81eed
...
...
@@ -57,7 +57,7 @@ public class ActivityProductSpecsBiz extends BaseBiz<ActivityProductSpecsMapper,
}
ActivityProductSpecs
oldValue
=
selectById
(
activityProductSpecs
.
getId
());
if
(
oldValue
!=
null
)
{
//增加销量,减少库存
if
(
oldValue
.
getStock
()
>
0
)
{
if
(
oldValue
.
getStock
()
>
0
||
activityProductSpecs
.
getSales
()
<
0
)
{
oldValue
.
setSales
(
oldValue
.
getSales
()
+
activityProductSpecs
.
getSales
());
oldValue
.
setStock
(
oldValue
.
getStock
()
-
activityProductSpecs
.
getSales
());
updateSelectiveByIdRe
(
oldValue
);
...
...
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