bxsubscribe.proto 11 KB

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