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.OrderStatusEnums;
import com.heyu.api.data.service.impl.AbstractOrderAction;

public class CloseAction extends AbstractOrderAction {
    @Override
    public ActionEnums getAction(VvTradeOrderLineEntity vvTradeOrderLineEntity, boolean isApp) {
        if (
                OrderStatusEnums.wait_pay.getStatus().equals(vvTradeOrderLineEntity.getStatus())
                        || OrderStatusEnums.create.getStatus().equals(vvTradeOrderLineEntity.getStatus())
        ) {
            if (isApp) {
                return ActionEnums.App_Close;
            }
        }

        return null;
    }
}
