|
@@ -1,6 +1,7 @@
|
|
|
package com.tongyu.luck.happywork.ui.mvp.cclient.presenter;
|
|
package com.tongyu.luck.happywork.ui.mvp.cclient.presenter;
|
|
|
|
|
|
|
|
import com.tongyu.luck.happywork.AppCacheManager;
|
|
import com.tongyu.luck.happywork.AppCacheManager;
|
|
|
|
|
+import com.tongyu.luck.happywork.R;
|
|
|
import com.tongyu.luck.happywork.bean.WelfarePositionBean;
|
|
import com.tongyu.luck.happywork.bean.WelfarePositionBean;
|
|
|
import com.tongyu.luck.happywork.callback.MvpDataCallBack;
|
|
import com.tongyu.luck.happywork.callback.MvpDataCallBack;
|
|
|
import com.tongyu.luck.happywork.http.exception.ApiException;
|
|
import com.tongyu.luck.happywork.http.exception.ApiException;
|
|
@@ -8,6 +9,7 @@ import com.tongyu.luck.happywork.ui.activity.cclient.job.WelfareJobDetailActivit
|
|
|
import com.tongyu.luck.happywork.ui.base.BasePresenter;
|
|
import com.tongyu.luck.happywork.ui.base.BasePresenter;
|
|
|
import com.tongyu.luck.happywork.ui.mvp.cclient.contacts.WelfareJobDetailContacts;
|
|
import com.tongyu.luck.happywork.ui.mvp.cclient.contacts.WelfareJobDetailContacts;
|
|
|
import com.tongyu.luck.happywork.ui.mvp.cclient.model.WelfareJobDetailModel;
|
|
import com.tongyu.luck.happywork.ui.mvp.cclient.model.WelfareJobDetailModel;
|
|
|
|
|
+import com.tongyu.luck.happywork.ui.widget.dialog.SureDialog;
|
|
|
|
|
|
|
|
public class WelfareJobDetailPresenter extends BasePresenter<WelfareJobDetailActivity> implements WelfareJobDetailContacts.IWelfareJobDetailPresenter {
|
|
public class WelfareJobDetailPresenter extends BasePresenter<WelfareJobDetailActivity> implements WelfareJobDetailContacts.IWelfareJobDetailPresenter {
|
|
|
private WelfareJobDetailModel mWelfareJobDetailModel;
|
|
private WelfareJobDetailModel mWelfareJobDetailModel;
|
|
@@ -53,17 +55,23 @@ public class WelfareJobDetailPresenter extends BasePresenter<WelfareJobDetailAct
|
|
|
return;
|
|
return;
|
|
|
}
|
|
}
|
|
|
if (AppCacheManager.getInstance().getResumeModel() != null && AppCacheManager.getInstance().getResumeModel().isBaseInformation()) {
|
|
if (AppCacheManager.getInstance().getResumeModel() != null && AppCacheManager.getInstance().getResumeModel().isBaseInformation()) {
|
|
|
- mWelfareJobDetailModel.uploadSaveApply(new MvpDataCallBack<Boolean>() {
|
|
|
|
|
|
|
+ new SureDialog(mvpReference.get()).initData(R.string.toast_job_request, R.string.cancel, R.string.sure, new SureDialog.OnClickSureListener() {
|
|
|
@Override
|
|
@Override
|
|
|
- public void onData(Boolean data) {
|
|
|
|
|
- if (isViewAttach()) {
|
|
|
|
|
- if (data)
|
|
|
|
|
- mvpReference.get().onApply(mWelfareJobDetailModel.isApply());
|
|
|
|
|
- else
|
|
|
|
|
- mvpReference.get().onInitResume();
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ public void onClick(boolean isSure) {
|
|
|
|
|
+ if (isSure)
|
|
|
|
|
+ mWelfareJobDetailModel.uploadSaveApply(new MvpDataCallBack<Boolean>() {
|
|
|
|
|
+ @Override
|
|
|
|
|
+ public void onData(Boolean data) {
|
|
|
|
|
+ if (isViewAttach()) {
|
|
|
|
|
+ if (data)
|
|
|
|
|
+ mvpReference.get().onApply(mWelfareJobDetailModel.isApply());
|
|
|
|
|
+ else
|
|
|
|
|
+ mvpReference.get().onInitResume();
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
- });
|
|
|
|
|
|
|
+ }).show();
|
|
|
} else {//完善个人简历
|
|
} else {//完善个人简历
|
|
|
mvpReference.get().onInitResume();
|
|
mvpReference.get().onInitResume();
|
|
|
}
|
|
}
|