Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lib_base
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
sikang
lib_base
Commits
ce17ec10
Commit
ce17ec10
authored
Jun 16, 2020
by
sikang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
123
parent
216d5658
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
19 deletions
+19
-19
src/main/java/tech/starwin/mvp/presenter/LoanPresenter.java
+3
-3
src/main/java/tech/starwin/mvp/presenter/UploadPresenter.java
+5
-5
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
+11
-11
No files found.
src/main/java/tech/starwin/mvp/presenter/LoanPresenter.java
View file @
ce17ec10
...
@@ -70,7 +70,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
...
@@ -70,7 +70,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
* 获取贷款记录
* 获取贷款记录
*/
*/
public
void
getLoanHistory
(
String
action
)
{
public
void
getLoanHistory
(
String
action
)
{
handleRequest
(
getApiService
().
getLoanAppAll
(),
new
HttpObserver
<
List
<
HistoryLoanAppInfoBean
>>()
{
handleRequest
(
getApiService
().
getLoanAppAll
(),
new
HttpObserver
<
List
<
HistoryLoanAppInfoBean
>>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -98,7 +98,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
...
@@ -98,7 +98,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
* 取消贷款
* 取消贷款
*/
*/
public
void
cancelLoan
(
String
action
,
String
loanAppId
)
{
public
void
cancelLoan
(
String
action
,
String
loanAppId
)
{
handleRequest
(
getApiService
().
cancelLoan
(
loanAppId
),
new
HttpObserver
<
ResponseBody
>()
{
handleRequest
(
getApiService
().
cancelLoan
(
loanAppId
),
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -155,7 +155,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
...
@@ -155,7 +155,7 @@ public class LoanPresenter extends BasePresenter<LoanApi> {
"ANDROID"
,
"ANDROID"
,
loanInfo
.
getCouponId
());
loanInfo
.
getCouponId
());
handleRequest
(
observable
,
new
HttpObserver
<
ResponseBody
>()
{
handleRequest
(
observable
,
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
...
src/main/java/tech/starwin/mvp/presenter/UploadPresenter.java
View file @
ce17ec10
...
@@ -69,7 +69,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
...
@@ -69,7 +69,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
*/
*/
private
void
identityOcr
(
final
String
action
,
MultipartBody
.
Part
filePart
)
{
private
void
identityOcr
(
final
String
action
,
MultipartBody
.
Part
filePart
)
{
handleRequest
(
getApiService
().
identityOcr
(
filePart
),
handleRequest
(
getApiService
().
identityOcr
(
filePart
),
new
HttpObserver
<
OcrResultBean
>()
{
new
HttpObserver
<
OcrResultBean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -143,7 +143,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
...
@@ -143,7 +143,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
!
TextUtils
.
isEmpty
(
LibConfig
.
TONGDUN_PARENT_KEY
),
!
TextUtils
.
isEmpty
(
LibConfig
.
TONGDUN_PARENT_KEY
),
method
method
),
),
new
HttpObserver
<
BasicAck
>()
{
new
HttpObserver
<
BasicAck
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -181,7 +181,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
...
@@ -181,7 +181,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
.
take
(
1
);
.
take
(
1
);
handleRequest
(
observable
,
new
HttpObserver
<
BasicAck
>()
{
handleRequest
(
observable
,
new
HttpObserver
<
BasicAck
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -282,7 +282,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
...
@@ -282,7 +282,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
})
})
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
onErrorReturn
(
throwable
->
false
)
.
onErrorReturn
(
throwable
->
false
)
.
subscribe
(
new
HttpObserver
<
Boolean
>()
{
.
subscribe
(
new
HttpObserver
<
Boolean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
//从采集数据开始loading
//从采集数据开始loading
...
@@ -339,7 +339,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
...
@@ -339,7 +339,7 @@ public class UploadPresenter extends BasePresenter<UploadApi> {
})
})
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
onErrorReturn
(
throwable
->
false
)
.
onErrorReturn
(
throwable
->
false
)
.
subscribe
(
new
HttpObserver
<
Boolean
>()
{
.
subscribe
(
new
HttpObserver
<
Boolean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
//从采集数据开始loading
//从采集数据开始loading
...
...
src/main/java/tech/starwin/mvp/presenter/UserPresenter.java
View file @
ce17ec10
...
@@ -116,7 +116,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -116,7 +116,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
})
})
.
take
(
1
)
.
take
(
1
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribe
(
new
HttpObserver
<
GatewayInfoBean
>()
{
.
subscribe
(
new
HttpObserver
<
GatewayInfoBean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
if
(
view
!=
null
)
{
if
(
view
!=
null
)
{
...
@@ -212,7 +212,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -212,7 +212,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
return
getApiService
().
getUserInfo
();
return
getApiService
().
getUserInfo
();
}
}
}),
}),
new
HttpObserver
<
UserBean
>()
{
new
HttpObserver
<
UserBean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -246,7 +246,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -246,7 +246,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
* 获取用户信息
* 获取用户信息
*/
*/
public
void
getUserInfo
(
final
String
action
)
{
public
void
getUserInfo
(
final
String
action
)
{
handleRequest
(
getApiService
().
getUserInfo
(),
new
HttpObserver
<
UserBean
>()
{
handleRequest
(
getApiService
().
getUserInfo
(),
new
HttpObserver
<
UserBean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
}
}
...
@@ -311,7 +311,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -311,7 +311,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
* 活动中心数据
* 活动中心数据
*/
*/
public
void
trackEvent
(
String
type
,
String
action
,
String
event
)
{
public
void
trackEvent
(
String
type
,
String
action
,
String
event
)
{
handleRequest
(
getApiService
().
trackEvent
(
type
,
action
,
event
),
new
HttpObserver
<
ResponseBody
>()
{
handleRequest
(
getApiService
().
trackEvent
(
type
,
action
,
event
),
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
...
@@ -361,7 +361,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -361,7 +361,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
return
getApiService
().
getUserInfo
();
return
getApiService
().
getUserInfo
();
}
}
}),
}),
new
HttpObserver
<
UserBean
>()
{
new
HttpObserver
<
UserBean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -540,7 +540,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -540,7 +540,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
personalInfo
.
getFacebookId
(),
personalInfo
.
getFacebookId
(),
personalInfo
.
getWhatsappId
());
personalInfo
.
getWhatsappId
());
handleRequest
(
observable
,
new
HttpObserver
<
ResponseBody
>()
{
handleRequest
(
observable
,
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -570,7 +570,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -570,7 +570,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
*/
*/
public
void
submitContactInfo
(
String
action
,
String
parentName
,
String
parentPhone
,
String
friendName
,
String
friendPhone
)
{
public
void
submitContactInfo
(
String
action
,
String
parentName
,
String
parentPhone
,
String
friendName
,
String
friendPhone
)
{
handleRequest
(
getApiService
().
submitContactInfo
(
parentName
,
parentPhone
,
friendName
,
friendPhone
,
LoginManager
.
get
().
getToken
()),
handleRequest
(
getApiService
().
submitContactInfo
(
parentName
,
parentPhone
,
friendName
,
friendPhone
,
LoginManager
.
get
().
getToken
()),
new
HttpObserver
<
ResponseBody
>()
{
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -599,7 +599,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -599,7 +599,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
handleRequest
(
getApiService
().
submitContactInfo
(
contactInfo
.
getParentId
(),
contactInfo
.
getParentName
(),
contactInfo
.
getParentMobile
(),
contactInfo
.
getParentType
(),
handleRequest
(
getApiService
().
submitContactInfo
(
contactInfo
.
getParentId
(),
contactInfo
.
getParentName
(),
contactInfo
.
getParentMobile
(),
contactInfo
.
getParentType
(),
contactInfo
.
getFriendId
(),
contactInfo
.
getFriendName
(),
contactInfo
.
getFriendMobile
(),
contactInfo
.
getFriendType
(),
contactInfo
.
getFriendId
(),
contactInfo
.
getFriendName
(),
contactInfo
.
getFriendMobile
(),
contactInfo
.
getFriendType
(),
contactInfo
.
getFriendId1
(),
contactInfo
.
getFriendName1
(),
contactInfo
.
getFriendMobile1
(),
contactInfo
.
getFriendType1
()),
contactInfo
.
getFriendId1
(),
contactInfo
.
getFriendName1
(),
contactInfo
.
getFriendMobile1
(),
contactInfo
.
getFriendType1
()),
new
HttpObserver
<
ResponseBody
>()
{
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -693,7 +693,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -693,7 +693,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
}
}
}));
}));
}
else
{
}
else
{
handleRequest
(
info
,
new
HttpObserver
<
ResponseBody
>()
{
handleRequest
(
info
,
new
HttpObserver
<
ResponseBody
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
@@ -723,7 +723,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -723,7 +723,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
* 客户服务热线、公司介绍
* 客户服务热线、公司介绍
*/
*/
public
void
getCustomerMsg
(
String
action
)
{
public
void
getCustomerMsg
(
String
action
)
{
handleRequest
(
getApiService
().
display
(),
new
HttpObserver
<
DisplayBean
>()
{
handleRequest
(
getApiService
().
display
(),
new
HttpObserver
<
DisplayBean
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
false
);
view
.
onHttpStart
(
action
,
false
);
...
@@ -801,7 +801,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
...
@@ -801,7 +801,7 @@ public class UserPresenter extends BasePresenter<UserApi> {
* 获取联系人信息
* 获取联系人信息
*/
*/
public
void
submitContactList
(
String
action
,
List
<
ContactBean
>
contactBeans
)
{
public
void
submitContactList
(
String
action
,
List
<
ContactBean
>
contactBeans
)
{
handleRequest
(
getApiService
().
submitContactList
(
contactBeans
),
new
HttpObserver
<
BasicAck
>()
{
handleRequest
(
getApiService
().
submitContactList
(
contactBeans
),
new
HttpObserver
<
BasicAck
>(
action
)
{
@Override
@Override
public
void
onStart
()
{
public
void
onStart
()
{
view
.
onHttpStart
(
action
,
true
);
view
.
onHttpStart
(
action
,
true
);
...
...
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