bxsubscribe.proto 11 KB

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