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
198182a3
Commit
198182a3
authored
Nov 19, 2019
by
张晓林
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
获取用户组
parent
b9371c09
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
34 deletions
+19
-34
urlmanager.php
backend/config/urlmanager.php
+2
-2
ShopUserListController.php
backend/controllers/v1/shopuser/ShopUserListController.php
+17
-6
ShopUserMembergradeController.php
...controllers/v1/shopuser/ShopUserMembergradeController.php
+0
-26
No files found.
backend/config/urlmanager.php
View file @
198182a3
...
...
@@ -50,8 +50,8 @@ return [
'GET,OPTIONS user-detail'
=>
'user-detail'
,
'POST,OPTIONS user-update'
=>
'user-update'
,
'GET,OPTIONS user-delete'
=>
'user-delete'
,
'GET,OPTIONS licence-list'
=>
'licence-list'
,
'GET,OPTIONS get-member-grade-list'
=>
'get-member-grade-list'
,
'GET,OPTIONS licence-list'
=>
'licence-list'
,
'GET,OPTIONS licence-detail'
=>
'licence-detail'
,
'GET,OPTIONS branch-list'
=>
'branch-list'
,
],
...
...
backend/controllers/v1/shopuser/ShopUserListController.php
View file @
198182a3
...
...
@@ -120,7 +120,7 @@ class ShopUserListController extends BaseController
];
$data
[
'userInfo'
]
=
$model
::
find
()
->
select
(
$userColumn
)
->
where
([
'GUID'
=>
$param
[
'GUID'
]])
->
asArray
()
->
one
();
//获取所有用户组
$data
[
'memberGradeList'
]
=
$this
->
g
etMemberGradeList
();
$data
[
'memberGradeList'
]
=
$this
->
actionG
etMemberGradeList
();
//获取用户所在用户组
if
(
!
empty
(
$data
[
'userInfo'
])){
$data
[
'userMemberGradeList'
]
=
$model
::
find
()
...
...
@@ -229,13 +229,24 @@ class ShopUserListController extends BaseController
'message'
=>
'更新失败'
];
}
// CODE CONSUMPTION_POINT MOBILE_PHONE CONTACT_SEX CONTACTBIRTH_DATE EMPLOYEE_CODE EMPLOYEE_GUID
// MEMBER_NO LABEL IS_HS_DISTRIBUTOR_PARENT
// var_dump($model->getAttr);
// $orgGuid = Yii::$app->user->identity->ORG_GUID;
}
/**
* @OA\GET(
* path="/backend/web/v1/shopuser/shop-user-lists/get-member-grade-list",
* tags={"用户&员工接口"},
* summary="获取所有用户组(张晓林)",
* description="获取所有用户组",
* @OA\Response(response="200",description="操作成功"),
* security={{"Authorization": {}}}
* )
*/
public
function
actionGetMemberGradeList
(){
//获取所有用户组
$model
=
new
ShopUserMembergrade
();
$list
=
$model
::
find
()
->
select
([
'GUID'
,
'NAME'
])
->
all
();
return
$list
;
}
}
backend/controllers/v1/shopuser/ShopUserMembergradeController.php
View file @
198182a3
...
...
@@ -191,31 +191,5 @@ class ShopUserMembergradeController extends BaseController
Yii
::
$app
->
getResponse
()
->
setStatusCode
(
204
);
return
$model
;
}
/**
* @OA\GET(
* path="/backend/web/v1/shopuser/shop-user-membergrades/get-member-grade-list",
* tags={"用户&员工接口"},
* summary="获取所有用户组(张晓林)",
* description="获取所有用户组",
* @OA\RequestBody(
* required=true,
* @OA\MediaType(
* mediaType="application/x-www-form-urlencoded",
* @OA\Schema(
* type="object",
* @OA\Property(property="GUID",description="要删除的用户组GUID",type="string"),
* )
* )
* ),
* @OA\Response(response=200,description="成功时返回access-token"),
* security={{"Authorization": {}}}
* )
*/
public
function
actionGetMemberGradeList
(){
//获取所有用户组
$model
=
new
$this
->
modelClass
();
$list
=
$model
::
find
()
->
select
([
'GUID'
,
'NAME'
])
->
asArray
()
->
all
();
return
$list
;
}
}
\ No newline at end of file
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