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
abe8d618
Commit
abe8d618
authored
May 17, 2021
by
zhiheng.zhang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature/20210513-申请退款按钮关闭-张志恒' into develop
parents
9bb14d25
5f178141
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
5 deletions
+27
-5
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
+23
-1
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingCartService.java
+3
-3
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingEquallyService.java
+1
-1
No files found.
order-application-service/src/main/java/cn/freemud/adapter/OrderAdapter.java
View file @
abe8d618
...
@@ -64,6 +64,7 @@ import com.freemud.application.sdk.api.ordercenter.request.OrderConditionsReq;
...
@@ -64,6 +64,7 @@ import com.freemud.application.sdk.api.ordercenter.request.OrderConditionsReq;
import
com.freemud.application.sdk.api.ordercenter.request.OrderExtInfoDto
;
import
com.freemud.application.sdk.api.ordercenter.request.OrderExtInfoDto
;
import
com.freemud.application.sdk.api.ordercenter.request.OrderExtendedReq
;
import
com.freemud.application.sdk.api.ordercenter.request.OrderExtendedReq
;
import
com.freemud.application.sdk.api.ordercenter.response.BaseDownLoadResponse
;
import
com.freemud.application.sdk.api.ordercenter.response.BaseDownLoadResponse
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.AfterSalesOrderResp
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderInfoReqs
;
import
com.freemud.application.sdk.api.ordercenter.response.orderInfo.OrderInfoReqs
;
import
com.freemud.application.sdk.api.promotioncenter.dto.promotion.GoodsStockDTO
;
import
com.freemud.application.sdk.api.promotioncenter.dto.promotion.GoodsStockDTO
;
import
com.freemud.application.sdk.api.promotioncenter.request.promotion.ActivityUpdateStockRequest
;
import
com.freemud.application.sdk.api.promotioncenter.request.promotion.ActivityUpdateStockRequest
;
...
@@ -88,6 +89,7 @@ import org.apache.commons.collections4.CollectionUtils;
...
@@ -88,6 +89,7 @@ import org.apache.commons.collections4.CollectionUtils;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.ObjectUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.apache.commons.lang.time.FastDateFormat
;
import
org.apache.commons.lang.time.FastDateFormat
;
import
org.junit.After
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.stereotype.Component
;
import
org.springframework.stereotype.Component
;
...
@@ -1490,7 +1492,8 @@ public class OrderAdapter {
...
@@ -1490,7 +1492,8 @@ public class OrderAdapter {
responseVo
.
setRefundMode
(
afterOrderExtInfoDto
.
getRefundMode
());
responseVo
.
setRefundMode
(
afterOrderExtInfoDto
.
getRefundMode
());
}
}
}
}
responseVo
.
setRefundButtonDisable
(
AfterSalesStatus
.
CANCEL
.
getIndex
()
==
ordersBean
.
getAfterSalesOrderResp
().
getAfterSalesStatus
()
?
false
:
true
);
//是否展示申请退款按钮 true 展示 false 不展示
responseVo
.
setRefundButtonDisable
(
getRefundButtonDisable
(
ordersBean
));
}
}
responseVo
.
setExpressChannelCode
(
ordersBean
.
getExpressChannelCode
());
responseVo
.
setExpressChannelCode
(
ordersBean
.
getExpressChannelCode
());
responseVo
.
setExpressChannelName
(
ordersBean
.
getExpressChannelName
());
responseVo
.
setExpressChannelName
(
ordersBean
.
getExpressChannelName
());
...
@@ -4384,4 +4387,23 @@ public class OrderAdapter {
...
@@ -4384,4 +4387,23 @@ public class OrderAdapter {
}
}
return
refundStatusDesc
;
return
refundStatusDesc
;
}
}
private
boolean
getRefundButtonDisable
(
QueryOrdersResponse
.
DataBean
.
OrderBean
orderBean
){
boolean
refundButtonDisable
=
true
;
//订单状态为 2:已支付 3:已接单 4:已发货 5:已收货/已完成(C端展示的订单状态),这些状态订单展示申请退款按钮(未有售后单或者售后单已经取消)
// 正常订单,未发生售后单的订单,以发货的时间节点为基准,30天后,关闭C端申请退款入口(未有售后单或者售后单已经取消)
//以最新的发起售后单的时间节点为基准(售后单最后申请的时间,同意申请不会更新申请的时间),30天后,关闭订单状态为已完成,退款状态为未处理的退款单,B端不展示退款处理按钮
//未发货订单,申请退款商家未处理,以售后单发起时间+30天后,自动退款。
//校验有没有售后单,一笔订单只会存在一笔售后单,售后单展示为取消展示申请退款按钮
AfterSalesOrderResp
afterSalesOrderResp
=
orderBean
.
getAfterSalesOrderResp
();
List
<
Integer
>
orderStatusList
=
Arrays
.
asList
(
OrderStatus
.
WAIT_PAY
.
getCode
(),
OrderStatus
.
RECEIPT
.
getCode
(),
OrderStatus
.
DISTRIBUTION
.
getCode
(),
OrderStatus
.
COMPLETE
.
getCode
());
if
(
orderStatusList
.
contains
(
orderBean
.
getStatus
())
&&
(
null
==
afterSalesOrderResp
||
(
null
!=
afterSalesOrderResp
&&
AfterSalesStatus
.
CANCEL
.
getIndex
()
==
afterSalesOrderResp
.
getAfterSalesStatus
()))){
refundButtonDisable
=
true
;
}
if
(
null
==
orderBean
.
getAfterSalesOrderResp
()
&&
(
DateUtil
.
addDays
(
new
Date
(
orderBean
.
getGmtDelivery
()),
30
)).
compareTo
(
new
Date
())
==-
1
){
refundButtonDisable
=
false
;
}
return
refundButtonDisable
;
}
}
}
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingCartService.java
View file @
abe8d618
...
@@ -72,15 +72,15 @@ public class CalculationSharingCartService {
...
@@ -72,15 +72,15 @@ public class CalculationSharingCartService {
,
Integer
flag
,
Integer
flag
,
String
userId
,
String
userId
,
String
storeId
)
{
,
String
storeId
)
{
if
(
BusinessTypeEnum
.
SAAS_MALL
.
getCode
().
equals
(
menuType
)
&&
null
!=
shoppingCartInfoRequestVo
&&
OrderChannelType
.
SAASMALL
.
getCode
().
equalsIgnoreCase
(
shoppingCartInfoRequestVo
.
getChannelType
()))
{
deliverySharingService
.
mallDeliveryResponse
(
shoppingCartGoodsResponseVo
,
deliveryAmount
,
discountResult
);
}
/**
/**
* 用促销价格初始化购物车行记录成交价
* 用促销价格初始化购物车行记录成交价
*/
*/
calculationCommonService
.
initShoppingCart
(
discountResult
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
couponPromotionVO
!=
null
?
couponPromotionVO
.
getCouponCode
()
:
null
);
calculationCommonService
.
initShoppingCart
(
discountResult
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
couponPromotionVO
!=
null
?
couponPromotionVO
.
getCouponCode
()
:
null
);
if
(
BusinessTypeEnum
.
SAAS_MALL
.
getCode
().
equals
(
menuType
)
&&
null
!=
shoppingCartInfoRequestVo
&&
OrderChannelType
.
SAASMALL
.
getCode
().
equalsIgnoreCase
(
shoppingCartInfoRequestVo
.
getChannelType
()))
{
deliverySharingService
.
mallDeliveryResponse
(
shoppingCartGoodsResponseVo
,
deliveryAmount
,
discountResult
);
}
/**
/**
* 可用券及券折扣
* 可用券及券折扣
*/
*/
...
...
shopping-cart-application-service/src/main/java/cn/freemud/service/impl/calculate/CalculationSharingEquallyService.java
View file @
abe8d618
...
@@ -78,10 +78,10 @@ public class CalculationSharingEquallyService {
...
@@ -78,10 +78,10 @@ public class CalculationSharingEquallyService {
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
ShoppingCartGoodsDto
shoppingCartGoodsDto
,
CreateOrderVo
.
PremiumExchangeActivity
premiumExchangeActivity
)
{
,
CreateOrderVo
.
PremiumExchangeActivity
premiumExchangeActivity
)
{
calculationCommonService
.
initShoppingCart
(
discountResult
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
couponPromotionVO
!=
null
?
couponPromotionVO
.
getCouponCode
()
:
null
);
if
(
BusinessTypeEnum
.
SAAS_MALL
.
getCode
().
equals
(
menuType
)
&&
null
!=
shoppingCartInfoRequestVo
&&
OrderChannelType
.
SAASMALL
.
getCode
().
equalsIgnoreCase
(
shoppingCartInfoRequestVo
.
getChannelType
()))
{
if
(
BusinessTypeEnum
.
SAAS_MALL
.
getCode
().
equals
(
menuType
)
&&
null
!=
shoppingCartInfoRequestVo
&&
OrderChannelType
.
SAASMALL
.
getCode
().
equalsIgnoreCase
(
shoppingCartInfoRequestVo
.
getChannelType
()))
{
deliverySharingService
.
mallDeliveryResponse
(
shoppingCartGoodsResponseVo
,
deliveryAmount
,
discountResult
);
deliverySharingService
.
mallDeliveryResponse
(
shoppingCartGoodsResponseVo
,
deliveryAmount
,
discountResult
);
}
}
calculationCommonService
.
initShoppingCart
(
discountResult
,
cartGoodsList
,
shoppingCartGoodsResponseVo
,
couponPromotionVO
!=
null
?
couponPromotionVO
.
getCouponCode
()
:
null
);
/**
/**
* 商品券\换购券
* 商品券\换购券
*/
*/
...
...
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