bxsubscribe.proto 9.8 KB

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