帐户管理

添加用户

接口描述: 根据传入的信息新增企业用户

接口地址: https://yd.yunding360.com/openapi/users

请求方式:POST

请求示例:

{
  "account": "",
  "password": "",
  "age": 0,
  "birthday": 0,
  "mobile": "",
  "email": "",
  "nickname": "",
  "faviconKey": "",
  "faviconUrl": "",
  "sex": "",
  "roleIds": [],
  "storeIds": [],
  "areaIds": [],
  "departmentIds": [],
  "accountNonLocked": false,
  "description": "",
  "isThirdSync": false
}

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
create create body true UserCreate UserCreate

schema属性说明

UserCreate

参数名称 参数说明 in 是否必须 数据类型 schema
account 用户账号(账号可以包含汉字、数字或字母,4-20位,用户初始密码为123456,首次登录时需要修改) body true string
age 年龄(如果传入了生日信息,则会由生日推算出年龄) body false integer(int32)
birthday 生日 body false integer(int64)
mobile 手机号(同一企业下手机号不允许重复,如果没有传入则不判断) body false string
email 邮箱地址(同一企业下邮箱地址不允许重复,如果没有传入则不判断) body false string
nickname 用户昵称(用户昵称可以包含汉字、数字或字母,1-20位,不传入时会被设置成用户账号) body false string
faviconKey 用户头像识别标识 body false string
faviconUrl 用户头像地址 body false string
sex 性别,可用值:MALE, FEMALE body false string
roleIds 岗位id body false array
storeIds 门店权限id body false array
areaIds 用戶门店区域id body false array
departmentIds 部门id body false array
accountNonLocked 账号是否锁定,true表示不锁定,false表示锁定,不传入时默认为true body false boolean
description 描述 body false string
isThirdSync 是否为第三方同步,true 是 false 否,默认:false body false string

响应示例:

{
    "id":"",
    "createdTime":0,
    "creator":"",
    "modifiedTime":0,
    "modifier":"",
    "name":"",
    "account":"",
    "username":"",
    "accountNonExpired":true,
    "accountNonLocked":true,
    "credentialsNonExpired":true,
    "enabled":true,
    "age":0,
    "birthday":0,
    "sex":"MALE",
    "description":"",
    "mobile":"",
    "email":"",
    "nickname":"",
    "faviconUrl":"",
    "faviconKey":"",
    "departmentIds":[

    ],
    "roleType":"CUSTOM",
    "enterpriseCode":"",
    "navigationStatus":"OLD",
    "authorities":[

    ],
    "roles":[

    ],
    "stores":[

    ],
    "storeGroups":[

    ]
}

响应参数:

参数名称 参数说明 类型 schema
id ID string(uuid) string(uuid)
createdTime 创建时间 integer(int64) integer(int64)
creator 创建者ID string(uuid) string(uuid)
modifiedTime 最后更新时间 integer(int64) integer(int64)
modifier 更新者ID string(uuid) string(uuid)
name 名称 string
account 用户账号 string
username 用户名(用户唯一标识) string
accountNonExpired 账号是否过期(true:不过期,false:过期) boolean
accountNonLocked 账号是否被锁定(true:未锁定,false:锁定) boolean
credentialsNonExpired 账号认证是否过期(true:不过期,false:过期) boolean
enabled 账号是否可用(true:可用,false:不可用) boolean
age 年龄 integer(int32) integer(int32)
birthday 生日 integer(int64) integer(int64)
sex 性别,可用值: MALE, FEMALE, UNKNOWN, UNRECOGNIZED string
description 描述 string
mobile 手机号 string
email 邮箱地址 string
nickname 用户昵称 string
faviconUrl 用户头像地址 string
faviconKey 用户头像识别标识 string
departmentIds 部门ID集合 array string(uuid)
roleType 用户类型,可用值:SYSTEM, CUSTOM string
enterpriseCode 企业Code string
navigationStatus 用户导航类型,可用值:NEW("新版导航"),OLD("旧版导航") string
用户权限 用户权限集合 array Authority
用户岗位(角色) 用户岗位集合 roles Role
stores 门店ID集合 array string(uuid)
storeGroups 门店组ID集合 array string(uuid)

schema属性说明

Authority

参数名称 参数说明 类型 schema
name 权限名称 string
authority 权限Code string
clientId 客户端Id string
description 描述 string
display 是否显示 boolean

Role

参数名称 参数说明 类型 schema
name 岗位名称 string
role 岗位Code string
type 类型,可用值:SYSTEM, CUSTOM string
description 描述 string
constraints 数据约束,仅可见自己创建的数据 boolean

响应状态:

