蛋蛋星球 后台端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

svc_base.go 722 B

5 days ago
12345678910111213141516171819202122232425262728293031
  1. package user_real_name
  2. import (
  3. "applet/app/db"
  4. "applet/app/e"
  5. "applet/app/md"
  6. "applet/app/svc"
  7. "applet/app/utils/cache"
  8. "code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
  9. "github.com/gin-gonic/gin"
  10. )
  11. func Base(c *gin.Context) {
  12. res := md.UserRealNameBaseResp{
  13. UserRealNameMoney: svc.GetSysCfgStr("user_real_name_money"),
  14. }
  15. e.OutSuc(c, res, nil)
  16. return
  17. }
  18. func BaseSave(c *gin.Context) {
  19. var req md.UserRealNameBaseResp
  20. if err := c.ShouldBindJSON(&req); err != nil {
  21. e.OutErr(c, e.ERR_INVALID_ARGS, err)
  22. return
  23. }
  24. conn := cache.GetPool().Get()
  25. cfgDb := implement.NewSysCfgDb(db.Db, conn)
  26. cfgDb.SysCfgUpdate("user_real_name_money", req.UserRealNameMoney)
  27. e.OutSuc(c, "success", nil)
  28. return
  29. }