更改京东用户角色
This commit is contained in:
@@ -655,3 +655,16 @@ func (a *API) PrivilegeUpdateJdUserStatus(id int64, status int) (err error) {
|
||||
_, err = a.AccessStorePage(url, nil, true)
|
||||
return err
|
||||
}
|
||||
|
||||
// 更改商家中心账号角色接口
|
||||
// https://login-o2o.jddj.com/jpuser/binduserrole/346568/update?appCode=lsp-store
|
||||
//roleIds: 28926(拣货员)
|
||||
func (a *API) UpdateJdUserRoles(id int64, roleIDs []string) (err error) {
|
||||
url := "https://login-o2o.jddj.com/jpuser/binduserrole/" + utils.Int64ToStr(id) + "/update"
|
||||
jdParams := map[string]interface{}{
|
||||
"appCode": "lsp-store",
|
||||
"roleIds": strings.Join(roleIDs, ","),
|
||||
}
|
||||
_, err = a.AccessStorePage(url, jdParams, true)
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -207,5 +207,9 @@ func TestPrivilegeSearchUser(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestPrivilegeUpdateJdUserStatus(t *testing.T) {
|
||||
api.PrivilegeUpdateJdUserStatus(346408, 0)
|
||||
api.PrivilegeUpdateJdUserStatus(346415, 0)
|
||||
}
|
||||
|
||||
func TestUpdateJdUserRoles(t *testing.T) {
|
||||
api.UpdateJdUserRoles(346568, []string{"28926", "28924"})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user