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
e26883dc
Commit
e26883dc
authored
Nov 30, 2021
by
周晓航
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
维护 加价购商品的 pos编码
Signed-off-by: 周晓航 <xiaohang.zhou@freemud.com>
parent
ba6117ef
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
4 deletions
+6
-4
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/BuySendPromotionService.java
+4
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMealServiceImpl.java
+1
-1
No files found.
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ShoppingCartConvertAdapter.java
View file @
e26883dc
...
...
@@ -62,6 +62,7 @@ public class ShoppingCartConvertAdapter {
cartGoodsDetailDto
.
setSkuId
(
goodsId
);
// fisherman 加价购商品类型设置
cartGoodsDetailDto
.
setOriginalProductType
(
getProductsVo
.
getType
());
cartGoodsDetailDto
.
setLinkedId
(
getProductsVo
.
getLinkedId
());
cartGoodsDetailDto
.
setProductType
(
sendGoods
.
getProductType
());
cartGoodsDetailDto
.
setQty
(
product
.
getQty
());
cartGoodsDetailDto
.
setSpuName
(
getProductsVo
!=
null
?
getProductsVo
.
getSpuName
()
:
""
);
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/BuySendPromotionService.java
View file @
e26883dc
...
...
@@ -7,13 +7,13 @@ import cn.freemud.entities.dto.activity.ActivityQueryDto;
import
cn.freemud.entities.dto.calculate.CalculationDiscountResult
;
import
cn.freemud.entities.dto.calculate.SendActivity
;
import
cn.freemud.entities.dto.calculate.SendGoods
;
import
cn.freemud.entities.dto.product.info.ProductBean
;
import
cn.freemud.entities.dto.shoppingCart.ShoppingCartGoodsDto
;
import
cn.freemud.entities.vo.*
;
import
cn.freemud.enums.ActivityTypeEnum
;
import
cn.freemud.enums.ResponseResult
;
import
cn.freemud.interceptor.ServiceException
;
import
cn.freemud.service.IPromotionService
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.sdk.api.assortment.shoppingcart.service.impl.ShoppingCartBaseServiceImpl
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.ObjectUtils
;
...
...
@@ -281,19 +281,20 @@ public class BuySendPromotionService implements IPromotionService {
*/
private
void
updateSendGooodsInfo
(
List
<
CartGoods
>
newCartGoodsList
,
ActivityQueryDto
activityQueryDto
,
ShoppingCartInfoRequestVo
shoppingCartInfoRequestVo
){
List
<
String
>
goodsIds
=
newCartGoodsList
.
stream
().
map
(
CartGoods:
:
getGoodsId
).
collect
(
Collectors
.
toList
());
List
<
ProductBean
DTO
>
productBeanList
=
assortmentSdkService
.
getProductsInfoSdk
(
activityQueryDto
.
getPartnerId
()
List
<
ProductBean
>
productBeanList
=
assortmentSdkService
.
getProductsInfo
(
activityQueryDto
.
getPartnerId
()
,
activityQueryDto
.
getStoreId
(),
goodsIds
,
shoppingCartInfoRequestVo
==
null
?
null
:
shoppingCartInfoRequestVo
.
getMenuType
()
,
shoppingCartBaseService
);
if
(
CollectionUtils
.
isEmpty
(
productBeanList
))
{
throw
new
ServiceException
(
ResponseResult
.
SHOPPING_CART_GIFTS_PRODUCT_NOT_EXIST
);
}
for
(
CartGoods
cartGoods
:
newCartGoodsList
)
{
Optional
<
ProductBean
DTO
>
productBeanDTO
=
productBeanList
.
stream
().
filter
(
productBean
->
ObjectUtils
.
equals
(
productBean
.
getPid
(),
cartGoods
.
getGoodsId
())).
findFirst
();
Optional
<
ProductBean
>
productBeanDTO
=
productBeanList
.
stream
().
filter
(
productBean
->
ObjectUtils
.
equals
(
productBean
.
getPid
(),
cartGoods
.
getGoodsId
())).
findFirst
();
if
(!
productBeanDTO
.
isPresent
())
{
continue
;
}
cartGoods
.
setUnit
(
productBeanDTO
.
get
().
getUnit
());
cartGoods
.
setWeight
(
productBeanDTO
.
get
().
getWeight
());
cartGoods
.
setLinkedId
(
productBeanDTO
.
get
().
getLinkedId
());
}
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartMealServiceImpl.java
View file @
e26883dc
...
...
@@ -117,7 +117,7 @@ public class ShoppingCartMealServiceImpl implements ShoppingCartNewService {
String
appType
=
customerInfo
.
getIappId
();
requestVo
.
setAppType
(
appType
);
requestVo
.
setTableNumber
(
tableNumber
);
CartGoods
cartGoods
=
s
hoppingCartConvertAdapter
.
convent2CartGoods
(
requestVo
);
CartGoods
cartGoods
=
S
hoppingCartConvertAdapter
.
convent2CartGoods
(
requestVo
);
List
<
Long
>
productIds
=
new
ArrayList
<>();
//商品skuId或者商品券的商品id
String
spuId2
=
spuId
;
...
...
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