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

3 weeks ago
1 week ago
3 weeks ago
1 week ago
1 week ago
3 weeks ago
3 weeks ago
3 weeks 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/svc/sys_cfg"
  8. "github.com/gin-gonic/gin"
  9. )
  10. func Base(c *gin.Context) {
  11. res := md.UserRealNameBaseResp{
  12. UserRealNameMoney: svc.GetSysCfgStr("user_real_name_money"),
  13. }
  14. e.OutSuc(c, res, nil)
  15. return
  16. }
  17. func BaseSave(c *gin.Context) {
  18. var req md.UserRealNameBaseResp
  19. if err := c.ShouldBindJSON(&req); err != nil {
  20. e.OutErr(c, e.ERR_INVALID_ARGS, err)
  21. return
  22. }
  23. cfgDb := sys_cfg.NewSysCfgDb(db.Db)
  24. cfgDb.SysCfgUpdate("user_real_name_money", req.UserRealNameMoney)
  25. cfgDb.SysCfgUpdate("user_real_name_rule", req.UserRealNameRule)
  26. e.OutSuc(c, "success", nil)
  27. return
  28. }