gorpc.proto 61 KB

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