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
deb0a155
Commit
deb0a155
authored
Jun 10, 2020
by
任国军
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix searchClass
parent
e5268415
Pipeline
#24846
passed with stage
in 1 minute 47 seconds
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
2 deletions
+1
-2
institution.js
app/service/course/v5/institution.js
+1
-2
No files found.
app/service/course/v5/institution.js
View file @
deb0a155
...
@@ -396,8 +396,7 @@ class InstitutionSubService extends Service {
...
@@ -396,8 +396,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
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
);
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'
],
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'
],
raw
:
true
});
classList
=
await
this
.
formatClassList
(
classList
);
classList
=
await
this
.
formatClassList
(
classList
);
const
ret
=
{
const
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