gn.go 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. package routers
  2. import (
  3. "eta_gn/eta_bridge/controller/gn"
  4. "github.com/gin-gonic/gin"
  5. )
  6. // InitGn 国能接口
  7. func InitGn(r *gin.RouterGroup) {
  8. control := new(gn.GuoNengController)
  9. group := r.Group("gn/")
  10. group.GET("auth/getToken", control.GetToken)
  11. group.GET("auth/getUserInfo", control.GetUserInfo)
  12. //group.GET("user/sync", control.SyncUser)
  13. // 4A身份供应接口
  14. init4A(r)
  15. // OA接口
  16. initOA(r)
  17. }
  18. func init4A(r *gin.RouterGroup) {
  19. control := new(gn.GuoNengController)
  20. group := r.Group("gn/")
  21. group.POST("user/add4AUser", control.AddAccount)
  22. group.POST("user/modify4AUser", control.ModifyAccount)
  23. group.POST("user/delete4AUser", control.DeleteAccount)
  24. group.POST("user/suspend4AUser", control.SuspendAccount)
  25. group.POST("user/restore4AUser", control.RestoreAccount)
  26. group.POST("user/ChangePassword", control.ChangePassword)
  27. group.POST("user/syncMdmComstru", control.SyncMdmOrganization)
  28. group.POST("user/syncMdmEmployee", control.SyncMdmEmployee)
  29. }
  30. func initOA(r *gin.RouterGroup) {
  31. control := new(gn.GuoNengController)
  32. group := r.Group("gn/")
  33. group.POST("oa", control.OA)
  34. }