状态码 说明 schema
200 OK CustomerMemberInfo

修改用户

接口描述: 修改用户信息

接口地址:https://yd.yunding360.com/openapi/users/{id}

请求方式:PATCH

请求示例:

{
    "age": 0,
    "birthday": 0,
    "mobile": "",
    "email": "",
    "nickname": "",
    "faviconKey": "",
    "faviconUrl": "",
    "sex": "",
    "roleIds": [],
    "storeIds": [],
    "areaIds": [],
    "departmentIds": [],
    "description": ""
}

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
id 用户id path true string
user 用户信息 body true UserUpdate UserUpdate

schema属性说明

UserUpdate

参数名称 参数说明 in 是否必须 数据类型 schema
age 年龄(如果传入了生日信息,则会由生日推算出年龄) body false integer(int32)
birthday 生日 body false integer(int64)
mobile 手机号(同一企业下手机号不允许重复,如果没有传入则不判断) body false string
email 邮箱地址(同一企业下邮箱地址不允许重复,如果没有传入则不判断) body false string
nickname 用户昵称(用户昵称可以包含汉字、数字或字母,1-20位,不传入时会被设置成用户账号) body false string
faviconKey 用户头像识别标识 body false string
faviconUrl 用户头像地址 body false string
sex 性别,可用值:MALE, FEMALE body false string
roleIds 岗位id body false array
storeIds 门店权限id body false array
areaIds 用戶门店区域id body false array
departmentIds 部门id body false array
accountNonLocked 账号是否锁定,true表示不锁定,false表示锁定,不传入时默认为true body false boolean
resetPwd 是否重置密码,true表示重置,false表示不重置,不传入时默认为false body false boolean
description 描述 body false string

响应示例:

{
    "id":"",
    "createdTime":0,
    "creator":"",
    "modifiedTime":0,
    "modifier":"",
    "name":"",
    "account":"",
    "username":"",
    "accountNonExpired":true,
    "accountNonLocked":true,
    "credentialsNonExpired":true,
    "enabled":true,
    "age":0,
    "birthday":0,
    "sex":"MALE",
    "description":"",
    "mobile":"",
    "email":"",
    "nickname":"",
    "faviconUrl":"",
    "faviconKey":"",
    "departmentIds":[

    ],
    "roleType":"CUSTOM",
    "enterpriseCode":"",
    "navigationStatus":"OLD",
    "authorities":[

    ],
    "roles":[

    ],
    "stores":[

    ],
    "storeGroups":[

    ]
}

响应参数:

参数名称 参数说明 类型 schema
id ID string(uuid) string(uuid)
createdTime 创建时间 integer(int64) integer(int64)
creator 创建者ID string(uuid) string(uuid)
modifiedTime 最后更新时间 integer(int64) integer(int64)
modifier 更新者ID string(uuid) string(uuid)
name 名称 string
account 用户账号 string
username 用户名(用户唯一标识) string
accountNonExpired 账号是否过期(true:不过期,false:过期) boolean
accountNonLocked 账号是否被锁定(true:未锁定,false:锁定) boolean
credentialsNonExpired 账号认证是否过期(true:不过期,false:过期) boolean
enabled 账号是否可用(true:可用,false:不可用) boolean
age 年龄 integer(int32) integer(int32)
birthday 生日 integer(int64) integer(int64)
sex 性别,可用值: MALE, FEMALE, UNKNOWN, UNRECOGNIZED string
description 描述 string
mobile 手机号 string
email 邮箱地址 string
nickname 用户昵称 string
faviconUrl 用户头像地址 string
faviconKey 用户头像识别标识 string
departmentIds 部门ID集合 array string(uuid)
roleType 用户类型,可用值:SYSTEM, CUSTOM string
enterpriseCode 企业Code string
navigationStatus 用户导航类型,可用值:NEW("新版导航"),OLD("旧版导航") string
用户权限 用户权限集合 array Authority
用户岗位(角色) 用户岗位集合 roles Role
stores 门店ID集合 array string(uuid)
storeGroups 门店组ID集合 array string(uuid)

schema属性说明

Authority

参数名称 参数说明 类型 schema
name 权限名称 string
authority 权限Code string
clientId 客户端Id string
description 描述 string
display 是否显示 boolean

Role

参数名称 参数说明 类型 schema
name 岗位名称 string
role 岗位Code string
type 类型,可用值:SYSTEM, CUSTOM string
description 描述 string
constraints 数据约束,仅可见自己创建的数据 boolean

响应状态:

状态码 说明 schema
200 OK CustomerMemberInfo

删除用户

接口描述: 根据用户id删除对应用户

