transform_server.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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. // 获取erp 字典
  32. func (s *TransformServer) LoadOptionset(ctx context.Context, in *transform.OptionsetReq) (*transform.OptionsetRes, error) {
  33. l := logic.NewLoadOptionsetLogic(ctx, s.svcCtx)
  34. return l.LoadOptionset(in)
  35. }
  36. func (s *TransformServer) GetSchoolIds(ctx context.Context, in *transform.SchoolIdsReq) (*transform.SchoolIdsRes, error) {
  37. l := logic.NewGetSchoolIdsLogic(ctx, s.svcCtx)
  38. return l.GetSchoolIds(in)
  39. }
  40. func (s *TransformServer) GetCityIds(ctx context.Context, in *transform.CityIdsReq) (*transform.CityIdsRes, error) {
  41. l := logic.NewGetCityIdsLogic(ctx, s.svcCtx)
  42. return l.GetCityIds(in)
  43. }
  44. func (s *TransformServer) PostExcelLog(ctx context.Context, in *transform.ExcelLogReq) (*transform.ExcelLogRes, error) {
  45. l := logic.NewPostExcelLogLogic(ctx, s.svcCtx)
  46. return l.PostExcelLog(in)
  47. }
  48. func (s *TransformServer) GetErpOptionset(ctx context.Context, in *transform.OptionCode) (*transform.Options, error) {
  49. l := logic.NewGetErpOptionsetLogic(ctx, s.svcCtx)
  50. return l.GetErpOptionset(in)
  51. }
  52. // 获取数据权限
  53. func (s *TransformServer) GetDataPermission(ctx context.Context, in *transform.DataPermissionReq) (*transform.DataPermissionRes, error) {
  54. l := logic.NewGetDataPermissionLogic(ctx, s.svcCtx)
  55. return l.GetDataPermission(in)
  56. }
  57. // 获取erp 渠道细分树
  58. func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  59. l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
  60. return l.GetErpMktNetWorkDetailTree(in)
  61. }
  62. // 获取erp 用户校区权限
  63. func (s *TransformServer) GetErpOrganSchPerByUserId(ctx context.Context, in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
  64. l := logic.NewGetErpOrganSchPerByUserIdLogic(ctx, s.svcCtx)
  65. return l.GetErpOrganSchPerByUserId(in)
  66. }
  67. // 获取 erp 用户角色
  68. func (s *TransformServer) GetErpRole(ctx context.Context, in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
  69. l := logic.NewGetErpRoleLogic(ctx, s.svcCtx)
  70. return l.GetErpRole(in)
  71. }
  72. // 获取 erp 全部校区
  73. func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.GetErpSchoolRes, error) {
  74. l := logic.NewGetErpSchoolLogic(ctx, s.svcCtx)
  75. return l.GetErpSchool(in)
  76. }
  77. // 获取 erp 活动
  78. func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
  79. l := logic.NewGetErpActiveLogic(ctx, s.svcCtx)
  80. return l.GetErpActive(in)
  81. }