|
@@ -945,6 +945,23 @@ class PublicRpcService implements PublicRpcServiceInterface
|
|
|
return Result::success('更新成功');
|
|
|
}
|
|
|
}
|
|
|
+ /**
|
|
|
+ * 获取所有尺寸
|
|
|
+ * @param array $data
|
|
|
+ * @return array
|
|
|
+ */
|
|
|
+ public function getAllSize(array $data): array
|
|
|
+ {
|
|
|
+ if(isset($data['id']) && !empty($data['id'])){
|
|
|
+ $result = Size::where('id', $data['id'])->get()->all();
|
|
|
+ }else{
|
|
|
+ $result = Size::get()->all();
|
|
|
+ }
|
|
|
+ if(empty($result)){
|
|
|
+ return Result::error("暂无尺寸", 0);
|
|
|
+ }
|
|
|
+ return Result::success($result);
|
|
|
+ }
|
|
|
/**
|
|
|
* 根据皮肤名称-获取所有皮肤
|
|
|
* @param array $data
|