40 lines
998 B
Go
Executable File
40 lines
998 B
Go
Executable File
package nakedchatorderctrl
|
|
|
|
import (
|
|
"91porn-server/app/service/nakedchatorderser"
|
|
"91porn-server/common"
|
|
"91porn-server/common/stderr"
|
|
|
|
"github.com/gin-gonic/gin"
|
|
)
|
|
|
|
// List doc
|
|
//
|
|
// @Summary 获取裸聊订单列表接口
|
|
// @Description 获取裸聊订单列表
|
|
// @Tags 移动端-裸聊订单
|
|
// @Accept mpfd,json
|
|
// @Produce json
|
|
// @Param q query nakedchatorderser.AppQueryListReq false "请求参数"
|
|
// @Success 200 object nakedchatorderser.AppListRes "成功"
|
|
// @Failure 400 {string} json "{"msg": "操作失败"}"
|
|
// @Router /api/app/nakedchatorder/list [get]
|
|
func List(ctx *gin.Context) {
|
|
p := &nakedchatorderser.AppQueryListReq{}
|
|
if err := ctx.ShouldBind(&p); err != nil {
|
|
common.ServeJSON(ctx, stderr.ErrParamError, nil)
|
|
return
|
|
}
|
|
|
|
// 获取用户当前配置
|
|
var err error
|
|
uid, err := common.GetUID(ctx)
|
|
if err != nil {
|
|
common.ServeJSON(ctx, stderr.ErrNoToken, err)
|
|
return
|
|
}
|
|
|
|
list := p.GetList(uid)
|
|
common.ServeJSON(ctx, stderr.Success, list)
|
|
}
|