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
+55
View File
@@ -0,0 +1,55 @@
package currencyctrl
import (
"fmt"
"91porn-server/common"
"91porn-server/common/log"
"91porn-server/common/stderr"
"91porn-server/web/service/currencyser"
"github.com/gin-gonic/gin"
)
func Add(c *gin.Context) {
var in *currencyser.AddCond
if err := c.ShouldBindJSON(&in); err != nil {
log.Error(fmt.Sprintf("新增裸聊 参数异常 [%v]", err))
common.ServeJSON(c, stderr.ErrParamError, err)
return
}
if code := currencyser.Add(in); code != stderr.Success {
common.ServeJSON(c, code, nil)
return
}
common.ServeJSON(c, stderr.Success, "success")
}
func Edit(c *gin.Context) {
var in *currencyser.EditCond
if err := c.ShouldBindJSON(&in); err != nil {
log.Error(fmt.Sprintf("编辑裸聊 参数异常 [%v]", err))
common.ServeJSON(c, stderr.ErrParamError, err)
return
}
if code := currencyser.Edit(in); code != stderr.Success {
common.ServeJSON(c, code, nil)
return
}
common.ServeJSON(c, stderr.Success, "success")
}
func QueryAll(c *gin.Context) {
var in *currencyser.QueryAllCond
if err := c.ShouldBindQuery(&in); err != nil {
log.Error(fmt.Sprintf("查询裸聊 参数异常 [%v]", err))
common.ServeJSON(c, stderr.ErrParamError, err)
return
}
data, code := currencyser.QueryAll(in)
if code != stderr.Success {
common.ServeJSON(c, code, nil)
return
}
common.ServeJSON(c, code, data)
}