获取jduser接口修改,新增启用,禁用接口
This commit is contained in:
@@ -219,7 +219,7 @@ type StoreUserInfo struct {
|
|||||||
PartTimeOrgIds interface{} `json:"partTimeOrgIds"`
|
PartTimeOrgIds interface{} `json:"partTimeOrgIds"`
|
||||||
Phone string `json:"phone"`
|
Phone string `json:"phone"`
|
||||||
Remark interface{} `json:"remark"`
|
Remark interface{} `json:"remark"`
|
||||||
RoleNameStr interface{} `json:"roleNameStr"`
|
RoleNameStr string `json:"roleNameStr"`
|
||||||
Roles interface{} `json:"roles"`
|
Roles interface{} `json:"roles"`
|
||||||
SortNo int `json:"sortNo"`
|
SortNo int `json:"sortNo"`
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
@@ -236,6 +236,8 @@ const (
|
|||||||
|
|
||||||
SaveQualifyActionTypeCommit = 0 // 提交
|
SaveQualifyActionTypeCommit = 0 // 提交
|
||||||
SaveQualifyActionTypeSave = 1 // 暂时保存
|
SaveQualifyActionTypeSave = 1 // 暂时保存
|
||||||
|
JdUserStatusEnable = 0 //启用
|
||||||
|
JdUserStatusDisable = 1 //禁用
|
||||||
)
|
)
|
||||||
|
|
||||||
type QualifyItem struct {
|
type QualifyItem struct {
|
||||||
@@ -614,9 +616,10 @@ func (a *API) PrivilegeSearchUser(pageNo int) (storeUserList []*StoreUserInfo, t
|
|||||||
if len(tdList) > 0 {
|
if len(tdList) > 0 {
|
||||||
id := regexpJDUserID.FindStringSubmatch(tdList[10][0])[1]
|
id := regexpJDUserID.FindStringSubmatch(tdList[10][0])[1]
|
||||||
storeUserInfo := &StoreUserInfo{
|
storeUserInfo := &StoreUserInfo{
|
||||||
LoginName: tdList[0][1],
|
LoginName: tdList[0][1],
|
||||||
LockStatus: tdList[9][1],
|
LockStatus: tdList[9][1],
|
||||||
ID: int(utils.Str2Int64(id)),
|
ID: int(utils.Str2Int64(id)),
|
||||||
|
RoleNameStr: tdList[4][1],
|
||||||
}
|
}
|
||||||
storeUserList = append(storeUserList, storeUserInfo)
|
storeUserList = append(storeUserList, storeUserInfo)
|
||||||
}
|
}
|
||||||
@@ -624,7 +627,7 @@ func (a *API) PrivilegeSearchUser(pageNo int) (storeUserList []*StoreUserInfo, t
|
|||||||
return storeUserList, totalCount, totalPage, err
|
return storeUserList, totalCount, totalPage, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// 查询商家中心账号信息接口
|
// 查询全部商家中心账号信息接口
|
||||||
// https://login-o2o.jddj.com/jpuser/list?doPage=false&pageNo=1&appCode=lsp-store&pageSize=20&autoCount=false&_=1574936207872
|
// https://login-o2o.jddj.com/jpuser/list?doPage=false&pageNo=1&appCode=lsp-store&pageSize=20&autoCount=false&_=1574936207872
|
||||||
func (a *API) PrivilegeSearchUserAll() (storeUserLists []*StoreUserInfo, err error) {
|
func (a *API) PrivilegeSearchUserAll() (storeUserLists []*StoreUserInfo, err error) {
|
||||||
_, _, totalPage, err := a.PrivilegeSearchUser(1)
|
_, _, totalPage, err := a.PrivilegeSearchUser(1)
|
||||||
@@ -637,3 +640,18 @@ func (a *API) PrivilegeSearchUserAll() (storeUserLists []*StoreUserInfo, err err
|
|||||||
}
|
}
|
||||||
return storeUserLists, err
|
return storeUserLists, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 禁用/启用商家中心账号信息接口
|
||||||
|
// https: //login-o2o.jddj.com/jpuser/enable/346408
|
||||||
|
// https: //login-o2o.jddj.com/jpuser/disable/346408
|
||||||
|
func (a *API) PrivilegeUpdateJdUserStatus(id int64, status int) (err error) {
|
||||||
|
url := "https://login-o2o.jddj.com/jpuser/"
|
||||||
|
if status == JdUserStatusEnable {
|
||||||
|
url += "enable/"
|
||||||
|
} else {
|
||||||
|
url += "disable/"
|
||||||
|
}
|
||||||
|
url += utils.Int64ToStr(id)
|
||||||
|
_, err = a.AccessStorePage2(url, nil, true, "")
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user