Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
81218644
Commit
81218644
authored
Jul 03, 2020
by
王昆
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
gsb
parent
7e2d88e8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
0 deletions
+20
-0
engine-product/app/base/api/impl/op/action.js
+11
-0
engine-product/app/base/service/impl/product/productSve.js
+9
-0
No files found.
engine-product/app/base/api/impl/op/action.js
View file @
81218644
...
...
@@ -70,6 +70,17 @@ class ActionAPI extends APIBase {
}
result
=
await
this
.
productSve
.
getByIds
(
action_body
.
ids
)
break
;
case
'getMapByIds'
:
{
if
(
!
action_body
.
ids
)
{
return
system
.
getResult
(
null
,
'id列表不能为空'
)
}
let
list
=
await
this
.
productSve
.
getByIds
(
action_body
.
ids
)
||
[];
result
=
{};
for
(
let
item
of
list
)
{
result
[
item
.
id
]
=
item
;
}
break
;
}
case
'getItems'
:
result
=
await
this
.
productSve
.
getItems
(
action_body
.
id
)
break
;
...
...
engine-product/app/base/service/impl/product/productSve.js
View file @
81218644
...
...
@@ -66,6 +66,15 @@ class ProductService extends ServiceBase {
return
result
}
async
getMapByIds
(
params
)
{
if
(
!
params
.
ids
)
{
return
system
.
getResult
(
null
,
'id列表不能为空'
)
}
}
async
getItems
(
id
)
{
const
querys
=
{
where
:
{
parent_id
:
id
},
...
...
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