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
a2f31a02
Commit
a2f31a02
authored
Dec 31, 2020
by
zhiheng.zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/qa' into qa
parents
360197b8
998b2f92
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
122 additions
and
120 deletions
+122
-120
assortment-ordercenter-sdk/readme.md
+1
-5
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
+1
-0
order-application-service/src/main/java/cn/freemud/entities/dto/QueryOrdersResponseDto.java
+4
-0
order-application-service/src/main/java/cn/freemud/entities/vo/PlatformPaySuccessRequest.java
+0
-15
order-application-service/src/main/java/cn/freemud/service/Orderservice.java
+0
-4
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
+21
-37
order-management/src/main/java/cn/freemud/management/service/handle/DeliveryHandle.java
+0
-1
order-management/src/main/java/cn/freemud/management/service/impl/OrderDeliveryService.java
+0
-1
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
+2
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
+49
-32
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
+16
-0
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
+28
-24
No files found.
assortment-ordercenter-sdk/readme.md
View file @
a2f31a02
...
@@ -88,12 +88,9 @@
...
@@ -88,12 +88,9 @@
| 2.2.18-SNAPSHOT| 抖音支付新增抖音单号和openId | 张志恒 | 2020-12-4 |
| 2.2.18-SNAPSHOT| 抖音支付新增抖音单号和openId | 张志恒 | 2020-12-4 |
| 2.1.7-RELEASE | 农工商撤单 | 张志恒 | 2020-12-07 |
| 2.1.7-RELEASE | 农工商撤单 | 张志恒 | 2020-12-07 |
| 2.2.20-SNAPSHOT| 抖音支付 | 张志恒 | 2020-12-11ß |
| 2.2.20-SNAPSHOT| 抖音支付 | 张志恒 | 2020-12-11ß |
| 2.1.8-RELEASE | 拼单 | 缪晖 | 2020-12-10 |
| 2.1.8-RELEASE | 拼单 | 缪晖 | 2020-12-10 |
| 2.1.9-RELEASE | 去掉0元核销优惠券 | 李小二 | 2020-12-14 |
| 2.1.9-RELEASE | 去掉0元核销优惠券 | 李小二 | 2020-12-14 |
| 2.1.10-RELEASE | coco | 刘鹏飞 | 2020-12-17 |
| 2.1.10-RELEASE | coco | 刘鹏飞 | 2020-12-17 |
| 2.1.11-RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-17 |
| 2.1.11-RELEASE | 农工商添加设备号 | 梁崇福 | 2020-12-17 |
| 2.1.12-RELEASE | coco定制优惠券核销 | 刘鹏飞 | 2020-12-24 |
| 2.1.12-RELEASE | coco定制优惠券核销 | 刘鹏飞 | 2020-12-24 |
| 2.1.19-SNAPSHOT | 增加配送类型字段 | 王航航 | 2020-12-22 |
| 2.1.19-SNAPSHOT | 增加配送类型字段 | 王航航 | 2020-12-22 |
\ No newline at end of file
order-application-service/src/main/java/cn/freemud/controller/OrderController.java
View file @
a2f31a02
...
@@ -410,4 +410,5 @@ public class OrderController {
...
@@ -410,4 +410,5 @@ public class OrderController {
}
}
order-application-service/src/main/java/cn/freemud/entities/dto/QueryOrdersResponseDto.java
View file @
a2f31a02
...
@@ -135,6 +135,10 @@ public class QueryOrdersResponseDto {
...
@@ -135,6 +135,10 @@ public class QueryOrdersResponseDto {
*/
*/
private
Integer
orderType
;
private
Integer
orderType
;
/**
/**
* 销售类型或营销活动类型 1普通订单 2秒杀订单 3推广活动 4拼单订单
*/
private
Byte
marketingType
;
/**
* 取餐码
* 取餐码
*/
*/
private
String
otherCode
;
private
String
otherCode
;
...
...
order-application-service/src/main/java/cn/freemud/entities/vo/PlatformPaySuccessRequest.java
deleted
100644 → 0
View file @
360197b8
package
cn
.
freemud
.
entities
.
vo
;
import
lombok.Data
;
import
org.hibernate.validator.constraints.NotEmpty
;
@Data
public
class
PlatformPaySuccessRequest
{
@NotEmpty
(
message
=
"orderCode 不能为空"
)
private
String
orderCode
;
@NotEmpty
(
message
=
"商户号 不能为空"
)
private
String
partnerId
;
}
order-application-service/src/main/java/cn/freemud/service/Orderservice.java
View file @
a2f31a02
...
@@ -147,8 +147,4 @@ public interface Orderservice {
...
@@ -147,8 +147,4 @@ public interface Orderservice {
BaseResponse
timeOutOrderRefund
(
TimeOutOrderVo
timeOutOrderVo
);
BaseResponse
timeOutOrderRefund
(
TimeOutOrderVo
timeOutOrderVo
);
BaseResponse
platformPaysuccess
(
PlatformPaySuccessRequest
requestVo
);
}
}
order-application-service/src/main/java/cn/freemud/service/impl/OrderServiceImpl.java
View file @
a2f31a02
...
@@ -522,25 +522,27 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -522,25 +522,27 @@ public class OrderServiceImpl implements Orderservice {
takeCode
=
payAccessResponse
.
getData
().
getTakeCode
();
takeCode
=
payAccessResponse
.
getData
().
getTakeCode
();
daySeq
=
payAccessResponse
.
getData
().
getDaySeq
();
daySeq
=
payAccessResponse
.
getData
().
getDaySeq
();
//TODO 清空购物车
if
(
null
!=
orderBean
.
getMarketingType
()
&&
OrderMarketType
.
COLLAGE
.
getIndex
()
==
orderBean
.
getMarketingType
())
{
NewShoppingCartClearDto
newShoppingCartClearDto
=
new
NewShoppingCartClearDto
();
// 更新拼单购物车状态
newShoppingCartClearDto
.
setPartnerId
(
partnerId
);
CollageOrderDto
collageOrderDto
=
new
CollageOrderDto
();
newShoppingCartClearDto
.
setShopId
(
storeId
);
collageOrderDto
.
setSessionId
(
StringUtils
.
isBlank
(
sessionId
)
?
oid
:
sessionId
);
newShoppingCartClearDto
.
setUserId
(
userId
);
collageOrderDto
.
setPartnerId
(
partnerId
);
newShoppingCartClearDto
.
setAppId
(
wxappid
);
collageOrderDto
.
setShopId
(
storeId
);
newShoppingCartClearDto
.
setSessionId
(
sessionId
);
collageOrderDto
.
setCreateCollageUserId
(
userId
);
newShoppingCartClearDto
.
setOperationType
(
1
);
collageOrderDto
.
setOrderCode
(
oid
);
shoppingCartClient
.
clearShoppingCart
(
newShoppingCartClearDto
);
collageOrderDto
.
setStatus
(
1
);
shoppingCartClient
.
updateCollageOrder
(
collageOrderDto
);
// 清空拼单购物车
}
else
{
CollageOrderDto
collageOrderDto
=
new
CollageOrderDto
();
//TODO 清空购物车
collageOrderDto
.
setSessionId
(
StringUtils
.
isBlank
(
sessionId
)
?
oid
:
sessionId
);
NewShoppingCartClearDto
newShoppingCartClearDto
=
new
NewShoppingCartClearDto
();
collageOrderDto
.
setPartnerId
(
partnerId
);
newShoppingCartClearDto
.
setPartnerId
(
partnerId
);
collageOrderDto
.
setShopId
(
storeId
);
newShoppingCartClearDto
.
setShopId
(
storeId
);
collageOrderDto
.
setCreateCollageUserId
(
userId
);
newShoppingCartClearDto
.
setUserId
(
userId
);
collageOrderDto
.
setOrderCode
(
oid
);
newShoppingCartClearDto
.
setAppId
(
wxappid
);
collageOrderDto
.
setStatus
(
1
);
newShoppingCartClearDto
.
setSessionId
(
sessionId
);
shoppingCartClient
.
updateCollageOrder
(
collageOrderDto
);
newShoppingCartClearDto
.
setOperationType
(
1
);
shoppingCartClient
.
clearShoppingCart
(
newShoppingCartClearDto
);
}
if
(
StringUtils
.
isNotBlank
(
daySeq
)
&&
orderExtInfoDto
!=
null
&&
!
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getType
()))
{
if
(
StringUtils
.
isNotBlank
(
daySeq
)
&&
orderExtInfoDto
!=
null
&&
!
OrderType
.
TAKE_OUT
.
getCode
().
equals
(
orderBean
.
getType
()))
{
String
storeAddress
=
StringUtils
.
isNotBlank
(
orderBean
.
getAddress
())
?
orderBean
.
getAddress
()
:
""
;
String
storeAddress
=
StringUtils
.
isNotBlank
(
orderBean
.
getAddress
())
?
orderBean
.
getAddress
()
:
""
;
...
@@ -1280,24 +1282,6 @@ public class OrderServiceImpl implements Orderservice {
...
@@ -1280,24 +1282,6 @@ public class OrderServiceImpl implements Orderservice {
return
ResponseUtil
.
success
();
return
ResponseUtil
.
success
();
}
}
@Override
public
BaseResponse
platformPaysuccess
(
PlatformPaySuccessRequest
requestVo
)
{
BaseQueryOrderRequest
baseQueryOrderRequest
=
new
BaseQueryOrderRequest
();
baseQueryOrderRequest
.
setOrderId
(
requestVo
.
getOrderCode
());
baseQueryOrderRequest
.
setTrackingNo
(
LogThreadLocal
.
getTrackingNo
());
QueryOrderByIdResponse
queryOrderByIdResponse
=
orderCenterSdkService
.
queryOrderById
(
baseQueryOrderRequest
);
if
(!
RESPONSE_SUCCESS_CODE
.
equals
(
queryOrderByIdResponse
.
getErrcode
())
||
queryOrderByIdResponse
.
getData
()
==
null
)
{
return
ResponseUtil
.
error
(
ResponseResult
.
ORDER_QUERYORDER_ERROR
);
}
// 扣减储值卡
// 扣减券
// 扣减积分
return
ResponseUtil
.
success
();
}
private
String
getRedpacketsPicture
(
String
activityId
)
{
private
String
getRedpacketsPicture
(
String
activityId
)
{
if
(
StringUtils
.
isNotBlank
(
activityId
))
{
if
(
StringUtils
.
isNotBlank
(
activityId
))
{
...
...
order-management/src/main/java/cn/freemud/management/service/handle/DeliveryHandle.java
View file @
a2f31a02
...
@@ -26,7 +26,6 @@ import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
...
@@ -26,7 +26,6 @@ import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import
com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter
;
import
com.freemud.sdk.api.assortment.order.adapter.OrderSdkAdapter
;
import
com.freemud.sdk.api.assortment.order.enums.OrderSourceType
;
import
com.freemud.sdk.api.assortment.order.enums.OrderSourceType
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
javafx.util.Pair
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
order-management/src/main/java/cn/freemud/management/service/impl/OrderDeliveryService.java
View file @
a2f31a02
...
@@ -22,7 +22,6 @@ import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
...
@@ -22,7 +22,6 @@ import com.freemud.application.sdk.api.storecenter.response.StoreResponse;
import
com.freemud.application.sdk.api.storecenter.service.StoreCenterService
;
import
com.freemud.application.sdk.api.storecenter.service.StoreCenterService
;
import
com.freemud.sdk.api.assortment.order.enums.OrderSourceType
;
import
com.freemud.sdk.api.assortment.order.enums.OrderSourceType
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
com.freemud.sdk.api.assortment.order.response.order.QueryOrdersResponse
;
import
javafx.util.Pair
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/enums/ResponseResult.java
View file @
a2f31a02
...
@@ -179,7 +179,8 @@ public enum ResponseResult {
...
@@ -179,7 +179,8 @@ public enum ResponseResult {
/**
/**
* coco验证券错误
* coco验证券错误
*/
*/
COCO_COUPON_VALIDATOR_FAIL
(
"49000"
,
"优惠券验证错误"
)
COCO_COUPON_VALIDATOR_FAIL
(
"49000"
,
"优惠券验证错误"
),
NEW_PURCHASE
(
"49001"
,
"超过限购数量了"
)
;
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/ShoppingCartNewServiceImpl.java
View file @
a2f31a02
This diff is collapsed.
Click to expand it.
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingDiscountService.java
View file @
a2f31a02
...
@@ -193,6 +193,7 @@ public class CalculationSharingDiscountService {
...
@@ -193,6 +193,7 @@ public class CalculationSharingDiscountService {
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountDTO
=
result
.
getDiscounts
().
stream
().
filter
(
d
->
221
==
d
.
getType
()).
findFirst
().
get
();
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountDTO
=
result
.
getDiscounts
().
stream
().
filter
(
d
->
221
==
d
.
getType
()).
findFirst
().
get
();
convert2SendPoint
(
result
,
discountDTO
);
convert2SendPoint
(
result
,
discountDTO
);
}
}
this
.
checkPurchase
(
result
);
result
.
setValidCouponMap
(
validCouponMap
);
result
.
setValidCouponMap
(
validCouponMap
);
result
.
setDeliveryAmount
(
deliveryAmount
);
result
.
setDeliveryAmount
(
deliveryAmount
);
result
.
setDistributionFee
(
result
.
getDistributionFee
());
result
.
setDistributionFee
(
result
.
getDistributionFee
());
...
@@ -209,6 +210,21 @@ public class CalculationSharingDiscountService {
...
@@ -209,6 +210,21 @@ public class CalculationSharingDiscountService {
return
null
;
return
null
;
}
}
private
void
checkPurchase
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
result
)
{
if
(
CollectionUtils
.
isEmpty
(
result
.
getGoods
()))
{
return
;
}
Integer
type
=
16
;
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
good
:
result
.
getGoods
())
{
if
(
CollectionUtils
.
isNotEmpty
(
good
.
getDiscounts
()))
{
for
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Goods
.
GoodsDiscount
discount
:
good
.
getDiscounts
())
{
if
(
type
.
equals
(
discount
.
getType
())
&&
good
.
getGoodsQuantity
()>=
discount
.
getActualGoodsNumber
())
{
throw
new
ServiceException
(
ResponseResult
.
NEW_PURCHASE
);
}
}
}
}
}
private
void
convert2SendPoint
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
result
,
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountDTO
)
{
private
void
convert2SendPoint
(
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
result
,
CalculationSharingDiscountResponseDto
.
CalculationDiscountResult
.
Discount
discountDTO
)
{
SendPoint
sendPointNew
=
new
SendPoint
();
SendPoint
sendPointNew
=
new
SendPoint
();
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/mcoffee/calculation/CouponDiscountCalculation.java
View file @
a2f31a02
...
@@ -475,32 +475,36 @@ public class CouponDiscountCalculation {
...
@@ -475,32 +475,36 @@ public class CouponDiscountCalculation {
private
Long
createProductRequest
(
List
<
CartGoods
>
cartGoods
,
List
<
CouponProductVo
>
productList
)
{
private
Long
createProductRequest
(
List
<
CartGoods
>
cartGoods
,
List
<
CouponProductVo
>
productList
)
{
Long
totalAmount
=
0L
;
Long
totalAmount
=
0L
;
for
(
CartGoods
cartGood
:
cartGoods
)
{
try
{
// 剔除商品券得商品
for
(
CartGoods
cartGood
:
cartGoods
)
{
if
(
StringUtils
.
isEmpty
(
cartGood
.
getSkuId
())
&&
StringUtils
.
isEmpty
(
cartGood
.
getSpuId
()))
{
// 剔除商品券得商品
continue
;
if
(
StringUtils
.
isEmpty
(
cartGood
.
getSkuId
())
&&
StringUtils
.
isEmpty
(
cartGood
.
getSpuId
()))
{
}
continue
;
// 剔除商品券得商品,麦咖啡逻辑
}
if
(
StringUtils
.
isNotEmpty
(
cartGood
.
getCouponCode
())){
// 剔除商品券得商品,麦咖啡逻辑
continue
;
if
(
StringUtils
.
isNotEmpty
(
cartGood
.
getCouponCode
())){
}
continue
;
CouponProductVo
product
=
new
CouponProductVo
();
}
product
.
setKeyProductCode
(
cartGood
.
getCustomerCode
());
CouponProductVo
product
=
new
CouponProductVo
();
product
.
setProductId
(
StringUtils
.
isEmpty
(
cartGood
.
getSkuId
())
?
cartGood
.
getSpuId
()
:
cartGood
.
getSkuId
());
product
.
setKeyProductCode
(
cartGood
.
getCustomerCode
());
// 普通商品价格
product
.
setProductId
(
StringUtils
.
isEmpty
(
cartGood
.
getSkuId
())
?
cartGood
.
getSpuId
()
:
cartGood
.
getSkuId
());
product
.
setAmount
(
Integer
.
valueOf
(
cartGood
.
getOriginalPrice
()
+
""
));
// 普通商品价格
// 套餐价格为: 套餐价+可选商品总价格
product
.
setAmount
(
Integer
.
valueOf
(
cartGood
.
getOriginalPrice
()
+
""
));
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGood
.
getGoodsType
()))
{
// 套餐价格为: 套餐价+可选商品总价格
Long
finalPrice
=
cartGood
.
getFinalPrice
();
if
(
ObjectUtils
.
equals
(
GoodsTypeEnum
.
SET_MEAL_GOODS
.
getGoodsType
(),
cartGood
.
getGoodsType
()))
{
if
(
CollectionUtils
.
isNotEmpty
(
cartGood
.
getProductGroupList
())){
Long
finalPrice
=
cartGood
.
getFinalPrice
();
finalPrice
+=
cartGood
.
getProductGroupList
().
stream
().
mapToLong
(
group
->
group
.
getFinalPrice
()*
group
.
getQty
()).
sum
();
if
(
CollectionUtils
.
isNotEmpty
(
cartGood
.
getProductGroupList
())){
finalPrice
+=
cartGood
.
getProductGroupList
().
stream
().
mapToLong
(
group
->
group
.
getFinalPrice
()*
group
.
getQty
()).
sum
();
}
product
.
setAmount
(
finalPrice
.
intValue
());
}
}
product
.
setAmount
(
finalPrice
.
intValue
());
// 数量
product
.
setQuantity
(
cartGood
.
getQty
());
productList
.
add
(
product
);
totalAmount
=
totalAmount
+
product
.
getAmount
()
*
cartGood
.
getQty
();
}
}
// 数量
}
catch
(
NumberFormatException
e
)
{
product
.
setQuantity
(
cartGood
.
getQty
());
throw
new
ServiceException
(
ResponseResult
.
SYSTEM_ERROR
);
productList
.
add
(
product
);
totalAmount
=
totalAmount
+
product
.
getAmount
()
*
cartGood
.
getQty
();
}
}
return
totalAmount
;
return
totalAmount
;
}
}
...
...
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