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
0af237e9
Commit
0af237e9
authored
Sep 07, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix search response & option_age
parent
ff485a56
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
institution.js
app/service/course/v5/institution.js
+1
-1
option.js
app/service/course/v5/option.js
+1
-1
No files found.
app/service/course/v5/institution.js
View file @
0af237e9
...
...
@@ -454,7 +454,7 @@ class InstitutionSubService extends Service {
// 先查询机构名称的
const
institutionList
=
await
ctx
.
classModel
.
V5
.
CourseV5Institution
.
findAll
({
where
:
{
name
:
{
$like
:
`%
${
word
}
%`
},
status
:
1
,
is_deleted
:
0
},
attributes
:
[
'id'
,
'name'
],
raw
:
true
});
const
institutionIds
=
R
.
pluck
(
'id'
,
institutionList
);
let
classList
=
await
ctx
.
classModel
.
V5
.
CourseV5Class
.
findAll
({
where
:
{
$or
:
[{
name
:
{
$like
:
`%
${
word
}
%`
}
},
{
institution_id
:
{
$in
:
institutionIds
}
}],
status
:
1
,
is_deleted
:
0
},
attributes
:
[
'id'
,
'name'
,
'logo'
,
'price_type'
,
'mode'
,
'price'
,
'age'
,
'institution_id'
,
'pay_count'
],
order
:
[[
'sort'
,
'asc'
]],
raw
:
true
});
let
classList
=
await
ctx
.
classModel
.
V5
.
CourseV5Class
.
findAll
({
where
:
{
$or
:
[{
name
:
{
$like
:
`%
${
word
}
%`
}
},
{
institution_id
:
{
$in
:
institutionIds
}
}],
status
:
1
,
is_deleted
:
0
},
attributes
:
[
'id'
,
'name'
,
'logo'
,
'price_type'
,
'mode'
,
'price'
,
'age'
,
'institution_id'
,
'pay_count'
,
'multi_classes'
,
'sub_title'
],
order
:
[[
'sort'
,
'asc'
]],
raw
:
true
});
classList
=
await
this
.
formatClassList
(
classList
);
const
ret
=
{
...
...
app/service/course/v5/option.js
View file @
0af237e9
...
...
@@ -68,7 +68,7 @@ class OptionService extends Service {
ageList
.
forEach
(
e
=>
{
e
.
value
=
e
.
id
;
});
ageList
.
unshift
({
id
:
0
,
name
:
'全
部
'
,
value
:
0
});
ageList
.
unshift
({
id
:
0
,
name
:
'全
年级
'
,
value
:
0
});
// // 课程班型
// const typeList = await ctx.classModel.V5.CourseV5Type.findAll({ where: { status: 1, is_deleted: 0 }, order: [ ['sort', 'asc'] ], attributes: [ 'id', 'name' ], raw: true });
// typeList.forEach(e => {
...
...
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