|
- package user_real_name
-
- import (
- "applet/app/db"
- "applet/app/e"
- "applet/app/md"
- "applet/app/svc"
- "applet/app/utils/cache"
- "code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
- "github.com/gin-gonic/gin"
- )
-
- func Base(c *gin.Context) {
- res := md.UserRealNameBaseResp{
- UserRealNameMoney: svc.GetSysCfgStr("user_real_name_money"),
- }
- e.OutSuc(c, res, nil)
- return
- }
- func BaseSave(c *gin.Context) {
- var req md.UserRealNameBaseResp
- if err := c.ShouldBindJSON(&req); err != nil {
- e.OutErr(c, e.ERR_INVALID_ARGS, err)
- return
- }
- conn := cache.GetPool().Get()
- cfgDb := implement.NewSysCfgDb(db.Db, conn)
- cfgDb.SysCfgUpdate("user_real_name_money", req.UserRealNameMoney)
- cfgDb.SysCfgUpdate("user_real_name_rule", req.UserRealNameRule)
- e.OutSuc(c, "success", nil)
- return
- }
|