1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
<?php
/**
* Created by PhpStorm.
* User: 王源
* Date: 2020/1/9
* Time: 15:07
*/
namespace Meibuyu\Micro\Service\Interfaces;
interface ProductServiceInterface
{
/**
* 获取单个数据
* @param int $id 产品id
* @param array $relations 产品的关联关系,支持:["brand","category","ingredient","product_name","status","type","images","price_info","product_children"]
* @return array
*/
public function get($id, array $relations = []): array;
/**
* 通过id列表获取产品数组
* @param array $idList 产品id的列表
* @param array $relations 产品的关联关系,支持["brand","category","ingredient","product_name","status","type","images","price_info","product_children"]
* @param array $columns 产品表的字段,默认显示全部
* @return array
*/
public function getByIdList(array $idList, array $relations = [], array $columns = ['*']): array;
/**
* 通过产品列表
* @param int $page 第几页数据,默认:1
* @param array $relations 产品的关联关系,支持["brand","category","ingredient","product_name","status","type","images","price_info","product_children"]
* @param int $pageSize 每页产品数默认:15,最大支持100
* @param array $columns 产品表的字段,默认显示全部
* @return array
*/
public function list($page = 1, array $relations = [], $pageSize = 15, array $columns = ['*']): array;
/**
* 获取某个产品的子产品,包含颜色和尺码
* @param int $productId 产品编号
* @return array
*/
public function getProductChildren($productId): array;
/** 获取某个产品的平台产品,包含颜色和尺码
* @param int $productId 产品编号
* @param int $site_id 站点id,可选,默认为空
* @return array
*/
public function getPlatformProduct($productId, $site_id = null): array;
/**
* 获取平台产品的子产品
* @param int $platformProductId 平台产品id
* @return array
*/
public function getPlatformProductChildren($platformProductId): array;
/**
* 获取某个站点的所有平台产品
* @param int $site_id 站点id
* @param int $page 第几页数据,默认:1
* @param array $relations 平台产品的关联关系,支持["product","amazon_warehouse","platform_product_images","platform_product_children"]
* @param int $pageSize 每页列表数默认:15,最大支持100
* @param array $columns 平台产品表的字段,默认显示全部
* @return array
*/
public function getPlatformProductListBySite($site_id, $page = 1, array $relations = [], $pageSize = 15, array $columns = ['*']): array;
/**
* 获取全部尺码列表
* @return array
*/
public function sizes(): array;
/**
* 获取全部颜色列表
* @return array
*/
public function colors(): array;
/**
* 获取全部品类列表
* @return array
*/
public function categories(): array;
/**
* 获取全部品牌列表
* @return array
*/
public function brands(): array;
/**
* 获取全部报关品名列表
* @return array
*/
public function productNames(): array;
/**
* 获取全部成分列表
* @return array
*/
public function ingredients(): array;
/**
* 获取全部产品状态列表
* @return array
*/
public function productStatus(): array;
/**
* 获取全部平台产品状态列表
* @return array
*/
public function platformProductStatus(): array;
}