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
c0e2b1d0
Commit
c0e2b1d0
authored
Apr 23, 2020
by
jiaorz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master-order'
parents
89ae3285
1dbfeb93
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
4 additions
and
4 deletions
+4
-4
ActivityProductBiz.java
...va/com/xxfc/platform/activity/biz/ActivityProductBiz.java
+1
-1
ActivityProductSpecsBiz.java
...m/xxfc/platform/activity/biz/ActivityProductSpecsBiz.java
+1
-1
OrderCancelBiz.java
...ava/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
+2
-2
No files found.
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityProductBiz.java
View file @
c0e2b1d0
...
@@ -63,7 +63,7 @@ public class ActivityProductBiz extends BaseBiz<ActivityProductMapper, ActivityP
...
@@ -63,7 +63,7 @@ public class ActivityProductBiz extends BaseBiz<ActivityProductMapper, ActivityP
ActivityProduct
oldValue
=
selectById
(
activityProduct
.
getId
());
ActivityProduct
oldValue
=
selectById
(
activityProduct
.
getId
());
if
(
oldValue
!=
null
)
{
//增加销量,减少库存
if
(
oldValue
!=
null
)
{
//增加销量,减少库存
oldValue
.
setSales
(
oldValue
.
getSales
()
+
activityProduct
.
getSales
());
oldValue
.
setSales
(
oldValue
.
getSales
()
+
activityProduct
.
getSales
());
if
(
oldValue
.
getStock
()
>
0
)
{
if
(
oldValue
.
getStock
()
>
0
||
activityProduct
.
getSales
()
<
0
)
{
oldValue
.
setStock
(
oldValue
.
getStock
()
-
activityProduct
.
getSales
());
oldValue
.
setStock
(
oldValue
.
getStock
()
-
activityProduct
.
getSales
());
updateSelectiveByIdRe
(
oldValue
);
updateSelectiveByIdRe
(
oldValue
);
return
ObjectRestResponse
.
succ
(
oldValue
);
return
ObjectRestResponse
.
succ
(
oldValue
);
...
...
xx-activity/xx-activity-server/src/main/java/com/xxfc/platform/activity/biz/ActivityProductSpecsBiz.java
View file @
c0e2b1d0
...
@@ -57,7 +57,7 @@ public class ActivityProductSpecsBiz extends BaseBiz<ActivityProductSpecsMapper,
...
@@ -57,7 +57,7 @@ public class ActivityProductSpecsBiz extends BaseBiz<ActivityProductSpecsMapper,
}
}
ActivityProductSpecs
oldValue
=
selectById
(
activityProductSpecs
.
getId
());
ActivityProductSpecs
oldValue
=
selectById
(
activityProductSpecs
.
getId
());
if
(
oldValue
!=
null
)
{
//增加销量,减少库存
if
(
oldValue
!=
null
)
{
//增加销量,减少库存
if
(
oldValue
.
getStock
()
>
0
)
{
if
(
oldValue
.
getStock
()
>
0
||
activityProductSpecs
.
getSales
()
<
0
)
{
oldValue
.
setSales
(
oldValue
.
getSales
()
+
activityProductSpecs
.
getSales
());
oldValue
.
setSales
(
oldValue
.
getSales
()
+
activityProductSpecs
.
getSales
());
oldValue
.
setStock
(
oldValue
.
getStock
()
-
activityProductSpecs
.
getSales
());
oldValue
.
setStock
(
oldValue
.
getStock
()
-
activityProductSpecs
.
getSales
());
updateSelectiveByIdRe
(
oldValue
);
updateSelectiveByIdRe
(
oldValue
);
...
...
xx-order/xx-order-server/src/main/java/com/xxfc/platform/order/biz/inner/OrderCancelBiz.java
View file @
c0e2b1d0
...
@@ -390,12 +390,12 @@ public class OrderCancelBiz {
...
@@ -390,12 +390,12 @@ public class OrderCancelBiz {
ActivityProductSpecs
activityProductSpecs
=
activityFeign
.
get
(
orderActiveDetail
.
getSpecsId
()).
getData
();
ActivityProductSpecs
activityProductSpecs
=
activityFeign
.
get
(
orderActiveDetail
.
getSpecsId
()).
getData
();
if
(
activityProductSpecs
!=
null
)
{
if
(
activityProductSpecs
!=
null
)
{
//修改规格库存
//修改规格库存
activityProductSpecs
.
setSales
(
orderActiveDetail
.
getNumber
());
activityProductSpecs
.
setSales
(
-
orderActiveDetail
.
getNumber
());
activityFeign
.
update
(
activityProductSpecs
);
activityFeign
.
update
(
activityProductSpecs
);
//修改商品库存
//修改商品库存
ActivityProduct
activityProduct
=
new
ActivityProduct
();
ActivityProduct
activityProduct
=
new
ActivityProduct
();
activityProduct
.
setId
(
activityProductSpecs
.
getGoodsId
());
activityProduct
.
setId
(
activityProductSpecs
.
getGoodsId
());
activityProduct
.
setSales
(
orderActiveDetail
.
getNumber
());
activityProduct
.
setSales
(
-
orderActiveDetail
.
getNumber
());
activityFeign
.
updateProduct
(
activityProduct
);
activityFeign
.
updateProduct
(
activityProduct
);
}
}
...
...
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