|
@@ -2,16 +2,14 @@ package com.yohoufo.order.service.impl; |
|
@@ -2,16 +2,14 @@ package com.yohoufo.order.service.impl; |
2
|
|
2
|
|
3
|
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
|
3
|
import com.yohobuy.ufo.model.order.bo.ButtonShowBo;
|
4
|
import com.yohobuy.ufo.model.order.bo.OrderInfo;
|
4
|
import com.yohobuy.ufo.model.order.bo.OrderInfo;
|
5
|
-import com.yohobuy.ufo.model.order.common.OrderCodeType;
|
|
|
6
|
-import com.yohobuy.ufo.model.order.common.OrderStatus;
|
|
|
7
|
-import com.yohobuy.ufo.model.order.common.SkupStatus;
|
|
|
8
|
-import com.yohobuy.ufo.model.order.common.TabType;
|
5
|
+import com.yohobuy.ufo.model.order.common.*;
|
9
|
import com.yohoufo.common.utils.DateUtil;
|
6
|
import com.yohoufo.common.utils.DateUtil;
|
10
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
7
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
11
|
import com.yohoufo.order.common.Payment;
|
8
|
import com.yohoufo.order.common.Payment;
|
12
|
import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
|
9
|
import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
|
13
|
import com.yohoufo.order.model.response.OrderDetailInfo;
|
10
|
import com.yohoufo.order.model.response.OrderDetailInfo;
|
14
|
import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler;
|
11
|
import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler;
|
|
|
12
|
+import com.yohoufo.order.utils.BuyerOrderUtils;
|
15
|
import org.apache.commons.collections.CollectionUtils;
|
13
|
import org.apache.commons.collections.CollectionUtils;
|
16
|
import org.slf4j.Logger;
|
14
|
import org.slf4j.Logger;
|
17
|
import org.slf4j.helpers.MessageFormatter;
|
15
|
import org.slf4j.helpers.MessageFormatter;
|
|
@@ -39,6 +37,9 @@ public abstract class AbsOrderViewService { |
|
@@ -39,6 +37,9 @@ public abstract class AbsOrderViewService { |
39
|
if (CollectionUtils.isEmpty(buttons)){
|
37
|
if (CollectionUtils.isEmpty(buttons)){
|
40
|
return buttons;
|
38
|
return buttons;
|
41
|
}
|
39
|
}
|
|
|
40
|
+
|
|
|
41
|
+ disableBuyAgainIfOffline(buyerOrder, buttons);
|
|
|
42
|
+
|
42
|
//TODO optimized first query out status of order need BuyerPenaltyCalResult
|
43
|
//TODO optimized first query out status of order need BuyerPenaltyCalResult
|
43
|
int orderStatusCode = buyerOrder.getStatus();
|
44
|
int orderStatusCode = buyerOrder.getStatus();
|
44
|
|
45
|
|
|
@@ -68,6 +69,21 @@ public abstract class AbsOrderViewService { |
|
@@ -68,6 +69,21 @@ public abstract class AbsOrderViewService { |
68
|
return buttonsClone;
|
69
|
return buttonsClone;
|
69
|
}
|
70
|
}
|
70
|
|
71
|
|
|
|
72
|
+ /**
|
|
|
73
|
+ * 门店订单,不需要“再次购买”,替换为“查看详情”
|
|
|
74
|
+ * @param buyerOrder
|
|
|
75
|
+ * @param buttons
|
|
|
76
|
+ */
|
|
|
77
|
+ private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons) {
|
|
|
78
|
+ if(BuyerOrderUtils.isOffline(buyerOrder.getAttributes())
|
|
|
79
|
+ && buttons != null && buttons.contains(ButtonShow.BUY_AGAIN.getBo())) {
|
|
|
80
|
+ buttons.remove(ButtonShow.BUY_AGAIN.getBo());
|
|
|
81
|
+ if(!buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
|
|
|
82
|
+ buttons.add(ButtonShow.SHOW_DETAIL.getBo());
|
|
|
83
|
+ }
|
|
|
84
|
+ }
|
|
|
85
|
+ }
|
|
|
86
|
+
|
71
|
String formatconfirmTips(BuyerPenaltyCalResult bpcr,int orderStatusCode, String temp){
|
87
|
String formatconfirmTips(BuyerPenaltyCalResult bpcr,int orderStatusCode, String temp){
|
72
|
Object[] formatParms = new Object[1];
|
88
|
Object[] formatParms = new Object[1];
|
73
|
String confirmTips = temp;
|
89
|
String confirmTips = temp;
|