package com.cooleshow.student.presenter.main;

import com.cooleshow.base.presenter.BasePresenter;
import com.cooleshow.base.rx.BaseObserver;
import com.cooleshow.student.api.APIService;
import com.cooleshow.student.bean.StudentUserInfo;
import com.cooleshow.student.contract.MineContract;

/**
 * 创建日期：2022/5/26 10:05
 *
 * @author Ryan
 * 类说明：
 */
public class MinePresenter extends BasePresenter<MineContract.MineView> implements MineContract.Presenter {
    @Override
    public void queryUserInfo() {
        addSubscribe(create(APIService.class).queryUserInfo(), new BaseObserver<StudentUserInfo>(getView()) {
            @Override
            protected void onSuccess(StudentUserInfo data) {
                if (getView() != null) {
                    getView().queryUserInfoSuccess(data);
                }
            }
        });
    }

}
