feat(1.0):增加客服管理
This commit is contained in:
parent
5af6831bb7
commit
a3ef966c30
@ -623,6 +623,12 @@ const docTemplate = `{
|
||||
"name": "app_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "客服编号",
|
||||
"name": "admin_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 1,
|
||||
|
||||
@ -615,6 +615,12 @@
|
||||
"name": "app_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"description": "客服编号",
|
||||
"name": "admin_id",
|
||||
"in": "query"
|
||||
},
|
||||
{
|
||||
"type": "integer",
|
||||
"default": 1,
|
||||
|
||||
@ -1043,6 +1043,10 @@ paths:
|
||||
in: query
|
||||
name: app_id
|
||||
type: string
|
||||
- description: 客服编号
|
||||
in: query
|
||||
name: admin_id
|
||||
type: integer
|
||||
- default: 1
|
||||
description: 当前页码
|
||||
in: query
|
||||
|
||||
@ -14,6 +14,7 @@ import (
|
||||
|
||||
type listRequest struct {
|
||||
AppID string `form:"app_id"` // 小程序ID
|
||||
AdminID int32 `form:"admin_id"` // 客服编号
|
||||
Name string `form:"name"` // 小程序名称
|
||||
Page int `form:"page"` // 当前页码,默认为第一页
|
||||
PageSize int `form:"page_size"` // 每页返回的数据量
|
||||
@ -44,6 +45,7 @@ type listResponse struct {
|
||||
// @Produce json
|
||||
// @Param name query string false "小程序名称"
|
||||
// @Param app_id query string false "小程序ID"
|
||||
// @Param admin_id query int false "客服编号"
|
||||
// @Param page query int true "当前页码" default(1)
|
||||
// @Param page_size query int true "每页返回的数据量,最多 100 条" default(20)
|
||||
// @Success 200 {object} listResponse
|
||||
@ -85,6 +87,10 @@ func (h *handler) PageList() core.HandlerFunc {
|
||||
|
||||
if ctx.SessionUserInfo().IsSuper != 1 {
|
||||
query = query.Where(h.readDB.MiniProgram.AdminID.Eq(ctx.SessionUserInfo().Id))
|
||||
} else {
|
||||
if req.AdminID != 0 {
|
||||
query = query.Where(h.readDB.MiniProgram.AdminID.Eq(req.AdminID))
|
||||
}
|
||||
}
|
||||
|
||||
if req.AppID != "" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user