transform_server.go 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. // Code generated by goctl. DO NOT EDIT!
  2. // Source: transform.proto
  3. package server
  4. import (
  5. "context"
  6. "git.i2edu.net/i2/i2-bill-erp/internal/logic"
  7. "git.i2edu.net/i2/i2-bill-erp/internal/svc"
  8. "git.i2edu.net/i2/i2-bill-erp/transform"
  9. )
  10. type TransformServer struct {
  11. svcCtx *svc.ServiceContext
  12. }
  13. func NewTransformServer(svcCtx *svc.ServiceContext) *TransformServer {
  14. return &TransformServer{
  15. svcCtx: svcCtx,
  16. }
  17. }
  18. func (s *TransformServer) GetUser(ctx context.Context, in *transform.UserRequest) (*transform.UserResponse, error) {
  19. l := logic.NewGetUserLogic(ctx, s.svcCtx)
  20. return l.GetUser(in)
  21. }
  22. func (s *TransformServer) ParseToken(ctx context.Context, in *transform.TokenRequest) (*transform.TokenResponse, error) {
  23. l := logic.NewParseTokenLogic(ctx, s.svcCtx)
  24. return l.ParseToken(in)
  25. }
  26. // 获取erp 省、城市树
  27. func (s *TransformServer) GetErpCityTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  28. l := logic.NewGetErpCityTreeLogic(ctx, s.svcCtx)
  29. return l.GetErpCityTree(in)
  30. }
  31. func (s *TransformServer) AddMkt(ctx context.Context, in *transform.MktReq) (*transform.MktRes, error) {
  32. l := logic.NewAddMktLogic(ctx, s.svcCtx)
  33. return l.AddMkt(in)
  34. }
  35. // 获取erp 字典
  36. func (s *TransformServer) LoadOptionset(ctx context.Context, in *transform.OptionsetReq) (*transform.OptionsetRes, error) {
  37. l := logic.NewLoadOptionsetLogic(ctx, s.svcCtx)
  38. return l.LoadOptionset(in)
  39. }
  40. func (s *TransformServer) GetSchoolIds(ctx context.Context, in *transform.SchoolIdsReq) (*transform.SchoolIdsRes, error) {
  41. l := logic.NewGetSchoolIdsLogic(ctx, s.svcCtx)
  42. return l.GetSchoolIds(in)
  43. }
  44. func (s *TransformServer) GetCityIds(ctx context.Context, in *transform.CityIdsReq) (*transform.CityIdsRes, error) {
  45. l := logic.NewGetCityIdsLogic(ctx, s.svcCtx)
  46. return l.GetCityIds(in)
  47. }
  48. func (s *TransformServer) PostExcelLog(ctx context.Context, in *transform.ExcelLogReq) (*transform.ExcelLogRes, error) {
  49. l := logic.NewPostExcelLogLogic(ctx, s.svcCtx)
  50. return l.PostExcelLog(in)
  51. }
  52. func (s *TransformServer) GetErpOptionset(ctx context.Context, in *transform.OptionCode) (*transform.Options, error) {
  53. l := logic.NewGetErpOptionsetLogic(ctx, s.svcCtx)
  54. return l.GetErpOptionset(in)
  55. }
  56. func (s *TransformServer) GetStudent(ctx context.Context, in *transform.StudentReq) (*transform.StudentRes, error) {
  57. l := logic.NewGetStudentLogic(ctx, s.svcCtx)
  58. return l.GetStudent(in)
  59. }
  60. // 获取数据权限
  61. func (s *TransformServer) GetDataPermission(ctx context.Context, in *transform.DataPermissionReq) (*transform.DataPermissionRes, error) {
  62. l := logic.NewGetDataPermissionLogic(ctx, s.svcCtx)
  63. return l.GetDataPermission(in)
  64. }
  65. // 获取erp 渠道细分树
  66. func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  67. l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
  68. return l.GetErpMktNetWorkDetailTree(in)
  69. }
  70. // 获取erp 用户校区权限
  71. func (s *TransformServer) GetErpOrganSchPerByUserId(ctx context.Context, in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
  72. l := logic.NewGetErpOrganSchPerByUserIdLogic(ctx, s.svcCtx)
  73. return l.GetErpOrganSchPerByUserId(in)
  74. }
  75. // 获取 erp 用户角色
  76. func (s *TransformServer) GetErpRole(ctx context.Context, in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
  77. l := logic.NewGetErpRoleLogic(ctx, s.svcCtx)
  78. return l.GetErpRole(in)
  79. }
  80. // 获取 erp 全部校区
  81. func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.GetErpSchoolRes, error) {
  82. l := logic.NewGetErpSchoolLogic(ctx, s.svcCtx)
  83. return l.GetErpSchool(in)
  84. }
  85. // 获取 erp 活动
  86. func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
  87. l := logic.NewGetErpActiveLogic(ctx, s.svcCtx)
  88. return l.GetErpActive(in)
  89. }
  90. // 获取erp 省、城、校区
  91. func (s *TransformServer) GetErpOrganSchTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  92. l := logic.NewGetErpOrganSchTreeLogic(ctx, s.svcCtx)
  93. return l.GetErpOrganSchTree(in)
  94. }