gorpc.proto 61 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323
  1. syntax = "proto3";
  2. package gorpc;
  3. option go_package = "./pb";
  4. enum RegisterMode {
  5. RegisterModeUnknown = 0;
  6. RegisterModeGuest = 1;
  7. RegisterModeApp = 2;
  8. RegisterModeWeb = 3;
  9. RegisterModePc = 4;
  10. RegisterModeInvalid = 9999;
  11. }
  12. // enum Provider {
  13. // ProviderUnknown = 0;
  14. // ProviderGoogle = 1;
  15. // ProviderApple = 2;
  16. // ProviderMeta = 3;
  17. // ProviderGithub = 4;
  18. // }
  19. // 根据需要增加状态
  20. enum CommonResultCode {
  21. Success = 0;
  22. }
  23. enum Status {
  24. UnknownStatus = 0;
  25. StatusValid = 1;
  26. StatusInValid = 2;
  27. }
  28. enum BoolInt {
  29. BoolIntUnknown = 0;
  30. BoolIntTrue = 1;
  31. BoolIntFalse = 2;
  32. }
  33. message Empty {}
  34. message Int64SelectController {
  35. repeated int64 values = 1;
  36. bool exclude = 2;
  37. }
  38. message IntSelectController {
  39. repeated int32 values = 1;
  40. bool exclude = 2;
  41. }
  42. message StringSelectController {
  43. repeated string values = 1;
  44. bool exclude = 2;
  45. }
  46. message Page {
  47. message OrderItem {
  48. string column = 1;
  49. bool asc = 2;
  50. bool isFunc = 3;
  51. }
  52. int64 pageNo = 1;
  53. int64 pageSize = 2;
  54. int64 startTime = 3;
  55. int64 endTime = 4;
  56. repeated OrderItem sortBy = 5;
  57. bool ignoreTotal = 6; // 忽略总条数
  58. bool ignoreStat = 7; // 忽略总条数
  59. bool ignoreList = 8; // 忽略列表
  60. repeated int64 ids = 9;
  61. repeated string groupBy = 10;
  62. }
  63. message CommonResult {
  64. CommonResultCode code = 1;
  65. string msg = 2;
  66. }
  67. message BaseReq {
  68. int64 timeZoneOffset = 1;
  69. string lan = 2;
  70. }
  71. message DeleteIdResp { repeated int64 failedIds = 1; }
  72. message Ids { repeated int64 ids = 1; }
  73. message Request {}
  74. message Response { string msg = 1; }
  75. message TransactionOperation {
  76. string table = 1; // 表名
  77. string operate = 2; // delete,insert,update
  78. string data = 3; // json格式
  79. }
  80. message TransactionReq { repeated TransactionOperation transactions = 1; }
  81. message GameVo {
  82. int64 id = 1;
  83. string name = 2;
  84. string pkg = 3;
  85. string categories = 4;
  86. string icon = 5;
  87. string internal_icon = 6;
  88. string source_icon = 7;
  89. int64 status = 8;
  90. int64 state = 9;
  91. int64 enableRating = 10;
  92. int64 gameUpdateTime = 11;
  93. int64 gameBoostCount = 12;
  94. string gameBoostCountryCount = 13;
  95. int64 createTime = 14;
  96. int64 updateTime = 15;
  97. }
  98. message GameReq { GameVo vo = 1; }
  99. message GameListReq {
  100. Page page = 1;
  101. repeated string pkgs = 2;
  102. GameVo vo = 3;
  103. }
  104. message GameListRes {
  105. int64 total = 1;
  106. repeated GameVo list = 2;
  107. }
  108. message RelGameRankVo {
  109. int64 id = 1;
  110. int64 gameId = 2;
  111. int64 rankId = 3;
  112. int64 weight = 4;
  113. int64 createTime = 5;
  114. int64 updateTime = 6;
  115. }
  116. message RelGameRankReq { RelGameRankVo vo = 1; }
  117. message RelGameRankListReq {
  118. Page page = 1;
  119. RelGameRankVo vo = 2;
  120. }
  121. message RelGameRankListRes {
  122. int64 total = 1;
  123. repeated RelGameRankVo list = 2;
  124. }
  125. message RelGameVpnGroupVo {
  126. int64 id = 1;
  127. int64 gameId = 2;
  128. string productCode = 3;
  129. int64 vpnGroupId = 4;
  130. int64 status = 5;
  131. int64 createTime = 6;
  132. int64 updateTime = 7;
  133. }
  134. message RelGameVpnGroupReq { RelGameVpnGroupVo vo = 1; }
  135. message RelGameVpnGroupListReq {
  136. repeated int64 gameIds = 1;
  137. RelGameVpnGroupVo vo = 2;
  138. }
  139. message RelGameVpnGroupListRes {
  140. int64 total = 1;
  141. repeated RelGameVpnGroupVo list = 2;
  142. }
  143. message GameRedisHScanByNameReq {
  144. string name = 1;
  145. int64 cursor = 2;
  146. int64 count = 3;
  147. }
  148. message GameRedisHScanByNameResp {
  149. repeated int64 ids = 1;
  150. int64 cursor = 2;
  151. }
  152. message GameCustomerVo {
  153. int64 id = 1;
  154. string name = 2;
  155. string pkg = 3;
  156. string icon = 4;
  157. int64 createTime = 5;
  158. int64 updateTime = 6;
  159. }
  160. message GameCustomerListReq {
  161. Page page = 1;
  162. repeated string pkgs = 2;
  163. GameCustomerVo vo = 3;
  164. }
  165. message GameCustomerListRes {
  166. int64 total = 1;
  167. repeated GameCustomerVo list = 2;
  168. }
  169. message GameCustomerAddResp {
  170. GameCustomerVo vo = 1;
  171. bool ExistBoost = 2;
  172. }
  173. message GameCategoryVo {
  174. int64 id = 1;
  175. string code = 2;
  176. string name = 3;
  177. string described = 4;
  178. int64 createTime = 5;
  179. int64 updateTime = 6;
  180. }
  181. message GameCategoryReq { GameCategoryVo vo = 1; }
  182. message GameCategoryListReq {
  183. Page page = 1;
  184. GameCategoryVo vo = 3;
  185. }
  186. message GameCategoryListRes {
  187. int64 total = 1;
  188. repeated GameCategoryVo list = 2;
  189. }
  190. service GoGameClient {
  191. // 加速器游戏管理
  192. rpc GameAdd(GameVo) returns (GameVo);
  193. rpc GameUpdate(GameVo) returns (Empty);
  194. rpc GameDel(Ids) returns (Empty);
  195. rpc GameGet(GameReq) returns (GameVo);
  196. rpc GameList(GameListReq) returns (GameListRes);
  197. rpc GameAll(Request) returns (GameListRes);
  198. rpc GameRedisHScanByName(GameRedisHScanByNameReq)
  199. returns (GameRedisHScanByNameResp);
  200. // 游戏榜单关联关系
  201. rpc RelGameRankAdd(RelGameRankVo) returns (RelGameRankVo);
  202. rpc RelGameRankUpdate(RelGameRankVo) returns (Empty);
  203. rpc RelGameRankDel(Ids) returns (Empty);
  204. rpc RelGameRankGet(RelGameRankReq) returns (RelGameRankVo);
  205. rpc RelGameRankList(RelGameRankListReq) returns (RelGameRankListRes);
  206. // 游戏地域关联关系
  207. rpc RelGameVpnGroupAdd(RelGameVpnGroupVo) returns (RelGameVpnGroupVo);
  208. rpc RelGameVpnGroupUpdate(RelGameVpnGroupVo) returns (Empty);
  209. rpc RelGameVpnGroupDel(Ids) returns (Empty);
  210. rpc RelGameVpnGroupGet(RelGameVpnGroupReq) returns (RelGameVpnGroupVo);
  211. rpc RelGameVpnGroupList(RelGameVpnGroupListReq)
  212. returns (RelGameVpnGroupListRes);
  213. // 用户提交游戏
  214. rpc GameCustomerList(GameCustomerListReq) returns (GameCustomerListRes);
  215. rpc GameCustomerAdd(GameCustomerVo) returns (GameCustomerAddResp);
  216. rpc GameCustomerDel(Ids) returns (Empty);
  217. rpc GameCategoryAdd(GameCategoryVo) returns (GameCategoryVo);
  218. rpc GameCategoryUpdate(GameCategoryVo) returns (Empty);
  219. rpc GameCategoryDel(Ids) returns (Empty);
  220. rpc GameCategoryGet(GameCategoryReq) returns (GameCategoryVo);
  221. rpc GameCategoryList(GameCategoryListReq) returns (GameCategoryListRes);
  222. rpc GameCategoryAll(Request) returns (GameCategoryListRes);
  223. }
  224. message I18nVo {
  225. string code = 1;
  226. string value = 2;
  227. }
  228. message ConfigGetReq {
  229. int64 id = 1; // ID
  230. string code = 2; // 类型标识
  231. }
  232. // GlobalParam
  233. message GlobalParamVo {
  234. int64 id = 1;
  235. string paramKey = 2;
  236. string paramValue = 3;
  237. string valueType = 4;
  238. float minValue = 5;
  239. float maxValue = 6;
  240. string name = 7;
  241. BoolInt editable = 8;
  242. BoolInt nullable = 9;
  243. BoolInt hidden = 10;
  244. BoolInt mutiLang = 11;
  245. int64 sort = 12;
  246. string remark = 13;
  247. BoolInt apiExport = 14;
  248. string apiExportName = 15;
  249. int64 createTime = 16;
  250. int64 updateTime = 17;
  251. // valueType 为 string、text、json、string[], 且 mutiLang 为 true
  252. // 时,需要同时干查询/修改/插入多语言数据
  253. repeated I18nVo i18ns = 18;
  254. }
  255. message GlobalParamGetReq {
  256. GlobalParamVo vo = 1;
  257. string lang = 2;
  258. }
  259. message GlobalParamListReq {
  260. Page page = 1;
  261. GlobalParamVo vo = 2;
  262. repeated int64 excludeIds = 3; // 排除的ID
  263. };
  264. message GlobalParamListResp {
  265. int64 total = 1;
  266. repeated GlobalParamVo list = 2;
  267. };
  268. // end GlobalParam
  269. // Product
  270. message ProductVo {
  271. int64 id = 1;
  272. string code = 2;
  273. string name = 3;
  274. string domain = 4;
  275. Status status = 5;
  276. string langs = 6;
  277. string defaultLang = 7;
  278. string remark = 8;
  279. int64 createTime = 9;
  280. int64 updateTime = 10;
  281. }
  282. message ProductListReq {
  283. Page page = 1;
  284. ProductVo vo = 2;
  285. repeated string productCodes = 3;
  286. repeated int64 excludeIds = 4;
  287. }
  288. message ProductListResp {
  289. int64 total = 1;
  290. repeated ProductVo list = 2;
  291. }
  292. // end Product
  293. // ProductParam
  294. message ProductParamVo {
  295. int64 id = 1;
  296. string productCode = 2;
  297. string paramKey = 3;
  298. string paramValue = 4;
  299. string valueType = 5;
  300. float minValue = 6;
  301. float maxValue = 7;
  302. string name = 8;
  303. BoolInt editable = 9;
  304. BoolInt nullable = 10;
  305. BoolInt hidden = 11;
  306. BoolInt mutiLang = 12;
  307. int64 sort = 13;
  308. string remark = 14;
  309. BoolInt apiExport = 15;
  310. string apiExportName = 16;
  311. int64 createTime = 17;
  312. int64 updateTime = 18;
  313. // valueType 为 string、text、json、string[], 且 mutiLang 为 true
  314. // 时,需要同时干查询/修改/插入多语言数据
  315. repeated I18nVo i18ns = 19;
  316. }
  317. message ProductParamGetReq {
  318. ProductParamVo vo = 1;
  319. string lang = 2;
  320. }
  321. message ProductParamListReq {
  322. Page page = 1;
  323. ProductParamVo vo = 2;
  324. repeated string productCodes = 3;
  325. repeated int64 excludeIds = 4;
  326. };
  327. message ProductParamListResp {
  328. int64 total = 1;
  329. repeated ProductParamVo list = 2;
  330. };
  331. // end ProductParam
  332. // ProductAction
  333. message ProductActionVo {
  334. int64 id = 1;
  335. string productCode = 2;
  336. string imgUrl = 3;
  337. string actionType = 4;
  338. string actionData = 5;
  339. string title = 6;
  340. Status status = 7;
  341. int64 createTime = 8;
  342. int64 updateTime = 9;
  343. int64 sort = 10;
  344. }
  345. message ProductActionReq { ProductActionVo vo = 1; }
  346. message ProductActionListReq {
  347. Page page = 1;
  348. ProductActionVo vo = 2;
  349. repeated string productCodes = 3;
  350. repeated int64 excludeIds = 4;
  351. }
  352. message ProductActionListResp {
  353. int64 total = 1;
  354. repeated ProductActionVo list = 2;
  355. }
  356. // end ProductAction
  357. // AreaParam
  358. message AreaParamVo {
  359. int64 id = 1;
  360. string productCode = 2;
  361. string name = 3;
  362. string areas = 4;
  363. string paramValue = 5;
  364. Status status = 6;
  365. int64 sort = 7;
  366. string remark = 8;
  367. int64 createTime = 9;
  368. int64 updateTime = 10;
  369. string version = 11;
  370. }
  371. message AreaParamListReq {
  372. Page page = 1;
  373. AreaParamVo vo = 2;
  374. repeated string productCodes = 3; // 产品code
  375. repeated int64 excludeIds = 4; // 排除的ID
  376. }
  377. message AreaParamListResp {
  378. int64 total = 1;
  379. repeated AreaParamVo list = 2;
  380. }
  381. // end AreaParam
  382. // NationalLanguage
  383. message NationalLanguageVo {
  384. int64 id = 1;
  385. string tbName = 2;
  386. int64 tbRowId = 3;
  387. string tbFieldName = 4;
  388. string lan = 5;
  389. string value = 6;
  390. Status status = 7;
  391. int64 updateTime = 8;
  392. int64 createTime = 9;
  393. }
  394. message NationalLanguageListReq {
  395. Page page = 1;
  396. NationalLanguageVo vo = 2;
  397. repeated int64 excludeIds = 3; // 排除的ID
  398. }
  399. message NationalLanguageListResp {
  400. int64 total = 1;
  401. repeated NationalLanguageVo list = 2;
  402. }
  403. // end NationalLanguage
  404. // Tip
  405. message TipVo {
  406. int64 id = 1;
  407. string productCode = 2;
  408. string paramKey = 3;
  409. string paramValue = 4;
  410. string code = 5;
  411. int64 showType = 6;
  412. int64 sort = 7;
  413. string remark = 8;
  414. int64 createTime = 9;
  415. int64 updateTime = 10;
  416. repeated I18nVo i18ns = 11;
  417. }
  418. message TipGetReq {
  419. TipVo vo = 1;
  420. string lang = 2;
  421. }
  422. message TipListReq {
  423. Page page = 1;
  424. TipVo vo = 2;
  425. repeated string productCodes = 3;
  426. repeated int64 excludeIds = 4; // 排除的ID
  427. }
  428. message TipListResp {
  429. int64 total = 1;
  430. repeated TipVo list = 2;
  431. }
  432. // end Tip
  433. // Dict
  434. message DictVo {
  435. int64 id = 1;
  436. string productCode = 2;
  437. int64 parentId = 3;
  438. string dataType = 4;
  439. string name = 5;
  440. string payload = 6;
  441. int64 sort = 7;
  442. Status status = 8;
  443. string remark = 9;
  444. int64 createTime = 10;
  445. int64 updateTime = 11;
  446. string payloadJson = 12;
  447. }
  448. message DictGetReq { DictVo vo = 1; }
  449. message DictListReq {
  450. Page page = 1;
  451. DictVo vo = 2;
  452. repeated string productCodes = 3;
  453. repeated int64 excludeIds = 4;
  454. }
  455. message DictListResp {
  456. int64 total = 1;
  457. repeated DictVo list = 2;
  458. }
  459. // end Dict
  460. // message UpgradeResVo {
  461. // int64 id = 1;
  462. // string title = 2;
  463. // string path = 3;
  464. // string fileMd5 = 4;
  465. // string filePath = 5;
  466. // string metadataId = 6;
  467. // string createdAt = 7;
  468. // string runtimeVersion = 8;
  469. // int64 runtimeVersionCode = 9;
  470. // string appVersionName = 10;
  471. // int64 appVersionCode = 11;
  472. // Status status = 12;
  473. // string remark = 13;
  474. // int64 createTime = 14;
  475. // int64 updateTime = 15;
  476. // int64 resSize = 16;
  477. // }
  478. // message UpgradeResConfigVo {
  479. // int64 id = 1;
  480. // int64 productId = 2;
  481. // string platform = 3;
  482. // string channel = 4;
  483. // int64 resId = 5;
  484. // int64 isForceUpdate = 6;
  485. // string forceIntro = 7;
  486. // string areaConfigs = 8;
  487. // string versionConfigs = 9;
  488. // int64 interval = 10;
  489. // int64 upgradeRate = 11;
  490. // string intro = 12;
  491. // string apis = 13;
  492. // Status status = 14;
  493. // string remark = 15;
  494. // string userIds = 16;
  495. // int64 createTime = 17;
  496. // int64 updateTime = 18;
  497. // string forceVersionConfigs = 19;
  498. // string forceAreaConfigs = 20;
  499. // string runtimeVersionConfigs = 21;
  500. // string title = 22;
  501. // int64 isSilent = 23;
  502. // }
  503. // message UpgradePkgVo {
  504. // int64 id = 1;
  505. // int64 productId = 2;
  506. // string platform = 3;
  507. // string channel = 4;
  508. // int64 versionCode = 5;
  509. // string versionName = 6;
  510. // string fileMd5 = 7;
  511. // string areaConfigs = 8;
  512. // string versionConfigs = 9;
  513. // int64 interval = 10;
  514. // int64 upgradeRate = 11;
  515. // string intro = 12;
  516. // string appStoreUrl = 13;
  517. // string url = 14;
  518. // string onlineUrls = 15;
  519. // string userIds = 16;
  520. // int64 isForceUpdate = 17;
  521. // string forceIntro = 18;
  522. // string forceVersionConfigs = 19;
  523. // Status status = 20;
  524. // string remark = 21;
  525. // int64 createTime = 22;
  526. // int64 updateTime = 23;
  527. // string title = 24;
  528. // string forceAreaConfigs = 25;
  529. // }
  530. // message UpgradeResConfigGetReq {
  531. // Page page = 1;
  532. // int64 id = 2;
  533. // }
  534. // message UpgradeResConfigListReq {
  535. // Page page = 1;
  536. // UpgradeResConfigVo vo = 2;
  537. // }
  538. // message UpgradeResConfigListResp {
  539. // int64 total = 1;
  540. // repeated UpgradeResConfigVo list = 2;
  541. // }
  542. // message UpgradePkgGetReq { UpgradePkgVo vo = 1; }
  543. // message UpgradePkgListReq {
  544. // Page page = 1;
  545. // UpgradePkgVo vo = 2;
  546. // }
  547. // message UpgradePkgListResp {
  548. // int64 total = 1;
  549. // repeated UpgradePkgVo list = 2;
  550. // }
  551. // message UpgradeResGetReq { UpgradeResVo vo = 1; }
  552. // message UpgradeResListReq {
  553. // Page page = 1;
  554. // UpgradeResVo vo = 2;
  555. // }
  556. // message UpgradeResListResp {
  557. // int64 total = 1;
  558. // repeated UpgradeResVo list = 2;
  559. // }
  560. // message ResourceDelReq {
  561. // repeated int64 ids = 1;
  562. // string fileMd5 = 2;
  563. // }
  564. // UpgradePkgPlan
  565. message UpgradePkgPlanVo {
  566. int64 id = 1;
  567. string productCode = 2; // 产品code
  568. string areas = 3; // 地区列表
  569. int64 sort = 4;
  570. Status status = 5; // 状态
  571. string remark = 6;
  572. int64 createTime = 7;
  573. int64 updateTime = 8;
  574. }
  575. message UpgradePkgPlanListReq {
  576. Page page = 1;
  577. UpgradePkgPlanVo vo = 2;
  578. repeated string productCodes = 3;
  579. repeated int64 excludeIds = 4;
  580. }
  581. message UpgradePkgPlanListResp {
  582. int64 total = 1;
  583. repeated UpgradePkgPlanVo list = 2;
  584. }
  585. // end UpgradePkgPlan
  586. // UpgradePkgPlanDetail
  587. message UpgradePkgPlanDetailVo {
  588. int64 id = 1;
  589. int64 planId = 2; // 方案ID
  590. string platform = 3; // 平台
  591. string channel = 4; // 渠道
  592. string name = 5; // 名称
  593. int64 ver = 6; // 版本号
  594. string url = 7; // 商店地址
  595. string websiteUrl = 8; // 官网地址
  596. string directUrl = 9; // 直接下载地址
  597. string md5 = 10; // MD5
  598. string info = 11; // 更新信息
  599. string testUpgradePolicyConfig = 12; // 测试更新策略配置
  600. string upgradePolicyConfig = 13; // 更新策略配置
  601. string forceUpgradePolicyConfig = 14; // 强制更新策略
  602. Status status = 15; // 状态
  603. string remark = 16;
  604. int64 createTime = 17;
  605. int64 updateTime = 18;
  606. }
  607. message UpgradePkgPlanDetailListReq {
  608. Page page = 1;
  609. UpgradePkgPlanDetailVo vo = 2;
  610. repeated int64 planIds = 3;
  611. }
  612. message UpgradePkgPlanDetailListResp {
  613. int64 total = 1;
  614. repeated UpgradePkgPlanDetailVo list = 2;
  615. }
  616. // end UpgradePkgPlanDetail
  617. // UpgradeResPlan
  618. message UpgradeResPlanVo {
  619. int64 id = 1;
  620. string productCode = 2; // 产品code
  621. string areas = 3; // 地区列表
  622. int64 sort = 4;
  623. Status status = 5; // 状态
  624. string remark = 6;
  625. int64 createTime = 7;
  626. int64 updateTime = 8;
  627. }
  628. message UpgradeResPlanListReq {
  629. Page page = 1;
  630. UpgradeResPlanVo vo = 2;
  631. repeated string productCodes = 3;
  632. repeated int64 excludeIds = 4;
  633. }
  634. message UpgradeResPlanListResp {
  635. int64 total = 1;
  636. repeated UpgradeResPlanVo list = 2;
  637. }
  638. // end UpgradeResPlan
  639. // UpgradeResPlanDetail
  640. message UpgradeResPlanDetailVo {
  641. int64 id = 1; // ID
  642. int64 planId = 2; // 方案ID
  643. string platform = 3; // 平台
  644. string channel = 4; // 渠道
  645. string name = 5; // 名称
  646. int64 ver = 6; // 资源版本号
  647. string url = 7; // 资源地址
  648. string info = 8; // 更新信息
  649. string md5 = 9; // 资源 md5值
  650. int64 size = 10; // 资源大小
  651. string testUpgradePolicyConfig = 11; // 测试更新策略配置
  652. string upgradePolicyConfig = 12; // 更新策略配置
  653. string forceUpgradePolicyConfig = 13; // 强制更新策略
  654. Status status = 14; // 状态,1=正常,2=冻结
  655. string remark = 15; // 备注
  656. int64 createTime = 16; // 创建时间秒
  657. int64 updateTime = 17; // 修改时间秒
  658. }
  659. message UpgradeResPlanDetailListReq {
  660. Page page = 1;
  661. UpgradeResPlanDetailVo vo = 2;
  662. repeated int64 planIds = 3;
  663. }
  664. message UpgradeResPlanDetailListResp {
  665. int64 total = 1;
  666. repeated UpgradeResPlanDetailVo list = 2;
  667. }
  668. // end UpgradeResPlanDetail
  669. // AdPlan
  670. message AdPlanVo {
  671. int64 id = 1;
  672. string productCode = 2; // 产品code
  673. string areas = 3; // 地区列表
  674. string config = 4; // 配置
  675. int64 sort = 5;
  676. Status status = 6; // 状态
  677. string remark = 7;
  678. int64 createTime = 8;
  679. int64 updateTime = 9;
  680. }
  681. message AdPlanListReq {
  682. Page page = 1;
  683. AdPlanVo vo = 2;
  684. repeated string productCodes = 3;
  685. repeated int64 excludeIds = 4;
  686. }
  687. message AdPlanListResp {
  688. int64 total = 1;
  689. repeated AdPlanVo list = 2;
  690. }
  691. // end AdPlan
  692. // AdPlanDetail
  693. message AdPlanDetailVo {
  694. int64 id = 1;
  695. int64 planId = 2; // 方案ID
  696. string adPlatform = 3; // 平台
  697. string adType = 4; // 广告类型
  698. string adSlot = 5; // 广告位置
  699. string adDatas = 6; // 广告资源
  700. string testPolicyConfig = 7; // 策略配置
  701. string policyConfig = 8; // 策略配置
  702. int64 sort = 9; // 排序
  703. Status status = 10; // 0未知,1正常,2暂停
  704. string remark = 11;
  705. int64 createTime = 12;
  706. int64 updateTime = 13;
  707. string version = 14;
  708. }
  709. message AdPlanDetailListReq {
  710. Page page = 1;
  711. AdPlanDetailVo vo = 2;
  712. repeated int64 planIds = 3;
  713. }
  714. message AdPlanDetailListResp {
  715. int64 total = 1;
  716. repeated AdPlanDetailVo list = 2;
  717. }
  718. // end AdPlanDetail
  719. // AdGlobalConfig
  720. message AdGlobalConfigVo {
  721. int64 id = 1;
  722. string productCode = 2; // 产品code
  723. string platforms = 3; // 按平台分类的广告配置JSON
  724. string remark = 4; // 备注
  725. int64 createTime = 5; // 创建时间
  726. int64 updateTime = 6; // 更新时间
  727. }
  728. message AdGlobalConfigGetReq {
  729. string productCode = 1; // 产品代码
  730. }
  731. // end AdGlobalConfig
  732. // JobBatch
  733. message JobBatchVo {
  734. int64 id = 1; // ID
  735. string name = 2; // 作业名称
  736. string type = 3; // 作业类型
  737. string initParams = 4; // 作业初始化参数
  738. string contextData =
  739. 5; // 上下文数据,可用于存储此次批量作业的任务过程中产生的通用的中间数据
  740. string beginHandler = 6; // 预处理函数/URL
  741. string afterHandler = 7; // 后处理函数/URL
  742. int64 concurrency = 8; // 并发控制数
  743. string retryPolicy = 9; // 子任务重试策略
  744. int64 startedTime = 10; // 批量作业开始时间
  745. int64 finishedTime = 11; // 批量作业完成时间
  746. string result = 12; // 批量作业返回结果
  747. string status = 13; // 批量作业完成状态
  748. string remark = 14; // 备注
  749. int64 createAt = 15; // 创建者ID
  750. int64 updateAt = 16; // 更新者ID
  751. int64 createTime = 17; // 创建时间
  752. int64 updateTime = 18; // 更新时间
  753. }
  754. message JobBatchWithTasksVo {
  755. JobBatchVo jobBatch = 1;
  756. repeated JobTasksVo jobTasks = 2;
  757. }
  758. message TimeRange {
  759. int64 start = 1;
  760. int64 end = 2;
  761. }
  762. message JobBatchListReq {
  763. Page page = 1;
  764. JobBatchVo vo = 2;
  765. TimeRange startedTimeRange = 3;
  766. TimeRange finishedTimeRange = 4;
  767. repeated string statuses = 5;
  768. repeated int64 excludeIds = 6;
  769. }
  770. message JobBatchListResp {
  771. int64 total = 1;
  772. repeated JobBatchVo list = 2;
  773. }
  774. message JobBatchListWithTasksResp {
  775. int64 total = 1;
  776. repeated JobBatchWithTasksVo list = 2;
  777. }
  778. // end JobBatch
  779. // JobTasks
  780. message JobTasksVo {
  781. int64 id = 1; // 任务id
  782. int64 batchId = 2; // 批量作业Id
  783. string name = 3; // 任务名称
  784. string initParams = 4; // 任务初始化配置及数据
  785. string runtimeData =
  786. 5; // 任务运行时数据,用于临时存储任务过程中各个关键节点的中间数据
  787. string externalRefs = 6; // 外部系统引用,用于记录与外部系统交互产生的关联标识
  788. int64 startedTime = 7; // 任务开始时间
  789. int64 finishedTime = 8; // 任务结束时间
  790. int64 retryCount = 9; // 当前已重试次数
  791. string result = 10; // 任务执行结果
  792. string status = 11; // 任务状态
  793. string remark = 12; // 备注
  794. int64 createAt = 13; // 创建者ID
  795. int64 updateAt = 14; // 更新者ID
  796. int64 createTime = 15; // 创建时间
  797. int64 updateTime = 16; // 更新时间
  798. }
  799. message JobTasksListReq {
  800. Page page = 1;
  801. JobTasksVo vo = 2;
  802. TimeRange startedTimeRange = 3;
  803. TimeRange finishedTimeRange = 4;
  804. repeated string statuses = 5;
  805. repeated int64 excludeIds = 6;
  806. }
  807. message JobTasksListResp {
  808. int64 total = 1;
  809. repeated JobTasksVo list = 2;
  810. }
  811. // end JobTasks
  812. // DeployConfig
  813. message DeployConfigVo {
  814. int64 id = 1; // ID
  815. string name = 2; // 名称
  816. string type = 3; // 类型
  817. string data = 4; // 数据
  818. Status status = 5; // 状态
  819. string remark = 6; // 备注
  820. int64 createTime = 7; // 创建时间
  821. int64 updateTime = 8; // 更新时间
  822. }
  823. message DeployConfigListReq {
  824. Page page = 1;
  825. DeployConfigVo vo = 2;
  826. repeated int64 excludeIds = 3;
  827. }
  828. message DeployConfigListResp {
  829. int64 total = 1;
  830. repeated DeployConfigVo list = 2;
  831. }
  832. // end DeployConfig
  833. // OperationLog
  834. message OperationLogVo {
  835. int64 id = 1;
  836. int64 sysUserId = 2;
  837. string productCode = 3;
  838. string model = 4;
  839. string action = 5;
  840. string details = 6;
  841. string result = 7;
  842. int64 updateTime = 8;
  843. int64 createTime = 9;
  844. }
  845. message OperationLogListReq {
  846. Page page = 1;
  847. OperationLogVo vo = 2;
  848. repeated string productCodes = 3;
  849. repeated int64 excludeIds = 4;
  850. }
  851. message OperationLogListResp {
  852. int64 total = 1;
  853. repeated OperationLogVo list = 2;
  854. }
  855. // end OperationLog
  856. // AnnouncePlan
  857. message AnnouncePlanVo {
  858. int64 id = 1;
  859. string productCode = 2; // 产品code
  860. string areas = 3; // 地区列表
  861. int64 sort = 4;
  862. Status status = 5; // 状态
  863. string remark = 6;
  864. int64 createTime = 7;
  865. int64 updateTime = 8;
  866. }
  867. message AnnouncePlanListReq {
  868. Page page = 1;
  869. AnnouncePlanVo vo = 2;
  870. repeated string productCodes = 3;
  871. repeated int64 excludeIds = 4;
  872. }
  873. message AnnouncePlanListResp {
  874. int64 total = 1;
  875. repeated AnnouncePlanVo list = 2;
  876. }
  877. // end AnnouncePlan
  878. // AnnouncePlanDetail
  879. message AnnouncePlanDetailVo {
  880. int64 id = 1;
  881. int64 planId = 2; // 方案ID
  882. string platforms = 3; // 平台
  883. string channels = 4; // 渠道
  884. string icon = 5; // 图标
  885. string title = 6; // 标题
  886. string content = 7; // 内容
  887. string url = 8; // 商店地址
  888. string buttonText = 9; // 按钮文本
  889. int64 closeable = 10; // 是否可关闭
  890. int64 sort = 11; // 排序
  891. string policyConfig = 12; // 更新策略配置
  892. Status status = 13; // 状态
  893. string remark = 14;
  894. int64 createTime = 15;
  895. int64 updateTime = 16;
  896. }
  897. message AnnouncePlanDetailListReq {
  898. Page page = 1;
  899. AnnouncePlanDetailVo vo = 2;
  900. repeated int64 planIds = 3;
  901. }
  902. message AnnouncePlanDetailListResp {
  903. int64 total = 1;
  904. repeated AnnouncePlanDetailVo list = 2;
  905. }
  906. // end AnnouncePlanDetail
  907. // ServiceTypes
  908. message ServiceTypesVo {
  909. int64 id = 1;
  910. string productCode = 2;
  911. string name = 3;
  912. int64 userLevel = 4;
  913. int64 deviceLimit = 5; // 可选字段,Go中是 *int64
  914. int64 sort = 6;
  915. string config = 7;
  916. Status status = 8;
  917. string remark = 9;
  918. int64 createTime = 10;
  919. int64 updateTime = 11;
  920. }
  921. message ServiceTypesGetReq { int64 id = 1; }
  922. message ServiceTypesListReq {
  923. Page page = 1;
  924. ServiceTypesVo vo = 2;
  925. repeated string productCodes = 3;
  926. repeated int64 excludeIds = 4;
  927. }
  928. message ServiceTypesListResp {
  929. int64 total = 1;
  930. repeated ServiceTypesVo list = 2;
  931. }
  932. message ServiceTypesAddReq { ServiceTypesVo vo = 1; }
  933. message ServiceTypesUpdateReq { ServiceTypesVo vo = 1; }
  934. message ServiceTypesDelReq { int64 id = 1; }
  935. // end ServiceTypes
  936. // ServiceSets
  937. message ServiceSetsVo {
  938. int64 id = 1;
  939. string productCode = 2;
  940. int64 serviceTypeId = 3;
  941. string name = 4;
  942. int64 licenseDays = 5;
  943. string channel = 6;
  944. string channelItemId = 7;
  945. int64 refPortalServiceSetId = 8; // Go中是 sql.int64,转换为 int64
  946. string appleChannelItemId = 9;
  947. string googleChannelItemId = 10;
  948. string title = 11;
  949. string subTitle = 12;
  950. string introduce = 13;
  951. float orgPrice = 14;
  952. float price = 15;
  953. BoolInt display = 16;
  954. BoolInt isDefault = 17;
  955. BoolInt recommend = 18;
  956. BoolInt hidden = 19;
  957. int64 sort = 20;
  958. Status status = 21;
  959. string remark = 22;
  960. int64 createTime = 23;
  961. int64 updateTime = 24;
  962. }
  963. message ServiceSetsGetReq { int64 id = 1; }
  964. message ServiceSetsListReq {
  965. Page page = 1;
  966. ServiceSetsVo vo = 2;
  967. repeated string productCodes = 3;
  968. repeated int64 serviceTypeIds = 4;
  969. repeated int64 excludeIds = 5;
  970. }
  971. message ServiceSetsListResp {
  972. int64 total = 1;
  973. repeated ServiceSetsVo list = 2;
  974. }
  975. message ServiceSetsAddReq { ServiceSetsVo vo = 1; }
  976. message ServiceSetsUpdateReq { ServiceSetsVo vo = 1; }
  977. message ServiceSetsDelReq { int64 id = 1; }
  978. // end ServiceSets
  979. message MessagePushVo {
  980. int64 id = 1;
  981. string status = 2;
  982. int64 operator = 3;
  983. string module = 4;
  984. string title = 5;
  985. string message = 6;
  986. string imgUrl = 7;
  987. string data = 8;
  988. string productCode = 9;
  989. int64 areaParam = 10;
  990. repeated string topics = 11;
  991. repeated string firebaseTokens = 12;
  992. int64 publishTime = 13;
  993. int64 createTime = 14;
  994. int64 updateTime = 15;
  995. }
  996. message MessagePushListReq {
  997. Page page = 1;
  998. MessagePushVo vo = 2;
  999. }
  1000. message MessagePushListResp {
  1001. int64 total = 1;
  1002. repeated MessagePushVo list = 2;
  1003. }
  1004. // 基础服务: 产品管理,产品配置,升级配置、更新资源管理,资源版本管理,全局配置
  1005. service GoPmpClient {
  1006. rpc Ping(Request) returns (Response);
  1007. // GlobalParamVo
  1008. rpc GlobalParamAdd(GlobalParamVo) returns (GlobalParamVo);
  1009. rpc GlobalParamUpdate(GlobalParamVo) returns (GlobalParamVo);
  1010. rpc GlobalParamDel(Ids) returns (Empty);
  1011. rpc GlobalParamGet(GlobalParamVo)
  1012. returns (GlobalParamVo); // 兼容旧接口,新版本代码中请不要调用
  1013. rpc GlobalParamGetWithLang(GlobalParamGetReq) returns (GlobalParamVo);
  1014. rpc GlobalParamList(GlobalParamListReq) returns (GlobalParamListResp);
  1015. // ProductVo
  1016. rpc ProductAdd(ProductVo) returns (ProductVo);
  1017. rpc ProductUpdate(ProductVo) returns (ProductVo);
  1018. rpc ProductDel(Ids) returns (Empty);
  1019. rpc ProductGet(ProductVo) returns (ProductVo);
  1020. rpc ProductList(ProductListReq) returns (ProductListResp);
  1021. rpc ProductAll(Request) returns (ProductListResp);
  1022. // ProductParamVo
  1023. rpc ProductParamAdd(ProductParamVo) returns (ProductParamVo);
  1024. rpc ProductParamUpdate(ProductParamVo) returns (ProductParamVo);
  1025. rpc ProductParamDel(Ids) returns (Empty);
  1026. rpc ProductParamGet(ProductParamVo)
  1027. returns (ProductParamVo); // 兼容旧接口,新版本代码中请不要调用
  1028. rpc ProductParamGetWithLang(ProductParamGetReq) returns (ProductParamVo);
  1029. rpc ProductParamList(ProductParamListReq) returns (ProductParamListResp);
  1030. // ProductAction 产品行为配置
  1031. rpc ProductActionAdd(ProductActionVo) returns (ProductActionVo);
  1032. rpc ProductActionUpdate(ProductActionVo) returns (ProductActionVo);
  1033. rpc ProductActionDel(Ids) returns (Empty);
  1034. rpc ProductActionGet(ProductActionReq) returns (ProductActionVo);
  1035. rpc ProductActionList(ProductActionListReq) returns (ProductActionListResp);
  1036. // AreaParamVo
  1037. rpc AreaParamAdd(AreaParamVo) returns (AreaParamVo);
  1038. rpc AreaParamUpdate(AreaParamVo) returns (AreaParamVo);
  1039. rpc AreaParamDel(Ids) returns (Empty);
  1040. rpc AreaParamGet(AreaParamVo) returns (AreaParamVo);
  1041. rpc AreaParamList(AreaParamListReq) returns (AreaParamListResp);
  1042. // NationalLanguage
  1043. rpc NationalLanguageAdd(NationalLanguageVo) returns (NationalLanguageVo);
  1044. rpc NationalLanguageUpdate(NationalLanguageVo) returns (NationalLanguageVo);
  1045. rpc NationalLanguageDel(Ids) returns (Empty);
  1046. rpc NationalLanguageGet(NationalLanguageVo) returns (NationalLanguageVo);
  1047. rpc NationalLanguageList(NationalLanguageListReq)
  1048. returns (NationalLanguageListResp);
  1049. // Tip
  1050. rpc TipAdd(TipVo) returns (TipVo);
  1051. rpc TipUpdate(TipVo) returns (TipVo);
  1052. rpc TipDel(Ids) returns (Empty);
  1053. rpc TipGet(TipGetReq) returns (TipVo);
  1054. rpc TipList(TipListReq) returns (TipListResp);
  1055. // Dict
  1056. rpc DictAdd(DictVo) returns (DictVo);
  1057. rpc DictUpdate(DictVo) returns (DictVo);
  1058. rpc DictDel(Ids) returns (Empty);
  1059. rpc DictGet(DictGetReq) returns (DictVo);
  1060. rpc DictList(DictListReq) returns (DictListResp);
  1061. // // UpgradeRes 热更新代码资源管理
  1062. // rpc UpgradeResAdd(UpgradeResVo) returns (UpgradeResVo);
  1063. // rpc UpgradeResUpdate(UpgradeResVo) returns (Empty);
  1064. // rpc UpgradeResDel(ResourceDelReq) returns (Empty);
  1065. // rpc UpgradeResGet(UpgradeResGetReq) returns (UpgradeResVo);
  1066. // rpc UpgradeResList(UpgradeResListReq) returns (UpgradeResListResp);
  1067. // // UpgradePkg app 包更新管理
  1068. // rpc UpgradePkgAdd(UpgradePkgVo) returns (UpgradePkgVo);
  1069. // rpc UpgradePkgUpdate(UpgradePkgVo) returns (Empty);
  1070. // rpc UpgradePkgDel(Ids) returns (Empty);
  1071. // rpc UpgradePkgGet(UpgradePkgGetReq) returns (UpgradePkgVo);
  1072. // rpc UpgradePkgList(UpgradePkgListReq) returns (UpgradePkgListResp);
  1073. // // UpgradeResConfig
  1074. // 热更新【代码资源】配置管理,控制哪些版本地区的用户可以更新 rpc
  1075. // UpgradeResConfigAdd(UpgradeResConfigVo) returns (UpgradeResConfigVo); rpc
  1076. // UpgradeResConfigUpdate(UpgradeResConfigVo) returns (Empty); rpc
  1077. // UpgradeResConfigDel(Ids) returns (Empty); rpc
  1078. // UpgradeResConfigGet(UpgradeResConfigGetReq) returns (UpgradeResConfigVo);
  1079. // rpc UpgradeResConfigList(UpgradeResConfigListReq)
  1080. // returns (UpgradeResConfigListResp);
  1081. // UpgradePkgPlan
  1082. rpc UpgradePkgPlanAdd(UpgradePkgPlanVo) returns (UpgradePkgPlanVo);
  1083. rpc UpgradePkgPlanUpdate(UpgradePkgPlanVo) returns (UpgradePkgPlanVo);
  1084. rpc UpgradePkgPlanDel(Ids) returns (Empty);
  1085. rpc UpgradePkgPlanGet(UpgradePkgPlanVo) returns (UpgradePkgPlanVo);
  1086. rpc UpgradePkgPlanList(UpgradePkgPlanListReq)
  1087. returns (UpgradePkgPlanListResp);
  1088. // UpgradePkgPlanDetail
  1089. rpc UpgradePkgPlanDetailAdd(UpgradePkgPlanDetailVo)
  1090. returns (UpgradePkgPlanDetailVo);
  1091. rpc UpgradePkgPlanDetailUpdate(UpgradePkgPlanDetailVo)
  1092. returns (UpgradePkgPlanDetailVo);
  1093. rpc UpgradePkgPlanDetailDel(Ids) returns (Empty);
  1094. rpc UpgradePkgPlanDetailGet(UpgradePkgPlanDetailVo)
  1095. returns (UpgradePkgPlanDetailVo);
  1096. rpc UpgradePkgPlanDetailList(UpgradePkgPlanDetailListReq)
  1097. returns (UpgradePkgPlanDetailListResp);
  1098. // UpgradeResPlan
  1099. rpc UpgradeResPlanAdd(UpgradeResPlanVo) returns (UpgradeResPlanVo);
  1100. rpc UpgradeResPlanUpdate(UpgradeResPlanVo) returns (UpgradeResPlanVo);
  1101. rpc UpgradeResPlanDel(Ids) returns (Empty);
  1102. rpc UpgradeResPlanGet(UpgradeResPlanVo) returns (UpgradeResPlanVo);
  1103. rpc UpgradeResPlanList(UpgradeResPlanListReq)
  1104. returns (UpgradeResPlanListResp);
  1105. // UpgradeResPlanDetail
  1106. rpc UpgradeResPlanDetailAdd(UpgradeResPlanDetailVo)
  1107. returns (UpgradeResPlanDetailVo);
  1108. rpc UpgradeResPlanDetailUpdate(UpgradeResPlanDetailVo)
  1109. returns (UpgradeResPlanDetailVo);
  1110. rpc UpgradeResPlanDetailDel(Ids) returns (Empty);
  1111. rpc UpgradeResPlanDetailGet(UpgradeResPlanDetailVo)
  1112. returns (UpgradeResPlanDetailVo);
  1113. rpc UpgradeResPlanDetailList(UpgradeResPlanDetailListReq)
  1114. returns (UpgradeResPlanDetailListResp);
  1115. // AdPlan
  1116. rpc AdPlanAdd(AdPlanVo) returns (AdPlanVo);
  1117. rpc AdPlanUpdate(AdPlanVo) returns (AdPlanVo);
  1118. rpc AdPlanDel(Ids) returns (Empty);
  1119. rpc AdPlanGet(AdPlanVo) returns (AdPlanVo);
  1120. rpc AdPlanList(AdPlanListReq) returns (AdPlanListResp);
  1121. // AdPlanDetail
  1122. rpc AdPlanDetailAdd(AdPlanDetailVo) returns (AdPlanDetailVo);
  1123. rpc AdPlanDetailUpdate(AdPlanDetailVo) returns (AdPlanDetailVo);
  1124. rpc AdPlanDetailDel(Ids) returns (Empty);
  1125. rpc AdPlanDetailGet(AdPlanDetailVo) returns (AdPlanDetailVo);
  1126. rpc AdPlanDetailList(AdPlanDetailListReq) returns (AdPlanDetailListResp);
  1127. // AdGlobalConfig
  1128. rpc AdGlobalConfigGet(AdGlobalConfigGetReq) returns (AdGlobalConfigVo);
  1129. rpc AdGlobalConfigUpdate(AdGlobalConfigVo) returns (AdGlobalConfigVo);
  1130. // JobBatch
  1131. rpc JobBatchAdd(JobBatchVo) returns (JobBatchVo);
  1132. rpc JobBatchAddWithTasks(JobBatchWithTasksVo) returns (JobBatchWithTasksVo);
  1133. rpc JobBatchUpdate(JobBatchVo) returns (JobBatchVo);
  1134. rpc JobBatchDel(Ids) returns (Empty);
  1135. rpc JobBatchGet(JobBatchVo) returns (JobBatchVo);
  1136. rpc JobBatchGetWithTasks(JobBatchVo) returns (JobBatchWithTasksVo);
  1137. rpc JobBatchList(JobBatchListReq) returns (JobBatchListResp);
  1138. rpc JobBatchListWithTasks(JobBatchListReq)
  1139. returns (JobBatchListWithTasksResp);
  1140. // JobTasks
  1141. rpc JobTasksAdd(JobTasksVo) returns (JobTasksVo);
  1142. rpc JobTasksUpdate(JobTasksVo) returns (JobTasksVo);
  1143. rpc JobTasksDel(Ids) returns (Empty);
  1144. rpc JobTasksGet(JobTasksVo) returns (JobTasksVo);
  1145. rpc JobTasksList(JobTasksListReq) returns (JobTasksListResp);
  1146. // DeployConfig
  1147. rpc DeployConfigAdd(DeployConfigVo) returns (DeployConfigVo);
  1148. rpc DeployConfigUpdate(DeployConfigVo) returns (DeployConfigVo);
  1149. rpc DeployConfigDel(Ids) returns (Empty);
  1150. rpc DeployConfigGet(DeployConfigVo) returns (DeployConfigVo);
  1151. rpc DeployConfigList(DeployConfigListReq) returns (DeployConfigListResp);
  1152. // OperationLog
  1153. rpc OperationLogAdd(OperationLogVo) returns (OperationLogVo);
  1154. rpc OperationLogUpdate(OperationLogVo) returns (OperationLogVo);
  1155. rpc OperationLogGet(OperationLogVo) returns (OperationLogVo);
  1156. rpc OperationLogList(OperationLogListReq) returns (OperationLogListResp);
  1157. // AnnouncePlan
  1158. rpc AnnouncePlanAdd(AnnouncePlanVo) returns (AnnouncePlanVo);
  1159. rpc AnnouncePlanUpdate(AnnouncePlanVo) returns (AnnouncePlanVo);
  1160. rpc AnnouncePlanDel(Ids) returns (Empty);
  1161. rpc AnnouncePlanGet(AnnouncePlanVo) returns (AnnouncePlanVo);
  1162. rpc AnnouncePlanList(AnnouncePlanListReq) returns (AnnouncePlanListResp);
  1163. // AnnouncePlanDetail
  1164. rpc AnnouncePlanDetailAdd(AnnouncePlanDetailVo)
  1165. returns (AnnouncePlanDetailVo);
  1166. rpc AnnouncePlanDetailUpdate(AnnouncePlanDetailVo)
  1167. returns (AnnouncePlanDetailVo);
  1168. rpc AnnouncePlanDetailDel(Ids) returns (Empty);
  1169. rpc AnnouncePlanDetailGet(AnnouncePlanDetailVo)
  1170. returns (AnnouncePlanDetailVo);
  1171. rpc AnnouncePlanDetailList(AnnouncePlanDetailListReq)
  1172. returns (AnnouncePlanDetailListResp);
  1173. // ServiceTypes
  1174. rpc ServiceTypesAdd(ServiceTypesAddReq) returns (ServiceTypesVo);
  1175. rpc ServiceTypesUpdate(ServiceTypesUpdateReq) returns (ServiceTypesVo);
  1176. rpc ServiceTypesDel(ServiceTypesDelReq) returns (Empty);
  1177. rpc ServiceTypesGet(ServiceTypesGetReq) returns (ServiceTypesVo);
  1178. rpc ServiceTypesList(ServiceTypesListReq) returns (ServiceTypesListResp);
  1179. // ServiceSets
  1180. rpc ServiceSetsAdd(ServiceSetsAddReq) returns (ServiceSetsVo);
  1181. rpc ServiceSetsUpdate(ServiceSetsUpdateReq) returns (ServiceSetsVo);
  1182. rpc ServiceSetsDel(ServiceSetsDelReq) returns (Empty);
  1183. rpc ServiceSetsGet(ServiceSetsGetReq) returns (ServiceSetsVo);
  1184. rpc ServiceSetsList(ServiceSetsListReq) returns (ServiceSetsListResp);
  1185. // MessagePush
  1186. rpc MessagePushAdd(MessagePushVo) returns (MessagePushVo);
  1187. rpc MessagePushUpdate(MessagePushVo) returns (MessagePushVo);
  1188. rpc MessagePushList(MessagePushListReq) returns (MessagePushListResp);
  1189. }
  1190. message ShortDramaEpisodeVo {
  1191. int64 id = 1;
  1192. int64 dramaId = 2;
  1193. int64 type = 3;
  1194. string name = 4;
  1195. int64 sort = 5;
  1196. string videos = 6;
  1197. string subtitles = 7;
  1198. Status status = 8;
  1199. int64 createTime = 9;
  1200. int64 updateTime = 10;
  1201. string danmakuUrl = 11;
  1202. }
  1203. message ShortDramaEpisodeGetReq { ShortDramaEpisodeVo vo = 1; }
  1204. message ShortDramaEpisodeListReq {
  1205. Page page = 1;
  1206. ShortDramaEpisodeVo vo = 2;
  1207. repeated int64 dramaIds = 3;
  1208. }
  1209. message ShortDramaEpisodeListResp {
  1210. int64 total = 1;
  1211. repeated ShortDramaEpisodeVo list = 2;
  1212. }
  1213. message ShortDramaEpisodeBatchAddReq {
  1214. int64 dramaId = 1;
  1215. repeated ShortDramaEpisodeVo episodes = 2;
  1216. }
  1217. message ShortDramaEpisodeBatchRefreshUpdateTimeReq { int64 dramaId = 1; }
  1218. message ShortDramaLanguageVo {
  1219. int64 id = 1;
  1220. int64 dramaId = 2;
  1221. string lang = 3;
  1222. string title = 4;
  1223. string description = 5;
  1224. string covers = 6;
  1225. string coverDominantColor = 7;
  1226. int64 createTime = 8;
  1227. int64 updateTime = 9;
  1228. }
  1229. message ShortDramaVo {
  1230. int64 id = 1;
  1231. string productCodes = 2;
  1232. string title = 3;
  1233. string description = 4;
  1234. string covers = 5;
  1235. string coverDominantColor = 6;
  1236. string type = 7;
  1237. string tags = 8;
  1238. string releaseRegions = 9;
  1239. int64 releaseDate = 10;
  1240. int64 totalEpisodes = 11;
  1241. int64 completedStatus = 12;
  1242. string copyrightSupplier = 13;
  1243. string copyrightDoc = 14;
  1244. int64 copyrightPurchaseDate = 15;
  1245. int64 copyrightExpireDate = 16;
  1246. int64 status = 17;
  1247. int64 createTime = 18;
  1248. int64 updateTime = 19;
  1249. string ghostCutId = 20;
  1250. int64 recommend = 21;
  1251. string otherConfig = 22;
  1252. repeated ShortDramaLanguageVo shortDramaLanguages = 23;
  1253. int64 mainEpisodeCount = 24;
  1254. int64 trailerEpisodeCount = 25;
  1255. int64 copyrightId = 26;
  1256. int64 creator = 27;
  1257. int64 modifier = 28;
  1258. }
  1259. message ShortDramaGetReq {
  1260. ShortDramaVo vo = 1;
  1261. string productCode = 2;
  1262. string countryCode = 3;
  1263. string lang = 4;
  1264. }
  1265. message ShortDramaListReq {
  1266. Page page = 1;
  1267. ShortDramaVo vo = 2;
  1268. repeated int64 excludeIds = 3;
  1269. string productCode = 4;
  1270. string countryCode = 5;
  1271. string lang = 6;
  1272. }
  1273. message ShortDramaListResp {
  1274. int64 total = 1;
  1275. repeated ShortDramaVo list = 2;
  1276. }
  1277. message ShortDramaLanguageListReq {
  1278. Page page = 1;
  1279. ShortDramaLanguageVo vo = 2;
  1280. }
  1281. message ShortDramaLanguageListResp {
  1282. int64 total = 1;
  1283. repeated ShortDramaLanguageVo list = 2;
  1284. }
  1285. message ShortDramaEpisodeCountVo {
  1286. int64 dramaId = 1;
  1287. int64 episodeCount = 2;
  1288. }
  1289. message ShortDramaEpisodeCountReq {
  1290. Page page = 1;
  1291. Status status = 2;
  1292. int64 type = 3;
  1293. repeated int64 dramaIds = 4;
  1294. }
  1295. message ShortDramaEpisodeCountResp {
  1296. int64 total = 1;
  1297. repeated ShortDramaEpisodeCountVo list = 2;
  1298. }
  1299. message ShortDramaCheckNameReq {
  1300. string title = 1; // 短剧名称
  1301. int64 id = 2; // 编辑时排除当前短剧ID
  1302. }
  1303. message ShortDramaCheckNameResp {
  1304. bool exists = 1; // 是否存在
  1305. }
  1306. message ShortDramaUpdateModifierReq {
  1307. int64 id = 1;
  1308. int64 modifier = 2;
  1309. }
  1310. message SetTotalStatsReq {
  1311. int64 dramaId = 1;
  1312. string country = 2;
  1313. int64 todayPlayCount = 3;
  1314. int64 weeklyPlayCount = 4;
  1315. int64 monthlyPlayCount = 5;
  1316. }
  1317. message ShortDramaStatsPlaysTotalVo {
  1318. int64 id = 1;
  1319. int64 dramaId = 2;
  1320. string country = 3;
  1321. int64 todayPlayCount = 4;
  1322. int64 weeklyPlayCount = 5;
  1323. int64 monthlyPlayCount = 6;
  1324. int64 createTime = 7;
  1325. int64 updateTime = 8;
  1326. }
  1327. message ShortDramaStatsPlaysTotalListReq {
  1328. Page page = 1;
  1329. string country = 2; // 国家代码
  1330. }
  1331. message ShortDramaStatsPlaysTotalListResp {
  1332. int64 total = 1;
  1333. repeated ShortDramaStatsPlaysTotalVo list = 2;
  1334. }
  1335. service GoShortDramaClient {
  1336. // ShortDrama
  1337. rpc ShortDramaAdd(ShortDramaVo) returns (ShortDramaVo);
  1338. rpc ShortDramaUpdate(ShortDramaVo) returns (Empty);
  1339. rpc ShortDramaDel(Ids) returns (Empty);
  1340. rpc ShortDramaGet(ShortDramaGetReq) returns (ShortDramaVo);
  1341. rpc ShortDramaList(ShortDramaListReq) returns (ShortDramaListResp);
  1342. rpc ShortDramaUpdateModifier(ShortDramaUpdateModifierReq) returns (Empty);
  1343. // ShortDramaLanguage
  1344. rpc ShortDramaLanguageList(ShortDramaLanguageListReq)
  1345. returns (ShortDramaLanguageListResp);
  1346. // ShortDramaEpisode
  1347. rpc ShortDramaEpisodeAdd(ShortDramaEpisodeVo) returns (ShortDramaEpisodeVo);
  1348. rpc ShortDramaEpisodeBatchAdd(ShortDramaEpisodeBatchAddReq) returns (Empty);
  1349. rpc ShortDramaEpisodeUpdate(ShortDramaEpisodeVo) returns (Empty);
  1350. rpc ShortDramaEpisodeDel(Ids) returns (Empty);
  1351. rpc ShortDramaEpisodeGet(ShortDramaEpisodeGetReq)
  1352. returns (ShortDramaEpisodeVo);
  1353. rpc ShortDramaEpisodeList(ShortDramaEpisodeListReq)
  1354. returns (ShortDramaEpisodeListResp);
  1355. rpc ShortDramaEpisodeBatchRefreshUpdateTime(
  1356. ShortDramaEpisodeBatchRefreshUpdateTimeReq) returns (Empty);
  1357. // ShortDramaEpisodeCount
  1358. rpc ShortDramaEpisodeCount(ShortDramaEpisodeCountReq)
  1359. returns (ShortDramaEpisodeCountResp);
  1360. rpc ShortDramaCheckName(ShortDramaCheckNameReq)
  1361. returns (ShortDramaCheckNameResp);
  1362. // ShortDramaStats
  1363. rpc SetTotalStats(SetTotalStatsReq) returns (Empty);
  1364. // ShortDramaStatsPlaysTotal
  1365. rpc ShortDramaStatsPlaysTotalList(ShortDramaStatsPlaysTotalListReq)
  1366. returns (ShortDramaStatsPlaysTotalListResp);
  1367. }
  1368. // 根据需要增加状态
  1369. message SysUserVo {
  1370. int64 id = 1; // ID
  1371. string username = 2; // 登录名
  1372. string password = 3; // 登录密码
  1373. string nickname = 4; // 昵称
  1374. string avatar = 5; // 头像
  1375. string email = 6; // 邮箱
  1376. string phone = 7; // 手机号
  1377. string remark = 8; // 备注
  1378. BoolInt isSuperAdmin = 9; // 是否为超级管理员 1是 2否
  1379. int64 permsLevel = 10; // 权限等级 值越大 权限越小
  1380. Status status = 11; // 状态 1正常 2冻结
  1381. int64 createTime = 12; // 创建时间
  1382. int64 updateTime = 13; // 修改时间
  1383. }
  1384. message SysRoleVo {
  1385. int64 id = 1; // ID
  1386. string productCode = 2; // 所属产品
  1387. string name = 3; // 角色名
  1388. string remark = 4; // 备注
  1389. Status status = 5; // 状态 1启用 2禁用
  1390. int64 createTime = 6; // 创建时间
  1391. int64 updateTime = 7; // 修改时间
  1392. int64 permsLevel = 8; // 权限等级 值越大 权限越小
  1393. }
  1394. message SysPermVo {
  1395. int64 id = 1; // ID
  1396. string name = 2; // 权限名
  1397. string code = 3; // 权限code
  1398. string remark = 4; // 备注
  1399. Status status = 5; // 状态 1启用 2禁用
  1400. int64 createTime = 6; // 创建时间
  1401. int64 updateTime = 7; // 修改时间
  1402. }
  1403. message SysUserRoleVo {
  1404. int64 id = 1; // ID
  1405. int64 userId = 2; // 用户ID
  1406. int64 roleId = 3; // 角色ID
  1407. int64 createTime = 4; // 创建时间
  1408. int64 updateTime = 5; // 修改时间
  1409. }
  1410. message SysRolePermVo {
  1411. int64 id = 1; // ID
  1412. int64 roleId = 2; // 角色ID
  1413. int64 permId = 3; // 权限ID
  1414. int64 createTime = 4; // 创建时间
  1415. int64 updateTime = 5; // 修改时间
  1416. }
  1417. message SysUserPermVo {
  1418. int64 id = 1; // ID
  1419. int64 userId = 2; // 用户ID
  1420. int64 permId = 3; // 权限ID
  1421. string effect = 4; // 权限控制策略 ALLOW允许 DENY拒绝
  1422. int64 createTime = 5; // 创建时间
  1423. int64 updateTime = 6; // 修改时间
  1424. }
  1425. message SysPermRule {
  1426. int64 permId = 1;
  1427. string effect = 2; // ALLOW允许 DENY拒绝
  1428. }
  1429. message SysUserWithRoleIdsAndPermRules {
  1430. SysUserVo user = 1; // 用户信息
  1431. repeated int64 roleIds = 2; // 角色
  1432. repeated SysPermRule permRules = 3; // 权限
  1433. }
  1434. message SysUserWithRolesAndPerms {
  1435. SysUserVo user = 1; // 用户信息
  1436. repeated SysRoleVo roles = 2; // 角色
  1437. repeated SysPermVo perms = 3; // 权限
  1438. }
  1439. message SysUserGetReq { SysUserVo vo = 1; }
  1440. message SysUserListReq {
  1441. Page page = 1;
  1442. SysUserVo vo = 2;
  1443. repeated int64 excludeIds = 3; // 排除的ID
  1444. }
  1445. message SysUserListResp {
  1446. int64 total = 1;
  1447. repeated SysUserVo list = 2;
  1448. }
  1449. message SysUserListWithRolesAndPermsResp {
  1450. int64 total = 1;
  1451. repeated SysUserWithRolesAndPerms list = 2;
  1452. }
  1453. message SysRoleWithPermIds {
  1454. SysRoleVo role = 1;
  1455. repeated int64 permIds = 2;
  1456. }
  1457. message SysRoleWithPerms {
  1458. SysRoleVo role = 1;
  1459. repeated SysPermVo perms = 2;
  1460. }
  1461. message SysRoleGetReq { SysRoleVo vo = 1; }
  1462. message SysRoleListReq {
  1463. Page page = 1;
  1464. SysRoleVo vo = 2;
  1465. repeated string productCodes = 3; // 所属产品
  1466. repeated int64 excludeIds = 4; // 排除的ID
  1467. }
  1468. message SysRoleListResp {
  1469. int64 total = 1;
  1470. repeated SysRoleVo list = 2;
  1471. }
  1472. message SysRoleListWithPermsResp {
  1473. int64 total = 1;
  1474. repeated SysRoleWithPerms list = 2;
  1475. }
  1476. message SysPermGetReq { SysPermVo vo = 1; }
  1477. message SysPermListReq {
  1478. Page page = 1;
  1479. SysPermVo vo = 2;
  1480. repeated int64 excludeIds = 3; // 排除的ID
  1481. }
  1482. message SysPermListResp {
  1483. int64 total = 1;
  1484. repeated SysPermVo list = 2;
  1485. }
  1486. message SysUserRoleGetReq { SysUserRoleVo vo = 1; }
  1487. message SysUserRoleListReq {
  1488. Page page = 1;
  1489. SysUserRoleVo vo = 2;
  1490. repeated int64 excludeIds = 3; // 排除的ID
  1491. }
  1492. message SysUserRoleListResp {
  1493. int64 total = 1;
  1494. repeated SysUserRoleVo list = 2;
  1495. }
  1496. message SysRolePermGetReq { SysRolePermVo vo = 1; }
  1497. message SysRolePermListReq {
  1498. Page page = 1;
  1499. SysRolePermVo vo = 2;
  1500. repeated int64 excludeIds = 3; // 排除的ID
  1501. }
  1502. message SysRolePermListResp {
  1503. int64 total = 1;
  1504. repeated SysRolePermVo list = 2;
  1505. }
  1506. message SysUserPermGetReq { SysUserPermVo vo = 1; }
  1507. message SysUserPermListReq {
  1508. Page page = 1;
  1509. SysUserPermVo vo = 2;
  1510. repeated int64 excludeIds = 3; // 排除的ID
  1511. }
  1512. message SysUserPermListResp {
  1513. int64 total = 1;
  1514. repeated SysUserPermVo list = 2;
  1515. }
  1516. service GoSysClient {
  1517. rpc Ping(Request) returns (Response);
  1518. // 用户管理
  1519. rpc SysUserAdd(SysUserVo) returns (SysUserVo);
  1520. rpc SysUserUpdate(SysUserVo) returns (SysUserVo);
  1521. rpc SysUserDelete(Ids) returns (Empty);
  1522. rpc SysUserGet(SysUserGetReq) returns (SysUserVo);
  1523. rpc SysUserList(SysUserListReq) returns (SysUserListResp);
  1524. rpc SysUserAddWithRolesAndPerms(SysUserWithRoleIdsAndPermRules)
  1525. returns (SysUserWithRolesAndPerms);
  1526. rpc SysUserUpdateWithRolesAndPerms(SysUserWithRoleIdsAndPermRules)
  1527. returns (SysUserWithRolesAndPerms);
  1528. rpc SysUserGetWithRolesAndPerms(SysUserGetReq)
  1529. returns (SysUserWithRolesAndPerms);
  1530. rpc SysUserListWithRolesAndPerms(SysUserListReq)
  1531. returns (SysUserListWithRolesAndPermsResp);
  1532. // 角色管理
  1533. rpc SysRoleAdd(SysRoleVo) returns (SysRoleVo);
  1534. rpc SysRoleUpdate(SysRoleVo) returns (SysRoleVo);
  1535. rpc SysRoleDelete(Ids) returns (Empty);
  1536. rpc SysRoleGet(SysRoleGetReq) returns (SysRoleVo);
  1537. rpc SysRoleList(SysRoleListReq) returns (SysRoleListResp);
  1538. rpc SysRoleAddWithPerms(SysRoleWithPermIds) returns (SysRoleWithPerms);
  1539. rpc SysRoleUpdateWithPerms(SysRoleWithPermIds) returns (SysRoleWithPerms);
  1540. rpc SysRoleGetWithPerms(SysRoleGetReq) returns (SysRoleWithPerms);
  1541. rpc SysRoleListWithPerms(SysRoleListReq) returns (SysRoleListWithPermsResp);
  1542. // 权限管理
  1543. rpc SysPermAdd(SysPermVo) returns (SysPermVo);
  1544. rpc SysPermUpdate(SysPermVo) returns (SysPermVo);
  1545. rpc SysPermDelete(Ids) returns (Empty);
  1546. rpc SysPermGet(SysPermGetReq) returns (SysPermVo);
  1547. rpc SysPermList(SysPermListReq) returns (SysPermListResp);
  1548. // 用户角色管理
  1549. rpc SysUserRoleAdd(SysUserRoleVo) returns (SysUserRoleVo);
  1550. rpc SysUserRoleUpdate(SysUserRoleVo) returns (SysUserRoleVo);
  1551. rpc SysUserRoleDelete(Ids) returns (Empty);
  1552. rpc SysUserRoleGet(SysUserRoleGetReq) returns (SysUserRoleVo);
  1553. rpc SysUserRoleList(SysUserRoleListReq) returns (SysUserRoleListResp);
  1554. // 角色权限管理
  1555. rpc SysRolePermAdd(SysRolePermVo) returns (SysRolePermVo);
  1556. rpc SysRolePermUpdate(SysRolePermVo) returns (SysRolePermVo);
  1557. rpc SysRolePermDelete(Ids) returns (Empty);
  1558. rpc SysRolePermGet(SysRolePermGetReq) returns (SysRolePermVo);
  1559. rpc SysRolePermList(SysRolePermListReq) returns (SysRolePermListResp);
  1560. // 用户权限管理
  1561. rpc SysUserPermAdd(SysUserPermVo) returns (SysUserPermVo);
  1562. rpc SysUserPermUpdate(SysUserPermVo) returns (SysUserPermVo);
  1563. rpc SysUserPermDelete(Ids) returns (Empty);
  1564. rpc SysUserPermGet(SysUserPermGetReq) returns (SysUserPermVo);
  1565. rpc SysUserPermList(SysUserPermListReq) returns (SysUserPermListResp);
  1566. }
  1567. // Account
  1568. message AccountVo {
  1569. int64 id = 1; // 主键ID
  1570. string userUuid = 2; // 用户UUID
  1571. string productCode = 3; // 产品ID
  1572. string username = 4; // 用户名
  1573. string password = 5; // 密码
  1574. string accountKey = 6; // 账号KEY
  1575. string accountPassword = 7; // 账号密码
  1576. int64 accountType = 8; // 账号类型
  1577. int64 registMode = 9; // 注册方式
  1578. string provider = 10; // 授权登录标识
  1579. BoolInt whitelistUser = 11; // 白名单用户
  1580. BoolInt activated = 12; // 是否激活
  1581. string config = 13; // 配置
  1582. Status status = 14; // 状态
  1583. string avatar = 15; // 头像
  1584. string area = 16; // 指定地区
  1585. string remark = 17; // 备注
  1586. string deviceId = 18; // 设备ID
  1587. string platform = 19; // 平台
  1588. string channel = 20; // 渠道
  1589. string deviceModel = 21; // 设备型号
  1590. string deviceOs = 22; // 设备系统
  1591. int64 timezone = 23; // 时区
  1592. string lang = 24; // 语言
  1593. string ip = 25; // IP
  1594. string country = 26; // 国家
  1595. string province = 27; // 省份
  1596. string city = 28; // 城市
  1597. string isp = 29; // ISP
  1598. int64 appVer = 30; // 产品版本号
  1599. int64 appRuntimeCode = 31; // 产品运行码
  1600. int64 createTime = 32; // 创建时间
  1601. int64 updateTime = 33; // 更新时间
  1602. string version = 34; // 数据版本
  1603. string sessionId = 35; // 登录凭证
  1604. int64 sessionCreateTime = 36; // 凭证创建时间
  1605. }
  1606. message AccountListReq {
  1607. Page page = 1;
  1608. AccountVo vo = 2;
  1609. repeated string productCodes = 3; // 产品code
  1610. repeated int64 excludeIds = 4; // 排除的ID
  1611. }
  1612. message AccountListResp {
  1613. int64 total = 1;
  1614. repeated AccountVo list = 2;
  1615. }
  1616. // AccountDevice
  1617. message AccountDeviceVo {
  1618. int64 id = 1;
  1619. int64 accountId = 2; // 用户ID
  1620. int64 deviceId = 3; // 设备ID
  1621. string sessionId = 4; // 登录凭证
  1622. int64 sessionCreateTime = 5; // 凭证创建时间
  1623. int64 updateTime = 6;
  1624. int64 createTime = 7;
  1625. }
  1626. message AccountDeviceListReq {
  1627. Page page = 1;
  1628. AccountDeviceVo vo = 2;
  1629. repeated int64 excludeIds = 3; // 排除的ID
  1630. }
  1631. message AccountDeviceListResp {
  1632. int64 total = 1;
  1633. repeated AccountDeviceVo list = 2;
  1634. }
  1635. message DeviceVo {
  1636. int64 id = 1;
  1637. string userUuid = 2;
  1638. string productCode = 3;
  1639. string deviceId = 4;
  1640. string accountKey = 5;
  1641. string accountPassword = 6;
  1642. string platform = 7;
  1643. string channel = 8;
  1644. string referChannel = 9;
  1645. string deviceModel = 10;
  1646. string deviceOs = 11;
  1647. int64 timezone = 12;
  1648. string lang = 13;
  1649. int64 appVer = 14;
  1650. string ip = 15;
  1651. string country = 16;
  1652. string province = 17;
  1653. string city = 18;
  1654. string isp = 19;
  1655. int64 createTime = 20;
  1656. int64 updateTime = 21;
  1657. Status status = 22;
  1658. string refer = 23;
  1659. int64 whitelistUser = 24; // 白名单用户 1正常用户 2: 白名单用户
  1660. int64 testUser = 25; // 测试用户 1正常用户 2: 测试用户
  1661. string mockCountry = 26; // 指定国家
  1662. string mockApi = 27; // 指定API
  1663. string mockRouter = 28; // 指定路由
  1664. }
  1665. message DeviceListReq {
  1666. Page page = 1;
  1667. DeviceVo vo = 2;
  1668. repeated string productCodes = 3; // 产品code
  1669. repeated int64 excludeIds = 4; // 排除的ID
  1670. repeated string dateRange = 5; // 日期范围
  1671. int64 createStartTime = 6; // 创建开始时间
  1672. int64 createEndTime = 7; // 创建结束时间
  1673. }
  1674. message DeviceListRes {
  1675. int64 total = 1;
  1676. repeated DeviceVo list = 2;
  1677. }
  1678. message UserAppConfigVo {
  1679. int64 id = 1;
  1680. string deviceId = 2;
  1681. string key = 3;
  1682. string value = 4;
  1683. Status status = 5;
  1684. int64 createTime = 6;
  1685. int64 updateTime = 7;
  1686. }
  1687. message UserAppConfigGetReq { UserAppConfigVo vo = 1; }
  1688. message UserAppConfigListReq {
  1689. Page page = 1;
  1690. UserAppConfigVo vo = 2;
  1691. }
  1692. message UserAppConfigListRes {
  1693. int64 total = 1;
  1694. repeated UserAppConfigVo list = 2;
  1695. }
  1696. // 用户模块
  1697. service GoUserClient {
  1698. rpc Ping(Request) returns (Response);
  1699. // 用户app配置管理(ring)
  1700. rpc UserAppConfigAdd(UserAppConfigVo) returns (UserAppConfigVo);
  1701. rpc UserAppConfigUpdate(UserAppConfigVo) returns (UserAppConfigVo);
  1702. rpc UserAppConfigDel(Ids) returns (Empty);
  1703. rpc UserAppConfigGet(UserAppConfigGetReq) returns (UserAppConfigVo);
  1704. rpc UserAppConfigList(UserAppConfigListReq) returns (UserAppConfigListRes);
  1705. // 设备管理
  1706. rpc DeviceAdd(DeviceVo) returns (DeviceVo);
  1707. rpc DeviceUpdate(DeviceVo) returns (DeviceVo);
  1708. rpc DeviceDel(Ids) returns (Empty);
  1709. rpc DeviceGet(DeviceVo) returns (DeviceVo);
  1710. rpc DeviceList(DeviceListReq) returns (DeviceListRes);
  1711. // Account
  1712. rpc AccountAdd(AccountVo) returns (AccountVo);
  1713. rpc AccountUpdate(AccountVo) returns (AccountVo);
  1714. rpc AccountDel(Ids) returns (Empty);
  1715. rpc AccountGet(AccountVo) returns (AccountVo);
  1716. rpc AccountList(AccountListReq) returns (AccountListResp);
  1717. // AccountDevice
  1718. rpc AccountDeviceAdd(AccountDeviceVo) returns (AccountDeviceVo);
  1719. rpc AccountDeviceUpdate(AccountDeviceVo) returns (AccountDeviceVo);
  1720. rpc AccountDeviceDel(Ids) returns (Empty);
  1721. rpc AccountDeviceGet(AccountDeviceVo) returns (AccountDeviceVo);
  1722. rpc AccountDeviceList(AccountDeviceListReq) returns (AccountDeviceListResp);
  1723. }
  1724. // VpnTag
  1725. message VpnTagVo {
  1726. int64 id = 1;
  1727. string productCode = 2;
  1728. string type = 3;
  1729. string name = 4;
  1730. int64 sort = 5;
  1731. Status status = 6;
  1732. string remark = 7;
  1733. int64 createTime = 8;
  1734. int64 updateTime = 9;
  1735. string otherConfig = 10;
  1736. }
  1737. message VpnTagGetReq { VpnTagVo vo = 1; }
  1738. message VpnTagListReq {
  1739. Page page = 1;
  1740. VpnTagVo vo = 2;
  1741. repeated string productCodes = 3;
  1742. repeated int64 excludeIds = 4;
  1743. }
  1744. message VpnTagListResp {
  1745. int64 total = 1;
  1746. repeated VpnTagVo list = 2;
  1747. }
  1748. message VpnTagBatchAddReq { repeated VpnTagVo list = 1; }
  1749. message VpnTagBatchAddResp { repeated VpnTagVo list = 1; }
  1750. message VpnTagBatchUpdateReq { repeated VpnTagVo list = 1; }
  1751. message VpnTagBatchUpdateResp { repeated VpnTagVo list = 1; }
  1752. message VpnTagBatchDelReq { repeated int64 ids = 1; }
  1753. // VpnTag
  1754. message VpnGroupVo {
  1755. int64 id = 1;
  1756. string productCode = 2;
  1757. string name = 3;
  1758. string icon = 4;
  1759. int64 sort = 5;
  1760. Status status = 6;
  1761. string remark = 7;
  1762. int64 createTime = 8;
  1763. int64 updateTime = 9;
  1764. string version = 10;
  1765. string otherConfig = 11;
  1766. }
  1767. message VpnGroupExVo {
  1768. VpnGroupVo vo = 1;
  1769. repeated int64 tagIds = 2;
  1770. }
  1771. message VpnGroupAddReq {
  1772. VpnGroupVo vo = 1;
  1773. repeated int64 tagIds = 2;
  1774. }
  1775. message VpnGroupGetReq { VpnGroupVo vo = 1; }
  1776. message VpnGroupListReq {
  1777. Page page = 1;
  1778. VpnGroupVo vo = 2;
  1779. repeated string productCodes = 3;
  1780. repeated int64 excludeIds = 4;
  1781. }
  1782. message VpnGroupListResp {
  1783. int64 total = 1;
  1784. repeated VpnGroupVo list = 2;
  1785. }
  1786. message VpnGroupBatchAddReq { repeated VpnGroupExVo list = 1; }
  1787. message VpnGroupBatchAddResp { repeated VpnGroupExVo list = 1; }
  1788. message VpnGroupBatchUpdateReq { repeated VpnGroupExVo list = 1; }
  1789. message VpnGroupBatchUpdateResp { repeated VpnGroupExVo list = 1; }
  1790. message VpnGroupBatchDelReq { repeated int64 ids = 1; }
  1791. // VpnGroupTag
  1792. message VpnGroupTagVo {
  1793. int64 id = 1;
  1794. int64 groupId = 2;
  1795. int64 tagId = 3;
  1796. int64 createTime = 4;
  1797. int64 updateTime = 5;
  1798. }
  1799. message VpnGroupTagListReq {
  1800. Page page = 1;
  1801. VpnGroupTagVo vo = 2;
  1802. repeated int64 groupIds = 3;
  1803. repeated int64 tagIds = 4;
  1804. }
  1805. message VpnGroupTagListResp {
  1806. int64 total = 1;
  1807. repeated VpnGroupTagVo list = 2;
  1808. }
  1809. // VpnLocation
  1810. message VpnLocationVo {
  1811. int64 id = 1;
  1812. int64 groupId = 2;
  1813. string name = 3;
  1814. string code = 4;
  1815. string icon = 5;
  1816. int64 type = 6;
  1817. string displayPolicyConfig = 7;
  1818. string routePolicyConfig = 8;
  1819. int64 sort = 9;
  1820. Status status = 10;
  1821. string remark = 11;
  1822. int64 createTime = 12;
  1823. int64 updateTime = 13;
  1824. string version = 14;
  1825. string otherConfig = 15;
  1826. }
  1827. message VpnLocationExVo {
  1828. VpnLocationVo vo = 1;
  1829. string productCode = 2;
  1830. }
  1831. message VpnLocationGetReq { VpnLocationVo vo = 1; }
  1832. message VpnLocationListReq {
  1833. Page page = 1;
  1834. VpnLocationExVo vo = 2;
  1835. repeated int64 groupIds = 3;
  1836. repeated int64 excludeIds = 4;
  1837. repeated string productCodes = 5;
  1838. }
  1839. message VpnLocationListResp {
  1840. int64 total = 1;
  1841. repeated VpnLocationExVo list = 2;
  1842. }
  1843. message VpnLocationBatchAddReq { repeated VpnLocationVo list = 1; }
  1844. message VpnLocationBatchAddResp { repeated VpnLocationExVo list = 1; }
  1845. message VpnLocationBatchUpdateReq { repeated VpnLocationVo list = 1; }
  1846. message VpnLocationBatchUpdateResp { repeated VpnLocationExVo list = 1; }
  1847. message VpnLocationBatchDelReq { repeated int64 ids = 1; }
  1848. // VpnServer
  1849. message VpnServerVo {
  1850. int64 id = 1;
  1851. int64 instanceId = 2;
  1852. string name = 3;
  1853. string ip = 4;
  1854. int64 port = 5;
  1855. int64 pingPort = 6;
  1856. string netConfig = 7;
  1857. string routePolicyConfig = 8;
  1858. string serverInfo = 9;
  1859. Status status = 10;
  1860. string remark = 11;
  1861. int64 createTime = 12;
  1862. int64 updateTime = 13;
  1863. string version = 14;
  1864. string otherInfo = 15;
  1865. int64 monitorPort = 16;
  1866. }
  1867. message VpnServerExVo {
  1868. VpnServerVo vo = 1;
  1869. repeated int64 locationIds = 2;
  1870. }
  1871. message VpnServerListReq {
  1872. Page page = 1;
  1873. VpnServerVo vo = 2;
  1874. repeated int64 excludeIds = 3; // 排除的ID
  1875. repeated string productCodes = 4;
  1876. repeated int64 locationIds = 5;
  1877. repeated int64 instanceIds = 6;
  1878. }
  1879. message VpnServerListResp {
  1880. int64 total = 1;
  1881. repeated VpnServerVo list = 2;
  1882. }
  1883. message VpnServerExListResp {
  1884. int64 total = 1;
  1885. repeated VpnServerExVo list = 2;
  1886. }
  1887. message VpnServerAddReq {
  1888. VpnServerVo vo = 1;
  1889. repeated int64 locationIds = 2;
  1890. }
  1891. message VpnServerBatchAddReq { repeated VpnServerExVo list = 1; }
  1892. message VpnServerBatchAddResp { repeated VpnServerExVo list = 1; }
  1893. message VpnServerBatchUpdateReq { repeated VpnServerExVo list = 1; }
  1894. message VpnServerBatchUpdateResp { repeated VpnServerExVo list = 1; }
  1895. message VpnServerBatchDelReq { repeated int64 ids = 1; }
  1896. message VpnServerLocationVo {
  1897. int64 id = 1;
  1898. int64 serverId = 2;
  1899. int64 locationId = 3;
  1900. int64 createTime = 4;
  1901. int64 updateTime = 5;
  1902. Status status = 6;
  1903. }
  1904. message VpnServerLocationListReq {
  1905. Page page = 1;
  1906. VpnServerLocationVo vo = 2;
  1907. repeated int64 serverIds = 3;
  1908. repeated int64 locationIds = 4;
  1909. }
  1910. message VpnServerLocationListResp {
  1911. int64 total = 1;
  1912. repeated VpnServerLocationVo list = 2;
  1913. }
  1914. message VpnLocationServerCountVo {
  1915. int64 locationId = 1;
  1916. int64 serverCount = 2;
  1917. }
  1918. message VpnLocationServerCountReq {
  1919. Page page = 1;
  1920. Status status = 2;
  1921. repeated int64 serverIds = 3;
  1922. repeated int64 locationIds = 4;
  1923. }
  1924. message VpnLocationServerCountResp {
  1925. int64 total = 1;
  1926. repeated VpnLocationServerCountVo list = 2;
  1927. }
  1928. message VpnProbeTaskVo {
  1929. int64 id = 1;
  1930. string taskId = 2;
  1931. string filter = 3; // 筛选条件
  1932. string type = 4; // 类型
  1933. string uploadDomain = 5; // 配置
  1934. string params = 6;
  1935. int64 answer = 7;
  1936. float percentage = 8; // 进度百分比
  1937. string result = 9; // 结果
  1938. int64 userId = 10;
  1939. int64 createTime = 11;
  1940. int64 updateTime = 12;
  1941. }
  1942. message VpnProbeTaskListReq {
  1943. Page page = 1;
  1944. VpnProbeTaskVo vo = 2;
  1945. }
  1946. message VpnProbeTaskListResp {
  1947. int64 total = 1;
  1948. repeated VpnProbeTaskVo list = 2;
  1949. }
  1950. // govpn 模块,VPN相关服务
  1951. service GoVpnClient {
  1952. rpc Ping(Request) returns (Response);
  1953. // 表的事务操作
  1954. rpc Transaction(TransactionReq) returns (Empty);
  1955. // VpnTag
  1956. rpc VpnTagAdd(VpnTagVo) returns (VpnTagVo);
  1957. rpc VpnTagUpdate(VpnTagVo) returns (VpnTagVo);
  1958. rpc VpnTagDel(Ids) returns (Empty);
  1959. rpc VpnTagGet(VpnTagGetReq) returns (VpnTagVo);
  1960. rpc VpnTagList(VpnTagListReq) returns (VpnTagListResp);
  1961. rpc VpnTagBatchAdd(VpnTagBatchAddReq) returns (VpnTagBatchAddResp);
  1962. rpc VpnTagBatchUpdate(VpnTagBatchUpdateReq) returns (VpnTagBatchUpdateResp);
  1963. // VpnGroup
  1964. rpc VpnGroupAdd(VpnGroupAddReq) returns (VpnGroupVo);
  1965. rpc VpnGroupUpdate(VpnGroupAddReq) returns (Empty);
  1966. rpc VpnGroupDel(Ids) returns (Empty);
  1967. rpc VpnGroupGet(VpnGroupGetReq) returns (VpnGroupVo);
  1968. rpc VpnGroupList(VpnGroupListReq) returns (VpnGroupListResp);
  1969. rpc VpnGroupBatchAdd(VpnGroupBatchAddReq) returns (VpnGroupBatchAddResp);
  1970. rpc VpnGroupBatchUpdate(VpnGroupBatchUpdateReq)
  1971. returns (VpnGroupBatchUpdateResp);
  1972. // VpnGroupTag
  1973. rpc VpnGroupTagAdd(VpnGroupTagVo) returns (VpnGroupTagVo);
  1974. rpc VpnGroupTagUpdate(VpnGroupTagVo) returns (VpnGroupTagVo);
  1975. rpc VpnGroupTagDel(Ids) returns (Empty);
  1976. rpc VpnGroupTagGet(VpnGroupTagVo) returns (VpnGroupTagVo);
  1977. rpc VpnGroupTagList(VpnGroupTagListReq) returns (VpnGroupTagListResp);
  1978. // VpnLocation
  1979. rpc VpnLocationAdd(VpnLocationVo) returns (VpnLocationVo);
  1980. rpc VpnLocationUpdate(VpnLocationVo) returns (Empty);
  1981. rpc VpnLocationDel(Ids) returns (Empty);
  1982. rpc VpnLocationGet(VpnLocationGetReq) returns (VpnLocationVo);
  1983. rpc VpnLocationList(VpnLocationListReq) returns (VpnLocationListResp);
  1984. rpc VpnLocationBatchAdd(VpnLocationBatchAddReq)
  1985. returns (VpnLocationBatchAddResp);
  1986. rpc VpnLocationBatchUpdate(VpnLocationBatchUpdateReq)
  1987. returns (VpnLocationBatchUpdateResp);
  1988. // VpnServer
  1989. rpc VpnServerAdd(VpnServerAddReq) returns (VpnServerAddReq);
  1990. rpc VpnServerUpdate(VpnServerAddReq) returns (VpnServerAddReq);
  1991. rpc VpnServerDel(Ids) returns (Empty);
  1992. rpc VpnServerGet(VpnServerVo) returns (VpnServerVo);
  1993. rpc VpnServerList(VpnServerListReq) returns (VpnServerListResp);
  1994. rpc VpnServerExList(VpnServerListReq) returns (VpnServerExListResp);
  1995. rpc VpnServerBatchAdd(VpnServerBatchAddReq) returns (VpnServerBatchAddResp);
  1996. rpc VpnServerBatchUpdate(VpnServerBatchUpdateReq)
  1997. returns (VpnServerBatchUpdateResp);
  1998. // VpnServerLocation
  1999. rpc VpnServerLocationAdd(VpnServerLocationVo) returns (VpnServerLocationVo);
  2000. rpc VpnServerLocationUpdate(VpnServerLocationVo) returns (Empty);
  2001. rpc VpnServerLocationDel(Ids) returns (Empty);
  2002. rpc VpnServerLocationGet(VpnServerLocationVo) returns (VpnServerLocationVo);
  2003. rpc VpnServerLocationList(VpnServerLocationListReq)
  2004. returns (VpnServerLocationListResp);
  2005. // VpnLocationServerCount
  2006. rpc VpnLocationServerCount(VpnLocationServerCountReq)
  2007. returns (VpnLocationServerCountResp);
  2008. // VpnProbeTask
  2009. rpc VpnProbeTaskAdd(VpnProbeTaskVo) returns (VpnProbeTaskVo);
  2010. rpc VpnProbeTaskUpdate(VpnProbeTaskVo) returns (Empty);
  2011. rpc VpnProbeTaskList(VpnProbeTaskListReq) returns (VpnProbeTaskListResp);
  2012. }