Commit e5945203 authored by 姚书霞's avatar 姚书霞 🐘

用户组接口修改

parent e2b053d7
...@@ -11,10 +11,6 @@ use yii\data\ActiveDataProvider; ...@@ -11,10 +11,6 @@ use yii\data\ActiveDataProvider;
class ShopUserMembergradeController extends BaseController class ShopUserMembergradeController extends BaseController
{ {
public $modelClass='app\models\v1\shopuser\ShopUserMembergrade'; public $modelClass='app\models\v1\shopuser\ShopUserMembergrade';
public $serializer = [
'class' => 'yii\rest\Serializer',
'collectionEnvelope' => 'data',
];
//重定义action方法 //重定义action方法
public function actions() public function actions()
...@@ -25,10 +21,6 @@ class ShopUserMembergradeController extends BaseController ...@@ -25,10 +21,6 @@ class ShopUserMembergradeController extends BaseController
unset( unset(
$actions['create'],$actions['update'],$actions['view'],$actions['index'] $actions['create'],$actions['update'],$actions['view'],$actions['index']
); );
// 使用 "prepareDataProvider()" 方法自定义数据 provider
// $actions['index']['prepareDataProvider'] = [$this, 'prepareDataProvider'];
return $actions; return $actions;
} }
...@@ -38,24 +30,9 @@ class ShopUserMembergradeController extends BaseController ...@@ -38,24 +30,9 @@ class ShopUserMembergradeController extends BaseController
* tags={"用户&员工接口"}, * tags={"用户&员工接口"},
* summary="用户组列表接口(姚书侠)", * summary="用户组列表接口(姚书侠)",
* description="用户组列表接口", * description="用户组列表接口",
* @OA\Parameter( * @OA\Parameter(in = "query",name = "page",description = "分页页码",required = false,@OA\Schema(type="string")),
* in = "query", * @OA\Parameter(in = "query",name = "pageSize",description = "分页大小",required = false,@OA\Schema(type="string")),
* name = "page", * @OA\Response(response = 200,description = "success"),
* 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": {}}} * security={{"Authorization": {}}}
* ) * )
*/ */
...@@ -78,20 +55,9 @@ class ShopUserMembergradeController extends BaseController ...@@ -78,20 +55,9 @@ class ShopUserMembergradeController extends BaseController
* tags={"用户&员工接口"}, * tags={"用户&员工接口"},
* summary="用户组详情接口(姚书侠)", * summary="用户组详情接口(姚书侠)",
* description="用户组详情接口", * description="用户组详情接口",
* @OA\Parameter( * @OA\Parameter(name="id",in="path",required=true,description="用户组id",@OA\Schema(type="string")),
* name="id", * @OA\Response(response = 200,description = "success"),
* in="path", * security={{"Authorization": {}}}
* required=true,
* description="用户组id",
* @OA\Schema(
* type="string"
* )
* ),
* @OA\Response(
* response = 200,
* description = "success"
* ),
* security={{"Authorization": {}}}
* ) * )
*/ */
//编辑用 //编辑用
...@@ -108,17 +74,18 @@ class ShopUserMembergradeController extends BaseController ...@@ -108,17 +74,18 @@ class ShopUserMembergradeController extends BaseController
* summary="添加用户组接口(姚书侠)", * summary="添加用户组接口(姚书侠)",
* description="添加用户组接口", * description="添加用户组接口",
* @OA\RequestBody( * @OA\RequestBody(
* @OA\MediaType( * required=true,
* mediaType="application/json", * @OA\MediaType(
* @OA\Schema( * mediaType="application/x-www-form-urlencoded",
* @OA\Property(property="NAME",type="string"), * @OA\Schema(
* @OA\Property(property="IS_DEFAULT",type="string"), * type="object",
* @OA\Property(property="GRADE_PERCENT",type="float"), * @OA\Property(property="NAME",description="用户组名称,最长20字",type="string"),
* @OA\Property(property="IS_SETRANGE",type="string"), * @OA\Property(property="IS_DEFAULT",description="是否默认用户组 0否1是",type="string"),
* @OA\Property(property="MONEY_POINT_SRATE",type="float"), * @OA\Property(property="GRADE_PERCENT",description="优惠百分比 浮点型",type="string"),
* example={"NAME":"用户组A", "IS_DEFAULT": "1","GRADE_PERCENT": 2.22,"IS_SETRANGE": "0","MONEY_POINT_SRATE":23.1}, * @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"), * @OA\Response(response=200,description="成功时返回access-token"),
* security={{"Authorization": {}}} * security={{"Authorization": {}}}
...@@ -153,27 +120,20 @@ class ShopUserMembergradeController extends BaseController ...@@ -153,27 +120,20 @@ class ShopUserMembergradeController extends BaseController
* tags={"用户&员工接口"}, * tags={"用户&员工接口"},
* summary="修改用户组接口(姚书侠)", * summary="修改用户组接口(姚书侠)",
* description="修改用户组接口", * description="修改用户组接口",
* @OA\Parameter( * @OA\Parameter(name="id",in="path",required=true,description="用户组id", @OA\Schema(type="string")),
* name="id",
* in="path",
* required=true,
* description="用户组id",
* @OA\Schema(
* type="string"
* )
* ),
* @OA\RequestBody( * @OA\RequestBody(
* @OA\MediaType( * required=true,
* mediaType="application/json", * @OA\MediaType(
* @OA\Schema( * mediaType="application/x-www-form-urlencoded",
* @OA\Property(property="NAME",type="string"), * @OA\Schema(
* @OA\Property(property="IS_DEFAULT",type="string"), * type="object",
* @OA\Property(property="GRADE_PERCENT",type="float"), * @OA\Property(property="NAME",description="用户组名称,最长20字",type="string"),
* @OA\Property(property="IS_SETRANGE",type="string"), * @OA\Property(property="IS_DEFAULT",description="是否默认用户组 0否1是",type="string"),
* @OA\Property(property="MONEY_POINT_SRATE",type="float"), * @OA\Property(property="GRADE_PERCENT",description="优惠百分比 浮点型",type="string"),
* example={"NAME":"修改后用户组A", "IS_DEFAULT": "1","GRADE_PERCENT": 2.22,"IS_SETRANGE": "0","MONEY_POINT_SRATE":23.1}, * @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"), * @OA\Response(response=200,description="成功时返回access-token"),
* security={{"Authorization": {}}} * security={{"Authorization": {}}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment