Commit fd710453 authored by linfeng's avatar linfeng

bug修复

parent 2dcc72ef
...@@ -45,7 +45,7 @@ public class OkGoUtil { ...@@ -45,7 +45,7 @@ public class OkGoUtil {
final private static String SP_KEY_USERINFO ="userinfo"; final private static String SP_KEY_USERINFO ="userinfo";
public static String getYkId(){ public static String getYkId(){
String ykid = "yk_"+ (int)((Math.random()*9+1)*100000); String ykid = "uk_"+ (int)((Math.random()*9+1)*100000);
return ykid; return ykid;
} }
......
...@@ -8,8 +8,8 @@ android { ...@@ -8,8 +8,8 @@ android {
minSdkVersion rootProject.ext.minSdkVersion minSdkVersion rootProject.ext.minSdkVersion
targetSdkVersion rootProject.ext.targetSdkVersion targetSdkVersion rootProject.ext.targetSdkVersion
flavorDimensions "default" flavorDimensions "default"
versionCode 139 versionCode 140
versionName "1.3.9" versionName "1.4.0"
multiDexEnabled true multiDexEnabled true
//新版Gradle 是 implementation 为了兼容compile,写上这句话 //新版Gradle 是 implementation 为了兼容compile,写上这句话
......
...@@ -3,5 +3,5 @@ package com.frame.rv.config; ...@@ -3,5 +3,5 @@ package com.frame.rv.config;
public interface CommonApi extends RvFrameConfig{ public interface CommonApi extends RvFrameConfig{
//行为记录保存 //行为记录保存
public static String RVENTHUSIAST_APP_UNAUTH_SAVE = RvFrameConfig.HOST + "/api/user/behavior/customerBehaviorNotes/app/unauth/save"; public static String RVENTHUSIAST_APP_UNAUTH_SAVE =RvFrameConfig.HOST + "/api/user/behavior/customerBehaviorNotes/app/unauth/save";
} }
...@@ -46,7 +46,7 @@ public class CommonPresenter extends MvpPresenter { ...@@ -46,7 +46,7 @@ public class CommonPresenter extends MvpPresenter {
customerid = OkGoUtil.getYkId(); customerid = OkGoUtil.getYkId();
customertype = "1"; customertype = "1";
} }
postBodyData(RvFrameConfig.HOST, 20, CommonApi.RVENTHUSIAST_APP_UNAUTH_SAVE, BaseBean.class, new SaveOnClick(customertype,customerid,type,typeid), headMap, false); postBodyData2(RvFrameConfig.HOST, CommonApi.RVENTHUSIAST_APP_UNAUTH_SAVE, new SaveOnClick(customertype, customerid, type, typeid), headMap);
} }
......
...@@ -111,8 +111,6 @@ public class RxRequestResult<T extends BaseBean, V extends BaseView<T>> extends ...@@ -111,8 +111,6 @@ public class RxRequestResult<T extends BaseBean, V extends BaseView<T>> extends
Log.e("OnSuccessAndFaultSub", "error:" + e.getMessage()); Log.e("OnSuccessAndFaultSub", "error:" + e.getMessage());
// mOnSuccessAndFaultListener.onFault("error:" + e.getMessage()); // mOnSuccessAndFaultListener.onFault("error:" + e.getMessage());
// dismissProgressDialog(); // dismissProgressDialog();
} }
} }
......
package com.ruiwenliu.wrapper.presenter; package com.ruiwenliu.wrapper.presenter;
import android.util.Log; import android.util.Log;
import com.ruiwenliu.wrapper.base.BaseBean; import com.ruiwenliu.wrapper.base.BaseBean;
...@@ -17,6 +16,7 @@ import io.reactivex.Observer; ...@@ -17,6 +16,7 @@ import io.reactivex.Observer;
import io.reactivex.android.schedulers.AndroidSchedulers; import io.reactivex.android.schedulers.AndroidSchedulers;
import io.reactivex.disposables.Disposable; import io.reactivex.disposables.Disposable;
import io.reactivex.functions.Consumer; import io.reactivex.functions.Consumer;
import io.reactivex.observers.DisposableObserver;
import io.reactivex.schedulers.Schedulers; import io.reactivex.schedulers.Schedulers;
import io.reactivex.subscribers.DisposableSubscriber; import io.reactivex.subscribers.DisposableSubscriber;
import okhttp3.MultipartBody; import okhttp3.MultipartBody;
...@@ -34,22 +34,24 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -34,22 +34,24 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
/** /**
* get请求 * get请求
*
* @param position 请求序列号 * @param position 请求序列号
* @param url 地址 * @param url 地址
* @param bean 请求实体类 * @param bean 请求实体类
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getData(int position, String url, Class<T> bean,boolean isShow) { public <T extends BaseBean> void getData(int position, String url, Class<T> bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 111111111111111111111"); Log.i("mvppresentnnt", "getData: ---------- 111111111111111111111");
} }
toSubscribe(getApi().rxGet(url), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(getApi().rxGet(url), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* get请求 * get请求
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -57,16 +59,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -57,16 +59,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getData(int position, String url, Class<T> bean, Map<String,Object> objectMap,boolean isShow) { public <T extends BaseBean> void getData(int position, String url, Class<T> bean, Map<String, Object> objectMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 222222222222222222222222"); Log.i("mvppresentnnt", "getData: ---------- 222222222222222222222222");
} }
toSubscribe(getApi().rxGet(url,objectMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(getApi().rxGet(url, objectMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 自定义域名get请求 * 自定义域名get请求
*
* @param baseUrl 域名地址 * @param baseUrl 域名地址
* @param position * @param position
* @param url * @param url
...@@ -75,17 +78,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -75,17 +78,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getData(String baseUrl,int position, String url, Class<T> bean, Map<String,Object> objectMap,boolean isShow) { public <T extends BaseBean> void getData(String baseUrl, int position, String url, Class<T> bean, Map<String, Object> objectMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 3333333333333333333333333"); Log.i("mvppresentnnt", "getData: ---------- 3333333333333333333333333");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxGet(url,objectMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxGet(url, objectMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 自定义域名get请求 * 自定义域名get请求
*
* @param baseUrl 域名地址 * @param baseUrl 域名地址
* @param position * @param position
* @param url * @param url
...@@ -94,16 +98,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -94,16 +98,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getDataHead(String baseUrl,int position, String url, Class<T> bean, Map<String,Object> headMap,boolean isShow) { public <T extends BaseBean> void getDataHead(String baseUrl, int position, String url, Class<T> bean, Map<String, Object> headMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 444444444444444444444444444444"); Log.i("mvppresentnnt", "getData: ---------- 444444444444444444444444444444");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxGetHead(url,headMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxGetHead(url, headMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 自定义域名get请求 * 自定义域名get请求
*
* @param baseUrl 域名地址 * @param baseUrl 域名地址
* @param position * @param position
* @param url * @param url
...@@ -112,16 +117,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -112,16 +117,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getData(String baseUrl,int position, String url, Class<T> bean, Map<String,Object> objectMap,Map<String,Object> headMap,boolean isShow) { public <T extends BaseBean> void getData(String baseUrl, int position, String url, Class<T> bean, Map<String, Object> objectMap, Map<String, Object> headMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 5555555555555555555555555555555555"); Log.i("mvppresentnnt", "getData: ---------- 5555555555555555555555555555555555");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxGet(url,objectMap,headMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxGet(url, objectMap, headMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 自定义域名get请求 * 自定义域名get请求
*
* @param baseUrl 域名地址 * @param baseUrl 域名地址
* @param position * @param position
* @param url * @param url
...@@ -129,34 +135,36 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -129,34 +135,36 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getData(String baseUrl,int position, String url, Class<T> bean,boolean isShow) { public <T extends BaseBean> void getData(String baseUrl, int position, String url, Class<T> bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 6666666666666666666666666666666666"); Log.i("mvppresentnnt", "getData: ---------- 6666666666666666666666666666666666");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxGet(url), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxGet(url), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* post请求 * post请求
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postData(int position, String url, Class<T> bean,boolean isShow) { public <T extends BaseBean> void postData(int position, String url, Class<T> bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 77777777777777777777777777777777777777"); Log.i("mvppresentnnt", "getData: ---------- 77777777777777777777777777777777777777");
} }
toSubscribe(getApi().rxPost(url), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(getApi().rxPost(url), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* post请求 * post请求
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -164,16 +172,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -164,16 +172,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postData(int position, String url, Class<T> bean, Map<String,Object> objectMap,boolean isShow) { public <T extends BaseBean> void postData(int position, String url, Class<T> bean, Map<String, Object> objectMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 8888888888888888888888888888888888888888"); Log.i("mvppresentnnt", "getData: ---------- 8888888888888888888888888888888888888888");
} }
toSubscribe(getApi().rxPost(url,objectMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(getApi().rxPost(url, objectMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* post请求 * post请求
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -181,16 +190,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -181,16 +190,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postData(String baseUrl,int position, String url, Class<T> bean, Map<String,Object> objectMap, Map<String,Object> headMap,boolean isShow) { public <T extends BaseBean> void postData(String baseUrl, int position, String url, Class<T> bean, Map<String, Object> objectMap, Map<String, Object> headMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 99999999999999999999999999999999999999999"); Log.i("mvppresentnnt", "getData: ---------- 99999999999999999999999999999999999999999");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxPost(url,objectMap,headMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxPost(url, objectMap, headMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* * post请求 * * post请求
*
* @param baseUrl * @param baseUrl
* @param position * @param position
* @param url * @param url
...@@ -200,17 +210,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -200,17 +210,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postHead(String baseUrl,int position, String url, Class<T> bean, Map<String,Object> headMap,boolean isShow) { public <T extends BaseBean> void postHead(String baseUrl, int position, String url, Class<T> bean, Map<String, Object> headMap, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 99999999999999999999999999999999999999999"); Log.i("mvppresentnnt", "getData: ---------- 99999999999999999999999999999999999999999");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxPost2(url,headMap), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxPost2(url, headMap), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* post请求 加json数据 * post请求 加json数据
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -218,31 +229,34 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -218,31 +229,34 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postBodyData(int position, String url, Class<T> baseBean, Map<String,Object> objectMap, Class<?> bean,boolean isShow) { public <T extends BaseBean> void postBodyData(int position, String url, Class<T> baseBean, Map<String, Object> objectMap, Class<?> bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 1010101010101010101010101010101010"); Log.i("mvppresentnnt", "getData: ---------- 1010101010101010101010101010101010");
} }
toSubscribe(getApi().rxPostBody(url,objectMap,bean), new RxRequestResult<>(position,baseBean,getView()),position); toSubscribe(getApi().rxPostBody(url, objectMap, bean), new RxRequestResult<>(position, baseBean, getView()), position);
} }
/** /**
* post请求 加json数据 * post请求 加json数据
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postBodyData(int position, String url, Class<T> baseBean, Object bean,boolean isShow) { public <T extends BaseBean> void postBodyData(int position, String url, Class<T> baseBean, Object bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 121212121212112121212121212121121212"); Log.i("mvppresentnnt", "getData: ---------- 121212121212112121212121212121121212");
} }
toSubscribe(getApi().rxPostBody(url,bean), new RxRequestResult<>(position,baseBean,getView()),position); toSubscribe(getApi().rxPostBody(url, bean), new RxRequestResult<>(position, baseBean, getView()), position);
} }
/** /**
* post请求 加json数据 * post请求 加json数据
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -250,34 +264,35 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -250,34 +264,35 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param mapHead 是否需要弹窗添加请求头 * @param mapHead 是否需要弹窗添加请求头
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postBodyData(int position, String url, Class<T> baseBean, Object bean,Map<String,Object> mapHead,boolean isShow) { public <T extends BaseBean> void postBodyData(int position, String url, Class<T> baseBean, Object bean, Map<String, Object> mapHead, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 131313131313131313131313131313"); Log.i("mvppresentnnt", "getData: ---------- 131313131313131313131313131313");
} }
toSubscribe(getApi().rxPostBody(url,bean,mapHead), new RxRequestResult<>(position,baseBean,getView()),position); toSubscribe(getApi().rxPostBody(url, bean, mapHead), new RxRequestResult<>(position, baseBean, getView()), position);
} }
/** /**
* post请求 加json数据 * post请求 加json数据
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postBodyData(String baseUrl,int position, String url, Class<T> baseBean, Object bean,boolean isShow) { public <T extends BaseBean> void postBodyData(String baseUrl, int position, String url, Class<T> baseBean, Object bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 141414141414141414141414141414141414"); Log.i("mvppresentnnt", "getData: ---------- 141414141414141414141414141414141414");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxPostBody(url,bean), new RxRequestResult<>(position,baseBean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxPostBody(url, bean), new RxRequestResult<>(position, baseBean, getView()), position);
} }
/** /**
* post请求 加json数据 * post请求 加json数据
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -285,16 +300,22 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -285,16 +300,22 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param mapHead 是否需要弹窗添加请求头 * @param mapHead 是否需要弹窗添加请求头
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postBodyData(String baseUrl,int position, String url, Class<T> baseBean, Object bean,Map<String,Object> mapHead,boolean isShow) { public <T extends BaseBean> void postBodyData(String baseUrl, int position, String url, Class<T> baseBean, Object bean, Map<String, Object> mapHead, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 15151515151515151515151515151515"); Log.i("mvppresentnnt", "getData: ---------- 15151515151515151515151515151515");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxPostBody(url,bean,mapHead), new RxRequestResult<>(position,baseBean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxPostBody(url, bean, mapHead), new RxRequestResult<>(position, baseBean, getView()), position);
}
public <T extends BaseBean> void postBodyData2(String baseUrl, String url, Object bean, Map<String, Object> mapHead) {
createService(HttpApi.class, baseUrl).rxPostBody(url, bean, mapHead);
} }
/** /**
* 自定义域名post请求 加json数据 * 自定义域名post请求 加json数据
*
* @param baseUrl 域名地址 * @param baseUrl 域名地址
* @param position * @param position
* @param url * @param url
...@@ -302,18 +323,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -302,18 +323,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void postBodyData(String baseUrl,int position, String url, Class<T> baseBean, Class<?> bean,boolean isShow) { public <T extends BaseBean> void postBodyData(String baseUrl, int position, String url, Class<T> baseBean, Class<?> bean, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 16161616161616161616161616161616"); Log.i("mvppresentnnt", "getData: ---------- 16161616161616161616161616161616");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxPostBody(url,bean), new RxRequestResult<>(position,baseBean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxPostBody(url, bean), new RxRequestResult<>(position, baseBean, getView()), position);
} }
/** /**
* 文件上传 * 文件上传
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -321,17 +342,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -321,17 +342,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getUploadFile( int position, String url, Class<T> bean, MultipartBody.Part part, boolean isShow) { public <T extends BaseBean> void getUploadFile(int position, String url, Class<T> bean, MultipartBody.Part part, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 17171717171717171717171717"); Log.i("mvppresentnnt", "getData: ---------- 17171717171717171717171717");
} }
toSubscribe(getApi().rxFileUpload(url,part), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(getApi().rxFileUpload(url, part), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 文件上传 * 文件上传
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -339,17 +361,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -339,17 +361,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getUploadFile(int position, String url, Class<T> bean, RequestBody body,MultipartBody.Part part, boolean isShow) { public <T extends BaseBean> void getUploadFile(int position, String url, Class<T> bean, RequestBody body, MultipartBody.Part part, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 181818181818181818181818"); Log.i("mvppresentnnt", "getData: ---------- 181818181818181818181818");
} }
toSubscribe(getApi().rxFileUpload(url,body,part), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(getApi().rxFileUpload(url, body, part), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 文件上传 * 文件上传
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -357,17 +380,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -357,17 +380,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getUploadFile(String baseUrl, int position, String url, Class<T> bean, RequestBody body, MultipartBody.Part part, boolean isShow) { public <T extends BaseBean> void getUploadFile(String baseUrl, int position, String url, Class<T> bean, RequestBody body, MultipartBody.Part part, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 1919191919191919191919"); Log.i("mvppresentnnt", "getData: ---------- 1919191919191919191919");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxFileUpload(url,body,part), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxFileUpload(url, body, part), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 多张图片上传 * 多张图片上传
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -375,17 +399,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -375,17 +399,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getUploadFiles(String baseUrl, int position, String url, Class<T> bean,RequestBody body, Map<String,RequestBody> part, boolean isShow) { public <T extends BaseBean> void getUploadFiles(String baseUrl, int position, String url, Class<T> bean, RequestBody body, Map<String, RequestBody> part, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 20202020202020202020202020202020"); Log.i("mvppresentnnt", "getData: ---------- 20202020202020202020202020202020");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxFileUploads(url,body,part), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxFileUploads(url, body, part), new RxRequestResult<>(position, bean, getView()), position);
} }
/** /**
* 文件上传 * 文件上传
*
* @param position * @param position
* @param url * @param url
* @param bean * @param bean
...@@ -393,14 +418,13 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter ...@@ -393,14 +418,13 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗 * @param isShow 是否需要弹窗
* @param <T> * @param <T>
*/ */
public <T extends BaseBean>void getUploadFile(String baseUrl, int position, String url, Class<T> bean, MultipartBody.Part part, boolean isShow) { public <T extends BaseBean> void getUploadFile(String baseUrl, int position, String url, Class<T> bean, MultipartBody.Part part, boolean isShow) {
if(isShow && getView()!=null){ if (isShow && getView() != null) {
getView().onShowLoading(); getView().onShowLoading();
Log.i("mvppresentnnt", "getData: ---------- 2121212121212121212121212121212121"); Log.i("mvppresentnnt", "getData: ---------- 2121212121212121212121212121212121");
} }
toSubscribe(createService(HttpApi.class,baseUrl).rxFileUpload(url,part), new RxRequestResult<>(position,bean,getView()),position); toSubscribe(createService(HttpApi.class, baseUrl).rxFileUpload(url, part), new RxRequestResult<>(position, bean, getView()), position);
} }
} }
...@@ -3,8 +3,8 @@ package com.xxfc.discovery.api; ...@@ -3,8 +3,8 @@ package com.xxfc.discovery.api;
import com.frame.rv.config.RvFrameConfig; import com.frame.rv.config.RvFrameConfig;
public interface DiscoveryApi extends RvFrameConfig { public interface DiscoveryApi extends RvFrameConfig {
String IMA_BASEUSRL = "https://imapi.dfangche.com"; // String IMA_BASEUSRL = "https://imapi.dfangche.com";
// String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim"; String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
//问题列表 //问题列表
String DISCOVERY_IMQUESTION_LIST = HOST + "/api/im/imQuestion/list"; String DISCOVERY_IMQUESTION_LIST = HOST + "/api/im/imQuestion/list";
......
...@@ -156,7 +156,7 @@ public class CompletedFragment extends BaseFragment<CommonPresenter> implements ...@@ -156,7 +156,7 @@ public class CompletedFragment extends BaseFragment<CommonPresenter> implements
Map<String, Object> mapData = new LinkedHashMap<>(); Map<String, Object> mapData = new LinkedHashMap<>();
mapData.put("page", page); mapData.put("page", page);
mapData.put("limit", 10); mapData.put("limit", 10);
mapData.put("multiStatus", "6,7"); mapData.put("multiStatus", "6,-1");
mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, 0, ApiConfig.HTTP_URL_ORDER_LIST, OrderListBean.class, mapData, headMap, page == 1 ? true : false); mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, 0, ApiConfig.HTTP_URL_ORDER_LIST, OrderListBean.class, mapData, headMap, page == 1 ? true : false);
} }
......
...@@ -177,7 +177,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> { ...@@ -177,7 +177,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
tvPickUpTheCar.setText(mActivity.getString(R.string.rv_return_car)); tvPickUpTheCar.setText(mActivity.getString(R.string.rv_return_car));
break; break;
case 6: case 6:
case 7: case -1:
if (dataBean.getType() == 3) { if (dataBean.getType() == 3) {
tvCancelOrder.setVisibility(View.GONE); tvCancelOrder.setVisibility(View.GONE);
} }
...@@ -281,7 +281,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> { ...@@ -281,7 +281,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
startActivity(PickUpTheCarQRCodeActivity.getIntent(mActivity, dataBean)); startActivity(PickUpTheCarQRCodeActivity.getIntent(mActivity, dataBean));
break; break;
case 6: case 6:
case 7: case -1:
startActivityForResult(EvaluationActivity.getIntent(mActivity, dataBean), TYPE_REQUEST_EVALUATION); startActivityForResult(EvaluationActivity.getIntent(mActivity, dataBean), TYPE_REQUEST_EVALUATION);
break; break;
} }
...@@ -300,7 +300,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> { ...@@ -300,7 +300,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
startActivity(intent); startActivity(intent);
break; break;
case 6: case 6:
case 7: case -1:
startActivity(DepositefundProgressDetailsActivity.getIntent(mActivity,no)); startActivity(DepositefundProgressDetailsActivity.getIntent(mActivity,no));
break; break;
} }
......
...@@ -45,7 +45,12 @@ public class CompletedAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity, ...@@ -45,7 +45,12 @@ public class CompletedAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
if (dataBean.getOrderRentVehicleDetail() !=null && dataBean.getOrderRentVehicleDetail().getStart_city_name()!=null) { if (dataBean.getOrderRentVehicleDetail() !=null && dataBean.getOrderRentVehicleDetail().getStart_city_name()!=null) {
helper.setText(R.id.tv_city, dataBean.getOrderRentVehicleDetail().getStart_city_name()); helper.setText(R.id.tv_city, dataBean.getOrderRentVehicleDetail().getStart_city_name());
} }
if (dataBean.getStatusX() ==6){
helper.setText(R.id.tv_order_state, mContext.getString(R.string.rv_order_completed)); helper.setText(R.id.tv_order_state, mContext.getString(R.string.rv_order_completed));
}else if (dataBean.getStatusX() ==-1){
helper.setText(R.id.tv_order_state, "定损中");
}
String icon =""; String icon ="";
if (!TextUtils.isEmpty(dataBean.getCoverPic())){ if (!TextUtils.isEmpty(dataBean.getCoverPic())){
icon = dataBean.getCoverPic(); icon = dataBean.getCoverPic();
......
...@@ -75,7 +75,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity, ...@@ -75,7 +75,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
4–待出行 4–待出行
5–出行中(进行中) 5–出行中(进行中)
6–已完成 6–已完成
7 - 定损 -1 - 定损
*/ */
switch (dataBean.getStatusX()) { switch (dataBean.getStatusX()) {
case 0: case 0:
...@@ -107,7 +107,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity, ...@@ -107,7 +107,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
helper.setText(R.id.tv_process, mContext.getString(R.string.rv_to_evaluation)); helper.setText(R.id.tv_process, mContext.getString(R.string.rv_to_evaluation));
helper.setVisible(R.id.tv_process, true); helper.setVisible(R.id.tv_process, true);
break; break;
case 7: case -1:
helper.setText(R.id.tv_order_state, "定损中"); helper.setText(R.id.tv_order_state, "定损中");
helper.setVisible(R.id.tv_process, false); helper.setVisible(R.id.tv_process, false);
default: default:
......
...@@ -106,7 +106,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i ...@@ -106,7 +106,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
// bodyMap.put("status", "3"); 4567 // bodyMap.put("status", "3"); 4567
bodyMap.put("hasMemberRight", 1); bodyMap.put("hasMemberRight", 1);
bodyMap.put("type", 1); bodyMap.put("type", 1);
bodyMap.put("multiStatus", "4,5,6,7"); bodyMap.put("multiStatus", "4,5,6,-1");
mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, 0, ApiConfig.HTTP_URL_ORDER_LIST, OrderListBean.class, bodyMap, headMap, mPage == 1 ? true : false); mPresenter.getData(RvFrameConfig.VEHICLE_ORDER, 0, ApiConfig.HTTP_URL_ORDER_LIST, OrderListBean.class, bodyMap, headMap, mPage == 1 ? true : false);
} }
......
...@@ -44,6 +44,8 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat ...@@ -44,6 +44,8 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat
helper.setText(R.id.tv_state, "出行中"); helper.setText(R.id.tv_state, "出行中");
} else if (bean.getStatusX() == 6) { } else if (bean.getStatusX() == 6) {
helper.setText(R.id.tv_state, "已完成"); helper.setText(R.id.tv_state, "已完成");
}else if (bean.getStatusX() == -1){
helper.setText(R.id.tv_state, "定损中");
} }
if (!TextUtils.isEmpty(bean.getName())) { if (!TextUtils.isEmpty(bean.getName())) {
helper.setText(R.id.tv_car_type, bean.getName()); helper.setText(R.id.tv_car_type, bean.getName());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment