124 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			124 lines
		
	
	
		
			4.0 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| syntax = "v1"
 | |
| 
 | |
| info (
 | |
| 	title:   "平台用户管理"
 | |
| 	desc:    "平台用户管理"
 | |
| 	author:  "Liangzai"
 | |
| 	email:   "2440983361@qq.com"
 | |
| 	version: "v1"
 | |
| )
 | |
| 
 | |
| // 平台用户管理接口
 | |
| @server(
 | |
| 	prefix: /api/v1/admin/platform_user
 | |
| 	group: admin_platform_user
 | |
| 	jwt: JwtAuth
 | |
| )
 | |
| service main {
 | |
| 	// 创建平台用户
 | |
| 	@handler AdminCreatePlatformUser
 | |
| 	post /create (AdminCreatePlatformUserReq) returns (AdminCreatePlatformUserResp)
 | |
| 
 | |
| 	// 更新平台用户
 | |
| 	@handler AdminUpdatePlatformUser
 | |
| 	put /update/:id (AdminUpdatePlatformUserReq) returns (AdminUpdatePlatformUserResp)
 | |
| 
 | |
| 	// 删除平台用户
 | |
| 	@handler AdminDeletePlatformUser
 | |
| 	delete /delete/:id (AdminDeletePlatformUserReq) returns (AdminDeletePlatformUserResp)
 | |
| 
 | |
| 	// 获取平台用户分页列表
 | |
| 	@handler AdminGetPlatformUserList
 | |
| 	get /list (AdminGetPlatformUserListReq) returns (AdminGetPlatformUserListResp)
 | |
| 
 | |
| 	// 获取平台用户详情
 | |
| 	@handler AdminGetPlatformUserDetail
 | |
| 	get /detail/:id (AdminGetPlatformUserDetailReq) returns (AdminGetPlatformUserDetailResp)
 | |
| }
 | |
| 
 | |
| type (
 | |
| 	// 分页列表请求
 | |
| 	AdminGetPlatformUserListReq {
 | |
| 		Page            int64  `form:"page,default=1"`             // 页码
 | |
| 		PageSize        int64  `form:"pageSize,default=20"`        // 每页数量
 | |
| 		Mobile          string `form:"mobile,optional"`            // 手机号
 | |
| 		Nickname        string `form:"nickname,optional"`          // 昵称
 | |
| 		Inside          int64  `form:"inside,optional"`            // 是否内部用户 1-是 0-否
 | |
| 		CreateTimeStart string `form:"create_time_start,optional"` // 创建时间开始
 | |
| 		CreateTimeEnd   string `form:"create_time_end,optional"`   // 创建时间结束
 | |
| 		OrderBy         string `form:"order_by,optional"`          // 排序字段
 | |
| 		OrderType       string `form:"order_type,optional"`        // 排序类型
 | |
| 	}
 | |
| 
 | |
| 	// 分页列表响应
 | |
| 	AdminGetPlatformUserListResp {
 | |
| 		Total int64                  `json:"total"` // 总数
 | |
| 		Items []PlatformUserListItem `json:"items"` // 列表
 | |
| 	}
 | |
| 
 | |
| 	// 列表项
 | |
| 	PlatformUserListItem {
 | |
| 		Id         int64  `json:"id"`          // 用户ID
 | |
| 		Mobile     string `json:"mobile"`      // 手机号
 | |
| 		Nickname   string `json:"nickname"`    // 昵称
 | |
| 		Info       string `json:"info"`        // 备注信息
 | |
| 		Inside     int64  `json:"inside"`      // 是否内部用户 1-是 0-否
 | |
| 		CreateTime string `json:"create_time"` // 创建时间
 | |
| 		UpdateTime string `json:"update_time"` // 更新时间
 | |
| 	}
 | |
| 
 | |
| 	// 详情请求
 | |
| 	AdminGetPlatformUserDetailReq {
 | |
| 		Id int64 `path:"id"` // 用户ID
 | |
| 	}
 | |
| 
 | |
| 	// 详情响应
 | |
| 	AdminGetPlatformUserDetailResp {
 | |
| 		Id         int64  `json:"id"`          // 用户ID
 | |
| 		Mobile     string `json:"mobile"`      // 手机号
 | |
| 		Nickname   string `json:"nickname"`    // 昵称
 | |
| 		Info       string `json:"info"`        // 备注信息
 | |
| 		Inside     int64  `json:"inside"`      // 是否内部用户 1-是 0-否
 | |
| 		CreateTime string `json:"create_time"` // 创建时间
 | |
| 		UpdateTime string `json:"update_time"` // 更新时间
 | |
| 	}
 | |
| 
 | |
| 	// 创建请求
 | |
| 	AdminCreatePlatformUserReq {
 | |
| 		Mobile   string `json:"mobile"`   // 手机号
 | |
| 		Password string `json:"password"` // 密码
 | |
| 		Nickname string `json:"nickname"` // 昵称
 | |
| 		Info     string `json:"info"`     // 备注信息
 | |
| 		Inside   int64  `json:"inside"`   // 是否内部用户 1-是 0-否
 | |
| 	}
 | |
| 
 | |
| 	// 创建响应
 | |
| 	AdminCreatePlatformUserResp {
 | |
| 		Id int64 `json:"id"` // 用户ID
 | |
| 	}
 | |
| 
 | |
| 	// 更新请求
 | |
| 	AdminUpdatePlatformUserReq {
 | |
| 		Id       int64   `path:"id"`                // 用户ID
 | |
| 		Mobile   *string `json:"mobile,optional"`   // 手机号
 | |
| 		Password *string `json:"password,optional"` // 密码
 | |
| 		Nickname *string `json:"nickname,optional"` // 昵称
 | |
| 		Info     *string `json:"info,optional"`     // 备注信息
 | |
| 		Inside   *int64  `json:"inside,optional"`   // 是否内部用户 1-是 0-否
 | |
| 	}
 | |
| 
 | |
| 	// 更新响应
 | |
| 	AdminUpdatePlatformUserResp {
 | |
| 		Success bool `json:"success"` // 是否成功
 | |
| 	}
 | |
| 
 | |
| 	// 删除请求
 | |
| 	AdminDeletePlatformUserReq {
 | |
| 		Id int64 `path:"id"` // 用户ID
 | |
| 	}
 | |
| 
 | |
| 	// 删除响应
 | |
| 	AdminDeletePlatformUserResp {
 | |
| 		Success bool `json:"success"` // 是否成功
 | |
| 	}
 | |
| ) |