Initial commit

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-15 13:57:10 +08:00
co-authored by Claude Opus 5
commit 8679200f41
1897 changed files with 257900 additions and 0 deletions
+71
View File
@@ -0,0 +1,71 @@
package nakedchatorderctrl
import (
"encoding/json"
"91porn-server/common"
"91porn-server/common/stderr"
"91porn-server/models/l/operatorlgmod"
"91porn-server/web/service/nakedchatorderser"
"github.com/gin-gonic/gin"
)
// List doc
// @Summary 获取裸聊订单列表
// @Description 获取裸聊订单列表
// @Tags 后台-裸聊订单
// @Accept mpfd,json
// @Produce json
// @Param q query nakedchatorderser.WebListReq false "请求参数"
// @Success 200 object nakedchatorderser.WebListRes "成功"
// @Failure 400 {string} json "{"msg": "操作失败"}"
// @Router /api/web/admin/nakedchatorder/list [get]
func List(ctx *gin.Context) {
var req = &nakedchatorderser.WebListReq{}
if err := ctx.ShouldBind(&req); err != nil {
common.ServeJSON(ctx, stderr.ErrParamError, err.Error())
return
}
res, err := req.GetList()
if err != nil {
common.ServeJSON(ctx, stderr.ErrDbQueryError, "")
return
}
common.ServeJSON(ctx, stderr.Success, res)
}
// Update doc
// @Summary 更新裸聊订单
// @Description 更新裸聊订单
// @Tags 后台-裸聊订单
// @Accept mpfd,json
// @Produce json
// @Param q body nakedchatorderser.WebUpdateReq false "请求参数"
// @Success 200 {string} json "{"msg": "操作成功"}"
// @Failure 400 {string} json "{"msg": "操作失败"}"
// @Router /api/web/admin/nakedchatorder/update [post]
func Update(ctx *gin.Context) {
manager, err := common.GetAdminAct(ctx)
if err != nil {
common.ServeJSON(ctx, stderr.AdminIDErr, err.Error())
return
}
p := &nakedchatorderser.WebUpdateReq{}
err = ctx.ShouldBindJSON(&p)
if err != nil {
common.ServeJSON(ctx, stderr.ErrParamError, err.Error())
return
}
// 更新
err = p.Update()
if err != nil {
common.ServeJSON(ctx, stderr.Failure, err.Error())
return
}
log, _ := json.Marshal(p)
_ = operatorlgmod.RecordOperation(manager, "裸聊订单管理", "更新", string(log), ctx.Request.URL.RequestURI())
common.ServeJSON(ctx, stderr.Success, "")
}