Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
ShenghuoquanBusiness
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
0
Merge Requests
0
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
bp
ShenghuoquanBusiness
Commits
01a9b9bb
Commit
01a9b9bb
authored
Sep 14, 2021
by
chengkun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
order_item_list -> merger_order_item_list
parent
44f6c7ae
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
11 deletions
+19
-11
OrderListAdapter.kt
...idian/shenghuoquan/buserorder/adapter/OrderListAdapter.kt
+16
-10
OrderWebData.kt
...va/com/yidian/shenghuoquan/buserorder/dto/OrderWebData.kt
+3
-1
No files found.
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/adapter/OrderListAdapter.kt
View file @
01a9b9bb
...
@@ -40,7 +40,7 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
...
@@ -40,7 +40,7 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
}
}
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_market_name
).
text
=
data
.
marketing_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_market_name
).
text
=
data
.
marketing_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_pay_status
).
text
=
data
.
online_status
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_pay_status
).
text
=
data
.
online_status
when
(
data
.
order_item_list
.
size
)
{
when
(
data
.
merge_
order_item_list
.
size
)
{
0
->
{
0
->
{
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image1
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image1
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
...
@@ -50,8 +50,8 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
...
@@ -50,8 +50,8 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image2
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
))
{
if
(
Utils
.
isWebUrl
(
data
.
merge_
order_item_list
[
0
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
merge_
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
}
}
...
@@ -60,11 +60,13 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
...
@@ -60,11 +60,13 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
holder
.
itemView
.
findViewById
<
LinearLayout
>(
R
.
id
.
ll_order_image3
).
visibility
=
View
.
GONE
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
1
].
desc_pic_url
))
{
if
(
Utils
.
isWebUrl
(
data
.
merge_order_item_list
[
0
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
merge_
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
1
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
}
if
(
Utils
.
isWebUrl
(
data
.
merge_order_item_list
[
1
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
merge_order_item_list
[
1
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
}
}
...
@@ -73,14 +75,18 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
...
@@ -73,14 +75,18 @@ class OrderListAdapter : BaseQuickAdapter<OrderWebData, BaseViewHolder>(R.layout
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog1_name
).
text
=
data
.
order_item_list
[
0
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_goog2_name
).
text
=
data
.
order_item_list
[
1
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_good3_name
).
text
=
data
.
order_item_list
[
2
].
goods_name
holder
.
itemView
.
findViewById
<
TextView
>(
R
.
id
.
tv_good3_name
).
text
=
data
.
order_item_list
[
2
].
goods_name
if
(
Utils
.
isWebUrl
(
data
.
order_item_list
[
0
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
1
].
desc_pic_url
)
&&
Utils
.
isWebUrl
(
data
.
order_item_list
[
2
].
desc_pic_url
))
{
if
(
Utils
.
isWebUrl
(
data
.
merge_order_item_list
[
0
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
merge_
order_item_list
[
0
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image1
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
1
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
}
if
(
Utils
.
isWebUrl
(
data
.
merge_order_item_list
[
1
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
merge_order_item_list
[
1
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image2
))
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
order_item_list
[
2
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
}
if
(
Utils
.
isWebUrl
(
data
.
merge_order_item_list
[
2
].
desc_pic_url
))
{
Glide
.
with
(
context
).
load
(
Uri
.
parse
(
data
.
merge_order_item_list
[
2
].
desc_pic_url
)).
apply
(
RequestOptions
().
transform
(
CenterCrop
(),
RoundedCorners
(
CenterCrop
(),
RoundedCorners
(
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image3
))
DensityUtil
.
dp2px
(
roundRadus
)))).
into
(
holder
.
itemView
.
findViewById
(
R
.
id
.
round_image3
))
}
}
...
...
Components/BUserOrder/src/main/java/com/yidian/shenghuoquan/buserorder/dto/OrderWebData.kt
View file @
01a9b9bb
...
@@ -71,7 +71,9 @@ data class MergeOrderItem(
...
@@ -71,7 +71,9 @@ data class MergeOrderItem(
@SerializedName
(
value
=
"goods_num"
)
@SerializedName
(
value
=
"goods_num"
)
val
goods_num
:
Int
,
val
goods_num
:
Int
,
@SerializedName
(
value
=
"price"
)
@SerializedName
(
value
=
"price"
)
val
price
:
Double
val
price
:
Double
,
@SerializedName
(
value
=
"desc_pic_url"
)
var
desc_pic_url
:
String
?
=
null
)
)
data class
OrderItem
(
data class
OrderItem
(
...
...
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