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
e6c1a245
Commit
e6c1a245
authored
Jul 20, 2019
by
linfeng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱包
parent
dd0b84c2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
45 additions
and
155 deletions
+45
-155
build.gradle
RvClient/build.gradle
+2
-2
WalletActivity.java
...rc/main/java/com/xxrv/wallet/activity/WalletActivity.java
+15
-2
WalletBean.java
...wallet/src/main/java/com/xxrv/wallet/bean/WalletBean.java
+28
-151
No files found.
RvClient/build.gradle
View file @
e6c1a245
...
...
@@ -8,8 +8,8 @@ android {
minSdkVersion
rootProject
.
ext
.
minSdkVersion
targetSdkVersion
rootProject
.
ext
.
targetSdkVersion
versionCode
11
3
versionName
"1.1.
3
"
versionCode
11
4
versionName
"1.1.
4
"
multiDexEnabled
true
//新版Gradle 是 implementation 为了兼容compile,写上这句话
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/activity/WalletActivity.java
View file @
e6c1a245
...
...
@@ -51,13 +51,26 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
@Override
public
void
onShowResult
(
int
requestType
,
BaseBean
result
)
{
switch
(
requestType
){
case
0
:
setWalletData
((
WalletBean
)
result
);
break
;
}
}
private
void
setWalletData
(
WalletBean
bean
)
{
if
(
bean
!=
null
&&
bean
.
getData
()
!=
null
){
tvWalletBalance
.
setText
(
"¥"
+
bean
.
getData
().
getBalance
());
tvTodayAmount
.
setText
(
bean
.
getData
().
getTodayAmount
());
tvTotalAmount
.
setText
(
bean
.
getData
().
getTotalAmount
());
tvNotAmount
.
setText
(
bean
.
getData
().
getUnbooked
());
}
}
@Override
protected
void
loadData
(
Bundle
savedInstanceState
,
Intent
intent
)
{
super
.
loadData
(
savedInstanceState
,
intent
);
getWalletList
();
}
...
...
@@ -68,7 +81,7 @@ public class WalletActivity extends BaseStatusActivity<WalletPresenter> {
Map
<
String
,
Object
>
headMap
=
new
LinkedHashMap
<>();
if
(
OkGoUtil
.
getToken
()
!=
null
)
headMap
.
put
(
"Authorization"
,
OkGoUtil
.
getToken
());
mPresenter
.
getDataHead
(
RvFrameConfig
.
ADMIN_P
OST
,
0
,
WalletApi
.
HTTP_URL_ADMIN_WALLET
,
WalletBean
.
class
,
headMap
,
true
);
mPresenter
.
getDataHead
(
RvFrameConfig
.
H
OST
,
0
,
WalletApi
.
HTTP_URL_ADMIN_WALLET
,
WalletBean
.
class
,
headMap
,
true
);
}
...
...
plugin_wallet/src/main/java/com/xxrv/wallet/bean/WalletBean.java
View file @
e6c1a245
package
com
.
xxrv
.
wallet
.
bean
;
import
com.chad.library.adapter.base.entity.MultiItemEntity
;
import
com.ruiwenliu.wrapper.base.BaseBean
;
import
java.io.Serializable
;
import
java.util.List
;
/**
* 钱包
...
...
@@ -13,14 +10,14 @@ import java.util.List;
public
class
WalletBean
extends
BaseBean
{
private
DataBean
X
data
;
private
DataBean
data
;
private
boolean
rel
;
public
DataBean
X
getData
()
{
public
DataBean
getData
()
{
return
data
;
}
public
void
setData
(
DataBean
X
data
)
{
public
void
setData
(
DataBean
data
)
{
this
.
data
=
data
;
}
...
...
@@ -32,171 +29,51 @@ public class WalletBean extends BaseBean {
this
.
rel
=
rel
;
}
public
static
class
DataBeanX
{
private
int
totalCount
;
private
int
totalPage
;
private
int
pageNum
;
private
int
pageSize
;
private
List
<
DataBean
>
data
;
public
int
getTotalCount
()
{
return
totalCount
;
}
public
void
setTotalCount
(
int
totalCount
)
{
this
.
totalCount
=
totalCount
;
}
public
int
getTotalPage
()
{
return
totalPage
;
}
public
void
setTotalPage
(
int
totalPage
)
{
this
.
totalPage
=
totalPage
;
}
public
int
getPageNum
()
{
return
pageNum
;
}
public
void
setPageNum
(
int
pageNum
)
{
this
.
pageNum
=
pageNum
;
}
public
int
getPageSize
()
{
return
pageSize
;
}
public
void
setPageSize
(
int
pageSize
)
{
this
.
pageSize
=
pageSize
;
}
public
List
<
DataBean
>
getData
()
{
return
data
;
}
public
void
setData
(
List
<
DataBean
>
data
)
{
this
.
data
=
data
;
}
public
static
class
DataBean
implements
MultiItemEntity
,
Serializable
{
private
String
id
;
private
int
userId
;
private
int
type
;
//1 租车 2 旅游
private
String
typeId
;
private
String
name
;
private
String
cover
;
private
double
price
;
private
String
unit
;
private
long
crtTime
;
private
long
updTime
;
private
int
status
;
private
int
isDel
;
@Override
public
int
getItemType
()
{
return
type
;
}
public
String
getId
()
{
return
id
;
}
public
void
setId
(
String
id
)
{
this
.
id
=
id
;
}
public
static
class
DataBean
implements
Serializable
{
private
String
userId
;
// ": 78, 用户id
private
String
balance
;
// ": 0.20, 余额
private
String
totalAmount
;
// ": 0.20, 总收益
private
String
todayAmount
;
// ": 0.20 今日收益
private
String
unbooked
;
//未入账(元)
public
int
getUserId
()
{
public
String
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
int
userId
)
{
public
void
setUserId
(
String
userId
)
{
this
.
userId
=
userId
;
}
public
int
getType
()
{
return
type
;
}
public
void
setType
(
int
type
)
{
this
.
type
=
type
;
}
public
String
getTypeId
()
{
return
typeId
;
}
public
void
setTypeId
(
String
typeId
)
{
this
.
typeId
=
typeId
;
}
public
String
getName
()
{
return
name
;
}
public
void
setName
(
String
name
)
{
this
.
name
=
name
;
}
public
String
getCover
()
{
return
cover
;
}
public
void
setCover
(
String
cover
)
{
this
.
cover
=
cover
;
}
public
double
getPrice
()
{
return
price
;
}
public
void
setPrice
(
double
price
)
{
this
.
price
=
price
;
public
String
getBalance
()
{
return
balance
;
}
public
String
getUnit
(
)
{
return
unit
;
public
void
setBalance
(
String
balance
)
{
this
.
balance
=
balance
;
}
public
void
setUnit
(
String
unit
)
{
this
.
unit
=
uni
t
;
public
String
getTotalAmount
(
)
{
return
totalAmoun
t
;
}
public
long
getCrtTime
(
)
{
return
crtTime
;
public
void
setTotalAmount
(
String
totalAmount
)
{
this
.
totalAmount
=
totalAmount
;
}
public
void
setCrtTime
(
long
crtTime
)
{
this
.
crtTime
=
crtTime
;
public
String
getTodayAmount
(
)
{
return
todayAmount
;
}
public
long
getUpdTime
(
)
{
return
updTime
;
public
void
setTodayAmount
(
String
todayAmount
)
{
this
.
todayAmount
=
todayAmount
;
}
public
void
setUpdTime
(
long
updTime
)
{
this
.
updTime
=
updTime
;
public
String
getUnbooked
(
)
{
return
unbooked
;
}
public
int
getStatus
()
{
return
status
;
}
public
void
setStatus
(
int
status
)
{
this
.
status
=
status
;
}
public
int
getIsDel
()
{
return
isDel
;
}
public
void
setIsDel
(
int
isDel
)
{
this
.
isDel
=
isDel
;
}
public
void
setUnbooked
(
String
unbooked
)
{
this
.
unbooked
=
unbooked
;
}
}
}
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