...
|
...
|
@@ -6,6 +6,7 @@ import com.yohobuy.ufo.model.order.common.*; |
|
|
import com.yohoufo.common.utils.DateUtil;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.order.common.Payment;
|
|
|
import com.yohoufo.order.constants.ViewType;
|
|
|
import com.yohoufo.order.model.dto.BuyerPenaltyCalResult;
|
|
|
import com.yohoufo.order.model.response.OrderDetailInfo;
|
|
|
import com.yohoufo.order.service.handler.BuyerCancelCompensateComputeHandler;
|
...
|
...
|
@@ -37,15 +38,15 @@ public abstract class AbsOrderViewService { |
|
|
*
|
|
|
* @param buyerOrder
|
|
|
* @param buttons
|
|
|
* @param actType 1:订单列表; 2:订单详情
|
|
|
* @param viewType 1:订单列表; 2:订单详情
|
|
|
* @return
|
|
|
*/
|
|
|
List<ButtonShowBo> formatButtons(BuyerOrder buyerOrder, List<ButtonShowBo> buttons, int actType){
|
|
|
List<ButtonShowBo> formatButtons(BuyerOrder buyerOrder, List<ButtonShowBo> buttons, ViewType viewType){
|
|
|
if (CollectionUtils.isEmpty(buttons) || Objects.isNull(buyerOrder)){
|
|
|
return buttons;
|
|
|
}
|
|
|
|
|
|
disableBuyAgainIfOffline(buyerOrder, buttons, actType);
|
|
|
disableBuyAgainIfOffline(buyerOrder, buttons, viewType);
|
|
|
|
|
|
//TODO optimized first query out status of order need BuyerPenaltyCalResult
|
|
|
int orderStatusCode = buyerOrder.getStatus();
|
...
|
...
|
@@ -80,14 +81,14 @@ public abstract class AbsOrderViewService { |
|
|
* 门店订单,不需要“再次购买”,替换为“查看详情”
|
|
|
* @param buyerOrder
|
|
|
* @param buttons
|
|
|
* @param actType 1:订单列表; 2:订单详情
|
|
|
* @param viewType 1:订单列表; 2:订单详情
|
|
|
*/
|
|
|
private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons, int actType) {
|
|
|
private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons, ViewType viewType) {
|
|
|
if(BuyerOrderUtils.isOffline(buyerOrder.getAttributes())
|
|
|
&& buttons != null && buttons.contains(ButtonShow.BUY_AGAIN.getBo())) {
|
|
|
buttons.remove(ButtonShow.BUY_AGAIN.getBo());
|
|
|
//订单列表“再次购买”替换为“查看详情”,订单详情“再次购买”直接去掉
|
|
|
if(actType == 1 && !buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
|
|
|
if(ViewType.LIST == viewType && !buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
|
|
|
buttons.add(ButtonShow.SHOW_DETAIL.getBo());
|
|
|
}
|
|
|
}
|
...
|
...
|
|