Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
N
newShopBack
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
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
newshop
newShopBack
Commits
e5945203
Commit
e5945203
authored
Nov 13, 2019
by
姚书霞
🐘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户组接口修改
parent
e2b053d7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
71 deletions
+31
-71
ShopUserMembergradeController.php
...controllers/v1/shopuser/ShopUserMembergradeController.php
+31
-71
No files found.
backend/controllers/v1/shopuser/ShopUserMembergradeController.php
View file @
e5945203
...
...
@@ -11,10 +11,6 @@ use yii\data\ActiveDataProvider;
class
ShopUserMembergradeController
extends
BaseController
{
public
$modelClass
=
'app\models\v1\shopuser\ShopUserMembergrade'
;
public
$serializer
=
[
'class'
=>
'yii\rest\Serializer'
,
'collectionEnvelope'
=>
'data'
,
];
//重定义action方法
public
function
actions
()
...
...
@@ -25,10 +21,6 @@ class ShopUserMembergradeController extends BaseController
unset
(
$actions
[
'create'
],
$actions
[
'update'
],
$actions
[
'view'
],
$actions
[
'index'
]
);
// 使用 "prepareDataProvider()" 方法自定义数据 provider
// $actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider'];
return
$actions
;
}
...
...
@@ -38,24 +30,9 @@ class ShopUserMembergradeController extends BaseController
* tags={"用户&员工接口"},
* summary="用户组列表接口(姚书侠)",
* description="用户组列表接口",
* @OA\Parameter(
* in = "query",
* name = "page",
* description = "分页页码",
* required = false,
* @OA\Schema(type="string")
* ),
* @OA\Parameter(
* in = "query",
* name = "pageSize",
* description = "分页大小",
* required = false,
* @OA\Schema(type="string")
* ),
* @OA\Response(
* response = 200,
* description = "success"
* ),
* @OA\Parameter(in = "query",name = "page",description = "分页页码",required = false,@OA\Schema(type="string")),
* @OA\Parameter(in = "query",name = "pageSize",description = "分页大小",required = false,@OA\Schema(type="string")),
* @OA\Response(response = 200,description = "success"),
* security={{"Authorization": {}}}
* )
*/
...
...
@@ -78,20 +55,9 @@ class ShopUserMembergradeController extends BaseController
* tags={"用户&员工接口"},
* summary="用户组详情接口(姚书侠)",
* description="用户组详情接口",
* @OA\Parameter(
* name="id",
* in="path",
* required=true,
* description="用户组id",
* @OA\Schema(
* type="string"
* )
* ),
* @OA\Response(
* response = 200,
* description = "success"
* ),
* security={{"Authorization": {}}}
* @OA\Parameter(name="id",in="path",required=true,description="用户组id",@OA\Schema(type="string")),
* @OA\Response(response = 200,description = "success"),
* security={{"Authorization": {}}}
* )
*/
//编辑用
...
...
@@ -108,17 +74,18 @@ class ShopUserMembergradeController extends BaseController
* summary="添加用户组接口(姚书侠)",
* description="添加用户组接口",
* @OA\RequestBody(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(property="NAME",type="string"),
* @OA\Property(property="IS_DEFAULT",type="string"),
* @OA\Property(property="GRADE_PERCENT",type="float"),
* @OA\Property(property="IS_SETRANGE",type="string"),
* @OA\Property(property="MONEY_POINT_SRATE",type="float"),
* example={"NAME":"用户组A", "IS_DEFAULT": "1","GRADE_PERCENT": 2.22,"IS_SETRANGE": "0","MONEY_POINT_SRATE":23.1},
* )
* )
* required=true,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded",
* @OA\Schema(
* type="object",
* @OA\Property(property="NAME",description="用户组名称,最长20字",type="string"),
* @OA\Property(property="IS_DEFAULT",description="是否默认用户组 0否1是",type="string"),
* @OA\Property(property="GRADE_PERCENT",description="优惠百分比 浮点型",type="string"),
* @OA\Property(property="IS_SETRANGE",description="0:全店通用 1:指定商品 2.指定促销分类",type="string"),
* @OA\Property(property="MONEY_POINT_SRATE",description="购物获得积分比率 浮点型",type="string"),
* )
* )
* ),
* @OA\Response(response=200,description="成功时返回access-token"),
* security={{"Authorization": {}}}
...
...
@@ -153,27 +120,20 @@ class ShopUserMembergradeController extends BaseController
* tags={"用户&员工接口"},
* summary="修改用户组接口(姚书侠)",
* description="修改用户组接口",
* @OA\Parameter(
* name="id",
* in="path",
* required=true,
* description="用户组id",
* @OA\Schema(
* type="string"
* )
* ),
* @OA\Parameter(name="id",in="path",required=true,description="用户组id", @OA\Schema(type="string")),
* @OA\RequestBody(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(property="NAME",type="string"),
* @OA\Property(property="IS_DEFAULT",type="string"),
* @OA\Property(property="GRADE_PERCENT",type="float"),
* @OA\Property(property="IS_SETRANGE",type="string"),
* @OA\Property(property="MONEY_POINT_SRATE",type="float"),
* example={"NAME":"修改后用户组A", "IS_DEFAULT": "1","GRADE_PERCENT": 2.22,"IS_SETRANGE": "0","MONEY_POINT_SRATE":23.1},
* )
* )
* required=true,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded",
* @OA\Schema(
* type="object",
* @OA\Property(property="NAME",description="用户组名称,最长20字",type="string"),
* @OA\Property(property="IS_DEFAULT",description="是否默认用户组 0否1是",type="string"),
* @OA\Property(property="GRADE_PERCENT",description="优惠百分比 浮点型",type="string"),
* @OA\Property(property="IS_SETRANGE",description="0:全店通用 1:指定商品 2.指定促销分类",type="string"),
* @OA\Property(property="MONEY_POINT_SRATE",description="购物获得积分比率 浮点型",type="string"),
* )
* )
* ),
* @OA\Response(response=200,description="成功时返回access-token"),
* security={{"Authorization": {}}}
...
...
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