package com.tejia.lijin.app.model;
|
|
import android.content.Context;
|
|
import com.tejia.lijin.app.BasicTextHttpResponseHandler;
|
import com.tejia.lijin.app.ShoppingApi;
|
import com.tejia.lijin.app.contract.InvitepeopleContract;
|
|
|
import org.apache.http.Header;
|
import org.json.JSONObject;
|
|
public class InvitepeopleModel {
|
/**
|
* 队员-统计数量+上级
|
*
|
* @param mContext
|
* @param uid
|
* @param callBack
|
*/
|
public void getCountMyTeam(Context mContext, Long uid, final InvitepeopleContract.InvitepeopleCallBack callBack) {
|
ShoppingApi.getCountMyTeam(mContext, uid, new BasicTextHttpResponseHandler() {
|
@Override
|
public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
|
callBack.onSuccess(jsonObject);
|
}
|
|
@Override
|
public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) {
|
callBack.onFail("onFailure");
|
}
|
});
|
}
|
|
/**
|
* 提醒添加微信
|
*
|
* @param mContext
|
* @param uid
|
* @param callBack
|
*/
|
public void getRemindTeam(Context mContext, Long uid, String inviteId, final InvitepeopleContract.InvitepeopleCallBack callBack) {
|
ShoppingApi.getRemindTeam(mContext, uid, inviteId, new BasicTextHttpResponseHandler() {
|
@Override
|
public void onSuccessPerfect(int statusCode, Header[] headers, JSONObject jsonObject) throws Exception {
|
callBack.onSuccess(jsonObject);
|
}
|
|
@Override
|
public void onFailure(int statusCode, Header[] headers, String jsonObject, Throwable e) {
|
callBack.onFail("onFailure");
|
}
|
});
|
}
|
}
|