Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Room Park Android
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
Vladislav Bogdashkin
Room Park Android
Commits
33732db9
Commit
33732db9
authored
Jan 15, 2020
by
Vladislav Bogdashkin
🎣
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
api data updated
parent
38f8b251
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
23 additions
and
23 deletions
+23
-23
EstateRepository.kt
...to/visual/roompark/data/data_provider/EstateRepository.kt
+2
-2
response.kt
...ual/roompark/data/repository/api/retrofit/raw/response.kt
+2
-2
Deal.kt
.../visual/roompark/data/repository/db/requrey/model/Deal.kt
+2
-2
raw2entity.kt
...anto/visual/roompark/data/repository/mapper/raw2entity.kt
+1
-1
deal.kt
...ava/com/biganto/visual/roompark/domain/interactor/deal.kt
+5
-5
deals.kt
...va/com/biganto/visual/roompark/domain/interactor/deals.kt
+4
-4
deals.kt
...in/java/com/biganto/visual/roompark/domain/model/deals.kt
+2
-2
ScreenController.kt
...ual/roompark/presentation/screen/deal/ScreenController.kt
+2
-2
ScreenDI.kt
...anto/visual/roompark/presentation/screen/deal/ScreenDI.kt
+1
-1
ScreenPresenter.kt
...sual/roompark/presentation/screen/deal/ScreenPresenter.kt
+1
-1
ScreenContract.kt
...sual/roompark/presentation/screen/deals/ScreenContract.kt
+1
-1
No files found.
app/src/main/java/com/biganto/visual/roompark/data/data_provider/EstateRepository.kt
View file @
33732db9
...
...
@@ -26,7 +26,7 @@ import javax.inject.Inject
//
const
val
TEST_DEAL_TOKEN
=
"18
5|_Zs1k17uO_Ezn7wqZ8ostl8XJ5_G2rDez3x9F4qxj-do4wV1bxiUfLgOZZMUvc5guXScNN3Dr9yfNEBVvxGkQw
=="
"18
3|iauhqAKpzrex9g1JYFYcp4443_PU5tm8ioce8G-QhtQbjNP-_a8CnW0WBw8O7dj4Rm2xdRGTuqvkfAF2zyMUSg
=="
class
EstateRepository
@Inject
constructor
(
private
val
local
:
ILocalStore
,
...
...
@@ -228,7 +228,7 @@ class EstateRepository @Inject constructor(
override
fun
getDeals
():
Observable
<
List
<
DealModel
>>
{
return
Observable
.
mergeDelayError
(
arrayListOf
(
getDeals
Db
,
getDealsApi
getDeals
Api
,
getDealsDb
)
).
map
{
fromEntity
(
it
,
::
fromEntity
)
}
.
doOnError
(
Timber
::
e
)
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/api/retrofit/raw/response.kt
View file @
33732db9
...
...
@@ -16,8 +16,8 @@ data class AuthRaw(
data class
StatusResponse
(
val
status
:
String
)
data class
DealRaw
(
val
id
:
Int
,
val
estate_id
:
Int
,
val
id
:
String
,
val
estate_id
:
String
,
val
opportunity_sum
:
Int
,
val
payment_sum
:
Int
,
val
amount_pay_sum
:
Int
,
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/db/requrey/model/Deal.kt
View file @
33732db9
...
...
@@ -10,8 +10,8 @@ import io.requery.*
interface
Deal
:
Persistable
{
@get
:
Key
val
id
:
Int
val
estateCrmId
:
Int
val
id
:
String
val
estateCrmId
:
String
val
opportunitySum
:
Int
val
paymentSum
:
Int
val
amountPaySum
:
Int
...
...
app/src/main/java/com/biganto/visual/roompark/data/repository/mapper/raw2entity.kt
View file @
33732db9
...
...
@@ -108,13 +108,13 @@ fun fromRaw(raw:DealRaw):DealEntity {
entity
.
setAmountPaySum
(
raw
.
amount_pay_sum
)
entity
.
setStatusId
(
raw
.
status_id
)
entity
.
setManagerName
(
raw
.
manager
)
entity
.
estate
=
fromRaw
(
raw
.
estate
)
return
entity
}
fun
fromRaw
(
raw
:
DealRaw
,
user
:
UserEntity
):
DealEntity
{
val
entity
=
fromRaw
(
raw
)
entity
.
estate
=
fromRaw
(
raw
.
estate
)
entity
.
user
=
user
return
entity
}
...
...
app/src/main/java/com/biganto/visual/roompark/domain/interactor/deal.kt
View file @
33732db9
...
...
@@ -13,7 +13,7 @@ class DealInteractor @Inject constructor(
val
useCase
:
DealContract
){
fun
getDeal
(
id
:
Int
):
Observable
<
DealModel
>
=
fun
getDeal
(
id
:
String
):
Observable
<
DealModel
>
=
useCase
.
getDeals
()
.
map
{
it
.
first
{
it
.
id
==
id
}
}
...
...
@@ -198,8 +198,8 @@ class DealInteractor @Inject constructor(
type
=
"flat"
,
url
=
"https://stage.room-park.ru:38386/choose/flat/1/14/1086/"
),
estate_id
=
2156
,
id
=
1562623
,
estate_id
=
"2156"
,
id
=
"1562623"
,
managerName
=
"\u0411\u043e\u0441\u043e\u0432\u0430, \u0418\u0440\u0438\u043d\u0430"
,
opportunitySum
=
5035860
,
paymentSum
=
500000
,
...
...
@@ -307,8 +307,8 @@ class DealInteractor @Inject constructor(
type
=
"flat"
,
url
=
"https://stage.room-park.ru:38386/choose/flat/1/2/88/"
),
estate_id
=
6222
,
id
=
42341
,
estate_id
=
"6222"
,
id
=
"42341"
,
managerName
=
"Босова, Ирина"
,
opportunitySum
=
5618160
,
paymentSum
=
500000
,
...
...
app/src/main/java/com/biganto/visual/roompark/domain/interactor/deals.kt
View file @
33732db9
...
...
@@ -195,8 +195,8 @@ class DealsInteractor @Inject constructor(
type
=
"flat"
,
url
=
"https://stage.room-park.ru:38386/choose/flat/1/14/1086/"
),
estate_id
=
1425
,
id
=
4621213
,
estate_id
=
"1425"
,
id
=
"4621213"
,
managerName
=
"\u0411\u043e\u0441\u043e\u0432\u0430, \u0418\u0440\u0438\u043d\u0430"
,
opportunitySum
=
5035860
,
paymentSum
=
500000
,
...
...
@@ -304,8 +304,8 @@ class DealsInteractor @Inject constructor(
type
=
"flat"
,
url
=
"https://stage.room-park.ru:38386/choose/flat/1/2/88/"
),
estate_id
=
1231
,
id
=
42342342
,
estate_id
=
"1231"
,
id
=
"42342342"
,
managerName
=
"Босова, Ирина"
,
opportunitySum
=
5618160
,
paymentSum
=
500000
,
...
...
app/src/main/java/com/biganto/visual/roompark/domain/model/deals.kt
View file @
33732db9
...
...
@@ -21,8 +21,8 @@ data class StatusModel(
)
data class
DealModel
(
val
id
:
Int
,
val
estate_id
:
Int
,
val
id
:
String
,
val
estate_id
:
String
,
val
opportunitySum
:
Int
,
val
paymentSum
:
Int
,
val
amount_pay_sum
:
Int
,
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenController.kt
View file @
33732db9
...
...
@@ -33,7 +33,7 @@ class DealScreenController :
constructor
(
args
:
Bundle
):
super
(
args
)
constructor
(
id
:
Int
)
:
super
(
bundleOf
(
SELECTED_DEAL_ID_KEY
to
id
))
constructor
(
id
:
String
)
:
super
(
bundleOf
(
SELECTED_DEAL_ID_KEY
to
id
))
override
fun
injectDependencies
()
{
getComponent
()
...
...
@@ -161,7 +161,7 @@ class DealScreenController :
private
fun
getComponent
()
=
DaggerDealScreenComponent
.
factory
()
.
create
(
RoomParkApplication
.
component
,
activity
as
RoomParkMainActivity
,
args
.
get
Int
(
SELECTED_DEAL_ID_KEY
)
,
args
.
get
String
(
SELECTED_DEAL_ID_KEY
)
?:
error
(
"Deal id not found!"
)
)
.
inject
(
this
)
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenDI.kt
View file @
33732db9
...
...
@@ -22,7 +22,7 @@ interface DealScreenComponent {
fun
create
(
appComponent
:
AppComponent
,
@BindsInstance
activity
:
RoomParkMainActivity
,
@BindsInstance
@Named
(
SELECTED_DEAL_ID_KEY
)
selectedDealId
:
Int
,
@BindsInstance
@Named
(
SELECTED_DEAL_ID_KEY
)
selectedDealId
:
String
):
DealScreenComponent
}
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deal/ScreenPresenter.kt
View file @
33732db9
...
...
@@ -22,7 +22,7 @@ import javax.inject.Named
class
DealScreenPresenter
@Inject
constructor
(
private
val
interactor
:
DealInteractor
,
private
val
context
:
Context
,
@Named
(
SELECTED_DEAL_ID_KEY
)
private
val
dealId
:
Int
@Named
(
SELECTED_DEAL_ID_KEY
)
private
val
dealId
:
String
)
:
BigantoBasePresenter
<
DealScreen
,
DealScreenViewState
>()
{
...
...
app/src/main/java/com/biganto/visual/roompark/presentation/screen/deals/ScreenContract.kt
View file @
33732db9
...
...
@@ -13,7 +13,7 @@ interface DealsScreen : BigantoBaseContract<DealsScreenViewState> {
data class
DealPreviewModel
(
val
id
:
Int
,
val
id
:
String
,
val
type
:
String
,
val
name
:
String
,
val
building
:
Int
?,
...
...
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