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
b8080021
Commit
b8080021
authored
Nov 03, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
删除代码冲突
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
6806b12a
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
15 deletions
+11
-15
order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
+11
-15
No files found.
order-application-service/src/main/java/cn/freemud/service/impl/SellCouponOrderServiceImpl.java
View file @
b8080021
...
...
@@ -61,7 +61,9 @@ import com.freemud.application.sdk.api.ordercenter.response.OrderBaseResp;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderInfoReqs
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderItemResp
;
import
com.freemud.application.sdk.api.ordercenter.service.OrderSdkService
;
import
com.freemud.application.sdk.api.productcenter.request.product.GetProductInfoRequest
;
import
com.freemud.application.sdk.api.productcenter.response.menu.GetMenuCategoryInfoResponse
;
import
com.freemud.application.sdk.api.productcenter.response.product.GetProductInfosResponse
;
import
com.freemud.application.sdk.api.productcenter.service.MenuService
;
import
com.freemud.application.sdk.api.promotioncenter.request.promotion.ActivityUpdateStockRequest
;
import
com.freemud.application.sdk.api.promotioncenter.response.PromotionResponseDTO
;
...
...
@@ -509,22 +511,14 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
return
ResponseUtil
.
error
(
ResponseResult
.
STORE_ITEM_CHECK_VAILD_ERROR
);
}
/
*GetProductInfoRequest request = new GetProductInfoRequest();
request.setChannel(menuType
);
/
/查询商品信息sdk改feign
GetProductInfoDto
request
=
new
GetProductInfoDto
(
);
request
.
setPartnerId
(
partnerId
);
request.setProductInfoType(ProductInfoType.ALL.getCode());
request
.
setShopId
(
storeId
);
request
.
setProductInfoType
(
ProductInfoType
.
ALL
.
getCode
());
request
.
setProductIds
(
productIds
);
//获取商品(里面的活动)
com.freemud.application.sdk.api.base.BaseResponse<GetProductInfosResponse> productInfosByIds = menuService.getProductInfosByIds(request, trackingNo);
if (!ResponseCodeConstant.RESPONSE_SUCCESS_STR.equals(productInfosByIds.getCode()) || productInfosByIds.getData() == null || CollectionUtils.isEmpty(productInfosByIds.getData().getProducts())) {
return ResponseUtil.error(ResponseResultEnum.GET_PRODUCT_INFOS_ERROR.getCode(), ResponseResultEnum.GET_PRODUCT_INFOS_ERROR.getMessage());
}
//效验商品券是否有效
List<ProductBindingCouponType> productBindingCoupons = productInfos.getData().getProducts().get(0).getProductBindingCouponTypes();
if (CollectionUtils.isEmpty(productBindingCoupons)) {
return ResponseUtil.error(ResponseResult.STORE_ITEM_CHECK_INVAILD);
}
request
.
setChannel
(
menuType
);
ProductInfosDto
productInfos
=
storeItemClient
.
listProductInfos
(
request
);
// 产品确认 暂时不需要改逻辑
// List<GetMenuCategoryInfoResponse.RootNodeBean.ChildrenBeanFirst.ChildrenBeanSecond.ProductBean> products = productInfosByIds.getData().getProducts();
//
...
...
@@ -535,8 +529,10 @@ public class SellCouponOrderServiceImpl implements OrderFactoryService {
// }
// }
List
<
String
>
activityCodes
=
new
ArrayList
<>();
for (ProductBindingCouponType productBindingCouponType : productBindingCoupons) {
activityCodes.add(productBindingCouponType.getActivityCode());
//效验商品券是否有效
List
<
ProductBindingCouponType
>
productBindingCoupons
=
productInfos
.
getData
().
getProducts
().
get
(
0
).
getProductBindingCouponTypes
();
if
(
CollectionUtils
.
isEmpty
(
productBindingCoupons
))
{
return
ResponseUtil
.
error
(
ResponseResult
.
STORE_ITEM_CHECK_INVAILD
);
}
//批量查询活动详情
List
<
ActiveDetailVO
>
activeDetailVOS
=
batchQueryActivityInfo
(
partnerId
,
activityCodes
,
trackingNo
);
...
...
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