transform.proto 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. syntax = "proto3";
  2. package transform;
  3. message UserRequest {
  4. string id = 1;
  5. string phone = 2;
  6. }
  7. message UserResponse {
  8. string id = 1;
  9. string phone = 2;
  10. string roles = 3;
  11. int64 status = 4;
  12. int64 erpRoleType = 5;
  13. string userName = 6;
  14. string cityName = 7;
  15. int64 gender = 8;
  16. }
  17. message TokenRequest {
  18. string token = 1;
  19. }
  20. message TokenResponse {
  21. string UserId = 1;
  22. string UserRoleIds = 2;
  23. string UserSchoolIds = 3;
  24. string UserProvinceIds = 4;
  25. string UserOrganIds = 5;
  26. string SysSchoolId = 6;
  27. string SysOrganId = 7;
  28. string UserPhone = 8;
  29. }
  30. message Empty {}
  31. message TreeNodes{
  32. repeated TreeNode nodes = 1;
  33. }
  34. message TreeNode{
  35. int64 id = 1;
  36. string text = 2;
  37. int64 parent = 3;
  38. Tag tag = 4;
  39. repeated TreeNode nodes = 5;
  40. }
  41. message Tag{
  42. int64 id = 1;
  43. string name = 2;
  44. }
  45. message OptionsetReq{
  46. string code = 1;
  47. }
  48. message OptionsetRes{
  49. map<string, string> mapList=1;
  50. }
  51. message OptionCode{
  52. string code = 1;
  53. }
  54. message Options{
  55. string code = 1;
  56. string name = 2;
  57. string value = 3;
  58. }
  59. message ResponseByte{
  60. bytes data = 1;
  61. }
  62. message ExcelLogReq {
  63. string Module = 1;
  64. string Cond = 2;
  65. string CreateBy = 3;
  66. string CreateTime = 4;
  67. string LastUpdateBy = 5;
  68. string LastUpdateTime = 6;
  69. string DelFlag = 7;
  70. }
  71. message ExcelLogRes {
  72. int64 Status = 1;
  73. }
  74. message SchoolIdsReq {
  75. repeated string names = 1;
  76. }
  77. message ListOfInt {
  78. repeated int64 ids = 1;
  79. }
  80. message SchoolIdsRes {
  81. map<string, int64> mapList=1;
  82. }
  83. message CityIdsReq {
  84. string names = 1;
  85. }
  86. message CityIdsRes {
  87. map<string, int64> mapList=1;
  88. }
  89. message BytesReq{
  90. bytes req = 1;
  91. }
  92. message BytesResp{
  93. bytes resp = 1;
  94. }
  95. message GetErpRoleRes{
  96. string user_id = 1;
  97. string role = 2;
  98. int64 sch_id = 3;
  99. }
  100. message GetErpRoleReq{
  101. string mobile = 1;
  102. string user_id = 2;
  103. }
  104. message GetErpOrganSchPerByUserIdReq{
  105. string user_id = 1;
  106. }
  107. message GetErpOrganSchPerByUserIdRes{
  108. repeated OrganSchool school = 1;
  109. }
  110. message OrganSchool {
  111. int64 id =1;
  112. string name = 2;
  113. int64 organ_id = 3;
  114. }
  115. message GetErpSchoolRes{
  116. repeated OrganSchool school = 1;
  117. }
  118. message GetErpActiveReq{
  119. uint64 sch_id = 1;
  120. }
  121. message GetErpActiveRes{
  122. repeated Active active = 1;
  123. }
  124. message Active{
  125. int64 active_id = 1;
  126. string ma_name = 2;
  127. }
  128. message DataPermissionReq {
  129. string rule_code = 1;
  130. string user_id = 2;
  131. }
  132. message DataPermissionRes {
  133. map<string, string> mapList=1;
  134. }
  135. message MktReq {
  136. int64 Id = 1;
  137. string MkId = 2;
  138. int64 PartTimeUserId = 3;
  139. int64 UserId = 4;
  140. string StuName = 5;
  141. int64 AgeGroup = 6;
  142. string StuLinkPerson = 7;
  143. string StuPhone = 8;
  144. int64 SchId = 9;
  145. string Address = 10;
  146. string CreateTime = 11;
  147. int64 DelFlag = 12;
  148. int64 CheckState = 13;
  149. string CheckTime = 14;
  150. string CheckBy = 15;
  151. int64 NetworkDetailId = 16;
  152. int64 ActiveId = 17;
  153. int64 CallType = 18;
  154. int64 MaType = 19;
  155. int64 QuaoYji = 20;
  156. int64 MktActivityId = 21;
  157. int64 LoadSchId = 22;
  158. }
  159. message MktRes {
  160. int64 Status = 1;
  161. }
  162. message StudentReq {
  163. int64 Id = 1;
  164. }
  165. message StudentRes {
  166. int64 Id = 1;
  167. string StuPhone = 2;
  168. }
  169. service Transform {
  170. rpc GetUser(UserRequest) returns(UserResponse);
  171. rpc ParseToken(TokenRequest) returns(TokenResponse);
  172. //获取erp 省、城市树
  173. rpc GetErpCityTree(Empty) returns(TreeNodes);
  174. rpc AddMkt(MktReq) returns(MktRes);
  175. //获取erp 字典
  176. rpc LoadOptionset(OptionsetReq) returns(OptionsetRes);
  177. rpc GetSchoolIds(SchoolIdsReq) returns(SchoolIdsRes);
  178. rpc GetCityIds(CityIdsReq) returns(CityIdsRes);
  179. rpc PostExcelLog(ExcelLogReq) returns(ExcelLogRes);
  180. rpc GetErpOptionset(OptionCode) returns(Options);
  181. rpc GetStudent(StudentReq) returns(StudentRes);
  182. //获取数据权限
  183. rpc GetDataPermission(DataPermissionReq) returns(DataPermissionRes);
  184. //获取erp 渠道细分树
  185. rpc GetErpMktNetWorkDetailTree(Empty) returns(TreeNodes);
  186. //获取erp 用户校区权限
  187. rpc GetErpOrganSchPerByUserId(GetErpOrganSchPerByUserIdReq) returns(GetErpOrganSchPerByUserIdRes);
  188. //获取 erp 用户角色
  189. rpc GetErpRole(GetErpRoleReq) returns(GetErpRoleRes);
  190. //获取 erp 全部校区
  191. rpc GetErpSchool(Empty) returns(GetErpSchoolRes);
  192. //获取 erp 活动
  193. rpc GetErpActive(GetErpActiveReq) returns(GetErpActiveRes);
  194. //获取erp 省、城、校区
  195. rpc GetErpOrganSchTree(Empty) returns(TreeNodes);
  196. }