bxsubscribe.proto 11 KB

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