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
347ac473
Commit
347ac473
authored
Feb 22, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix onlineCLass bug
parent
8d1b0c34
Pipeline
#19548
passed with stage
in 1 minute 8 seconds
Changes
1
Pipelines
4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
online.js
app/service/course/v4/online.js
+2
-2
No files found.
app/service/course/v4/online.js
View file @
347ac473
...
@@ -106,7 +106,7 @@ class OnlineService extends Service {
...
@@ -106,7 +106,7 @@ class OnlineService extends Service {
const
limit
=
Number
(
input
.
limit
)
||
10
;
const
limit
=
Number
(
input
.
limit
)
||
10
;
const
offset
=
(
page
-
1
)
*
limit
;
const
offset
=
(
page
-
1
)
*
limit
;
const
{
type
,
mode
,
age
,
cat
}
=
input
;
const
{
type
,
mode
,
age
,
cat
}
=
input
;
const
filter
=
{
where
:
{
status
:
'online'
,
is_deleted
:
0
},
order
:
[[
'institution_id'
,
'desc'
]],
limit
,
offset
,
attributes
:
[
'id'
,
'institution_id'
,
'name'
,
'price'
,
'
type'
,
'age'
,
'
mode'
,
'time'
,
'created_time'
]
};
const
filter
=
{
where
:
{
status
:
'online'
,
is_deleted
:
0
},
order
:
[[
'institution_id'
,
'desc'
]],
limit
,
offset
,
attributes
:
[
'id'
,
'institution_id'
,
'name'
,
'price'
,
'mode'
,
'time'
,
'created_time'
]
};
// 年龄段筛选
// 年龄段筛选
let
ids
=
[];
let
ids
=
[];
let
flag
=
false
;
let
flag
=
false
;
...
@@ -285,7 +285,7 @@ class OnlineService extends Service {
...
@@ -285,7 +285,7 @@ class OnlineService extends Service {
const
userCollection
=
await
ctx
.
classModel
.
V4
.
CourseUserCollection
.
findAndCountAll
({
where
:
{
user_uuid
:
userUuid
,
is_deleted
:
0
,
type
:
3
},
raw
:
true
,
limit
,
offset
});
const
userCollection
=
await
ctx
.
classModel
.
V4
.
CourseUserCollection
.
findAndCountAll
({
where
:
{
user_uuid
:
userUuid
,
is_deleted
:
0
,
type
:
3
},
raw
:
true
,
limit
,
offset
});
let
classIds
=
R
.
pluck
(
'type_id'
,
userCollection
.
rows
);
let
classIds
=
R
.
pluck
(
'type_id'
,
userCollection
.
rows
);
const
filter
=
{
where
:
{
id
:
{
$in
:
classIds
},
status
:
'online'
,
is_deleted
:
0
},
order
:
[[
'institution_id'
,
'desc'
]],
limit
,
offset
,
attributes
:
[
'id'
,
'institution_id'
,
'name'
,
'price'
,
'
type'
,
'age'
,
'
mode'
,
'time'
,
'created_time'
]
};
const
filter
=
{
where
:
{
id
:
{
$in
:
classIds
},
status
:
'online'
,
is_deleted
:
0
},
order
:
[[
'institution_id'
,
'desc'
]],
limit
,
offset
,
attributes
:
[
'id'
,
'institution_id'
,
'name'
,
'price'
,
'mode'
,
'time'
,
'created_time'
]
};
const
classes
=
await
ctx
.
classModel
.
V4
.
CourseOnlineClass
.
findAll
(
filter
);
const
classes
=
await
ctx
.
classModel
.
V4
.
CourseOnlineClass
.
findAll
(
filter
);
classIds
=
R
.
pluck
(
'id'
,
classes
);
classIds
=
R
.
pluck
(
'id'
,
classes
);
...
...
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