Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
0300aa1b
Commit
0300aa1b
authored
May 26, 2020
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
买券订单创建修改
parent
70c66671
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
3 deletions
+53
-3
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderProductAddInfoDto.java
+5
-0
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/ProductBindingCouponType.java
+35
-0
order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
+13
-3
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/OrderProductAddInfoDto.java
View file @
0300aa1b
...
...
@@ -51,4 +51,9 @@ public class OrderProductAddInfoDto extends BaseConfig {
/** 是否主食 **/
private
Integer
stapleFood
;
/**
* 商品绑定的券活动(买券虚拟订单才有)
*/
private
List
<
ProductBindingCouponType
>
productBindingCoupons
;
}
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/request/order/ProductBindingCouponType.java
0 → 100644
View file @
0300aa1b
package
com
.
freemud
.
sdk
.
api
.
assortment
.
order
.
request
.
order
;
import
lombok.Data
;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: ProductBindingCouponType
* @Package com.freemud.sdk.api.assortment.order.request.order
* @Description:
* @author: ping1.wu
* @date: 2020/5/26 14:26
* @Copyright: 2020 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
@Data
public
class
ProductBindingCouponType
{
/**
* 优惠券CODE
*/
private
String
activityCode
;
/**
* 数量
*/
private
int
num
;
/**
* 排序
*/
private
int
sequence
;
}
order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
View file @
0300aa1b
...
...
@@ -45,6 +45,8 @@ import com.freemud.application.sdk.api.storecenter.request.vo.GetOrgTreeListRequ
import
com.freemud.application.sdk.api.storecenter.response.StoreResponse
;
import
com.freemud.application.sdk.api.storecenter.service.StoreCenterService
;
import
com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter
;
import
com.freemud.sdk.api.assortment.order.request.order.OrderProductAddInfoDto
;
import
com.freemud.sdk.api.assortment.order.request.order.ProductBindingCouponType
;
import
com.freemud.sdk.api.assortment.order.response.order.CreateOrderResponse
;
import
com.google.common.collect.Lists
;
import
com.google.common.collect.Maps
;
...
...
@@ -320,9 +322,17 @@ public class SellCouponOrderServiceImpl {
orderItemCreateReq
.
setThirdProductId
(
productBean
.
getCustomerCode
());
orderItemCreateReq
.
setProductQuantity
(
1
);
Map
<
String
,
List
<
GetMenuCategoryInfoResponse
.
RootNodeBean
.
ChildrenBeanFirst
.
ChildrenBeanSecond
.
ProductBean
.
ProductBindingCouponType
>>
map
=
new
HashMap
<>();
map
.
put
(
"productBindingCoupons"
,
productBean
.
getProductBindingCouponTypes
());
orderItemCreateReq
.
setExtInfo
(
JSONObject
.
toJSONString
(
map
));
OrderProductAddInfoDto
orderProductAddInfoDto
=
new
OrderProductAddInfoDto
();
List
<
ProductBindingCouponType
>
productBindingCoupons
=
new
ArrayList
<>();
for
(
GetMenuCategoryInfoResponse
.
RootNodeBean
.
ChildrenBeanFirst
.
ChildrenBeanSecond
.
ProductBean
.
ProductBindingCouponType
productBindingCouponType
:
productBean
.
getProductBindingCouponTypes
()){
ProductBindingCouponType
productBindingCouponType2
=
new
ProductBindingCouponType
();
productBindingCouponType2
.
setActivityCode
(
productBindingCouponType
.
getActivityCode
());
productBindingCouponType2
.
setNum
(
productBindingCouponType
.
getNum
());
productBindingCouponType2
.
setSequence
(
productBindingCouponType
.
getSequence
());
productBindingCoupons
.
add
(
productBindingCouponType2
);
}
orderProductAddInfoDto
.
setProductBindingCoupons
(
productBindingCoupons
);
orderItemCreateReq
.
setExtInfo
(
JSONObject
.
toJSONString
(
orderProductAddInfoDto
));
orderItemList
.
add
(
orderItemCreateReq
);
//商品信息赋值
...
...
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