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
chenchao
6 years ago
Commit
dc992ce085780b66da8cc6c644a27640cd40bad7
1 parent
5e92e73f
protect skup type in special api
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
0 deletions
order/src/main/java/com/yohoufo/order/service/impl/SellerOrderService.java
order/src/main/java/com/yohoufo/order/service/impl/SellerOrderService.java
View file @
dc992ce
...
...
@@ -267,6 +267,18 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic
.
productId
(
goodsInfo
.
getProductId
()).
build
();
return
resp
;
}
private
static
final
List
<
Integer
>
SUPPORT_SKUPTYPES
;
static
{
SUPPORT_SKUPTYPES
=
new
ArrayList
<>(
8
);
SUPPORT_SKUPTYPES
.
add
(
SkupType
.
IN_STOCK
.
getCode
());
SUPPORT_SKUPTYPES
.
add
(
SkupType
.
ADVANCE
.
getCode
());
}
private
void
protectPublish
(
SellerOrderSubmitReq
req
){
Integer
skupType
=
req
.
getSkupType
();
if
(!
SUPPORT_SKUPTYPES
.
contains
(
skupType
)){
throw
new
UfoServiceException
(
400
,
"请升级至最新版本后操作"
);
}
}
/**
* 发布商品 + 生成订单
* @param req
...
...
@@ -274,6 +286,7 @@ public class SellerOrderService implements IOrderListService, IOrderDetailServic
* @throws GatewayException
*/
public
OrderSubmitResp
publishPrd
(
SellerOrderSubmitReq
req
)
throws
GatewayException
{
protectPublish
(
req
);
SellerOrderContext
context
=
sellerOrderPrepareProcessor
.
buildPublishCtx
(
req
);
boolean
isEntryShop
=
context
.
isEntryShop
();
OrderSubmitResp
resp
;
...
...
Please
register
or
login
to post a comment