bxsubscribe.proto 12 KB

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