蛋蛋星球 后台端
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 787 B

5 days ago
5 days ago
5 days ago
1234567891011121314151617181920212223242526272829303132
  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. cfgDb.SysCfgUpdate("user_real_name_rule", req.UserRealNameRule)
  28. e.OutSuc(c, "success", nil)
  29. return
  30. }