作者 唐旭辉

添加模型

... ... @@ -86,6 +86,7 @@ func (c *RbacController) RoleDelete() {
}
err := serverbac.RoleDelete(param)
msg = protocol.NewReturnResponse(nil, err)
return
}
... ... @@ -158,6 +159,7 @@ func (c *RbacController) RoleGroupDelete() {
msg = protocol.BadRequestParam("1")
return
}
err := serverbac.RoleGroupDelete(param)
msg = protocol.NewReturnResponse(nil, err)
return
... ...
... ... @@ -87,6 +87,6 @@ func GetUserCompanyBy(userid int64, companyId int64) (*UserCompany, error) {
}
func GetUserCompanyByUser(userid int64) ([]UserCompany, error) {
datasql := ``
// datasql := ``
return nil, nil
}
... ...
# 机会导向管理后台接口
## 全局统一设定
### 请求头指定要求的字段
| 字段 | 说明 |
| ------------------ | ---------------------------- |
| x-mmm-accesstoken | 发起请求时使用时校验用 token |
| x-mmm-refreshtoken | 刷新 token 时使用的 token |
- 备注 :token 使用 jwt 进行处理.其中包含有 user_id、company_id 的数据,登录时获取
### 通用响应结构
```json
{
"code": "错误码字符串",
"msg": "错误描述字符串",
"data": {
"xxx": "any"
}
}
```
- 备注:data 中的内容根据各接口实际情况确定
## 认证相关
### 登录
- 请求路径 :/auth/login
- 请求方式 :POST
- 请求 json:
```json
{
"account": "账号",
"password": "密码"
}
```
- 响应 json
```json
{
"access_token": "xxxxx",
"expires_in": 1576033744852,
"refresh_token": "xxxxx",
"refresh_expires": 1576033744852
}
```
- 备注 该请求无需指定请求头
... ...