1. 【Manager】用户接口

1.1. 获取所有用户

Type: GET

Author: Timothy

Content-Type: application/x-www-form-urlencoded

Description: 获取所有用户

Query-parameters:

Parameter Type Description Required Since

keyword

string

No comments found.

false

-

pageNum

int32

页码
Validation[Range(min=1, message=页码必须大于 {min}) ]

false

-

pageSize

int32

页面大小
Validation[Range(min=1, max=1000, message=页面大小必须在 {min} 和 {max} 之间) ]

false

-

Request-example:

curl -X GET -i '/ma/user/listAll?pageNum=0&pageSize=0&=604feq'

Response-fields:

Field Type Description Since

total

int64

No comments found.

-

list

array

No comments found.

-

└─id

int32

ID

-

└─username

string

用户名
Validation[Size(max=12, message=用户名要求最多 {max} 位) ]

-

└─email

string

E-mail
Validation[Email(message=邮箱格式不正确) ]

-

└─phone

string

电话
Validation[Pattern(regexp=^1[3-9]\d{9}$, message=手机号格式不正确) ]

-

└─password

string

密码

-

└─password1

string

用户填写密码

-

└─password2

string

用户确认密码

-

└─nickname

string

用户昵称
Validation[Size(min=2, max=12, message=昵称位数要求在 {min} 和 {max} 之间) ]

-

└─realname

string

姓名

-

└─roleId

int32

角色ID

-

└─roleTitle

string

角色头衔

-

└─corpId

int32

所在公司ID

-

└─corpName

string

所在公司名称

-

└─deptId

int32

部门ID

-

└─deptName

string

部门名称

-

└─gender

int32

性别【0=女,1=男】

-

└─avatar

string

头像

-

└─birthday

string

生日
Validation[Past(message=你是从未来穿越回来的吗:)) ]

-

└─qq

string

QQ

-

└─major

string

专业

-

└─university

string

毕业院校

-

└─assignee

string

委托人身份(用于流程)

-

└─address

string

住址

-

└─introduce

string

自我简介

-

└─code

string

各种码

-

└─invateId

int32

邀请人ID

-

└─invateUsername

string

邀请人用户名(注册时临时邀请码)

-

└─invateNickname

string

邀请人昵称

-

└─expiration

string

激活有效期 | 帐号有效期

-

└─state

int32

激活状态【-1=已禁用,0=已锁定,1=注册会员,2=VIP会员】(好友中代指关系状态)

-

└─alias

string

朋友别名(备注)

-

└─greeting

string

请求问候语(关系属性)

-

└─lastDate

string

上次登录时间

-

└─lastIp

string

上次登录IP

-

└─lastAddress

string

上次登录IP位置鉴定

-

└─createDate

string

注册时间

-

└─updateDate

string

更新时间

-

└─push

int32

消息推送

-

└─alert

int32

声音提醒

-

pageNum

int32

当前页

-

pageSize

int32

每页的数量

-

size

int32

当前页的数量

-

startRow

int64

由于startRow和endRow不常用,这里说个具体的用法
可以在页面中"显示startRow到endRow 共size条数据"
当前页面第一个元素在数据库中的行号

-

endRow

int64

当前页面最后一个元素在数据库中的行号

-

pages

int32

总页数

-

prePage

int32

前一页

-

nextPage

int32

下一页

-

firstPage

boolean

是否为第一页

-

lastPage

boolean

是否为最后一页

-

hasPreviousPage

boolean

是否有前一页

-

hasNextPage

boolean

是否有下一页

-

navigatePages

int32

导航页码数

-

navigatepageNums

array

所有导航页号

-

navigateFirstPage

int32

导航条上的第一页

-

navigateLastPage

int32

导航条上的最后一页

-

Response-example:

{
  "total": 0,
  "list": [
    {
      "id": 0,
      "username": "",
      "email": "",
      "phone": "",
      "password": "",
      "password1": "",
      "password2": "",
      "nickname": "",
      "realname": "",
      "roleId": 0,
      "roleTitle": "",
      "corpId": 0,
      "corpName": "",
      "deptId": 0,
      "deptName": "",
      "gender": 0,
      "avatar": "",
      "birthday": "yyyy-MM-dd",
      "qq": "",
      "major": "",
      "university": "",
      "assignee": "",
      "address": "",
      "introduce": "",
      "code": "",
      "invateId": 0,
      "invateUsername": "",
      "invateNickname": "",
      "expiration": "yyyy-MM-dd HH:mm:ss",
      "state": 0,
      "alias": "",
      "greeting": "",
      "lastDate": "yyyy-MM-dd HH:mm:ss",
      "lastIp": "",
      "lastAddress": "",
      "createDate": "yyyy-MM-dd HH:mm:ss",
      "updateDate": "yyyy-MM-dd HH:mm:ss",
      "push": 0,
      "alert": 0
    }
  ],
  "pageNum": 0,
  "pageSize": 0,
  "size": 0,
  "startRow": 0,
  "endRow": 0,
  "pages": 0,
  "prePage": 0,
  "nextPage": 0,
  "firstPage": true,
  "lastPage": true,
  "hasPreviousPage": true,
  "hasNextPage": true,
  "navigatePages": 0,
  "navigatepageNums": [
    0
  ],
  "navigateFirstPage": 0,
  "navigateLastPage": 0
}

