package com.heyu.api.data.service.impl.order;


import com.heyu.api.data.entity.vv.VvTradeOrderLineEntity;
import com.heyu.api.data.enums.ActionEnums;
import com.heyu.api.data.enums.ReverseStatusEnums;
import com.heyu.api.data.service.impl.AbstractOrderAction;

public class BuyerCloseReverseOrderAction extends AbstractOrderAction {


    @Override
    public ActionEnums getAction(VvTradeOrderLineEntity vvReverseOrderEntity, boolean isApp) {
        if (
                ReverseStatusEnums.buyer_apply_cancel.getStatus().equals(vvReverseOrderEntity.getReverseStatus())
                        || ReverseStatusEnums.buyer_apply_refund_wait_seller_agree.getStatus().equals(vvReverseOrderEntity.getStatus())
                        || ReverseStatusEnums.buyer_apply_return_wait_seller_agree.getStatus().equals(vvReverseOrderEntity.getStatus())
                        || ReverseStatusEnums.seller_agree_return_wait_buyer_post.getStatus().equals(vvReverseOrderEntity.getStatus())) {
            if (isApp) {
                return ActionEnums.App_Buyer_Reverse_Order_Close;
            }
        }
        return null;
    }


}
