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
7632bad9
Commit
7632bad9
authored
Oct 22, 2020
by
xiaoer.li@freemud.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'qa' of
http://gitlab.freemud.com/order-group-application/order-group
into qa
parents
ad7eaaf5
d222b4be
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
55 additions
and
40 deletions
+55
-40
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+1
-2
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/constant/CommonsConstant.java
+2
-0
order-application-service/src/main/java/cn/freemud/adapter/CouponAdapter.java
+8
-0
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+8
-1
order-application-service/src/main/java/cn/freemud/entities/vo/ProductVo.java
+2
-5
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
+8
-0
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+4
-4
order-application-service/src/main/java/cn/freemud/service/mccafe/impl/CouponClientServiceImpl.java
+2
-0
order-management/src/main/java/cn/freemud/management/adapter/McCafeCouponAdapter.java
+8
-0
shopping-cart-application-service/src/main/java/cn/freemud/enums/GoodsTypeEnum.java
+1
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
+6
-2
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/entity/MCoffeeAddGoodsRequestVo.java
+5
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOfflineMCCafeClient.java
+0
-26
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
7632bad9
...
...
@@ -805,7 +805,6 @@ public class OrderSdkAdapter {
}
accountBean
.
setSequence
(
orderSettlementResp
.
getProductSeq
());
accountBean
.
setType
(
getOldOrderAccountType
(
orderSettlementResp
.
getSettlementType
()));
// accountBean.setAddInfo("");
accountBean
.
setAddInfo
(
orderSettlementResp
.
getExtInfo
());
accountBean
.
setPlatformDiscountAmount
(
orderSettlementResp
.
getPlatformDiscountAmount
());
accountBean
.
setShopDiscountAmount
(
orderSettlementResp
.
getShopDiscountAmount
());
...
...
@@ -930,7 +929,7 @@ public class OrderSdkAdapter {
productDiscount
.
setDiscountAmount
(
orderSettlementResp
.
getShopDiscountAmount
());
//无数据
productDiscount
.
setCustomerCode
(
""
);
productDiscount
.
setAddInfo
(
""
);
productDiscount
.
setAddInfo
(
orderSettlementResp
.
getExtInfo
()
);
productDiscount
.
setProductId
(
orderSettlementResp
.
getProductId
());
discountList
.
add
(
productDiscount
);
}
...
...
assortment-shoppingcart-sdk/src/main/java/com/freemud/sdk/api/assortment/shoppingcart/constant/CommonsConstant.java
View file @
7632bad9
...
...
@@ -18,4 +18,6 @@ public class CommonsConstant {
public
final
static
Integer
WEIGHT_PRODUCT
=
1
;
public
final
static
Integer
COUPON_TYPE
=
0
;
}
order-application-service/src/main/java/cn/freemud/adapter/CouponAdapter.java
View file @
7632bad9
...
...
@@ -32,6 +32,7 @@ import cn.freemud.management.enums.OrderSource;
import
cn.freemud.service.mccafe.CouponClientService
;
import
cn.freemud.utils.BeanUtil
;
import
cn.freemud.utils.LogUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.ordercenter.enums.OrderClientType
;
import
com.freemud.card.sdk.vo.coupon.request.MemberAddCouponVo
;
import
com.freemud.sdk.api.assortment.order.enums.OldOrderAccountType
;
...
...
@@ -671,8 +672,15 @@ public class CouponAdapter {
}
MCCafeProductRedeemVo
mcCafeProductRedeemVo
=
new
MCCafeProductRedeemVo
();
mcCafeProductRedeemVo
.
setPid
(
pid
);
String
extInfo
=
productDiscount
.
getAddInfo
();
Integer
extendType
=
StringUtils
.
isBlank
(
extInfo
)?
null
:
JSON
.
parseObject
(
extInfo
).
getInteger
(
"extendType"
);
if
(
extendType
!=
null
&&
extendType
==
4
)
{
mcCafeProductRedeemVo
.
setKeyProductCode
(
JSON
.
parseObject
(
extInfo
).
getString
(
"tenderId"
));
mcCafeProductRedeemVo
.
setCustomer_code
(
JSON
.
parseObject
(
extInfo
).
getString
(
"tenderId"
));
}
else
{
mcCafeProductRedeemVo
.
setKeyProductCode
(
productBean
.
getCustomerCode
());
mcCafeProductRedeemVo
.
setCustomer_code
(
productBean
.
getCustomerCode
());
}
mcCafeProductRedeemVo
.
setConsume_num
(
productDiscount
.
getDiscountQty
());
mcCafeProductRedeemVo
.
setSeq
(
i
+
1
);
if
(
null
!=
coupon
&&
CollectionUtils
.
isNotEmpty
(
coupon
.
getCodeInfo
().
getGroups
()))
{
...
...
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
7632bad9
...
...
@@ -1207,6 +1207,7 @@ public class OrderAdapter {
Long
promotionAmount
=
0L
;
Long
deliveryAmount
=
0L
;
Long
packageAmount
=
0L
;
Long
originalDeliveryAmount
=
0L
;
//限时特价优惠金额
Long
discountLimitAmount
=
0L
;
Long
couponAmount
=
0L
;
...
...
@@ -1233,6 +1234,7 @@ public class OrderAdapter {
if
(
OrderAccountType
.
DELIVERY_AMOUNT
.
getCode
().
equals
(
accountBean
.
getType
()))
{
//deliveryAmount = accountBean.getPrice();
deliveryAmount
=
null
!=
accountBean
.
getActualCostAmount
()
?
accountBean
.
getActualCostAmount
()
:
accountBean
.
getPrice
();
originalDeliveryAmount
=
accountBean
.
getPrice
();
}
if
(
OrderAccountType
.
PACK_AMOUNT
.
getCode
().
equals
(
accountBean
.
getType
()))
{
packageAmount
=
accountBean
.
getPrice
();
...
...
@@ -1255,9 +1257,13 @@ public class OrderAdapter {
customerScorePrompt
=
decimalFormat
.
format
(
customerScoreAmount
/
100.0
);
// customerScorePrompt = "积分抵扣-¥" + customerScoreAmountStr;
}
if
(
Integer
.
valueOf
(
99
).
equals
(
accountBean
.
getType
()))
{
responseVo
.
setFreightCouponName
(
accountBean
.
getName
());
}
}
}
responseVo
.
setDeliveryAmount
(
deliveryAmount
);
responseVo
.
setOriginalDeliveryAmount
(
originalDeliveryAmount
);
responseVo
.
setPackageAmount
(
packageAmount
);
responseVo
.
setDiscountLimitAmount
(
discountLimitAmount
);
responseVo
.
setFullDiscountAmount
(
fullDiscountAmount
);
...
...
@@ -1976,7 +1982,8 @@ public class OrderAdapter {
discountTotalAmount
=
discountTotalAmount
+
productDiscount
.
getDiscountAmount
()*
productDiscount
.
getDiscountQty
();
if
(
OrderAccountType
.
PRODUCT_COUPON
.
getCode
().
equals
(
productDiscount
.
getDiscountType
()))
{
hasProductCoupon
=
true
;
if
(
"啡常月享卡"
.
equals
(
productDiscount
.
getDiscountDesc
()))
{
Integer
extendType
=
StringUtils
.
isBlank
(
productDiscount
.
getAddInfo
())?
null
:
JSON
.
parseObject
(
productDiscount
.
getAddInfo
()).
getInteger
(
"extendType"
);
if
(
"啡常月享卡"
.
equals
(
productDiscount
.
getDiscountDesc
())
||
(
null
!=
extendType
&&
4
==
extendType
))
{
productVo
.
setCouponName
(
productDiscount
.
getDiscountDesc
());
}
else
{
productVo
.
setName
(
productDiscount
.
getDiscountDesc
());
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/ProductVo.java
View file @
7632bad9
...
...
@@ -42,6 +42,8 @@ public class ProductVo {
* 商品spu名称
*/
private
String
spuName
;
private
String
couponName
;
/**
* 商品的规格信息加属性信息
*/
...
...
@@ -133,11 +135,6 @@ public class ProductVo {
private
String
unit
;
/**
* 优惠券名称
*/
private
String
couponName
;
/**
* 1.5.5版本添加
* 商品参与活动类型(61:买一赠一)
*/
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/QueryOrderResponseVo.java
View file @
7632bad9
...
...
@@ -99,6 +99,14 @@ public class QueryOrderResponseVo {
*/
private
Long
deliveryAmount
;
/**
* 配送费原价
*/
private
Long
originalDeliveryAmount
;
/**
* 运费券名称
*/
private
String
freightCouponName
;
/**
* 限时折扣优惠金额
*/
private
Long
discountLimitAmount
;
...
...
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
7632bad9
...
...
@@ -1222,9 +1222,9 @@ public class OrderServiceImpl implements Orderservice {
&&
queryOrderResponseVo
.
getRefundStatus
()
!=
null
&&
queryOrderResponseVo
.
getRefundStatus
()
==
1
)
{
Integer
automaticRefund
=
storeInfo
.
getBizVO
().
getStoreConfig
().
getAutomaticRefund
();
if
(
automaticRefund
!=
null
&&
automaticRefund
==
1
){
queryOrderResponseVo
.
setRefundTips
(
"若48小时
后商家未处理,自动同意
"
);
queryOrderResponseVo
.
setRefundTips
(
"若48小时
内未成功退款,请联系商家人工处理
"
);
}
else
{
queryOrderResponseVo
.
setRefundTips
(
"若48小时
后商家未处理,拒绝退款
"
);
queryOrderResponseVo
.
setRefundTips
(
"若48小时
内未成功退款,请联系商家人工处理
"
);
}
}
...
...
@@ -1349,9 +1349,9 @@ public class OrderServiceImpl implements Orderservice {
&&
queryOrderResponseVo
.
getRefundStatus
()
!=
null
&&
queryOrderResponseVo
.
getRefundStatus
()
==
1
)
{
Integer
automaticRefund
=
storeInfo
.
getBizVO
().
getStoreConfig
().
getAutomaticRefund
();
if
(
automaticRefund
!=
null
&&
automaticRefund
==
1
){
queryOrderResponseVo
.
setRefundTips
(
"若48小时
后商家未处理,自动同意
"
);
queryOrderResponseVo
.
setRefundTips
(
"若48小时
内未成功退款,请联系商家人工处理
"
);
}
else
{
queryOrderResponseVo
.
setRefundTips
(
"若48小时
后商家未处理,拒绝退款
"
);
queryOrderResponseVo
.
setRefundTips
(
"若48小时
内未成功退款,请联系商家人工处理
"
);
}
}
...
...
order-application-service/src/main/java/cn/freemud/service/mccafe/impl/CouponClientServiceImpl.java
View file @
7632bad9
...
...
@@ -162,6 +162,8 @@ public class CouponClientServiceImpl implements CouponClientService {
@Override
public
List
<
CouponRedeemResponse
>
redeemBatch
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
)
{
System
.
out
.
println
(
"======================================================================="
);
System
.
out
.
println
(
JSON
.
toJSONString
(
orderBean
));
if
(
null
==
orderBean
||
CollectionUtils
.
isEmpty
(
orderBean
.
getAccountList
()))
{
return
null
;
}
...
...
order-management/src/main/java/cn/freemud/management/adapter/McCafeCouponAdapter.java
View file @
7632bad9
...
...
@@ -8,6 +8,7 @@ import cn.freemud.management.enums.CouponReqTypeEnum;
import
cn.freemud.management.enums.MCCafeChannelEnum
;
import
cn.freemud.management.enums.OrderSource
;
import
cn.freemud.management.thirdparty.CouponOfflineMCCafeClient
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.ordercenter.enums.OrderClientType
;
import
com.freemud.sdk.api.assortment.order.enums.OldOrderAccountType
;
import
com.freemud.sdk.api.assortment.order.enums.OrderSourceType
;
...
...
@@ -90,8 +91,15 @@ public class McCafeCouponAdapter {
}
MCCafeProductRedeemVo
mcCafeProductRedeemVo
=
new
MCCafeProductRedeemVo
();
mcCafeProductRedeemVo
.
setPid
(
pid
);
String
extInfo
=
productDiscount
.
getAddInfo
();
Integer
extendType
=
StringUtils
.
isBlank
(
extInfo
)?
null
:
JSON
.
parseObject
(
extInfo
).
getInteger
(
"extendType"
);
if
(
extendType
!=
null
&&
extendType
==
4
)
{
mcCafeProductRedeemVo
.
setKeyProductCode
(
JSON
.
parseObject
(
extInfo
).
getString
(
"tenderId"
));
mcCafeProductRedeemVo
.
setCustomer_code
(
JSON
.
parseObject
(
extInfo
).
getString
(
"tenderId"
));
}
else
{
mcCafeProductRedeemVo
.
setKeyProductCode
(
productBean
.
getCustomerCode
());
mcCafeProductRedeemVo
.
setCustomer_code
(
productBean
.
getCustomerCode
());
}
mcCafeProductRedeemVo
.
setConsume_num
(
productDiscount
.
getDiscountQty
());
mcCafeProductRedeemVo
.
setSeq
(
i
+
1
);
if
(
null
!=
coupon
&&
CollectionUtils
.
isNotEmpty
(
coupon
.
getCodeInfo
().
getGroups
()))
{
...
...
shopping-cart-application-service/src/main/java/cn/freemud/enums/GoodsTypeEnum.java
View file @
7632bad9
...
...
@@ -22,6 +22,7 @@ public enum GoodsTypeEnum {
SKU_GOODS
(
4
,
"sku商品"
),
SPU_GOODS
(
5
,
"spu商品"
),
REDUCE_PRICE_GOODS
(
6
,
"超值加购商品"
),
ALL_COUPON_GOODS
(
8
,
"万能券商品"
),
MATERIAL
(
88
,
"有加料的商品"
),
EXCEPTION_GOODS
(
99
,
"异常商品:商品菜单变化导致和购物车不商品匹配"
);
private
Integer
goodsType
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/ShoppingCartMCoffeeServiceImpl.java
View file @
7632bad9
...
...
@@ -867,9 +867,10 @@ public class ShoppingCartMCoffeeServiceImpl {
comboxGoods
.
setName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSpuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductName
())
?
orderItemResp
.
getProductName
()
:
""
);
comboxGoods
.
setSkuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProduct
Name
())
?
orderItemResp
.
getProduct
Name
()
:
""
);
comboxGoods
.
setSkuName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProduct
SpecName
())
?
orderItemResp
.
getProductSpec
Name
()
:
""
);
comboxGoods
.
setSubName
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductSpecName
())
?
orderItemResp
.
getProductSpecName
()
:
""
);
comboxGoods
.
setPic
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductPicUrl
())
?
orderItemResp
.
getProductPicUrl
()
:
""
);
comboxGoods
.
setPic
(
StringUtils
.
isNotEmpty
(
orderItemResp
.
getProductPicUrl
())
?
orderItemResp
.
getProductPicUrl
()
:
""
);
if
(!
""
.
equals
(
orderItemResp
.
getProductProperty
()))
{
List
<
CartGoods
.
CartGoodsExtra
>
extra
=
new
ArrayList
<>();
String
[]
split
=
orderItemResp
.
getProductProperty
().
split
(
"/"
);
...
...
@@ -1150,6 +1151,9 @@ public class ShoppingCartMCoffeeServiceImpl {
}
else
if
(
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductComboList
())
||
CollectionUtils
.
isNotEmpty
(
addShoppingCartGoodsRequestVo
.
getProductGroupList
()))
{
goodsType
=
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
();
}
/*else if (CommonsConstant.COUPON_TYPE == addShoppingCartGoodsRequestVo.getCouponType()){
goodsType = GoodsTypeEnum.ALL_COUPON_GOODS.getGoodsType();
}*/
if
(
addShoppingCartGoodsRequestVo
.
getOperationType
()
!=
null
&&
addShoppingCartGoodsRequestVo
.
getOperationType
()
==
2
)
{
goodsType
=
GoodsTypeEnum
.
REDUCE_PRICE_GOODS
.
getGoodsType
();
}
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/entity/MCoffeeAddGoodsRequestVo.java
View file @
7632bad9
...
...
@@ -119,6 +119,11 @@ public class MCoffeeAddGoodsRequestVo {
private
Integer
operationType
;
/**
* 券类型 0:商品券
*/
private
Integer
couponType
;
/**
* 优惠券号
*/
private
String
couponCode
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/thirdparty/CouponOfflineMCCafeClient.java
deleted
100644 → 0
View file @
ad7eaaf5
package
cn
.
freemud
.
service
.
thirdparty
;
import
cn.freemud.entities.dto.CouponCodeResponseDto
;
import
cn.freemud.entities.dto.CouponCodeVerificationMCCafeDto
;
import
com.freemud.application.sdk.api.couponcenter.offline.response.CouponRedeemResponse
;
import
org.springframework.cloud.netflix.feign.FeignClient
;
import
org.springframework.web.bind.annotation.PostMapping
;
@FeignClient
(
name
=
"COUPONMCCafe"
,
url
=
"http://coupon-api-gateway-koderover-dev-coupon.api-ingress.sandload.cn"
)
public
interface
CouponOfflineMCCafeClient
{
@PostMapping
(
"/mccafe/redeem"
)
CouponRedeemResponse
redeem
(
CouponCodeVerificationMCCafeDto
couponCodeVerificationMCCafeDto
);
@PostMapping
(
"/mccafe/cancelRedeem"
)
CouponRedeemResponse
cancelRedeem
(
CouponCodeVerificationMCCafeDto
couponCodeVerificationMCCafeDto
);
@PostMapping
(
"/mccafe/query"
)
CouponRedeemResponse
query
(
CouponCodeVerificationMCCafeDto
couponCodeVerificationMCCafeDto
);
@PostMapping
(
"/mccafe/lock"
)
CouponRedeemResponse
lock
(
CouponCodeVerificationMCCafeDto
couponCodeVerificationMCCafeDto
);
@PostMapping
(
"/mccafe/unlock"
)
CouponRedeemResponse
unlock
(
CouponCodeVerificationMCCafeDto
couponCodeVerificationMCCafeDto
);
}
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