1.2. 获取公司用户

Type: GET

Author: Timothy

Content-Type: application/x-www-form-urlencoded

Description: 获取公司用户

Query-parameters:

Parameter Type Description Required Since

corpId

int32

公司ID

false

-

pageNum

int32

页码
Validation[Range(min=1, message=页码必须大于 {min}) ]

false

-

pageSize

int32

页面大小
Validation[Range(min=1, max=1000, message=页面大小必须在 {min} 和 {max} 之间) ]

false

-

Request-example:

curl -X GET -i '/ma/user/listByCorp?corpId=0&pageNum=0&pageSize=0&=992'

Response-fields:

Field Type Description Since

total

int64

No comments found.

-

list

array

No comments found.

-

└─id

int32

ID

-

└─username

string

用户名
Validation[Size(max=12, message=用户名要求最多 {max} 位) ]

-

└─email

string

E-mail
Validation[Email(message=邮箱格式不正确) ]

-

└─phone

string

电话
Validation[Pattern(regexp=^1[3-9]\d{9}$, message=手机号格式不正确) ]

-

└─password

string

密码

-

└─password1

string

用户填写密码

-

└─password2

string

用户确认密码

-

└─nickname

string

用户昵称
Validation[Size(min=2, max=12, message=昵称位数要求在 {min} 和 {max} 之间) ]

-

└─realname

string

姓名

-

└─roleId

int32

角色ID

-

└─roleTitle

string

角色头衔

-

└─corpId

int32

所在公司ID

-

└─corpName

string

所在公司名称

-

└─deptId

int32

部门ID

-

└─deptName

string

部门名称

-

└─gender

int32

性别【0=女,1=男】

-

└─avatar

string

头像

-

└─birthday

string

生日
Validation[Past(message=你是从未来穿越回来的吗:)) ]

-

└─qq

string

QQ

-

└─major

string

专业

-

└─university

string

毕业院校

-

└─assignee

string

委托人身份(用于流程)

-

└─address

string

住址

-

└─introduce

string

自我简介

-

└─code

string

各种码

-

└─invateId

int32

邀请人ID

-

└─invateUsername

string

邀请人用户名(注册时临时邀请码)

-

└─invateNickname

string

邀请人昵称

-

└─expiration

string

激活有效期 | 帐号有效期

-

└─state

int32

激活状态【-1=已禁用,0=已锁定,1=注册会员,2=VIP会员】(好友中代指关系状态)

-

└─alias

string

朋友别名(备注)

-

└─greeting

string

请求问候语(关系属性)

-

└─lastDate

string

上次登录时间

-

└─lastIp

string

上次登录IP

-

└─lastAddress

string

上次登录IP位置鉴定

-

└─createDate

string

注册时间

-

└─updateDate

string

更新时间

-

└─push

int32

消息推送

-

└─alert

int32

声音提醒

-

pageNum

int32

当前页

-

pageSize

int32

每页的数量

-

size

int32

当前页的数量

-

startRow

int64

由于startRow和endRow不常用,这里说个具体的用法
可以在页面中"显示startRow到endRow 共size条数据"
当前页面第一个元素在数据库中的行号

-

endRow

int64

当前页面最后一个元素在数据库中的行号

-

pages

int32

总页数

-

prePage

int32

前一页

-

nextPage

int32

下一页

-

firstPage

boolean

是否为第一页

-

lastPage

boolean

是否为最后一页

-

hasPreviousPage

boolean

是否有前一页

-

hasNextPage

boolean

是否有下一页

-

navigatePages

int32

导航页码数

-

navigatepageNums

array

所有导航页号

-

navigateFirstPage

int32

导航条上的第一页

-

navigateLastPage

int32

导航条上的最后一页

-

Response-example:

