manual.go 972 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. package data_manage
  2. import (
  3. "eta/eta_mobile/controllers"
  4. "eta/eta_mobile/models"
  5. "eta/eta_mobile/services/data"
  6. )
  7. // 手工数据管理
  8. type ManualController struct {
  9. controllers.BaseAuthController
  10. }
  11. // @Title 手工数据权限用户搜索
  12. // @Description 手工数据权限用户搜索
  13. // @Param KeyWord query string false "关键词搜索"
  14. // @Success 200 {object} data_manage.ManualSysUser
  15. // @router /manual/sysuser/search [get]
  16. func (this *ManualController) ManualSysUserSearch() {
  17. br := new(models.BaseResponse).Init()
  18. defer func() {
  19. this.Data["json"] = br
  20. this.ServeJSON()
  21. }()
  22. sysUser := this.SysUser
  23. if sysUser == nil {
  24. br.Msg = "请登录"
  25. br.Ret = 408
  26. return
  27. }
  28. keyWord := this.GetString("KeyWord")
  29. list, err := data.GetManualSysUser(keyWord)
  30. if err != nil {
  31. br.Msg = "获取失败"
  32. br.ErrMsg = "获取失败,Err:" + err.Error()
  33. return
  34. }
  35. br.Ret = 200
  36. br.Success = true
  37. br.Msg = "获取成功"
  38. br.Data = list
  39. }