package com.gingersoft.gsa.cloud.download.mvp.model.downmanager;

import com.gingersoft.gsa.cloud.download.mvp.presenter.DownloadPresenter;

/**
 * 作者：ELEGANT_BIN
 * 版本：1.6.0
 * 创建日期：2020-02-25
 * 修订历史：2020-02-25
 * 描述：
 */
public class DownloadTaskImp implements Runnable {

    private DownloadRequest request;
    private DownloadPresenter presenter;

    public DownloadTaskImp(DownloadRequest request, DownloadPresenter presenter) {
        this.request = request;
        this.presenter = presenter;
    }

    @Override
    public void run() {
        switch (request.getDownTag()) {
            case 0:
                presenter.downFun(request.getDownTag());
                break;
            case 1:
                presenter.downFoodList(request.getDownTag());
                break;
            case 2:
                presenter.downModifier(request.getDownTag());
                break;
            case 3:
                presenter.downFoodCombo(request.getDownTag());
                break;
            case 4:
                presenter.downComboItem(request.getDownTag());
                break;
            case 5:
                presenter.downFoodModifier(request.getDownTag());
                break;
            case 6:
                presenter.downDiscount(request.getDownTag());
                break;
            case 7:
                presenter.downExpandInfo(request.getDownTag());
                break;
            case 8:
                presenter.downPrinterList(request.getDownTag());
                break;
        }
    }
}
