...
|
...
|
@@ -33,12 +33,19 @@ public abstract class AbsOrderViewService { |
|
|
|
|
|
abstract Logger getLogger();
|
|
|
|
|
|
List<ButtonShowBo> formatButtons(BuyerOrder buyerOrder, List<ButtonShowBo> buttons){
|
|
|
/**
|
|
|
*
|
|
|
* @param buyerOrder
|
|
|
* @param buttons
|
|
|
* @param actType 1:订单列表; 2:订单详情
|
|
|
* @return
|
|
|
*/
|
|
|
List<ButtonShowBo> formatButtons(BuyerOrder buyerOrder, List<ButtonShowBo> buttons, int actType){
|
|
|
if (CollectionUtils.isEmpty(buttons)){
|
|
|
return buttons;
|
|
|
}
|
|
|
|
|
|
disableBuyAgainIfOffline(buyerOrder, buttons);
|
|
|
disableBuyAgainIfOffline(buyerOrder, buttons, actType);
|
|
|
|
|
|
//TODO optimized first query out status of order need BuyerPenaltyCalResult
|
|
|
int orderStatusCode = buyerOrder.getStatus();
|
...
|
...
|
@@ -73,12 +80,14 @@ public abstract class AbsOrderViewService { |
|
|
* 门店订单,不需要“再次购买”,替换为“查看详情”
|
|
|
* @param buyerOrder
|
|
|
* @param buttons
|
|
|
* @param actType 1:订单列表; 2:订单详情
|
|
|
*/
|
|
|
private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons) {
|
|
|
private void disableBuyAgainIfOffline(final BuyerOrder buyerOrder, final List<ButtonShowBo> buttons, int actType) {
|
|
|
if(BuyerOrderUtils.isOffline(buyerOrder.getAttributes())
|
|
|
&& buttons != null && buttons.contains(ButtonShow.BUY_AGAIN.getBo())) {
|
|
|
buttons.remove(ButtonShow.BUY_AGAIN.getBo());
|
|
|
if(!buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
|
|
|
//订单列表“再次购买”替换为“查看详情”,订单详情“再次购买”直接去掉
|
|
|
if(actType == 1 && !buttons.contains(ButtonShow.SHOW_DETAIL.getBo())) {
|
|
|
buttons.add(ButtonShow.SHOW_DETAIL.getBo());
|
|
|
}
|
|
|
}
|
...
|
...
|
|