Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
R
RvApp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lify
RvApp
Commits
fd710453
Commit
fd710453
authored
Aug 14, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug修复
parent
2dcc72ef
Changes
13
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
143 additions
and
114 deletions
+143
-114
OkGoUtil.java
OkGo/src/main/java/com/yuyife/okgo/OkGoUtil.java
+1
-1
build.gradle
RvClient/build.gradle
+2
-2
CommonApi.java
RvFrame/src/main/java/com/frame/rv/config/CommonApi.java
+1
-1
CommonPresenter.java
...com/ruiwenliu/wrapper/base/presenter/CommonPresenter.java
+1
-1
RxRequestResult.java
...main/java/com/ruiwenliu/wrapper/http/RxRequestResult.java
+0
-2
MvpPresenter.java
...in/java/com/ruiwenliu/wrapper/presenter/MvpPresenter.java
+121
-97
DiscoveryApi.java
...ry/src/main/java/com/xxfc/discovery/api/DiscoveryApi.java
+2
-2
CompletedFragment.java
.../home/rv/module/ui/main/home/order/CompletedFragment.java
+1
-1
OrderDetailActivity.java
...ome/rv/module/ui/main/home/order/OrderDetailActivity.java
+3
-3
CompletedAdapter.java
...v/module/ui/main/home/order/adapter/CompletedAdapter.java
+6
-1
OrderListAdapter.java
...v/module/ui/main/home/order/adapter/OrderListAdapter.java
+2
-2
ConsumeRecordActivity.java
...er/src/main/java/com/rv.member/ConsumeRecordActivity.java
+1
-1
ConsumeRecordListAdapter.java
.../java/com/rv.member/adapter/ConsumeRecordListAdapter.java
+2
-0
No files found.
OkGo/src/main/java/com/yuyife/okgo/OkGoUtil.java
View file @
fd710453
...
...
@@ -45,7 +45,7 @@ public class OkGoUtil {
final
private
static
String
SP_KEY_USERINFO
=
"userinfo"
;
public
static
String
getYkId
(){
String
ykid
=
"
y
k_"
+
(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
String
ykid
=
"
u
k_"
+
(
int
)((
Math
.
random
()*
9
+
1
)*
100000
);
return
ykid
;
}
...
...
RvClient/build.gradle
View file @
fd710453
...
...
@@ -8,8 +8,8 @@ android {
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
flavorDimensions
"default"
versionCode
1
39
versionName
"1.
3.9
"
versionCode
1
40
versionName
"1.
4.0
"
multiDexEnabled
true
//新版Gradle 是 implementation 为了兼容compile,写上这句话
...
...
RvFrame/src/main/java/com/frame/rv/config/CommonApi.java
View file @
fd710453
...
...
@@ -3,5 +3,5 @@ package com.frame.rv.config;
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"
;
}
RvWrapper/src/main/java/com/ruiwenliu/wrapper/base/presenter/CommonPresenter.java
View file @
fd710453
...
...
@@ -46,7 +46,7 @@ public class CommonPresenter extends MvpPresenter {
customerid
=
OkGoUtil
.
getYkId
();
customertype
=
"1"
;
}
postBodyData
(
RvFrameConfig
.
HOST
,
20
,
CommonApi
.
RVENTHUSIAST_APP_UNAUTH_SAVE
,
BaseBean
.
class
,
new
SaveOnClick
(
customertype
,
customerid
,
type
,
typeid
),
headMap
,
false
);
postBodyData
2
(
RvFrameConfig
.
HOST
,
CommonApi
.
RVENTHUSIAST_APP_UNAUTH_SAVE
,
new
SaveOnClick
(
customertype
,
customerid
,
type
,
typeid
),
headMap
);
}
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/http/RxRequestResult.java
View file @
fd710453
...
...
@@ -111,8 +111,6 @@ public class RxRequestResult<T extends BaseBean, V extends BaseView<T>> extends
Log
.
e
(
"OnSuccessAndFaultSub"
,
"error:"
+
e
.
getMessage
());
// mOnSuccessAndFaultListener.onFault("error:" + e.getMessage());
// dismissProgressDialog();
}
}
...
...
RvWrapper/src/main/java/com/ruiwenliu/wrapper/presenter/MvpPresenter.java
View file @
fd710453
package
com
.
ruiwenliu
.
wrapper
.
presenter
;
import
android.util.Log
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
...
...
@@ -17,6 +16,7 @@ import io.reactivex.Observer;
import
io.reactivex.android.schedulers.AndroidSchedulers
;
import
io.reactivex.disposables.Disposable
;
import
io.reactivex.functions.Consumer
;
import
io.reactivex.observers.DisposableObserver
;
import
io.reactivex.schedulers.Schedulers
;
import
io.reactivex.subscribers.DisposableSubscriber
;
import
okhttp3.MultipartBody
;
...
...
@@ -34,22 +34,24 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
/**
* get请求
*
* @param position 请求序列号
* @param url 地址
* @param bean 请求实体类
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
getData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
getData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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请求
*
* @param position
* @param url
* @param bean
...
...
@@ -57,16 +59,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
getData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
Map
<
String
,
Object
>
objectMap
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
getData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
Map
<
String
,
Object
>
objectMap
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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请求
*
* @param baseUrl 域名地址
* @param position
* @param url
...
...
@@ -75,17 +78,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
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
)
{
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
)
{
getView
().
onShowLoading
();
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请求
*
* @param baseUrl 域名地址
* @param position
* @param url
...
...
@@ -94,16 +98,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
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
)
{
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
)
{
getView
().
onShowLoading
();
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请求
*
* @param baseUrl 域名地址
* @param position
* @param url
...
...
@@ -112,16 +117,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @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
)
{
if
(
isShow
&&
getView
()!=
null
)
{
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
)
{
getView
().
onShowLoading
();
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请求
*
* @param baseUrl 域名地址
* @param position
* @param url
...
...
@@ -129,34 +135,36 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
getData
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
getData
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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请求
*
* @param position
* @param url
* @param bean
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
postData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
postData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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请求
*
* @param position
* @param url
* @param bean
...
...
@@ -164,16 +172,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
postData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
Map
<
String
,
Object
>
objectMap
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
postData
(
int
position
,
String
url
,
Class
<
T
>
bean
,
Map
<
String
,
Object
>
objectMap
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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请求
*
* @param position
* @param url
* @param bean
...
...
@@ -181,16 +190,17 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @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
)
{
if
(
isShow
&&
getView
()!=
null
)
{
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
)
{
getView
().
onShowLoading
();
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请求
*
* @param baseUrl
* @param position
* @param url
...
...
@@ -200,17 +210,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param <T>
*/
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
)
{
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
)
{
getView
().
onShowLoading
();
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数据
*
* @param position
* @param url
* @param bean
...
...
@@ -218,31 +229,34 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
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
)
{
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
)
{
getView
().
onShowLoading
();
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数据
*
* @param position
* @param url
* @param bean
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
postBodyData
(
int
position
,
String
url
,
Class
<
T
>
baseBean
,
Object
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
postBodyData
(
int
position
,
String
url
,
Class
<
T
>
baseBean
,
Object
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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数据
*
* @param position
* @param url
* @param bean
...
...
@@ -250,34 +264,35 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param mapHead 是否需要弹窗添加请求头
* @param <T>
*/
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
)
{
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
)
{
getView
().
onShowLoading
();
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数据
*
* @param position
* @param url
* @param bean
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
postBodyData
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
baseBean
,
Object
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
postBodyData
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
baseBean
,
Object
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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数据
*
* @param position
* @param url
* @param bean
...
...
@@ -285,16 +300,22 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param mapHead 是否需要弹窗添加请求头
* @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
)
{
if
(
isShow
&&
getView
()!=
null
)
{
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
)
{
getView
().
onShowLoading
();
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数据
*
* @param baseUrl 域名地址
* @param position
* @param url
...
...
@@ -302,18 +323,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
postBodyData
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
baseBean
,
Class
<?>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
postBodyData
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
baseBean
,
Class
<?>
bean
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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 url
* @param bean
...
...
@@ -321,17 +342,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
getUploadFile
(
int
position
,
String
url
,
Class
<
T
>
bean
,
MultipartBody
.
Part
part
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
getUploadFile
(
int
position
,
String
url
,
Class
<
T
>
bean
,
MultipartBody
.
Part
part
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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 url
* @param bean
...
...
@@ -339,17 +361,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
getUploadFile
(
int
position
,
String
url
,
Class
<
T
>
bean
,
RequestBody
body
,
MultipartBody
.
Part
part
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
getUploadFile
(
int
position
,
String
url
,
Class
<
T
>
bean
,
RequestBody
body
,
MultipartBody
.
Part
part
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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 url
* @param bean
...
...
@@ -357,17 +380,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
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
)
{
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
)
{
getView
().
onShowLoading
();
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 url
* @param bean
...
...
@@ -375,17 +399,18 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @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
)
{
if
(
isShow
&&
getView
()!=
null
)
{
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
)
{
getView
().
onShowLoading
();
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 url
* @param bean
...
...
@@ -393,14 +418,13 @@ public abstract class MvpPresenter<V extends BaseView> extends RetrofitPresenter
* @param isShow 是否需要弹窗
* @param <T>
*/
public
<
T
extends
BaseBean
>
void
getUploadFile
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
bean
,
MultipartBody
.
Part
part
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()!=
null
)
{
public
<
T
extends
BaseBean
>
void
getUploadFile
(
String
baseUrl
,
int
position
,
String
url
,
Class
<
T
>
bean
,
MultipartBody
.
Part
part
,
boolean
isShow
)
{
if
(
isShow
&&
getView
()
!=
null
)
{
getView
().
onShowLoading
();
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
);
}
}
module_discovery/src/main/java/com/xxfc/discovery/api/DiscoveryApi.java
View file @
fd710453
...
...
@@ -3,8 +3,8 @@ package com.xxfc.discovery.api;
import
com.frame.rv.config.RvFrameConfig
;
public
interface
DiscoveryApi
extends
RvFrameConfig
{
String
IMA_BASEUSRL
=
"https://imapi.dfangche.com"
;
//
String IMA_BASEUSRL = "https://xxfcim.upyuns.com/xxfcim";
//
String IMA_BASEUSRL = "https://imapi.dfangche.com";
String
IMA_BASEUSRL
=
"https://xxfcim.upyuns.com/xxfcim"
;
//问题列表
String
DISCOVERY_IMQUESTION_LIST
=
HOST
+
"/api/im/imQuestion/list"
;
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/CompletedFragment.java
View file @
fd710453
...
...
@@ -156,7 +156,7 @@ public class CompletedFragment extends BaseFragment<CommonPresenter> implements
Map
<
String
,
Object
>
mapData
=
new
LinkedHashMap
<>();
mapData
.
put
(
"page"
,
page
);
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
);
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/OrderDetailActivity.java
View file @
fd710453
...
...
@@ -177,7 +177,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
tvPickUpTheCar
.
setText
(
mActivity
.
getString
(
R
.
string
.
rv_return_car
));
break
;
case
6
:
case
7
:
case
-
1
:
if
(
dataBean
.
getType
()
==
3
)
{
tvCancelOrder
.
setVisibility
(
View
.
GONE
);
}
...
...
@@ -281,7 +281,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
startActivity
(
PickUpTheCarQRCodeActivity
.
getIntent
(
mActivity
,
dataBean
));
break
;
case
6
:
case
7
:
case
-
1
:
startActivityForResult
(
EvaluationActivity
.
getIntent
(
mActivity
,
dataBean
),
TYPE_REQUEST_EVALUATION
);
break
;
}
...
...
@@ -300,7 +300,7 @@ public class OrderDetailActivity extends BaseStatusActivity<PickerPresenter> {
startActivity
(
intent
);
break
;
case
6
:
case
7
:
case
-
1
:
startActivity
(
DepositefundProgressDetailsActivity
.
getIntent
(
mActivity
,
no
));
break
;
}
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/CompletedAdapter.java
View file @
fd710453
...
...
@@ -45,7 +45,12 @@ public class CompletedAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
if
(
dataBean
.
getOrderRentVehicleDetail
()
!=
null
&&
dataBean
.
getOrderRentVehicleDetail
().
getStart_city_name
()!=
null
)
{
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
));
}
else
if
(
dataBean
.
getStatusX
()
==-
1
){
helper
.
setText
(
R
.
id
.
tv_order_state
,
"定损中"
);
}
String
icon
=
""
;
if
(!
TextUtils
.
isEmpty
(
dataBean
.
getCoverPic
())){
icon
=
dataBean
.
getCoverPic
();
...
...
module_home/src/main/java/com/rv/home/rv/module/ui/main/home/order/adapter/OrderListAdapter.java
View file @
fd710453
...
...
@@ -75,7 +75,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
4–待出行
5–出行中(进行中)
6–已完成
7
- 定损
-1
- 定损
*/
switch
(
dataBean
.
getStatusX
())
{
case
0
:
...
...
@@ -107,7 +107,7 @@ public class OrderListAdapter extends BaseMultiItemQuickAdapter<MultiItemEntity,
helper
.
setText
(
R
.
id
.
tv_process
,
mContext
.
getString
(
R
.
string
.
rv_to_evaluation
));
helper
.
setVisible
(
R
.
id
.
tv_process
,
true
);
break
;
case
7
:
case
-
1
:
helper
.
setText
(
R
.
id
.
tv_order_state
,
"定损中"
);
helper
.
setVisible
(
R
.
id
.
tv_process
,
false
);
default
:
...
...
plugin_member/src/main/java/com/rv.member/ConsumeRecordActivity.java
View file @
fd710453
...
...
@@ -106,7 +106,7 @@ public class ConsumeRecordActivity extends BaseStatusActivity<CommonPresenter> i
// bodyMap.put("status", "3"); 4567
bodyMap
.
put
(
"hasMemberRight"
,
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
);
}
...
...
plugin_member/src/main/java/com/rv.member/adapter/ConsumeRecordListAdapter.java
View file @
fd710453
...
...
@@ -44,6 +44,8 @@ public class ConsumeRecordListAdapter extends BaseQuickAdapter<OrderListBean.Dat
helper
.
setText
(
R
.
id
.
tv_state
,
"出行中"
);
}
else
if
(
bean
.
getStatusX
()
==
6
)
{
helper
.
setText
(
R
.
id
.
tv_state
,
"已完成"
);
}
else
if
(
bean
.
getStatusX
()
==
-
1
){
helper
.
setText
(
R
.
id
.
tv_state
,
"定损中"
);
}
if
(!
TextUtils
.
isEmpty
(
bean
.
getName
()))
{
helper
.
setText
(
R
.
id
.
tv_car_type
,
bean
.
getName
());
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment