Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
meibuyu-micro
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
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
without authentication
meibuyu-micro
Commits
06b05c1e
Commit
06b05c1e
authored
Jun 28, 2020
by
王源
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整和子产品rpc服务方法
parent
6251f866
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
75 additions
and
18 deletions
+75
-18
ProductChildServiceInterface.php
...rvice/Interfaces/Product/ProductChildServiceInterface.php
+46
-0
ProductServiceInterface.php
src/Service/Interfaces/Product/ProductServiceInterface.php
+29
-18
No files found.
src/Service/Interfaces/Product/ProductChildServiceInterface.php
View file @
06b05c1e
...
...
@@ -37,4 +37,50 @@ interface ProductChildServiceInterface
*/
public
function
getListBySkuList
(
array
$skuList
,
array
$columns
=
[
'id'
]);
/**
* 获取全部尺码列表
* @param array $columns 默认['id', 'name']
* @return array
*/
public
function
sizes
(
array
$columns
=
[
'id'
,
'name'
])
:
array
;
/**
* 获取全部颜色列表
* @param array $columns 默认['id', 'code', 'cn_name', 'en_name']
* @return array
*/
public
function
colors
(
array
$columns
=
[
'id'
,
'code'
,
'cn_name'
,
'en_name'
])
:
array
;
/**
* 通过id数组获取尺码列表
* @param array $ids 默认去重
* @param array $columns
* @return array 默认keyBY('id')
*/
public
function
getSizesByIds
(
array
$ids
,
$columns
=
[
'id'
,
'name'
])
:
array
;
/**
* 通过id数组获取颜色列表
* @param array $ids 默认去重
* @param array $columns
* @return array 默认keyBY('id')
*/
public
function
getColorsByIds
(
array
$ids
,
array
$columns
=
[
'id'
,
'code'
,
'cn_name'
,
'en_name'
])
:
array
;
/**
* 通过id获取尺码
* @param int $id
* @param array $columns
* @return array|null
*/
public
function
getSizeById
(
int
$id
,
$columns
=
[
'id'
,
'name'
]);
/**
* 通过id获取颜色
* @param int $id
* @param array $columns
* @return array|null
*/
public
function
getColorById
(
int
$id
,
array
$columns
=
[
'id'
,
'code'
,
'cn_name'
,
'en_name'
]);
}
src/Service/Interfaces/Product/ProductServiceInterface.php
View file @
06b05c1e
...
...
@@ -35,20 +35,6 @@ interface ProductServiceInterface
*/
public
function
getByIdList
(
array
$idList
,
array
$relations
=
[],
array
$columns
=
[
'*'
])
:
array
;
/**
* 获取全部尺码列表
* @param array $columns 默认['id', 'name']
* @return array
*/
public
function
sizes
(
array
$columns
=
[
'id'
,
'name'
])
:
array
;
/**
* 获取全部颜色列表
* @param array $columns 默认['id', 'code', 'cn_name', 'en_name']
* @return array
*/
public
function
colors
(
array
$columns
=
[
'id'
,
'code'
,
'cn_name'
,
'en_name'
])
:
array
;
/**
* 获取全部品类列表
* @param bool $asTree 是否作为树返回
...
...
@@ -79,10 +65,35 @@ interface ProductServiceInterface
public
function
ingredients
(
array
$columns
=
[
'id'
,
'name'
,
'en_name'
])
:
array
;
/**
* 获取全部产品状态列表
* @param array $columns 默认['id', 'name']
* @return array
* 通过id数组获取品类列表
* @param array $ids 默认去重
* @param array $columns
* @return array 默认keyBY('id')
*/
public
function
getCategoriesByIds
(
array
$ids
,
array
$columns
=
[
'id'
,
'name'
,
'parent_id'
])
:
array
;
/**
* 通过id数组获取品名列表
* @param array $ids 默认去重
* @param array $columns
* @return array 默认keyBY('id')
*/
public
function
getProductNamesByIds
(
array
$ids
,
array
$columns
=
[
'id'
,
'name'
,
'en_name'
])
:
array
;
/**
* 通过id获取品类
* @param int $id
* @param array $columns
* @return array|null
*/
public
function
getCategoryById
(
int
$id
,
array
$columns
=
[
'id'
,
'name'
,
'parent_id'
]);
/**
* 通过id获取品名
* @param int $id
* @param array $columns
* @return array|null
*/
public
function
productStatus
(
array
$columns
=
[
'id'
,
'name'
])
:
array
;
public
function
getProductNameById
(
int
$id
,
array
$columns
=
[
'id'
,
'name'
,
'en_name'
])
;
}
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