bxsubscribe.proto 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445
  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. }
  134. //城市
  135. message CityList {
  136. repeated string city = 1;
  137. }
  138. //分类
  139. message Items{
  140. string s_item = 1;//分类名称
  141. int64 updateTime = 2;
  142. repeated Keys a_key = 3;
  143. }
  144. //关键词
  145. message Keys {
  146. repeated string key = 1;
  147. repeated string notkey = 2;
  148. int64 updateTime = 3;
  149. int64 matchway = 4;
  150. repeated string appendKey = 5;
  151. }
  152. message KeyItems{
  153. string s_item = 1;//分类名称
  154. int64 updateTime = 2;
  155. repeated Key a_key = 3;
  156. }
  157. //关键词
  158. message Key {
  159. repeated string key = 1;
  160. repeated string notkey = 2;
  161. int64 updateTime = 3;
  162. int64 matchway = 4;
  163. repeated string appendkey = 5;
  164. }
  165. message SetReadReq{
  166. string appId = 1;
  167. string userId = 2;
  168. string userType = 3;
  169. int64 vsid = 4;
  170. string EntId = 5;
  171. int64 newUserId = 6;
  172. string entUserId = 7;
  173. bool isEnt = 8;
  174. int64 positionType = 9;
  175. }
  176. message GetKeyReq{
  177. string appId = 1;
  178. string userId = 2;
  179. string userType = 3;
  180. string entId = 5;
  181. int64 newUserId = 6;
  182. string entUserId = 7;
  183. bool isEnt = 8;
  184. int64 vipPower = 4;
  185. int64 memberPower = 10;
  186. int64 powerSource = 11;
  187. int64 userPower = 12;
  188. string deptId = 13;
  189. int64 positionType = 14;
  190. }
  191. message GetDistributorReq{
  192. string appId = 1;
  193. string entId = 2;
  194. string entUserId = 3;
  195. string region = 4;
  196. string selectIds = 5;
  197. string queryType = 6;
  198. }
  199. message MsgDistributorReq{
  200. string appId = 1;
  201. string entId = 2;
  202. string entUserId = 3;
  203. string messageId = 4;//分发信息
  204. string staffs = 5; //分发的员工
  205. }
  206. message KeyResp {
  207. int64 err_code = 1;
  208. string err_msg = 2;
  209. repeated KeyItems items = 3;//关键词
  210. }
  211. message List{
  212. repeated string value = 1;
  213. }
  214. //订阅设置
  215. message Subscribe{
  216. map<string, List> area = 1;//地区
  217. repeated string buyerclass = 2;//采购单位类型
  218. repeated string infotype = 3;//信息类型
  219. repeated Items items = 4;//关键词
  220. int64 matchway = 5;//匹配方式 1标题 2正文
  221. int64 projectmatch = 6;//项目匹配
  222. bool keytip = 7;
  223. }
  224. message UserReq{
  225. string appId = 1;
  226. int64 entUserId = 2;
  227. string types = 3;//类型,不传按默认规则获取 m大会员 e商机管理 v超级订阅 f免费订阅
  228. int64 positionType = 4;//职位类型 0个人 1企业
  229. string userId = 5;
  230. int64 entId = 6;
  231. }
  232. //用户权益
  233. message UserResq{
  234. Subscribe data = 1;
  235. string error_msg = 2;
  236. int64 error_code = 3;
  237. }
  238. message DistributorResp {
  239. int64 err_code = 1;
  240. string err_msg = 2;
  241. repeated userResp items = 3;//分发人员
  242. }
  243. message userResp {
  244. string name = 1;
  245. int64 id = 2;
  246. string phone = 3;
  247. }
  248. message GetViewStatusReq{
  249. string appId = 1;
  250. string entId = 2;
  251. string entUserId = 3;
  252. string infoId = 4;
  253. }
  254. message ViewStatusResp {
  255. int64 err_code = 1;
  256. string err_msg = 2;
  257. repeated UserStatus items = 3;//分发人员
  258. }
  259. message UserStatus {
  260. string name = 1;
  261. int64 id = 2;
  262. int64 isvisit = 3;
  263. string visittime = 4;
  264. string date = 5;
  265. string phone = 6;
  266. int64 source = 7;
  267. }
  268. message GetUserInfoReq{
  269. string appId = 1;
  270. int64 entId = 2;
  271. int64 entUserId = 3;
  272. string userId = 4;
  273. int64 positionType = 5;
  274. int64 baseUserId = 6;
  275. string serviceType = 7;
  276. }
  277. message GetUserInfoResq{
  278. GetUserInfo data = 1;
  279. string error_msg = 2;
  280. int64 error_code = 3;
  281. }
  282. message GetUserInfo{
  283. string mail = 1;
  284. int64 state = 2;
  285. string imgUrl = 3;
  286. string appUrl = 4;
  287. bool showWx = 5;
  288. }
  289. message SetUserInfoReq{
  290. string appId = 1;
  291. int64 entId = 2;
  292. int64 entUserId = 3;
  293. string userId = 4;
  294. int64 positionType = 5;
  295. string mail = 6;
  296. }
  297. message GetPushSetReq{
  298. string appId = 1;
  299. int64 entId = 2;
  300. int64 entUserId = 3;
  301. string userId = 4;
  302. int64 positionType = 5;
  303. int64 positionId = 6;
  304. int64 accountId = 7;
  305. int64 baseUserId = 8;
  306. string mgoUserId = 9; //原userId
  307. }
  308. message GetPushSetResp{
  309. map<string, PushSet> data = 1;
  310. map<int64, TimeJson> timeData = 3;
  311. string error_msg = 4;
  312. int64 error_code = 5;
  313. }
  314. message TimeJson{
  315. repeated string a_times = 1;
  316. }
  317. message PushSet{
  318. repeated string a_times = 1;
  319. int64 i_wxpush = 2;
  320. int64 i_apppush = 3;
  321. int64 i_mailpush = 4;
  322. int64 i_ratemode = 5;
  323. int64 isWxShow = 6;
  324. int64 interested = 7;
  325. int64 isMailShow = 8;
  326. int64 i_nomsgtip=9;
  327. }
  328. message SetPushSetReq{
  329. string appId = 1;
  330. int64 entId = 2;
  331. int64 entUserId = 3;
  332. string userId = 4;
  333. int64 positionType = 5;
  334. string item = 6;
  335. string setType = 7;
  336. int64 ratemode = 8;
  337. string pushType = 9;
  338. repeated string times = 10;
  339. int64 pushValue = 11;
  340. int64 interested = 12;
  341. }
  342. message StaffSubscribeReq {
  343. string appId = 1;
  344. int64 entId = 2;
  345. int64 entUserId = 3;
  346. string query = 4;
  347. int64 eStatus = 6;
  348. int64 pStatus = 7;
  349. int64 pageNum = 8;
  350. int64 pageSize = 9;
  351. }
  352. message StaffSubscribeListResp {
  353. int64 err_code = 1;
  354. string err_msg = 2;
  355. int64 total = 3;
  356. repeated StaffSubscribe items = 4;
  357. }
  358. message StaffSubscribe {
  359. string token = 1;
  360. string name = 2;
  361. string phone = 3;
  362. int64 eStatus = 4;
  363. int64 pStatus = 5;
  364. }
  365. message StaffSubscribeDetailReq{
  366. int64 entId = 1;
  367. int64 entUserId = 2;
  368. string token = 3;
  369. }
  370. message StaffSubscribeDetail{
  371. int64 err_code = 1;
  372. string err_msg = 2;
  373. bytes data = 3;
  374. }
  375. message BidDistributorReq{
  376. string appId = 1;
  377. string entId = 2;
  378. string entUserId = 3;
  379. repeated string infoIds = 4;//分发信息
  380. string staffs = 5; //分发的员工
  381. }
  382. service Bxsubscribe {
  383. //获取订阅推送列表
  384. rpc GetSubList(SubscribeInfosReq) returns(SubscribeInfosResp);
  385. //获取订阅推送相关信息
  386. rpc GetSubSomeInfo(SomeInfoReq) returns(SomeInfoResp);
  387. //修改订阅信息接口
  388. rpc UpdateSubScribeInfo(UpdateSubScribeInfoReq)returns(StatusResp);
  389. //推送页面筛选导出
  390. rpc ByPushHistory(SubscribeInfosReq)returns(ByPushHistoryResp);
  391. //推送数据浏览状态修改
  392. rpc SetRead(SetReadReq)returns(StatusResp);
  393. //关键词获取
  394. rpc GetKey(GetKeyReq)returns(KeyResp);
  395. //订阅设置获取
  396. rpc GetSubScribeInfo(UserReq)returns(UserResq);
  397. //信息分发
  398. rpc MsgDistributor(MsgDistributorReq)returns(StatusResp);
  399. //手动分发人员查询
  400. rpc GetDistributor(GetDistributorReq)returns(DistributorResp);
  401. //查看状态
  402. rpc GetViewStatus(GetViewStatusReq)returns(ViewStatusResp);
  403. //用户推送信息查看
  404. rpc userInfo(GetUserInfoReq)returns(GetUserInfoResq);
  405. //用户邮箱保存
  406. rpc setUser(SetUserInfoReq)returns(StatusResp);
  407. //用户推送设置查看
  408. rpc getPushSet(GetPushSetReq)returns(GetPushSetResp);
  409. //用户推送设置修改
  410. rpc setPushSet(SetPushSetReq)returns(StatusResp);
  411. //查看企业员工用户订阅
  412. rpc getStaffSubscribeList(StaffSubscribeReq)returns(StaffSubscribeListResp);
  413. //查看企业员工用户订阅详情
  414. rpc getStaffSubscribeDetail(StaffSubscribeDetailReq)returns(StaffSubscribeDetail);
  415. //标讯信息分发
  416. rpc bidDistributor(BidDistributorReq)returns(StatusResp);
  417. }