transform_server.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  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) GetMkIds(ctx context.Context, in *transform.CityMkReq) (*transform.CityMkRes, error) {
  49. l := logic.NewGetMkIdsLogic(ctx, s.svcCtx)
  50. return l.GetMkIds(in)
  51. }
  52. func (s *TransformServer) PostExcelLog(ctx context.Context, in *transform.ExcelLogReq) (*transform.ExcelLogRes, error) {
  53. l := logic.NewPostExcelLogLogic(ctx, s.svcCtx)
  54. return l.PostExcelLog(in)
  55. }
  56. func (s *TransformServer) GetErpOptionset(ctx context.Context, in *transform.OptionCode) (*transform.Options, error) {
  57. l := logic.NewGetErpOptionsetLogic(ctx, s.svcCtx)
  58. return l.GetErpOptionset(in)
  59. }
  60. func (s *TransformServer) GetStudent(ctx context.Context, in *transform.StudentReq) (*transform.StudentRes, error) {
  61. l := logic.NewGetStudentLogic(ctx, s.svcCtx)
  62. return l.GetStudent(in)
  63. }
  64. // 获取数据权限
  65. func (s *TransformServer) GetDataPermission(ctx context.Context, in *transform.DataPermissionReq) (*transform.DataPermissionRes, error) {
  66. l := logic.NewGetDataPermissionLogic(ctx, s.svcCtx)
  67. return l.GetDataPermission(in)
  68. }
  69. // 获取erp 渠道细分树
  70. func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  71. l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
  72. return l.GetErpMktNetWorkDetailTree(in)
  73. }
  74. // 获取erp 渠道细分树
  75. func (s *TransformServer) GetErpMktNetWorkDetail(ctx context.Context, in *transform.ErpMktNetWorkDetailReq) (*transform.ErpMktNetWorkDetailRes, error) {
  76. l := logic.NewGetErpMktNetWorkDetailLogic(ctx, s.svcCtx)
  77. return l.GetErpMktNetWorkDetail(in)
  78. }
  79. // 获取erp 用户校区权限
  80. func (s *TransformServer) GetErpOrganSchPerByUserId(ctx context.Context, in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
  81. l := logic.NewGetErpOrganSchPerByUserIdLogic(ctx, s.svcCtx)
  82. return l.GetErpOrganSchPerByUserId(in)
  83. }
  84. // 获取 erp 用户角色
  85. func (s *TransformServer) GetErpRole(ctx context.Context, in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
  86. l := logic.NewGetErpRoleLogic(ctx, s.svcCtx)
  87. return l.GetErpRole(in)
  88. }
  89. // 获取 erp 全部校区
  90. func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.GetErpSchoolRes, error) {
  91. l := logic.NewGetErpSchoolLogic(ctx, s.svcCtx)
  92. return l.GetErpSchool(in)
  93. }
  94. // 获取 erp 活动
  95. func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
  96. l := logic.NewGetErpActiveLogic(ctx, s.svcCtx)
  97. return l.GetErpActive(in)
  98. }
  99. // 获取erp 省、城、校区
  100. func (s *TransformServer) GetErpOrganSchTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  101. l := logic.NewGetErpOrganSchTreeLogic(ctx, s.svcCtx)
  102. return l.GetErpOrganSchTree(in)
  103. }
  104. // 查看erp用户是否正常
  105. func (s *TransformServer) GetErpUser(ctx context.Context, in *transform.ErpUserReq) (*transform.ErpUserRes, error) {
  106. l := logic.NewGetErpUserLogic(ctx, s.svcCtx)
  107. return l.GetErpUser(in)
  108. }