蛋蛋星球-客户端
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.

hdl_basic.go 2.0 KiB

3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
3 weeks ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package public_platoon
  2. import (
  3. "applet/app/db"
  4. "applet/app/e"
  5. "code.fnuoos.com/EggPlanet/egg_models.git/src/implement"
  6. "code.fnuoos.com/EggPlanet/egg_models.git/src/model"
  7. "github.com/gin-gonic/gin"
  8. )
  9. // GetPublicPlatoonBasic
  10. // @Summary 制度中心-公排管理-公排基础设置(获取)
  11. // @Tags 公排管理
  12. // @Description 公排基础设置(获取)
  13. // @Accept json
  14. // @Produce json
  15. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  16. // @Success 200 {object} map[string]interface{} "用户数据"
  17. // @Failure 400 {object} md.Response "具体错误"
  18. // @Router /api/publicPlatoon/getBasic [get]
  19. func GetPublicPlatoonBasic(c *gin.Context) {
  20. publicPlatoonBasicDb := implement.NewPublicPlatoonBasicSettingDb(db.Db)
  21. publicPlatoonBasic, err := publicPlatoonBasicDb.PublicPlatoonBasicSettingGetOneByParams(nil)
  22. if err != nil {
  23. e.OutErr(c, e.ERR_DB_ORM, err)
  24. return
  25. }
  26. e.OutSuc(c, publicPlatoonBasic, nil)
  27. }
  28. // UpdatePublicPlatoonBasic
  29. // @Summary 制度中心-公排管理-公排基础设置(修改)
  30. // @Tags 公排管理
  31. // @Description 公排基础设置(修改)
  32. // @Accept json
  33. // @Produce json
  34. // @param Authorization header string true "验证参数Bearer和token空格拼接"
  35. // @Param req body interface{} true "公排设置表单内容"
  36. // @Success 200 {object} map[string]interface{} "修改数据条数"
  37. // @Failure 400 {object} md.Response "具体错误"
  38. // @Router /api/publicPlatoon/getBasic [get]
  39. func UpdatePublicPlatoonBasic(c *gin.Context) {
  40. var req *model.PublicPlatoonBasicSetting
  41. if err := c.ShouldBindJSON(&req); err != nil {
  42. e.OutErr(c, e.ERR_INVALID_ARGS, err)
  43. return
  44. }
  45. publicPlatoonBasicDb := implement.NewPublicPlatoonBasicSettingDb(db.Db)
  46. update, err := publicPlatoonBasicDb.PublicPlatoonBasicSettingUpdate(req.Id, req, "")
  47. if err != nil {
  48. e.OutErr(c, e.ERR_DB_ORM, err)
  49. return
  50. }
  51. e.OutSuc(c, update, nil)
  52. }