Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
5
51business
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
方斌
51business
Commits
25ef7e0d
Commit
25ef7e0d
authored
Jul 08, 2019
by
李尚科
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://t-git.51gjj.com/fangbin/51business
parents
b6bfce96
f7930abc
Pipeline
#10366
passed with stage
in 4 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
17 additions
and
26 deletions
+17
-26
Export190619.js
app/controller/house/v2/Export190619.js
+1
-1
collection.js
app/service/house/v2/collection.js
+1
-1
foot_print.js
app/service/house/v2/foot_print.js
+14
-23
order.js
app/service/house/v2/order.js
+1
-1
No files found.
app/controller/house/v2/Export190619.js
View file @
25ef7e0d
...
@@ -307,7 +307,7 @@ class Export20190425 extends Controller {
...
@@ -307,7 +307,7 @@ class Export20190425 extends Controller {
user_id
:
list
[
i
].
userId
,
user_id
:
list
[
i
].
userId
,
// app_type_id:list[i].xxx,
// app_type_id:list[i].xxx,
app_user_id
:
list
[
i
].
appUserId
,
app_user_id
:
list
[
i
].
appUserId
,
house_style
:
list
[
i
].
xxx
,
house_style
:
list
[
i
].
houseStyle
,
connect_id
:
list
[
i
].
connectId
,
connect_id
:
list
[
i
].
connectId
,
state
:
list
[
i
].
state
,
state
:
list
[
i
].
state
,
remark
:
list
[
i
].
remark
,
remark
:
list
[
i
].
remark
,
...
...
app/service/house/v2/collection.js
View file @
25ef7e0d
...
@@ -182,7 +182,7 @@ class CollectionService extends Service {
...
@@ -182,7 +182,7 @@ class CollectionService extends Service {
},
},
order
:
[[
'id'
,
'desc'
]]
order
:
[[
'id'
,
'desc'
]]
}
}
let
list
=
await
ctx
.
realestateModel
.
Collection
.
a
ll
(
filter
);
let
list
=
await
ctx
.
realestateModel
.
Collection
.
findA
ll
(
filter
);
let
count
=
0
;
let
count
=
0
;
if
(
list
.
length
>
0
)
{
if
(
list
.
length
>
0
)
{
let
newHouseId
=
[];
let
newHouseId
=
[];
...
...
app/service/house/v2/foot_print.js
View file @
25ef7e0d
...
@@ -132,41 +132,32 @@ class FootPrintService extends Service {
...
@@ -132,41 +132,32 @@ class FootPrintService extends Service {
},
},
order
:
[[
'created_at'
,
'desc'
]]
order
:
[[
'created_at'
,
'desc'
]]
}
}
const
list
=
await
ctx
.
realestateModel
.
FootPrint
.
a
ll
(
filter
);
const
list
=
await
ctx
.
realestateModel
.
FootPrint
.
findA
ll
(
filter
);
let
count
=
0
;
let
count
=
0
;
if
(
list
.
length
>
0
)
{
if
(
list
.
length
>
0
)
{
let
newHouseId
=
[];
let
taskList
=
[];
let
rentalHouseId
=
[];
for
(
let
i
in
list
)
{
for
(
let
i
in
list
)
{
if
(
Number
(
list
[
i
].
house_style
)
===
1
)
{
let
taskFilter
=
{
newHouseId
.
push
(
list
[
i
].
connect_id
);
attributes
:
[
'id'
],
}
if
(
Number
(
list
[
i
].
house_style
)
===
2
)
{
rentalHouseId
.
push
(
list
[
i
].
connect_id
);
}
}
let
newHousefilter
=
{
where
:
{
where
:
{
status
:
'online'
,
status
:
'online'
,
valid
:
1
,
valid
:
1
,
id
:
{
$in
:
newHouseId
},
id
:
list
[
i
].
connect_id
},
}
}
if
(
Number
(
list
[
i
].
house_style
)
===
1
)
{
taskList
[
i
]
=
ctx
.
realestateModel
.
NewHouse
.
one
(
taskFilter
);
}
if
(
Number
(
list
[
i
].
house_style
)
===
2
)
{
taskList
[
i
]
=
ctx
.
realestateModel
.
RentalHouse
.
one
(
taskFilter
);
}
}
let
newHouseCountTask
=
ctx
.
realestateModel
.
NewHouse
.
count
(
newHousefilter
);
let
rentalHousefilter
=
{
where
:
{
status
:
'online'
,
valid
:
1
,
id
:
{
$in
:
rentalHouseId
},
},
}
}
let
rentalHouseCountTask
=
ctx
.
realestateModel
.
RentalHouse
.
count
(
rentalHousefilter
);
const
retList
=
await
Promise
.
all
(
taskList
).
then
(
result
=>
{
const
retList
=
await
Promise
.
all
([
newHouseCountTask
,
rentalHouseCountTask
]).
then
(
result
=>
{
return
result
;
return
result
;
}).
catch
(
error
=>
{
}).
catch
(
error
=>
{
ctx
.
failed
(
error
);
ctx
.
failed
(
error
);
});
});
count
=
Number
(
retList
[
0
])
+
Number
(
retList
[
1
]
);
count
=
Number
(
retList
.
length
);
}
}
let
ret
=
{
let
ret
=
{
count
:
count
count
:
count
...
...
app/service/house/v2/order.js
View file @
25ef7e0d
...
@@ -136,7 +136,7 @@ class OrderService extends Service {
...
@@ -136,7 +136,7 @@ class OrderService extends Service {
},
},
order
:
[[
'id'
,
'desc'
]]
order
:
[[
'id'
,
'desc'
]]
}
}
let
list
=
await
ctx
.
realestateModel
.
Order
.
a
ll
(
filter
);
let
list
=
await
ctx
.
realestateModel
.
Order
.
findA
ll
(
filter
);
let
count
=
0
;
let
count
=
0
;
if
(
list
.
length
>
0
)
{
if
(
list
.
length
>
0
)
{
let
newHouseId
=
[];
let
newHouseId
=
[];
...
...
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