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
bcf7a71c
Commit
bcf7a71c
authored
Apr 12, 2019
by
Hsinli
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
addd
parent
7581526d
Pipeline
#5937
passed with stage
in 10 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
121 additions
and
3 deletions
+121
-3
collection.js
app/service/house/collection.js
+38
-0
foot_print.js
app/service/house/foot_print.js
+35
-0
mine.js
app/service/house/mine.js
+3
-3
order.js
app/service/house/order.js
+45
-0
No files found.
app/service/house/collection.js
View file @
bcf7a71c
...
...
@@ -170,6 +170,44 @@ class CollectionService extends Service {
}
/**
* 给我的页面使用 只需要count
*/
async
getCollectionCount
()
{
const
{
ctx
,
service
}
=
this
;
if
(
!
ctx
.
userId
)
{
return
{
count
:
0
};
}
let
endDate
=
moment
().
subtract
(
180
,
'days'
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
let
filter
=
{
pageIndex
:
1
,
pageSize
:
50
,
queryConditions
:
[{
key
:
"state"
,
value
:
1
,
operator
:
"equal"
},
{
key
:
"userId"
,
value
:
ctx
.
userId
,
operator
:
"equal"
},
{
key
:
"createdAt"
,
value
:
endDate
,
operator
:
"greater"
},
],
orderConditions
:
[{
key
:
'createdAt'
,
orderSequence
:
'desc'
,
},],
}
let
collectionList
=
await
service
.
houseCommon
.
collection
.
all
(
filter
);
let
ret
=
{
count
:
collectionList
.
rowCount
};
return
ret
;
}
}
module
.
exports
=
CollectionService
;
app/service/house/foot_print.js
View file @
bcf7a71c
...
...
@@ -109,6 +109,41 @@ class FootPrintService extends Service {
}
/**
* 我的-获取用户足迹个数
*/
async
getFootPrintCount
()
{
const
{
ctx
,
service
}
=
this
;
if
(
!
ctx
.
userId
)
{
return
{
count
:
0
};
}
const
filter
=
{
pageIndex
:
1
,
pageSize
:
50
,
queryConditions
:
[{
key
:
"state"
,
value
:
1
,
operator
:
"equal"
},
{
key
:
"userId"
,
value
:
ctx
.
userId
,
operator
:
"equal"
},
],
orderConditions
:
[{
key
:
'createdAt'
,
orderSequence
:
'desc'
,
},],
}
const
foot_prints_results
=
await
service
.
houseCommon
.
footPrint
.
all
(
filter
);
let
ret
=
{
count
:
foot_prints_results
.
rowCount
};
return
ret
;
}
}
module
.
exports
=
FootPrintService
;
app/service/house/mine.js
View file @
bcf7a71c
...
...
@@ -34,9 +34,9 @@ class MineService extends Service {
return
ret
;
}
let
appUserInfo
=
await
this
.
getAppUserInfo
();
let
footPrintList
=
await
service
.
house
.
footPrint
.
getFootPrint
Lis
t
();
let
collectionList
=
await
service
.
house
.
collection
.
getCollection
Lis
t
();
let
orderList
=
await
service
.
house
.
order
.
getOrder
Lis
t
();
let
footPrintList
=
await
service
.
house
.
footPrint
.
getFootPrint
Coun
t
();
let
collectionList
=
await
service
.
house
.
collection
.
getCollection
Coun
t
();
let
orderList
=
await
service
.
house
.
order
.
getOrder
Coun
t
();
let
phone
=
appUserInfo
.
phone
||
''
;
if
(
phone
.
length
>
0
)
{
...
...
app/service/house/order.js
View file @
bcf7a71c
...
...
@@ -60,6 +60,12 @@ class OrderService extends Service {
*/
async
getOrderList
()
{
const
{
ctx
,
service
}
=
this
;
if
(
!
ctx
.
userId
)
{
return
{
results
:
[],
rowCount
:
0
};
}
let
endDate
=
moment
().
subtract
(
180
,
'days'
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
let
filter
=
{
pageIndex
:
1
,
...
...
@@ -126,6 +132,45 @@ class OrderService extends Service {
return
ret
;
}
/**
* 我的-获取预约个数
*/
async
getOrderCount
()
{
const
{
ctx
,
service
}
=
this
;
if
(
!
ctx
.
userId
)
{
return
{
count
:
0
};
}
let
endDate
=
moment
().
subtract
(
180
,
'days'
).
format
(
'YYYY-MM-DD HH:mm:ss'
);
let
filter
=
{
pageIndex
:
1
,
pageSize
:
50
,
queryConditions
:
[{
key
:
"state"
,
value
:
1
,
operator
:
"equal"
},
{
key
:
"userId"
,
value
:
ctx
.
userId
,
operator
:
"equal"
},
{
key
:
"createdAt"
,
value
:
endDate
,
operator
:
"greater"
},
],
orderConditions
:
[{
key
:
'createdAt'
,
orderSequence
:
'desc'
,
},],
}
let
orderList
=
await
service
.
houseCommon
.
order
.
all
(
filter
);
let
ret
=
{
count
:
orderList
.
rowCount
};
return
ret
;
}
}
...
...
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