$tools_store_id, 'platformSkuId' => $platformSkuId]); if(0 === $response['total'] || '0' === $response['total'] ){ return null; } if(1 < $response['total']){ throw new \Exception('参数有误,产品匹配到多个结果!'); } return $response['data']['0']; } public static function add(array $data): array { $path = "/api/ext/products"; return static::post($path, [], $data); } public static function update(array $data): array { $path = "/api/ext/products/batch"; return static::put($path, [], $data); } public static function list(array $query) : array { $path = "/api/ext/products"; return static::get($path, $query); } }