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() {
//        DownloadManager.getInstance().download(request);
//        switch (request.getDownTag()) {
//            case 0:
//                presenter.downFun();
//                break;
//            case 1:
//                presenter.downFoodList();
//                break;
//            case 2:
//                presenter.downModifier();
//                break;
//            case 3:
//                presenter.downCombo();
//                break;
//            case 4:
//                presenter.downFoodModifier();
//                break;
//        }

        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;
        }
    }
}
