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
c240f455
Commit
c240f455
authored
Nov 18, 2019
by
姚书霞
🐘
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
接口名称修改
parent
b8262b96
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
17 deletions
+19
-17
urlmanager.php
backend/config/urlmanager.php
+7
-5
ShopUserMembergradeController.php
...controllers/v1/shopuser/ShopUserMembergradeController.php
+12
-12
No files found.
backend/config/urlmanager.php
View file @
c240f455
...
@@ -19,6 +19,7 @@ return [
...
@@ -19,6 +19,7 @@ return [
'v1/shopuser/shop-user'
,
'v1/shopuser/shop-user'
,
'v1/shopuser/user-complain'
,
'v1/shopuser/user-complain'
,
'v1/branch/branch-service-type'
,
'v1/branch/branch-service-type'
,
'v1/branch/shop-city-distribution-setting'
,
'v1/shopuser/shop-user-list'
,
'v1/shopuser/shop-user-list'
,
],
],
'extraPatterns'
=>
[
'extraPatterns'
=>
[
...
@@ -29,11 +30,12 @@ return [
...
@@ -29,11 +30,12 @@ return [
'GET,OPTIONS user-complain'
=>
'user-complain'
,
'GET,OPTIONS user-complain'
=>
'user-complain'
,
'GET,OPTIONS employee-info'
=>
'employee-info'
,
'GET,OPTIONS employee-info'
=>
'employee-info'
,
'GET,OPTIONS employee-list'
=>
'employee-list'
,
'GET,OPTIONS employee-list'
=>
'employee-list'
,
'GET,OPTIONS list'
=>
'list'
,
'GET,OPTIONS membergrade-list'
=>
'membergrade-list'
,
'GET,OPTIONS one'
=>
'one'
,
'GET,OPTIONS membergrade-detail'
=>
'membergrade-detail'
,
'PUT,OPTIONS revise'
=>
'revise'
,
'PUT,OPTIONS membergrade-revise'
=>
'membergrade-revise'
,
'POST,OPTIONS add'
=>
'add'
,
'POST,OPTIONS membergrade-add'
=>
'membergrade-add'
,
'DELETE,OPTIONS del'
=>
'del'
,
'DELETE,OPTIONS del'
=>
'membergrade-delete'
,
'GET,OPTIONS city-distribution-setting-list'
=>
'city-distribution-setting-list'
,
'GET,OPTIONS branch-score-list'
=>
'branch-score-list'
,
'GET,OPTIONS branch-score-list'
=>
'branch-score-list'
,
'GET,OPTIONS score-info'
=>
'score-info'
,
'GET,OPTIONS score-info'
=>
'score-info'
,
'PUT,OPTIONS score-info-update'
=>
'score-info-update'
,
'PUT,OPTIONS score-info-update'
=>
'score-info-update'
,
...
...
backend/controllers/v1/shopuser/ShopUserMembergradeController.php
View file @
c240f455
...
@@ -27,7 +27,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -27,7 +27,7 @@ class ShopUserMembergradeController extends BaseController
/**
/**
* @OA\Get(
* @OA\Get(
* path="/backend/web/v1/shopuser/shop-user-membergrades/list",
* path="/backend/web/v1/shopuser/shop-user-membergrades/
membergrade-
list",
* tags={"用户&员工接口"},
* tags={"用户&员工接口"},
* summary="用户组列表接口(姚书侠)",
* summary="用户组列表接口(姚书侠)",
* description="用户组列表接口",
* description="用户组列表接口",
...
@@ -38,7 +38,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -38,7 +38,7 @@ class ShopUserMembergradeController extends BaseController
* )
* )
*/
*/
//重写index
//重写index
public
function
actionList
()
public
function
action
Membergrade
List
()
{
{
$requestParams
=
Yii
::
$app
->
getRequest
()
->
get
();
$requestParams
=
Yii
::
$app
->
getRequest
()
->
get
();
$query
=
$this
->
modelClass
::
find
();
$query
=
$this
->
modelClass
::
find
();
...
@@ -55,7 +55,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -55,7 +55,7 @@ class ShopUserMembergradeController extends BaseController
/**
/**
* @OA\Get(
* @OA\Get(
* path="/backend/web/v1/shopuser/shop-user-membergrades/
one
",
* path="/backend/web/v1/shopuser/shop-user-membergrades/
membergrade-detail
",
* tags={"用户&员工接口"},
* tags={"用户&员工接口"},
* summary="用户组详情接口(姚书侠)",
* summary="用户组详情接口(姚书侠)",
* description="用户组详情接口",
* description="用户组详情接口",
...
@@ -65,7 +65,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -65,7 +65,7 @@ class ShopUserMembergradeController extends BaseController
* )
* )
*/
*/
//编辑用
//编辑用
public
function
action
One
()
public
function
action
MembergradeDetail
()
{
{
$guid
=
Yii
::
$app
->
getRequest
()
->
get
(
'guid'
);
$guid
=
Yii
::
$app
->
getRequest
()
->
get
(
'guid'
);
$model
=
$this
->
modelClass
::
findOne
(
$guid
);
$model
=
$this
->
modelClass
::
findOne
(
$guid
);
...
@@ -74,7 +74,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -74,7 +74,7 @@ class ShopUserMembergradeController extends BaseController
/**
/**
* @OA\POST(
* @OA\POST(
* path="/backend/web/v1/shopuser/shop-user-membergrades/add",
* path="/backend/web/v1/shopuser/shop-user-membergrades/
membergrade-
add",
* tags={"用户&员工接口"},
* tags={"用户&员工接口"},
* summary="添加用户组接口(姚书侠)",
* summary="添加用户组接口(姚书侠)",
* description="添加用户组接口",
* description="添加用户组接口",
...
@@ -96,7 +96,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -96,7 +96,7 @@ class ShopUserMembergradeController extends BaseController
* security={{"Authorization": {}}}
* security={{"Authorization": {}}}
* )
* )
*/
*/
public
function
actionAdd
()
public
function
action
Membergrade
Add
()
{
{
$model
=
new
$this
->
modelClass
();
$model
=
new
$this
->
modelClass
();
$model
->
scenario
=
'create'
;
//创建的场景
$model
->
scenario
=
'create'
;
//创建的场景
...
@@ -118,7 +118,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -118,7 +118,7 @@ class ShopUserMembergradeController extends BaseController
/**
/**
* @OA\PUT(
* @OA\PUT(
* path="/backend/web/v1/shopuser/shop-user-membergrades/revise",
* path="/backend/web/v1/shopuser/shop-user-membergrades/
membergrade-
revise",
* tags={"用户&员工接口"},
* tags={"用户&员工接口"},
* summary="修改用户组接口(姚书侠)",
* summary="修改用户组接口(姚书侠)",
* description="修改用户组接口",
* description="修改用户组接口",
...
@@ -141,12 +141,12 @@ class ShopUserMembergradeController extends BaseController
...
@@ -141,12 +141,12 @@ class ShopUserMembergradeController extends BaseController
* security={{"Authorization": {}}}
* security={{"Authorization": {}}}
* )
* )
*/
*/
public
function
actionRevise
()
public
function
action
Membergrade
Revise
()
{
{
$guid
=
Yii
::
$app
->
getRequest
()
->
post
(
'GUID'
);
$guid
=
Yii
::
$app
->
getRequest
()
->
post
(
'GUID'
);
$model
=
$this
->
modelClass
::
findOne
(
$guid
);
$model
=
$this
->
modelClass
::
findOne
(
$guid
);
if
(
!
$model
){
if
(
!
$model
){
throw
new
BadRequestHttpException
(
'没有找到
要修改的
记录'
);
throw
new
BadRequestHttpException
(
'没有找到记录'
);
}
}
$model
->
scenario
=
'update'
;
//创建的场景
$model
->
scenario
=
'update'
;
//创建的场景
$model
->
setAttributes
(
Yii
::
$app
->
getRequest
()
->
post
());
$model
->
setAttributes
(
Yii
::
$app
->
getRequest
()
->
post
());
...
@@ -160,7 +160,7 @@ class ShopUserMembergradeController extends BaseController
...
@@ -160,7 +160,7 @@ class ShopUserMembergradeController extends BaseController
/**
/**
* @OA\DELETE(
* @OA\DELETE(
* path="/backend/web/v1/shopuser/shop-user-membergrades/
del
",
* path="/backend/web/v1/shopuser/shop-user-membergrades/
membergrade-delete
",
* tags={"用户&员工接口"},
* tags={"用户&员工接口"},
* summary="删除用户组接口(姚书侠)",
* summary="删除用户组接口(姚书侠)",
* description="删除用户组接口",
* description="删除用户组接口",
...
@@ -178,12 +178,12 @@ class ShopUserMembergradeController extends BaseController
...
@@ -178,12 +178,12 @@ class ShopUserMembergradeController extends BaseController
* security={{"Authorization": {}}}
* security={{"Authorization": {}}}
* )
* )
*/
*/
public
function
action
Del
()
public
function
action
MembergradeDelete
()
{
{
$guid
=
Yii
::
$app
->
getRequest
()
->
post
(
'GUID'
);
$guid
=
Yii
::
$app
->
getRequest
()
->
post
(
'GUID'
);
$model
=
$this
->
modelClass
::
findOne
(
$guid
);
$model
=
$this
->
modelClass
::
findOne
(
$guid
);
if
(
!
$model
){
if
(
!
$model
){
throw
new
BadRequestHttpException
(
'没有找到
要修改的
记录'
);
throw
new
BadRequestHttpException
(
'没有找到记录'
);
}
else
if
(
$model
->
delete
()
===
false
)
{
}
else
if
(
$model
->
delete
()
===
false
)
{
throw
new
ServerErrorHttpException
(
'Failed to delete the object for unknown reason.'
);
throw
new
ServerErrorHttpException
(
'Failed to delete the object for unknown reason.'
);
}
}
...
...
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