bxsubscribe.proto 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. syntax = "proto3";
  2. package bxsubscribe;
  3. option go_package = "./bxsubscribe";
  4. message SubscribeInfosReq {
  5. int64 pageNum = 1;
  6. int64 pageSize = 2;
  7. string selectTime = 3;
  8. string area = 4;
  9. string city = 5;
  10. string industry = 6;
  11. string buyerClass = 7;
  12. string keyWords = 8;
  13. string subtype = 9;
  14. string userType = 10;//fType:普通用户;vType:超级订阅用户;mType:大会员用户;eType:商机管理用户;
  15. string userId = 11;
  16. string entId = 12;
  17. string appId = 13;
  18. string price = 14;
  19. string fileExists = 15;
  20. string isRead = 16; //是否已读
  21. string staffs = 17;//分发人员
  22. string source = 18; //信息来源
  23. string entUserId = 19;
  24. string deptId = 20;
  25. int64 newUserId = 21;
  26. bool IsEnt = 22;
  27. string SelectIds = 23;
  28. int64 positionType = 24;
  29. }
  30. message SubscribeInfosResp {
  31. int64 err_code = 1;
  32. string err_msg = 2;
  33. subscribeData data = 3;
  34. }
  35. message subscribeData{
  36. int64 count = 1;
  37. bool hasNextPage = 2;
  38. repeated subscribeInfo list = 3;
  39. }
  40. message subscribeInfo {
  41. string _id = 1;//和推送程序 缓存保持一致
  42. string title = 2;
  43. string area = 3;
  44. string buyerClass = 4;
  45. string subtype = 5;
  46. string industry = 6;
  47. int64 publishTime = 7;
  48. int64 ca_index = 8;
  49. int64 ca_date = 9;
  50. int64 ca_isvisit = 10;
  51. int64 ca_type = 11;
  52. repeated string matchKeys = 12;
  53. double budget = 13;// 预算
  54. double bidAmount = 14;
  55. int64 collection = 15;
  56. string buyer = 16;
  57. string projectName = 17;
  58. string winner = 18;
  59. int64 bidOpenTime = 19;
  60. int64 ca_isvip = 20;
  61. bool ca_fileExists = 21;
  62. int64 source = 22;//来源;1:个人订阅 2:企业自动分发 3:企业手动分发
  63. string site = 23; // 网站名称
  64. string buyerTel = 24; // 采购单位联系方式
  65. string buyerPerson = 25; // 采购单位联系人
  66. string agency = 26;//代理机构
  67. string agencyPerson = 27;//代理机构联系人
  68. string agencyTel = 28;//代理机构联系电话
  69. int64 signendTime = 29 ;// 报名截止日期
  70. int64 bidendTime = 30;// 投标截止日期
  71. repeated WinnerInfo winnerInfo = 31;// 中标企业信息
  72. string spiderCode = 33;//网站代码
  73. }
  74. //
  75. message WinnerInfo{
  76. string winner = 1;
  77. string winnerTel = 2;
  78. string winnerPerson = 3;
  79. string winnerId = 4;
  80. }
  81. //
  82. message SomeInfoReq{
  83. string appId = 1;
  84. string userId = 2;
  85. string userType = 3;
  86. string newUserId = 4;
  87. string entId = 5;
  88. string accountId = 6;
  89. string positionType = 7;
  90. string positionId = 8;
  91. }
  92. message SomeInfoResp {
  93. int64 err_code = 1;
  94. string err_msg = 2;
  95. SomeInfo data = 3;
  96. }
  97. message SomeInfo{
  98. bool hasKey = 1;//免费用户和超级订阅是否有订阅词
  99. bool isInTSguide = 2;//是否进入向导
  100. int64 isExpire = 3;//超级订阅到期提醒
  101. int64 isOnTail = 4;//超级订阅试用状态
  102. bool isPassCount = 5;//推送数量校验
  103. bool otherFlag = 6;//首次用户推送查询“其他”
  104. bool isRead = 7;//某个通知??是否已读
  105. repeated string industry = 8;//会员订阅的行业
  106. string userId = 9;//用户id
  107. }
  108. //
  109. message StatusResp{
  110. string error_msg = 1;
  111. int64 error_code = 2;
  112. int64 status = 3;
  113. }
  114. message ByPushHistoryResp{
  115. string error_msg = 1;
  116. int64 error_code = 2;
  117. string data = 3;
  118. }
  119. message UpdateSubScribeInfoReq{
  120. bytes subSet = 1;//订阅设置
  121. string userId = 2;//用户id
  122. int64 PositionType = 3;
  123. }
  124. //城市
  125. message CityList {
  126. repeated string city = 1;
  127. }
  128. //分类
  129. message Items{
  130. string s_item = 1;//分类名称
  131. int64 updateTime = 2;
  132. repeated Keys a_key = 3;
  133. }
  134. //关键词
  135. message Keys {
  136. repeated string key = 1;
  137. repeated string notkey = 2;
  138. int64 updateTime = 3;
  139. int64 matchway = 4;
  140. repeated string appendKey = 5;
  141. }
  142. message KeyItems{
  143. string s_item = 1;//分类名称
  144. int64 updateTime = 2;
  145. repeated Key a_key = 3;
  146. }
  147. //关键词
  148. message Key {
  149. repeated string key = 1;
  150. repeated string notkey = 2;
  151. int64 updateTime = 3;
  152. int64 matchway = 4;
  153. repeated string appendkey = 5;
  154. }
  155. message SetReadReq{
  156. string appId = 1;
  157. string userId = 2;
  158. string userType = 3;
  159. int64 vsid = 4;
  160. string EntId = 5;
  161. int64 newUserId = 6;
  162. string entUserId = 7;
  163. bool isEnt = 8;
  164. int64 positionType = 9;
  165. }
  166. message GetKeyReq{
  167. string appId = 1;
  168. string userId = 2;
  169. string userType = 3;
  170. string entId = 5;
  171. int64 newUserId = 6;
  172. string entUserId = 7;
  173. bool isEnt = 8;
  174. int64 vipPower = 4;
  175. int64 memberPower = 10;
  176. int64 powerSource = 11;
  177. int64 userPower = 12;
  178. string deptId = 13;
  179. int64 positionType = 14;
  180. }
  181. message GetDistributorReq{
  182. string appId = 1;
  183. string entId = 2;
  184. string entUserId = 3;
  185. string region = 4;
  186. string selectIds = 5;
  187. string queryType = 6;
  188. }
  189. message MsgDistributorReq{
  190. string appId = 1;
  191. string entId = 2;
  192. string entUserId = 3;
  193. string messageId = 4;//分发信息
  194. string staffs = 5; //分发的员工
  195. }
  196. message KeyResp {
  197. int64 err_code = 1;
  198. string err_msg = 2;
  199. repeated KeyItems items = 3;//关键词
  200. }
  201. message List{
  202. repeated string value = 1;
  203. }
  204. //订阅设置
  205. message Subscribe{
  206. map<string, List> area = 1;//地区
  207. repeated string buyerclass = 2;//采购单位类型
  208. repeated string infotype = 3;//信息类型
  209. repeated Items items = 4;//关键词
  210. int64 matchway = 5;//匹配方式 1标题 2正文
  211. int64 projectmatch = 6;//项目匹配
  212. bool keytip = 7;
  213. }
  214. message UserReq{
  215. string appId = 1;
  216. int64 entUserId = 2;
  217. string types = 3;//类型,不传按默认规则获取 m大会员 e商机管理 v超级订阅 f免费订阅
  218. int64 positionType = 4;//职位类型 0个人 1企业
  219. string userId = 5;
  220. int64 entId = 6;
  221. }
  222. //用户权益
  223. message UserResq{
  224. Subscribe data = 1;
  225. string error_msg = 2;
  226. int64 error_code = 3;
  227. }
  228. message DistributorResp {
  229. int64 err_code = 1;
  230. string err_msg = 2;
  231. repeated userResp items = 3;//分发人员
  232. }
  233. message userResp {
  234. string name = 1;
  235. int64 id = 2;
  236. string phone = 3;
  237. }
  238. message GetViewStatusReq{
  239. string appId = 1;
  240. string entId = 2;
  241. string entUserId = 3;
  242. string infoId = 4;
  243. }
  244. message ViewStatusResp {
  245. int64 err_code = 1;
  246. string err_msg = 2;
  247. repeated UserStatus items = 3;//分发人员
  248. }
  249. message UserStatus {
  250. string name = 1;
  251. int64 id = 2;
  252. int64 isvisit = 3;
  253. string visittime = 4;
  254. string date = 5;
  255. }
  256. message GetUserInfoReq{
  257. string appId = 1;
  258. int64 entId = 2;
  259. int64 entUserId = 3;
  260. string userId = 4;
  261. int64 positionType = 5;
  262. int64 baseUserId = 6;
  263. string serviceType = 7;
  264. }
  265. message GetUserInfoResq{
  266. GetUserInfo data = 1;
  267. string error_msg = 2;
  268. int64 error_code = 3;
  269. }
  270. message GetUserInfo{
  271. string mail = 1;
  272. bool showWx = 2;
  273. string imgUrl = 3;
  274. string appUrl=4;
  275. }
  276. message SetUserInfoReq{
  277. string appId = 1;
  278. int64 entId = 2;
  279. int64 entUserId = 3;
  280. string userId = 4;
  281. int64 positionType = 5;
  282. string mail = 6;
  283. }
  284. message GetPushSetReq{
  285. string appId = 1;
  286. int64 entId = 2;
  287. int64 entUserId = 3;
  288. string userId = 4;
  289. int64 positionType = 5;
  290. int64 positionId = 6;
  291. int64 accountId = 7;
  292. int64 baseUserId = 8;
  293. }
  294. message GetPushSetResp{
  295. map<string, PushSet> data = 1;
  296. string error_msg = 2;
  297. int64 error_code = 3;
  298. }
  299. message PushSet{
  300. repeated string a_times = 1;
  301. int64 i_wxpush = 2;
  302. int64 i_apppush = 3;
  303. int64 i_mailpush = 4;
  304. int64 i_ratemode = 5;
  305. int64 isWxShow = 6;
  306. int64 interested=7;
  307. }
  308. message SetPushSetReq{
  309. string appId = 1;
  310. int64 entId = 2;
  311. int64 entUserId = 3;
  312. string userId = 4;
  313. int64 positionType = 5;
  314. string item = 6;
  315. string setType = 7;
  316. int64 ratemode = 8;
  317. string pushType = 9;
  318. repeated string times = 10;
  319. int64 pushValue = 11;
  320. int64 interested = 12;
  321. }
  322. service Bxsubscribe {
  323. //获取订阅推送列表
  324. rpc GetSubList(SubscribeInfosReq) returns(SubscribeInfosResp);
  325. //获取订阅推送相关信息
  326. rpc GetSubSomeInfo(SomeInfoReq) returns(SomeInfoResp);
  327. //修改订阅信息接口
  328. rpc UpdateSubScribeInfo(UpdateSubScribeInfoReq)returns(StatusResp);
  329. //推送页面筛选导出
  330. rpc ByPushHistory(SubscribeInfosReq)returns(ByPushHistoryResp);
  331. //推送数据浏览状态修改
  332. rpc SetRead(SetReadReq)returns(StatusResp);
  333. //关键词获取
  334. rpc GetKey(GetKeyReq)returns(KeyResp);
  335. //订阅设置获取
  336. rpc GetSubScribeInfo(UserReq)returns(UserResq);
  337. //信息分发
  338. rpc MsgDistributor(MsgDistributorReq)returns(StatusResp);
  339. //手动分发人员查询
  340. rpc GetDistributor(GetDistributorReq)returns(DistributorResp);
  341. //查看状态
  342. rpc GetViewStatus(GetViewStatusReq)returns(ViewStatusResp);
  343. //用户推送信息查看
  344. rpc userInfo(GetUserInfoReq)returns(GetUserInfoResq);
  345. //用户邮箱保存
  346. rpc setUser(SetUserInfoReq)returns(StatusResp);
  347. //用户推送设置查看
  348. rpc getPushSet(GetPushSetReq)returns(GetPushSetResp);
  349. //用户推送设置修改
  350. rpc setPushSet(SetPushSetReq)returns(StatusResp);
  351. }