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

用户组接口修改

parent e2b053d7
......@@ -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,19 +55,8 @@ 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"
* ),
* @OA\Parameter(name="id",in="path",required=true,description="用户组id",@OA\Schema(type="string")),
* @OA\Response(response = 200,description = "success"),
* security={{"Authorization": {}}}
* )
*/
......@@ -108,15 +74,16 @@ class ShopUserMembergradeController extends BaseController
* summary="添加用户组接口(姚书侠)",
* description="添加用户组接口",
* @OA\RequestBody(
* required=true,
* @OA\MediaType(
* mediaType="application/json",
* mediaType="application/x-www-form-urlencoded",
* @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},
* 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"),
* )
* )
* ),
......@@ -153,25 +120,18 @@ 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(
* required=true,
* @OA\MediaType(
* mediaType="application/json",
* mediaType="application/x-www-form-urlencoded",
* @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},
* 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"),
* )
* )
* ),
......
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