{
  "total": 0,
  "list": [
    {
      "id": 0,
      "username": "",
      "email": "",
      "phone": "",
      "password": "",
      "password1": "",
      "password2": "",
      "nickname": "",
      "realname": "",
      "roleId": 0,
      "roleTitle": "",
      "corpId": 0,
      "corpName": "",
      "deptId": 0,
      "deptName": "",
      "gender": 0,
      "avatar": "",
      "birthday": "yyyy-MM-dd",
      "qq": "",
      "major": "",
      "university": "",
      "assignee": "",
      "address": "",
      "introduce": "",
      "code": "",
      "invateId": 0,
      "invateUsername": "",
      "invateNickname": "",
      "expiration": "yyyy-MM-dd HH:mm:ss",
      "state": 0,
      "alias": "",
      "greeting": "",
      "lastDate": "yyyy-MM-dd HH:mm:ss",
      "lastIp": "",
      "lastAddress": "",
      "createDate": "yyyy-MM-dd HH:mm:ss",
      "updateDate": "yyyy-MM-dd HH:mm:ss",
      "push": 0,
      "alert": 0
    }
  ],
  "pageNum": 0,
  "pageSize": 0,
  "size": 0,
  "startRow": 0,
  "endRow": 0,
  "pages": 0,
  "prePage": 0,
  "nextPage": 0,
  "firstPage": true,
  "lastPage": true,
  "hasPreviousPage": true,
  "hasNextPage": true,
  "navigatePages": 0,
  "navigatepageNums": [
    0
  ],
  "navigateFirstPage": 0,
  "navigateLastPage": 0
}

1.3. 更新用户基本信息

Type: PUT

Author: Timothy

Content-Type: application/json

Description: 更新用户基本信息

Body-parameters:

Parameter Type Description Required Since

id

int32

ID

false

-

username

string

用户名
Validation[Size(max=12, message=用户名要求最多 {max} 位) ]

false

-

email

string

E-mail
Validation[Email(message=邮箱格式不正确) ]

false

-

phone

string

电话
Validation[Pattern(regexp=^1[3-9]\d{9}$, message=手机号格式不正确) ]

false

-

password

string

密码

false

-

password1

string

用户填写密码

false

-

password2

string

用户确认密码

false

-

nickname

string

用户昵称
Validation[Size(min=2, max=12, message=昵称位数要求在 {min} 和 {max} 之间) ]

true

-

realname

string

姓名

false

-

roleId

int32

角色ID

false

-

roleTitle

string

角色头衔

false

-

corpId

int32

所在公司ID

false

-

corpName

string

所在公司名称

false

-

deptId

int32

部门ID

false

-

deptName

string

部门名称

false

-

gender

int32

性别【0=女,1=男】

false

-

avatar

string

头像

false

-

birthday

string

生日
Validation[Past(message=你是从未来穿越回来的吗:)) ]

false

-

qq

string

QQ

false

-

major

string

专业

false

-

university

string

毕业院校

false

-

assignee

string

委托人身份(用于流程)

false

-

address

string

住址

false

-

introduce

string

自我简介

false

-

code

string

各种码

false

-

invateId

int32

邀请人ID

false

-

invateUsername

string

邀请人用户名(注册时临时邀请码)

false

-

invateNickname

string

邀请人昵称

false

-

expiration

string

激活有效期 | 帐号有效期

false

-

state

int32

激活状态【-1=已禁用,0=已锁定,1=注册会员,2=VIP会员】(好友中代指关系状态)

false

-

alias

string

朋友别名(备注)

false

-

greeting

string

请求问候语(关系属性)

false

-

lastDate

string

上次登录时间

false

-

lastIp

string

上次登录IP

false

-

lastAddress

string

上次登录IP位置鉴定

false

-

createDate

string

注册时间

false

-

updateDate

string

更新时间

false

-

push

int32

消息推送

false

-

alert

int32

声音提醒

false

-

Request-example:

curl -X PUT -H "Content-Type: application/json" -i '/ma/user/update' --data '{
  "id": 0,
  "username": "",
  "email": "",
  "phone": "",
  "password": "",
  "password1": "",
  "password2": "",
  "nickname": "",
  "realname": "",
  "roleId": 0,
  "roleTitle": "",
  "corpId": 0,
  "corpName": "",
  "deptId": 0,
  "deptName": "",
  "gender": 0,
  "avatar": "",
  "birthday": "yyyy-MM-dd",
  "qq": "",
  "major": "",
  "university": "",
  "assignee": "",
  "address": "",
  "introduce": "",
  "code": "",
  "invateId": 0,
  "invateUsername": "",
  "invateNickname": "",
  "expiration": "yyyy-MM-dd HH:mm:ss",
  "state": 0,
  "alias": "",
  "greeting": "",
  "lastDate": "yyyy-MM-dd HH:mm:ss",
  "lastIp": "",
  "lastAddress": "",
  "createDate": "yyyy-MM-dd HH:mm:ss",
  "updateDate": "yyyy-MM-dd HH:mm:ss",
  "push": 0,
  "alert": 0
}'

Response-example:

0

1.4. 移除用户

Type: DELETE

Author: Timothy

Content-Type: application/x-www-form-urlencoded

Description: 移除用户

Query-parameters:

Parameter Type Description Required Since

id

int32

用户ID

false

-

Request-example:

curl -X DELETE -i '/ma/user/remove?id=0&=719'

Response-example:

0