Toggle navigation
Toggle navigation
This project
Loading...
Sign in
ufo
/
yohoufo-fore
·
Commits
Go to a project
GitLab
Go to group
Project
Activity
Files
Commits
Pipelines
0
Builds
0
Graphs
Milestones
Issues
0
Merge Requests
0
Members
Labels
Wiki
Forks
Network
Create a new issue
Download as
Email Patches
Plain Diff
Browse Files
Authored by
sailing-PC\sailing
7 years ago
Commit
3b29a6716c0a0047130491ae1d74bb170e29e214
1 parent
2047424b
fix
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
order/src/main/java/com/yohoufo/order/service/SellerOrderService.java
order/src/main/java/com/yohoufo/order/service/SkupService.java
order/src/main/java/com/yohoufo/order/service/SellerOrderService.java
View file @
3b29a67
...
...
@@ -66,7 +66,7 @@ public class SellerOrderService {
log
.
warn
(
"in computePublishPrd storageId illegal , req {}"
,
req
);
throw
new
GatewayException
(
400
,
"storageId 错误"
);
}
StorageLeastPriceResp
.
StorageLeastPrice
resp
=
ufoServiceCaller
.
call
(
"ufo.product.storage.leastprice"
,
storageId
);
StorageLeastPriceResp
resp
=
ufoServiceCaller
.
call
(
"ufo.product.storage.leastprice"
,
storageId
);
BigDecimal
leastPrice
;
if
(
Objects
.
isNull
(
resp
)
||
Objects
.
isNull
(
leastPrice
=
resp
.
getLeastPrice
())
||
leastPrice
.
doubleValue
()
==
0
D
){
throw
new
GatewayException
(
501
,
"暂无商品"
);
...
...
@@ -106,14 +106,13 @@ public class SellerOrderService {
//step 1: rpc get product detail by storage id
//ufo.product.storage.data
StorageDataResp
prdResp
=
ufoServiceCaller
.
call
(
"ufo.product.storage.data"
,
storageId
);
StorageDataResp
.
StorageData
storageData
=
prdResp
.
getProduct_info
();
//getProductDetail()
//step 2: generate skup ,action :set price status(unsaleable)
if
(
Objects
.
isNull
(
storageData
)){
if
(
Objects
.
isNull
(
prdResp
)){
log
.
warn
(
"in computePublishPrd storageId not exist in prd , req {}"
,
req
);
throw
new
GatewayException
(
400
,
"商品不存在"
);
}
int
skup
=
skupService
.
addSkup
(
storageData
);
int
skup
=
skupService
.
addSkup
(
prdResp
);
//TODO step 2: create order, set status(not pay)
//TODO generate a new real code
...
...
order/src/main/java/com/yohoufo/order/service/SkupService.java
View file @
3b29a67
...
...
@@ -17,8 +17,8 @@ public class SkupService {
@Autowired
private
SellerOrderGoodsMapper
sellerOrderGoodsMapper
;
public
int
addSkup
(
StorageDataResp
.
StorageData
storageData
){
GoodsSize
goodsSize
=
storageData
.
getSizeList
().
get
(
0
);
public
int
addSkup
(
StorageDataResp
storageData
){
GoodsSize
goodsSize
=
storageData
.
getSize
();
SellerOrderGoods
sellerOrderGoods
=
new
SellerOrderGoods
();
...
...
Please
register
or
login
to post a comment