Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
openApi
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hj
openApi
Commits
ba1f3c39
Commit
ba1f3c39
authored
Mar 09, 2023
by
hangjun83
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
百化产品接口更新
parent
3f294329
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
234 additions
and
0 deletions
+234
-0
server/app/Http/Controllers/Swagger/Responses/Bhua/ProductsList.php
.../Http/Controllers/Swagger/Responses/Bhua/ProductsList.php
+59
-0
server/app/Http/Controllers/Swagger/Responses/Bhua/Properties/ProductsDetailProperty.php
...gger/Responses/Bhua/Properties/ProductsDetailProperty.php
+127
-0
server/app/Http/Controllers/V1/Bhua/ProductsController.php
server/app/Http/Controllers/V1/Bhua/ProductsController.php
+48
-0
No files found.
server/app/Http/Controllers/Swagger/Responses/Bhua/ProductsList.php
0 → 100644
View file @
ba1f3c39
<?php
/*
* This file is part of the Jiannei/lumen-api-starter.
*
* (c) Jiannei <longjian.huang@foxmail.com>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
namespace
App\Http\Controllers\Swagger\Responses\Bhua
;
use
Illuminate\Http\JsonResponse
;
use
OpenApi\Annotations\Schema
;
use
OpenApi\Annotations\Property
;
use
OpenApi\Annotations\Items
;
/**
* @Schema(
* title="订单列表响应内容",
* description="订单列表响应内容"
* )
*
* @package App\Http\Responses
*/
class
ProductsList
extends
JsonResponse
{
/**
* @Property(
* type="integer",
* description="总页数"
* )
*
* @var integer
*/
public
$totalPage
;
/**
* @Property(
* type="integer",
* description="当前页数"
* )
*
* @var integer
*/
public
$pageNo
;
/**
* @Property(
* type="array",
* @Items(ref="#/components/schemas/ProductsDetailProperty")
* )
*
* @var array
*/
public
$list
=
[];
}
server/app/Http/Controllers/Swagger/Responses/Bhua/Properties/ProductsDetailProperty.php
0 → 100644
View file @
ba1f3c39
<?php
namespace
App\Http\Controllers\Swagger\Responses\Bhua\Properties
;
use
OpenApi\Annotations\Schema
;
use
OpenApi\Annotations\Property
;
/**
* @Schema(
* title="品牌详情内容",
* description="品牌详情内容"
* )
*/
class
ProductsDetailProperty
{
/**
* @Property(
* type="string",
* description="产品编号"
* )
*
* @var string
*/
public
$code
;
/**
* @Property(
* type="string",
* description="cas"
* )
*
* @var string
*/
public
$cas
;
/**
* @Property(
* type="string",
* description="中文名称"
* )
*
* @var string
*/
public
$chemCnName
;
/**
* @Property(
* type="string",
* description="英文名称"
* )
*
* @var string
*/
public
$chemEnName
;
/**
* @Property(
* type="string",
* description="中文名称"
* )
*
* @var string
*/
public
$cnName
;
/**
* @Property(
* type="string",
* description="英文名称"
* )
*
* @var string
*/
public
$enName
;
/**
* @Property(
* type="string",
* description="项目规格"
* )
*
* @var string
*/
public
$level
;
/**
* @Property(
* type="string",
* description="货期"
* )
*
* @var string
*/
public
$delivery
;
/**
* @Property(
* type="number",
* description="单价"
* )
*
* @var string
*/
public
$price
;
/**
* @Property(
* type="integer",
* description="状态"
* )
*
* @var string
*/
public
$status
;
/**
* @Property(
* type="string",
* description="规格"
* )
*
* @var string
*/
public
$pack
;
}
server/app/Http/Controllers/V1/Bhua/ProductsController.php
View file @
ba1f3c39
...
...
@@ -95,6 +95,54 @@ class ProductsController extends Controller
}
}
/**
*
* @Post(
* path="/openapi/bhua/products/getProductsByBrandId",
* tags={"百化 - 产品相关接口"},
* summary="获取品牌产品列表",
* description="获取品牌产品列表",
* @RequestBody(
* @MediaType(
* mediaType="application/json",
* @Schema(
* required={"brandId","pageSize", "pageNo"},
* @Property(property="brandId", @Schema(type="integer"),description="返回数据集数量"),
* @Property(property="pageSize", @Schema(type="integer"),description="返回数据集数量"),
* @Property(property="pageNo", @Schema(type="integer"),description="当前页数"),
* example={"brandId" : 1,"pageSize" : 100, "pageNo" : 1}
* ),
* )
* ),
* @OA\Parameter(
* description="用户获取的token值",
* in="header",
* name="authorization",
* required=true,
* @OA\Schema(type="string"),
* @OA\Examples(example="authorization", value="bearerNWJiNDhkNzlmNjg0N2FlMmZiYjliZWM3NGVkNzIyMjNleUpsZUhCcGNtVWlPakUyTmpRMk1EazJORGNzSW1oaGMyZ2lPaUl5ZEhsc1JIQlhkWFpNUVdaWGJVRllJbjA9",summary=""),
* ),
* @AnnotationResponse(
* response="200",
* description="正常操作响应",
* @MediaType(
* mediaType="application/json",
* @Schema(
* allOf={
* @Schema(ref="#/components/schemas/ApiResponse"),
* @Schema(
* type="object",
* @Property(property="data", ref="#/components/schemas/ProductsList")
* )
* }
* )
* )
* ),
* security={
* {"bearer_token":{}}
* }
* )
*/
public
function
getProductsByBrand
(
Request
$request
)
{
$brandId
=
$request
->
get
(
'brandId'
);
...
...
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