接口地址: https://yd.yunding360.com/openapi/users/{id}

请求方式:DELETE

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
id 用户id path true string

响应示例:


响应参数:

暂无

响应状态:

状态码 说明 schema
200 OK

查询用户列表

接口描述: 根据用户id删除对应用户

接口地址: https://yd.yunding360.com/openapi/users/details

请求方式:POST

请求示例:

{
    "departmentId":"6abdb260-3fb8-11e9-9d1e-d395929c703a",
    "roleId":"3c24f470-fbfb-11eb-a463-bfa503074e55",
    "keyword":"test",
    "accountNonLocked": true
}

请求参数:

参数名称 参数说明 in 是否必须 数据类型 schema
departmentId 部门id body false string
roleId 岗位id body false string
keyword 关键字(账号姓名手机邮箱) body false string
accountNonLocked 账号锁定: true 不锁定 false 锁定 body false bool

响应示例:

{
    "content": [
        {
            "id": "745c3110-fb4b-11eb-9d51-594a6e355776",
            "createdTime": null,
            "creator": null,
            "modifiedTime": null,
            "modifier": null,
            "name": "test456",
            "nameMap": {},
            "account": "test456",
            "username": "huoguo:test456",
            "accountNonExpired": true,
            "accountNonLocked": true,
            "credentialsNonExpired": true,
            "enabled": true,
            "age": null,
            "birthday": null,
            "sex": "MALE",
            "description": null,
            "mobile": null,
            "email": null,
            "nickname": "test456",
            "faviconUrl": "http://yd-img-dev.oss-cn-beijing.aliyuncs.com/favicon/2019-04-01/f20ea918-601e-46d9-8b2d-03b33fbeb59f.png?Expires=1869462808&OSSAccessKeyId=LTAIp7XxWvH6u1Zd&Signature=uBPFrfQb%2BoxKkiHlSWMzxw%2BQlz8%3D",
            "faviconKey": "favicon/2019-04-01/f20ea918-601e-46d9-8b2d-03b33fbeb59f.png",
            "departmentId": null,
            "departmentIds": null,
            "roleType": "CUSTOM",
            "lastChangePwdTime": null,
            "enterpriseCode": "huoguo",
            "navigationStatus": "OLD",
            "pwdSalt": null,
            "pwdType": null,
            "authorities": null,
            "roles": null,
            "stores": null,
            "storeGroups": null,
            "uuid": "745c3110-fb4b-11eb-9d51-594a6e355776"
        }
    ],
    "metadata": {
        "size": 1,
        "totalElements": 8315,
        "totalPages": 8315,
        "page": 0
    }
}

响应参数:

参数名称 参数说明 类型 schema
id ID string(uuid) string(uuid)
createdTime 创建时间 integer(int64) integer(int64)
creator 创建者ID string(uuid) string(uuid)
modifiedTime 最后更新时间 integer(int64) integer(int64)
modifier 更新者ID string(uuid) string(uuid)
name 名称 string
account 用户账号 string
username 用户名(用户唯一标识) string
accountNonExpired 账号是否过期(true:不过期,false:过期) boolean
accountNonLocked 账号是否被锁定(true:未锁定,false:锁定) boolean
credentialsNonExpired 账号认证是否过期(true:不过期,false:过期) boolean
enabled 账号是否可用(true:可用,false:不可用) boolean
age 年龄 integer(int32) integer(int32)
birthday 生日 integer(int64) integer(int64)
sex 性别,可用值: MALE, FEMALE, UNKNOWN, UNRECOGNIZED string
description 描述 string
mobile 手机号 string
email 邮箱地址 string
nickname 用户昵称 string
faviconUrl 用户头像地址 string
faviconKey 用户头像识别标识 string
departmentIds 部门ID集合 array string(uuid)
roleType 用户类型,可用值:SYSTEM, CUSTOM string
enterpriseCode 企业Code string
navigationStatus 用户导航类型,可用值:NEW("新版导航"),OLD("旧版导航") string
用户权限 用户权限集合 array Authority
用户岗位(角色) 用户岗位集合 roles Role
stores 门店ID集合 array string(uuid)
storeGroups 门店组ID集合 array string(uuid)

schema属性说明

Authority

参数名称 参数说明 类型 schema
name 权限名称 string
authority 权限Code string
clientId 客户端Id string
description 描述 string
display 是否显示 boolean

Role

参数名称 参数说明 类型 schema
name 岗位名称 string
role 岗位Code string
type 类型,可用值:SYSTEM, CUSTOM string
description 描述 string
constraints 数据约束,仅可见自己创建的数据 boolean

响应状态:

状态码 说明 schema
200 OK