bxsubscribe.proto 11 KB

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