transform_server.go 3.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  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. // 获取erp 渠道细分树
  53. func (s *TransformServer) GetErpMktNetWorkDetailTree(ctx context.Context, in *transform.Empty) (*transform.TreeNodes, error) {
  54. l := logic.NewGetErpMktNetWorkDetailTreeLogic(ctx, s.svcCtx)
  55. return l.GetErpMktNetWorkDetailTree(in)
  56. }
  57. // 获取erp 用户校区权限
  58. func (s *TransformServer) GetErpOrganSchPerByUserId(ctx context.Context, in *transform.GetErpOrganSchPerByUserIdReq) (*transform.GetErpOrganSchPerByUserIdRes, error) {
  59. l := logic.NewGetErpOrganSchPerByUserIdLogic(ctx, s.svcCtx)
  60. return l.GetErpOrganSchPerByUserId(in)
  61. }
  62. // 获取 erp 用户角色
  63. func (s *TransformServer) GetErpRole(ctx context.Context, in *transform.GetErpRoleReq) (*transform.GetErpRoleRes, error) {
  64. l := logic.NewGetErpRoleLogic(ctx, s.svcCtx)
  65. return l.GetErpRole(in)
  66. }
  67. // 获取 erp 全部校区
  68. func (s *TransformServer) GetErpSchool(ctx context.Context, in *transform.Empty) (*transform.GetErpSchoolRes, error) {
  69. l := logic.NewGetErpSchoolLogic(ctx, s.svcCtx)
  70. return l.GetErpSchool(in)
  71. }
  72. // 获取 erp 活动
  73. func (s *TransformServer) GetErpActive(ctx context.Context, in *transform.GetErpActiveReq) (*transform.GetErpActiveRes, error) {
  74. l := logic.NewGetErpActiveLogic(ctx, s.svcCtx)
  75. return l.GetErpActive(in)
  76. }