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
f3058dd2
Commit
f3058dd2
authored
Aug 11, 2021
by
胡敬轩
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'remotes/origin/feature/20210811-v2041-赠送商品状态判断' into qa
parents
10507429
c2279b13
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
32 additions
and
16 deletions
+32
-16
assortment-ordercenter-sdk/pom.xml
+2
-1
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/adapter/ShoppingCartAdapter.java
+8
-7
order-application-service/src/main/java/cn/freemud/service/thirdparty/ActivityApplicationClient.java
+2
-7
ordercenter-sdk/pom.xml
+2
-1
ordercenter-sdk/readme.md
+2
-0
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityQueryRequestDto.java
+7
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ActivityServiceImpl.java
+9
-0
No files found.
assortment-ordercenter-sdk/pom.xml
View file @
f3058dd2
...
@@ -40,7 +40,8 @@
...
@@ -40,7 +40,8 @@
<dependency>
<dependency>
<groupId>
cn.freemud
</groupId>
<groupId>
cn.freemud
</groupId>
<artifactId>
ordercenter-sdk
</artifactId>
<artifactId>
ordercenter-sdk
</artifactId>
<!-- 版本号在最外层pom设置,无需升级。直接打包升级聚合订单sdk -->
<!-- <version>1.3.66.RELEASE</version>-->
<!-- 版本号在最外层pom设置,其他服务使用聚合订单sdk,打开注释,版本号与基础订单sdk版本号保持一直,无需提交代码 -->
</dependency>
</dependency>
<dependency>
<dependency>
<groupId>
com.freemud.application.service.sdk
</groupId>
<groupId>
com.freemud.application.service.sdk
</groupId>
...
...
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/adapter/ShoppingCartAdapter.java
View file @
f3058dd2
package
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
adapter
;
package
com
.
freemud
.
sdk
.
api
.
assortment
.
shoppingcart
.
adapter
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.application.sdk.api.productcenter.domain.ProductBeanDTO
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ProductAttributeValueType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ProductAttributeValueType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductRequest
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateShopProductType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateSkuProductType
;
import
com.freemud.application.sdk.api.productcenter.request.product.valid.ValidateSkuProductType
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.CommonsConstant
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.*
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.GoodsTypeEnum
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.ProductStatus
;
import
com.freemud.sdk.api.assortment.shoppingcart.constant.ProductType
;
import
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods
;
import
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoods
;
import
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoodsStates
;
import
com.freemud.sdk.api.assortment.shoppingcart.domain.CartGoodsStates
;
import
com.freemud.sdk.api.assortment.shoppingcart.exception.ServiceException
;
import
com.freemud.sdk.api.assortment.shoppingcart.request.CheckCartRequest
;
import
com.freemud.sdk.api.assortment.shoppingcart.request.CheckCartRequest
;
import
com.freemud.sdk.api.assortment.shoppingcart.request.GetProductInfoRequest
;
import
com.freemud.sdk.api.assortment.shoppingcart.request.GetProductInfoRequest
;
import
com.freemud.sdk.api.assortment.shoppingcart.util.ShoppingSdkLogUtil
;
import
com.freemud.sdk.api.assortment.shoppingcart.util.ShoppingSdkLogUtil
;
...
@@ -275,8 +274,10 @@ public class ShoppingCartAdapter {
...
@@ -275,8 +274,10 @@ public class ShoppingCartAdapter {
boolean
isSkuProduct
=
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
());
boolean
isSkuProduct
=
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SKU_GOODS
.
getGoodsType
(),
cartGoods
.
getGoodsType
());
// 如果是套餐商品,更新套餐内固定商品&可选商品的详细信息
// 如果是套餐商品,更新套餐内固定商品&可选商品的详细信息
boolean
isSetMealProduct
=
ObjectUtils
.
equals
(
ProductType
.
SetMeal
.
getCode
(),
spuProduct
.
getType
())
||
ObjectUtils
.
equals
(
ProductType
.
IncreasedPackage
.
getCode
(),
spuProduct
.
getType
());
boolean
isSetMealProduct
=
ObjectUtils
.
equals
(
ProductType
.
SetMeal
.
getCode
(),
spuProduct
.
getType
())
||
ObjectUtils
.
equals
(
ProductType
.
IncreasedPackage
.
getCode
(),
spuProduct
.
getType
());
ProductBeanDTO
.
SkuProductBean
skuProduct
=
isSkuProduct
?
spuProduct
.
getSkuList
().
stream
().
filter
(
p
->
ObjectUtils
.
equals
(
cartGoods
.
getSkuId
(),
p
.
getSkuId
())).
findFirst
().
get
()
:
null
;
ProductBeanDTO
.
SkuProductBean
skuProduct
=
isSkuProduct
?
spuProduct
.
getSkuList
().
stream
().
filter
(
p
->
ObjectUtils
.
equals
(
cartGoods
.
getSkuId
(),
p
.
getSkuId
())).
findFirst
().
orElse
(
null
):
null
;
if
(
isSkuProduct
&&
skuProduct
==
null
){
//特殊场景前端传一个skuid非spuid下多规格商品
throw
new
ServiceException
(
CartResponseConstant
.
FAIL
);
}
Map
<
String
,
String
>
attributes
=
getAttributesNew
(
cartGoods
.
getExtra
());
Map
<
String
,
String
>
attributes
=
getAttributesNew
(
cartGoods
.
getExtra
());
if
(!
"早餐啡常搭"
.
equals
(
cartGoods
.
getName
())
&&
!
"早餐啡常搭"
.
equals
(
cartGoods
.
getSkuName
())
&&
!
"早餐啡常搭"
.
equals
(
cartGoods
.
getSpuName
())
if
(!
"早餐啡常搭"
.
equals
(
cartGoods
.
getName
())
&&
!
"早餐啡常搭"
.
equals
(
cartGoods
.
getSkuName
())
&&
!
"早餐啡常搭"
.
equals
(
cartGoods
.
getSpuName
())
&&
!
"啡常搭"
.
equals
(
cartGoods
.
getName
())
&&
!
"啡常搭"
.
equals
(
cartGoods
.
getSkuName
())
&&
!
"啡常搭"
.
equals
(
cartGoods
.
getSpuName
()))
{
&&
!
"啡常搭"
.
equals
(
cartGoods
.
getName
())
&&
!
"啡常搭"
.
equals
(
cartGoods
.
getSkuName
())
&&
!
"啡常搭"
.
equals
(
cartGoods
.
getSpuName
()))
{
...
@@ -356,7 +357,7 @@ public class ShoppingCartAdapter {
...
@@ -356,7 +357,7 @@ public class ShoppingCartAdapter {
this
.
checkMaterialProduct
(
cartGoods
,
spuProduct
);
this
.
checkMaterialProduct
(
cartGoods
,
spuProduct
);
}
catch
(
Exception
ex
)
{
}
catch
(
Exception
ex
)
{
ShoppingSdkLogUtil
.
errorLog
(
"updateCartGoodsInfoNew_Error cartGoods:{}
"
,
ex
,
cartGoods
);
ShoppingSdkLogUtil
.
errorLog
(
"updateCartGoodsInfoNew_Error cartGoods:{}
,productBeans:{}"
,
ex
,
JSONObject
.
toJSONString
(
cartGoods
),
JSONObject
.
toJSONString
(
productBeans
)
);
cartGoods
.
setCartGoodsUid
(
null
);
cartGoods
.
setCartGoodsUid
(
null
);
}
}
}
}
...
...
order-application-service/src/main/java/cn/freemud/service/thirdparty/ActivityApplicationClient.java
View file @
f3058dd2
...
@@ -14,12 +14,7 @@ package cn.freemud.service.thirdparty;
...
@@ -14,12 +14,7 @@ package cn.freemud.service.thirdparty;
import
cn.freemud.annotations.LogIgnoreFeign
;
import
cn.freemud.annotations.LogIgnoreFeign
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.base.entity.BaseResponse
;
import
cn.freemud.entities.dto.activity.ActivityRequestCommon
;
import
cn.freemud.entities.dto.activity.*
;
import
cn.freemud.entities.dto.activity.CheckAndJoinResponse
;
import
cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDto
;
import
cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseDtoNew
;
import
cn.freemud.entities.dto.activity.PayGiftCheckAndJoinResponseObj
;
import
cn.freemud.entities.dto.activity.PayGitCheckAndJoinRequestDto
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.cloud.openfeign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestBody
;
...
@@ -52,7 +47,7 @@ public interface ActivityApplicationClient {
...
@@ -52,7 +47,7 @@ public interface ActivityApplicationClient {
*/
*/
@LogIgnoreFeign
(
logMessage
=
"checkAndJoin"
)
@LogIgnoreFeign
(
logMessage
=
"checkAndJoin"
)
@PostMapping
(
"/promotionActivity/evaluate/checkAndJoin"
)
@PostMapping
(
"/promotionActivity/evaluate/checkAndJoin"
)
public
BaseResponse
<
CheckAndJoinResponse
>
checkAndJoin
(
@RequestBody
ActivityRequestCommon
requestVo
);
public
BaseResponse
<
CheckAndJoinResponse
>
checkAndJoin
(
@RequestBody
CheckAndJoinRequest
requestVo
);
}
}
ordercenter-sdk/pom.xml
View file @
f3058dd2
...
@@ -8,7 +8,8 @@
...
@@ -8,7 +8,8 @@
<version>
1.0.0
</version>
<version>
1.0.0
</version>
</parent>
</parent>
<modelVersion>
4.0.0
</modelVersion>
<modelVersion>
4.0.0
</modelVersion>
<!-- 版本号在最外层pom设置,无需升级。直接打包升级聚合订单sdk -->
<!-- 版本号在最外层pom设置,其他服务使用聚合订单sdk,版本号往上升级,无需提交版本号,记录好readme.md,后续看readme.md往上加版本 -->
<!-- <version>1.3.66.RELEASE</version>-->
<artifactId>
ordercenter-sdk
</artifactId>
<artifactId>
ordercenter-sdk
</artifactId>
<dependencies>
<dependencies>
...
...
ordercenter-sdk/readme.md
View file @
f3058dd2
...
@@ -102,3 +102,4 @@
...
@@ -102,3 +102,4 @@
| 1.3.63.RELEASE | 开放平台取消订单调用oms | 张志恒 | 2021-07-01 |
| 1.3.63.RELEASE | 开放平台取消订单调用oms | 张志恒 | 2021-07-01 |
| 1.3.64.RELEASE | 小助手日结统计订单查询和售后列表查询改为从库查询 | 刘继明 | 2021-07-19 |
| 1.3.64.RELEASE | 小助手日结统计订单查询和售后列表查询改为从库查询 | 刘继明 | 2021-07-19 |
| 1.3.65.RELEASE | 聚合层sdk异常,版本引不到,解决代码报错 | 王航航 | 2021-07-20 |
| 1.3.65.RELEASE | 聚合层sdk异常,版本引不到,解决代码报错 | 王航航 | 2021-07-20 |
| 1.3.66.RELEASE | 基础订单sdk版本升级 | 伍平 | 2021-08-10 |
\ No newline at end of file
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/ActivityQueryRequestDto.java
View file @
f3058dd2
package
cn
.
freemud
.
entities
.
dto
;
package
cn
.
freemud
.
entities
.
dto
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.*
;
import
lombok.*
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.NotNull
;
...
@@ -110,6 +111,12 @@ public class ActivityQueryRequestDto {
...
@@ -110,6 +111,12 @@ public class ActivityQueryRequestDto {
*/
*/
private
Integer
isShowStore
;
private
Integer
isShowStore
;
/**
* 商品渠道 查询商品信息时用
* saas-自提 saasdelivery-外卖 saasmall-微商城 ....
*/
@ApiModelProperty
(
value
=
"商品渠道 saas(开个店自提)、saasdelivery(开个店外卖)、saasmall(微商城)、wc(围餐)、mtwm(美团外卖)、jdwm(京东外卖)、fmwd(非码微店)、eleme(饿了么外卖)、ebwm(饿百外卖) 有换购或者赠送商品的活动时必传"
)
private
String
productChannel
;
private
List
<
QueryGoodsBeanDto
>
goods
;
private
List
<
QueryGoodsBeanDto
>
goods
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ActivityServiceImpl.java
View file @
f3058dd2
...
@@ -19,10 +19,12 @@ import cn.freemud.entities.dto.activity.ActivityQueryDto;
...
@@ -19,10 +19,12 @@ import cn.freemud.entities.dto.activity.ActivityQueryDto;
import
cn.freemud.entities.dto.activity.ActivityQueryResponseDto
;
import
cn.freemud.entities.dto.activity.ActivityQueryResponseDto
;
import
cn.freemud.enums.ActivityChannelEnum
;
import
cn.freemud.enums.ActivityChannelEnum
;
import
cn.freemud.enums.ActivityTypeEnum
;
import
cn.freemud.enums.ActivityTypeEnum
;
import
cn.freemud.enums.CreateOrderType
;
import
cn.freemud.service.ActivityService
;
import
cn.freemud.service.ActivityService
;
import
cn.freemud.service.CommonService
;
import
cn.freemud.service.CommonService
;
import
cn.freemud.service.thirdparty.ActivityClient
;
import
cn.freemud.service.thirdparty.ActivityClient
;
import
cn.freemud.utils.PropertyConvertUtil
;
import
cn.freemud.utils.PropertyConvertUtil
;
import
com.freemud.sdk.api.assortment.shoppingcart.enums.BusinessTypeEnum
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -115,6 +117,13 @@ public class ActivityServiceImpl implements ActivityService {
...
@@ -115,6 +117,13 @@ public class ActivityServiceImpl implements ActivityService {
activityQueryRequestDto
.
setIsShowStore
(
0
);
activityQueryRequestDto
.
setIsShowStore
(
0
);
activityQueryRequestDto
.
setIsShowTime
(
0
);
activityQueryRequestDto
.
setIsShowTime
(
0
);
activityQueryRequestDto
.
setOrgIds
(
commonService
.
getOrgIds
(
activityQueryDto
.
getPartnerId
(),
activityQueryDto
.
getStoreId
()));
activityQueryRequestDto
.
setOrgIds
(
commonService
.
getOrgIds
(
activityQueryDto
.
getPartnerId
(),
activityQueryDto
.
getStoreId
()));
if
(
Objects
.
equals
(
activityQueryDto
.
getOrderType
(),
CreateOrderType
.
COLLECT_GOODS
.
getCode
()))
{
activityQueryRequestDto
.
setProductChannel
(
BusinessTypeEnum
.
SAAS_PICKUP
.
getCode
());
}
else
if
(
Objects
.
equals
(
activityQueryDto
.
getOrderType
(),
CreateOrderType
.
TAKE_OUT
.
getCode
()))
{
activityQueryRequestDto
.
setProductChannel
(
BusinessTypeEnum
.
SAAS_DELIVERY
.
getCode
());
}
else
if
(
Objects
.
equals
(
activityQueryDto
.
getOrderType
(),
CreateOrderType
.
SAASMALL
.
getCode
()))
{
activityQueryRequestDto
.
setProductChannel
(
BusinessTypeEnum
.
SAAS_MALL
.
getCode
());
}
ActivityQueryResponseDto
activityQueryResponseDto
=
null
;
ActivityQueryResponseDto
activityQueryResponseDto
=
null
;
try
{
try
{
activityQueryResponseDto
=
activityClient
.
query
(
activityQueryRequestDto
);
activityQueryResponseDto
=
activityClient
.
query
(
activityQueryRequestDto
);
...
...
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