transform.proto 4.6 KB

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