transform_server.go 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111
  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. // 获取数据权限
  57. func (s *TransformServer) GetDataPermission(ctx context.Context, in *transform.DataPermissionReq) (*transform.DataPermissionRes, error) {
  58. l := logic.NewGetDataPermissionLogic(ctx, s.svcCtx)
  59. return l.GetDataPermission(in)
  60. }
  61. // 获取erp 渠道细分树
  62. func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  63. l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
  64. return l.GetErpMktNetWorkDetailTree(in)
  65. }
  66. // 获取erp 用户校区权限
  67. func (s *TransformServer) GetErpOrganSchPerByUserId(ctx context.Context, in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
  68. l := logic.NewGetErpOrganSchPerByUserIdLogic(ctx, s.svcCtx)
  69. return l.GetErpOrganSchPerByUserId(in)
  70. }
  71. // 获取 erp 用户角色
  72. func (s *TransformServer) GetErpRole(ctx context.Context, in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
  73. l := logic.NewGetErpRoleLogic(ctx, s.svcCtx)
  74. return l.GetErpRole(in)
  75. }
  76. // 获取 erp 全部校区
  77. func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.GetErpSchoolRes, error) {
  78. l := logic.NewGetErpSchoolLogic(ctx, s.svcCtx)
  79. return l.GetErpSchool(in)
  80. }
  81. // 获取 erp 活动
  82. func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
  83. l := logic.NewGetErpActiveLogic(ctx, s.svcCtx)
  84. return l.GetErpActive(in)
  85. }
  86. // 获取erp 省、城、校区
  87. func (s *TransformServer) GetErpOrganSchTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  88. l := logic.NewGetErpOrganSchTreeLogic(ctx, s.svcCtx)
  89. return l.GetErpOrganSchTree(in)
  90. }