transform.proto 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  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 CityMkReq {
  100. string phones = 1;
  101. }
  102. message CityIdsRes {
  103. map<string, int64> mapList=1;
  104. }
  105. message CityMkRes {
  106. map<string, string> mapList=1;
  107. }
  108. message BytesReq{
  109. bytes req = 1;
  110. }
  111. message BytesResp{
  112. bytes resp = 1;
  113. }
  114. message GetErpRoleRes{
  115. string user_id = 1;
  116. string role = 2;
  117. int64 sch_id = 3;
  118. }
  119. message GetErpRoleReq{
  120. string mobile = 1;
  121. string user_id = 2;
  122. }
  123. message GetErpOrganSchPerByUserIdReq{
  124. string user_id = 1;
  125. }
  126. message GetErpOrganSchPerByUserIdRes{
  127. repeated OrganSchool school = 1;
  128. }
  129. message OrganSchool {
  130. int64 id =1;
  131. string name = 2;
  132. int64 organ_id = 3;
  133. }
  134. message GetErpSchoolRes{
  135. repeated OrganSchool school = 1;
  136. }
  137. message GetErpActiveReq{
  138. uint64 sch_id = 1;
  139. }
  140. message GetErpActiveRes{
  141. repeated Active active = 1;
  142. }
  143. message Active{
  144. int64 active_id = 1;
  145. string ma_name = 2;
  146. }
  147. message DataPermissionReq {
  148. string rule_code = 1;
  149. string user_id = 2;
  150. }
  151. message DataPermissionRes {
  152. map<string, string> mapList=1;
  153. }
  154. message MktReq {
  155. int64 Id = 1;
  156. string MkId = 2;
  157. int64 PartTimeUserId = 3;
  158. int64 UserId = 4;
  159. string StuName = 5;
  160. int64 AgeGroup = 6;
  161. int64 StuLinkPerson = 7;
  162. string StuPhone = 8;
  163. int64 SchId = 9;
  164. string Address = 10;
  165. string CreateTime = 11;
  166. int64 DelFlag = 12;
  167. int64 CheckState = 13;
  168. string CheckTime = 14;
  169. string CheckBy = 15;
  170. int64 NetworkDetailId = 16;
  171. int64 ActiveId = 17;
  172. int64 CallType = 18;
  173. int64 MaType = 19;
  174. int64 QuaoYji = 20;
  175. int64 MktActivityId = 21;
  176. int64 LoadSchId = 22;
  177. string Remark = 23;
  178. int64 Gender = 24;
  179. }
  180. message MktRes {
  181. int64 Status = 1;
  182. }
  183. message StudentReq {
  184. int64 Id = 1;
  185. }
  186. message StudentRes {
  187. int64 Id = 1;
  188. string StuPhone = 2;
  189. string CreateBy = 3;
  190. string CreateTime = 4;
  191. }
  192. message ErpUserReq{
  193. string ErpId =1;
  194. }
  195. message ErpUserRes {
  196. int64 OsId = 1;
  197. string OsName = 2;
  198. }
  199. service Transform {
  200. rpc GetUser(UserRequest) returns(UserResponse);
  201. rpc ParseToken(TokenRequest) returns(TokenResponse);
  202. //获取erp 省、城市树
  203. rpc GetErpCityTree(Empty) returns(TreeNodes);
  204. rpc AddMkt(MktReq) returns(MktRes);
  205. //获取erp 字典
  206. rpc LoadOptionset(OptionsetReq) returns(OptionsetRes);
  207. rpc GetSchoolIds(SchoolIdsReq) returns(SchoolIdsRes);
  208. rpc GetCityIds(CityIdsReq) returns(CityIdsRes);
  209. rpc GetMkIds(CityMkReq) returns(CityMkRes);
  210. rpc PostExcelLog(ExcelLogReq) returns(ExcelLogRes);
  211. rpc GetErpOptionset(OptionCode) returns(Options);
  212. rpc GetStudent(StudentReq) returns(StudentRes);
  213. //获取数据权限
  214. rpc GetDataPermission(DataPermissionReq) returns(DataPermissionRes);
  215. //获取erp 渠道细分树
  216. rpc GetErpMktNetWorkDetailTree(Empty) returns(TreeNodes);
  217. //获取erp 渠道细分树
  218. rpc GetErpMktNetWorkDetail(ErpMktNetWorkDetailReq) returns(ErpMktNetWorkDetailRes);
  219. //获取erp 用户校区权限
  220. rpc GetErpOrganSchPerByUserId(GetErpOrganSchPerByUserIdReq) returns(GetErpOrganSchPerByUserIdRes);
  221. //获取 erp 用户角色
  222. rpc GetErpRole(GetErpRoleReq) returns(GetErpRoleRes);
  223. //获取 erp 全部校区
  224. rpc GetErpSchool(Empty) returns(GetErpSchoolRes);
  225. //获取 erp 活动
  226. rpc GetErpActive(GetErpActiveReq) returns(GetErpActiveRes);
  227. //获取erp 省、城、校区
  228. rpc GetErpOrganSchTree(Empty) returns(TreeNodes);
  229. // 查看erp用户是否正常
  230. rpc GetErpUser(ErpUserReq) returns(ErpUserRes);
  231. }