FreeMarkerGeneratorTest.java 128 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081
  1. package com.xjrsoft.xjrsoftboot;
  2. import cn.hutool.db.ds.simple.SimpleDataSource;
  3. import com.xjrsoft.common.constant.GlobalConstant;
  4. import com.xjrsoft.module.generator.dto.ApiGenerateCodesDto;
  5. import com.xjrsoft.module.generator.entity.TableConfig;
  6. import com.xjrsoft.module.generator.service.IApiGeneratorService;
  7. import com.xjrsoft.module.generator.service.impl.ApiGeneratorServiceImpl;
  8. import org.junit.jupiter.api.Test;
  9. import javax.sql.DataSource;
  10. import java.io.IOException;
  11. import java.util.ArrayList;
  12. import java.util.List;
  13. public class FreeMarkerGeneratorTest {
  14. private static final DataSource ds = new SimpleDataSource("jdbc:mysql://10.150.10.139:3306/tl?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true",
  15. "root" , "Zwr~-f6H,u6QE^]C-AD_" );
  16. @Test
  17. public void generateCodesTest() throws IOException {
  18. List<TableConfig> tableConfigs = new ArrayList<>();
  19. TableConfig mainTable = new TableConfig();
  20. mainTable.setTableName("xjr_oa_news");
  21. mainTable.setIsMain(true);
  22. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  23. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  24. TableConfig childTable1 = new TableConfig();
  25. childTable1.setTableName("xjr_oa_news_relation");
  26. childTable1.setIsMain(false);
  27. childTable1.setPkField(GlobalConstant.DEFAULT_PK);
  28. childTable1.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  29. childTable1.setRelationField("news_id");
  30. childTable1.setRelationTableField(GlobalConstant.DEFAULT_PK);
  31. TableConfig childTable2 = new TableConfig();
  32. childTable2.setTableName("xjr_oa_news_relation_config");
  33. childTable2.setIsMain(false);
  34. childTable2.setPkField(GlobalConstant.DEFAULT_PK);
  35. childTable2.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  36. childTable2.setRelationField("news_id");
  37. childTable2.setRelationTableField(GlobalConstant.DEFAULT_PK);
  38. tableConfigs.add(mainTable);
  39. tableConfigs.add(childTable1);
  40. // tableConfigs.add(childTable2);
  41. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  42. params.setAuthor("fanxp");
  43. params.setPackageName("test");
  44. params.setTableConfigs(tableConfigs);
  45. params.setPage(true);
  46. params.setImport(true);
  47. params.setExport(true);
  48. params.setOutMainDir(true);
  49. params.setDs(ds);
  50. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  51. apiGeneratorService.generateCodes(params);
  52. }
  53. @Test
  54. public void generateCodesTest1() throws IOException {
  55. List<TableConfig> tableConfigs = new ArrayList<>();
  56. TableConfig mainTable = new TableConfig();
  57. mainTable.setTableName("xjr_oa_news");
  58. mainTable.setIsMain(true);
  59. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  60. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  61. TableConfig childTable1 = new TableConfig();
  62. childTable1.setTableName("xjr_oa_news_relation");
  63. childTable1.setIsMain(false);
  64. childTable1.setPkField(GlobalConstant.DEFAULT_PK);
  65. childTable1.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  66. childTable1.setRelationField("news_id");
  67. childTable1.setRelationTableField(GlobalConstant.DEFAULT_PK);
  68. TableConfig childTable2 = new TableConfig();
  69. childTable2.setTableName("xjr_oa_news_relation_config");
  70. childTable2.setIsMain(false);
  71. childTable2.setPkField(GlobalConstant.DEFAULT_PK);
  72. childTable2.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  73. childTable2.setRelationField("news_id");
  74. childTable2.setRelationTableField(GlobalConstant.DEFAULT_PK);
  75. tableConfigs.add(mainTable);
  76. tableConfigs.add(childTable1);
  77. // tableConfigs.add(childTable2);
  78. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  79. params.setAuthor("fanxp");
  80. params.setPackageName("test");
  81. params.setTableConfigs(tableConfigs);
  82. params.setPage(true);
  83. params.setImport(true);
  84. params.setExport(true);
  85. params.setOutMainDir(false);
  86. params.setDs(ds);
  87. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  88. apiGeneratorService.generateCodes(params);
  89. }
  90. @Test
  91. public void gcMaterialType() throws IOException {
  92. List<TableConfig> tableConfigs = new ArrayList<>();
  93. TableConfig mainTable = new TableConfig();
  94. mainTable.setTableName("material_type");
  95. mainTable.setIsMain(true);
  96. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  97. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  98. TableConfig childTable1 = new TableConfig();
  99. childTable1.setTableName("material_type_assign");
  100. childTable1.setIsMain(false);
  101. childTable1.setPkField(GlobalConstant.DEFAULT_PK);
  102. childTable1.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  103. childTable1.setRelationField("material_type_id");
  104. childTable1.setRelationTableField(GlobalConstant.DEFAULT_PK);
  105. tableConfigs.add(mainTable);
  106. tableConfigs.add(childTable1);
  107. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  108. params.setAuthor("baicai");
  109. params.setPackageName("material");
  110. params.setTableConfigs(tableConfigs);
  111. params.setPage(true);
  112. params.setImport(true);
  113. params.setExport(true);
  114. params.setOutMainDir(false);
  115. params.setDs(ds);
  116. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  117. apiGeneratorService.generateCodes(params);
  118. }
  119. @Test
  120. public void gcMaterialTask() throws IOException {
  121. List<TableConfig> tableConfigs = new ArrayList<>();
  122. TableConfig mainTable = new TableConfig();
  123. mainTable.setTableName("material_task");
  124. mainTable.setIsMain(true);
  125. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  126. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  127. TableConfig childTable1 = new TableConfig();
  128. childTable1.setTableName("material_task_assign");
  129. childTable1.setIsMain(false);
  130. childTable1.setPkField(GlobalConstant.DEFAULT_PK);
  131. childTable1.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  132. childTable1.setRelationField("material_task_id");
  133. childTable1.setRelationTableField(GlobalConstant.DEFAULT_PK);
  134. TableConfig childTable2 = new TableConfig();
  135. childTable2.setTableName("material_task_appendix");
  136. childTable2.setIsMain(false);
  137. childTable2.setPkField(GlobalConstant.DEFAULT_PK);
  138. childTable2.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  139. childTable2.setRelationField("material_task_id");
  140. childTable2.setRelationTableField(GlobalConstant.DEFAULT_PK);
  141. tableConfigs.add(mainTable);
  142. tableConfigs.add(childTable1);
  143. tableConfigs.add(childTable2);
  144. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  145. params.setAuthor("baicai");
  146. params.setPackageName("material");
  147. params.setTableConfigs(tableConfigs);
  148. params.setPage(true);
  149. params.setImport(true);
  150. params.setExport(true);
  151. params.setOutMainDir(false);
  152. params.setDs(ds);
  153. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  154. apiGeneratorService.generateCodes(params);
  155. }
  156. @Test
  157. public void gcLiteFlowTest() throws IOException {
  158. List<TableConfig> tableConfigs = new ArrayList<>();
  159. TableConfig mainTable = new TableConfig();
  160. mainTable.setTableName("xjr_liteflow_chain");
  161. mainTable.setIsMain(true);
  162. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  163. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  164. tableConfigs.add(mainTable);
  165. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  166. params.setAuthor("fanxp");
  167. params.setPackageName("liteflow");
  168. params.setTableConfigs(tableConfigs);
  169. params.setPage(false);
  170. params.setImport(false);
  171. params.setExport(false);
  172. params.setOutMainDir(false);
  173. params.setDs(ds);
  174. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  175. apiGeneratorService.generateCodes(params);
  176. }
  177. @Test
  178. public void gcWFPushTest() throws IOException {
  179. List<TableConfig> tableConfigs = new ArrayList<>();
  180. TableConfig mainTable = new TableConfig();
  181. mainTable.setTableName("wf_oa_push");
  182. mainTable.setIsMain(true);
  183. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  184. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  185. tableConfigs.add(mainTable);
  186. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  187. params.setAuthor("fanxp");
  188. params.setPackageName("oa");
  189. params.setTableConfigs(tableConfigs);
  190. params.setPage(false);
  191. params.setImport(false);
  192. params.setExport(false);
  193. params.setOutMainDir(false);
  194. params.setDs(ds);
  195. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  196. apiGeneratorService.generateCodes(params);
  197. }
  198. @Test
  199. public void gcWFPullest() throws IOException {
  200. List<TableConfig> tableConfigs = new ArrayList<>();
  201. TableConfig mainTable = new TableConfig();
  202. mainTable.setTableName("wf_oa_pull");
  203. mainTable.setIsMain(true);
  204. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  205. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  206. tableConfigs.add(mainTable);
  207. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  208. params.setAuthor("fanxp");
  209. params.setPackageName("oa");
  210. params.setTableConfigs(tableConfigs);
  211. params.setPage(false);
  212. params.setImport(false);
  213. params.setExport(false);
  214. params.setOutMainDir(false);
  215. params.setDs(ds);
  216. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  217. apiGeneratorService.generateCodes(params);
  218. }
  219. @Test
  220. public void gcfileReceiveTest() throws IOException {
  221. List<TableConfig> tableConfigs = new ArrayList<>();
  222. TableConfig mainTable = new TableConfig();
  223. mainTable.setTableName("file_receive");
  224. mainTable.setIsMain(true);
  225. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  226. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  227. tableConfigs.add(mainTable);
  228. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  229. params.setAuthor("fanxp");
  230. params.setPackageName("oa");
  231. params.setTableConfigs(tableConfigs);
  232. params.setPage(true);
  233. params.setImport(false);
  234. params.setExport(false);
  235. params.setOutMainDir(true);
  236. params.setDs(ds);
  237. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  238. apiGeneratorService.generateCodes(params);
  239. }
  240. @Test
  241. public void gcAppWorkflowConfig() throws IOException {
  242. List<TableConfig> tableConfigs = new ArrayList<>();
  243. TableConfig mainTable = new TableConfig();
  244. mainTable.setTableName("base_app_function");
  245. mainTable.setIsMain(true);
  246. mainTable.setPkField(GlobalConstant.DEFAULT_PK);
  247. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  248. tableConfigs.add(mainTable);
  249. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  250. params.setAuthor("fanxp");
  251. params.setPackageName("app");
  252. params.setTableConfigs(tableConfigs);
  253. params.setPage(false);//是否生成分页接口
  254. params.setImport(false);//是否生成导入接口
  255. params.setExport(false);//是否生成导出接口
  256. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  257. params.setDs(ds);
  258. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  259. apiGeneratorService.generateCodes(params);
  260. }
  261. @Test
  262. public void gcBasePersonnelLabourCapital() throws IOException {
  263. List<TableConfig> tableConfigs = new ArrayList<>();
  264. TableConfig mainTable = new TableConfig();
  265. mainTable.setTableName("base_personnel_labour_capital");//init_sql中的表名
  266. mainTable.setIsMain(true);//是否是主表,一般默认为true
  267. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  268. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  269. tableConfigs.add(mainTable);
  270. mainTable = new TableConfig();
  271. mainTable.setTableName("base_personnel_labour_capital_data");//init_sql中的表名
  272. mainTable.setIsMain(false);//是否是主表,一般默认为true
  273. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  274. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  275. mainTable.setRelationField("labour_capital_id");//设置外键
  276. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  277. tableConfigs.add(mainTable);
  278. mainTable = new TableConfig();
  279. mainTable.setTableName("base_personnel_labour_capital_title");//init_sql中的表名
  280. mainTable.setIsMain(false);//是否是主表,一般默认为true
  281. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  282. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  283. mainTable.setRelationField("labour_capital_id");//设置外键
  284. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  285. tableConfigs.add(mainTable);
  286. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  287. params.setAuthor("dzx");//作者名称
  288. params.setPackageName("personnel");//包名
  289. params.setTableConfigs(tableConfigs);
  290. params.setPage(true);//是否生成分页接口
  291. params.setImport(true);//是否生成导入接口
  292. params.setExport(false);//是否生成导出接口
  293. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  294. params.setDs(ds);
  295. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  296. apiGeneratorService.generateCodes(params);
  297. }
  298. /**
  299. * 学生干部管理
  300. */
  301. @Test
  302. public void gcBaseStudentCadre() throws IOException {
  303. List<TableConfig> tableConfigs = new ArrayList<>();
  304. TableConfig mainTable = new TableConfig();
  305. mainTable.setTableName("base_student_cadre");//init_sql中的表名
  306. mainTable.setIsMain(true);//是否是主表,一般默认为true
  307. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  308. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  309. tableConfigs.add(mainTable);
  310. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  311. params.setAuthor("dzx");//作者名称
  312. params.setPackageName("student");//包名
  313. params.setTableConfigs(tableConfigs);
  314. params.setPage(true);//是否生成分页接口
  315. params.setImport(false);//是否生成导入接口
  316. params.setExport(true);//是否生成导出接口
  317. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  318. params.setDs(ds);
  319. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  320. apiGeneratorService.generateCodes(params);
  321. }
  322. /**
  323. * 快捷菜单
  324. */
  325. @Test
  326. public void gcXjrMenuQuick() throws IOException {
  327. List<TableConfig> tableConfigs = new ArrayList<>();
  328. TableConfig mainTable = new TableConfig();
  329. mainTable.setTableName("xjr_menu_quick");//init_sql中的表名
  330. mainTable.setIsMain(true);//是否是主表,一般默认为true
  331. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  332. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  333. tableConfigs.add(mainTable);
  334. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  335. params.setAuthor("fanxp");//作者名称
  336. params.setPackageName("system");//包名
  337. params.setTableConfigs(tableConfigs);
  338. params.setPage(false);//是否生成分页接口
  339. params.setImport(false);//是否生成导入接口
  340. params.setExport(false);//是否生成导出接口
  341. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  342. params.setDs(ds);
  343. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  344. apiGeneratorService.generateCodes(params);
  345. }
  346. /**
  347. * 学生职务设置
  348. */
  349. @Test
  350. public void gcBaseStudentPost() throws IOException {
  351. List<TableConfig> tableConfigs = new ArrayList<>();
  352. TableConfig mainTable = new TableConfig();
  353. mainTable.setTableName("base_student_post");//init_sql中的表名
  354. mainTable.setIsMain(true);//是否是主表,一般默认为true
  355. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  356. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  357. tableConfigs.add(mainTable);
  358. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  359. params.setAuthor("dzx");//作者名称
  360. params.setPackageName("student");//包名
  361. params.setTableConfigs(tableConfigs);
  362. params.setPage(false);//是否生成分页接口
  363. params.setImport(false);//是否生成导入接口
  364. params.setExport(true);//是否生成导出接口
  365. params.setOutMainDir(false);//是否生成在主目录,前期测试可设置成false
  366. params.setDs(ds);
  367. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  368. apiGeneratorService.generateCodes(params);
  369. }
  370. /**
  371. * 学生考核类别
  372. */
  373. @Test
  374. public void gcBaseStudentAssessmentCategoryPost() throws IOException {
  375. List<TableConfig> tableConfigs = new ArrayList<>();
  376. TableConfig mainTable = new TableConfig();
  377. mainTable.setTableName("base_student_assessment_category");//init_sql中的表名
  378. mainTable.setIsMain(true);//是否是主表,一般默认为true
  379. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  380. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  381. tableConfigs.add(mainTable);
  382. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  383. params.setAuthor("fanxp");//作者名称
  384. params.setPackageName("student");//包名
  385. params.setTableConfigs(tableConfigs);
  386. params.setPage(false);//是否生成分页接口
  387. params.setImport(false);//是否生成导入接口
  388. params.setExport(false);//是否生成导出接口
  389. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  390. params.setDs(ds);
  391. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  392. apiGeneratorService.generateCodes(params);
  393. }
  394. /**
  395. * 学生考核项目
  396. */
  397. @Test
  398. public void gcBaseStudentAssessmentProject() throws IOException {
  399. List<TableConfig> tableConfigs = new ArrayList<>();
  400. TableConfig mainTable = new TableConfig();
  401. mainTable.setTableName("base_student_assessment_project");//init_sql中的表名
  402. mainTable.setIsMain(true);//是否是主表,一般默认为true
  403. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  404. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  405. tableConfigs.add(mainTable);
  406. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  407. params.setAuthor("fanxp");//作者名称
  408. params.setPackageName("student");//包名
  409. params.setTableConfigs(tableConfigs);
  410. params.setPage(true);//是否生成分页接口
  411. params.setImport(false);//是否生成导入接口
  412. params.setExport(false);//是否生成导出接口
  413. params.setOutMainDir(false);//是否生成在主目录,前期测试可设置成false
  414. params.setDs(ds);
  415. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  416. apiGeneratorService.generateCodes(params);
  417. }
  418. /**
  419. * 学生操行分考核类别
  420. */
  421. @Test
  422. public void gcBaseStudentBehaviorCategory() throws IOException {
  423. List<TableConfig> tableConfigs = new ArrayList<>();
  424. TableConfig mainTable = new TableConfig();
  425. mainTable.setTableName("base_student_behavior_category");//init_sql中的表名
  426. mainTable.setIsMain(true);//是否是主表,一般默认为true
  427. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  428. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  429. tableConfigs.add(mainTable);
  430. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  431. params.setAuthor("fanxp");//作者名称
  432. params.setPackageName("student");//包名
  433. params.setTableConfigs(tableConfigs);
  434. params.setPage(false);//是否生成分页接口
  435. params.setImport(false);//是否生成导入接口
  436. params.setExport(false);//是否生成导出接口
  437. params.setOutMainDir(false);//是否生成在主目录,前期测试可设置成false
  438. params.setDs(ds);
  439. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  440. apiGeneratorService.generateCodes(params);
  441. }
  442. /**
  443. * 学生操行分考核项目
  444. */
  445. @Test
  446. public void gcBaseStudentBehaviorProject() throws IOException {
  447. List<TableConfig> tableConfigs = new ArrayList<>();
  448. TableConfig mainTable = new TableConfig();
  449. mainTable.setTableName("base_student_behavior_project");//init_sql中的表名
  450. mainTable.setIsMain(true);//是否是主表,一般默认为true
  451. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  452. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  453. tableConfigs.add(mainTable);
  454. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  455. params.setAuthor("fanxp");//作者名称
  456. params.setPackageName("student");//包名
  457. params.setTableConfigs(tableConfigs);
  458. params.setPage(true);//是否生成分页接口
  459. params.setImport(false);//是否生成导入接口
  460. params.setExport(false);//是否生成导出接口
  461. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  462. params.setDs(ds);
  463. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  464. apiGeneratorService.generateCodes(params);
  465. }
  466. /**
  467. * 学生考核项目
  468. */
  469. @Test
  470. public void gcBaseStudentPunishmentInfo() throws IOException {
  471. List<TableConfig> tableConfigs = new ArrayList<>();
  472. TableConfig mainTable = new TableConfig();
  473. mainTable.setTableName("base_student_punishment_info");//init_sql中的表名
  474. mainTable.setIsMain(true);//是否是主表,一般默认为true
  475. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  476. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  477. tableConfigs.add(mainTable);
  478. mainTable = new TableConfig();
  479. mainTable.setTableName("base_punishment_student_relation");//init_sql中的表名
  480. mainTable.setIsMain(false);//是否是主表,一般默认为true
  481. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  482. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  483. mainTable.setRelationField("punishment_info_id");//设置外键
  484. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  485. tableConfigs.add(mainTable);
  486. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  487. params.setAuthor("dzx");//作者名称
  488. params.setPackageName("student");//包名
  489. params.setTableConfigs(tableConfigs);
  490. params.setPage(true);//是否生成分页接口
  491. params.setImport(false);//是否生成导入接口
  492. params.setExport(false);//是否生成导出接口
  493. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  494. params.setDs(ds);
  495. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  496. apiGeneratorService.generateCodes(params);
  497. }
  498. /**
  499. * 学生班级巡查考核-关联班级
  500. */
  501. @Test
  502. public void gcBaseStudentAssessmentClassRelation() throws IOException {
  503. List<TableConfig> tableConfigs = new ArrayList<>();
  504. TableConfig mainTable = new TableConfig();
  505. mainTable.setTableName("base_student_assessment_class_relation");//init_sql中的表名
  506. mainTable.setIsMain(true);//是否是主表,一般默认为true
  507. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  508. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  509. tableConfigs.add(mainTable);
  510. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  511. params.setAuthor("fanxp");//作者名称
  512. params.setPackageName("test");//包名
  513. params.setTableConfigs(tableConfigs);
  514. params.setPage(true);//是否生成分页接口
  515. params.setImport(false);//是否生成导入接口
  516. params.setExport(false);//是否生成导出接口
  517. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  518. params.setDs(ds);
  519. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  520. apiGeneratorService.generateCodes(params);
  521. }
  522. /**
  523. * 学生考核项目
  524. */
  525. @Test
  526. public void gcBaseStudentBehaviorManage() throws IOException {
  527. List<TableConfig> tableConfigs = new ArrayList<>();
  528. TableConfig mainTable = new TableConfig();
  529. mainTable.setTableName("base_student_behavior_manage");//init_sql中的表名
  530. mainTable.setIsMain(true);//是否是主表,一般默认为true
  531. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  532. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  533. tableConfigs.add(mainTable);
  534. mainTable = new TableConfig();
  535. mainTable.setTableName("base_student_behavior_student_relation");//init_sql中的表名
  536. mainTable.setIsMain(false);//是否是主表,一般默认为true
  537. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  538. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  539. mainTable.setRelationField("base_student_behavior_manage_id");//设置外键
  540. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  541. tableConfigs.add(mainTable);
  542. mainTable = new TableConfig();
  543. mainTable.setTableName("base_student_behavior_class_relation");//init_sql中的表名
  544. mainTable.setIsMain(false);//是否是主表,一般默认为true
  545. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  546. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  547. mainTable.setRelationField("base_student_behavior_manage_id");//设置外键
  548. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  549. tableConfigs.add(mainTable);
  550. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  551. params.setAuthor("dzx");//作者名称
  552. params.setPackageName("student");//包名
  553. params.setTableConfigs(tableConfigs);
  554. params.setPage(true);//是否生成分页接口
  555. params.setImport(false);//是否生成导入接口
  556. params.setExport(false);//是否生成导出接口
  557. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  558. params.setDs(ds);
  559. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  560. apiGeneratorService.generateCodes(params);
  561. }
  562. /**
  563. * 奖学金类型维护
  564. */
  565. @Test
  566. public void gcBaseStudentScholarshipCategory() throws IOException {
  567. List<TableConfig> tableConfigs = new ArrayList<>();
  568. TableConfig mainTable = new TableConfig();
  569. mainTable.setTableName("base_student_bursaries_applicant");//init_sql中的表名
  570. mainTable.setIsMain(true);//是否是主表,一般默认为true
  571. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  572. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  573. tableConfigs.add(mainTable);
  574. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  575. params.setAuthor("dzx");//作者名称
  576. params.setPackageName("student");//包名
  577. params.setTableConfigs(tableConfigs);
  578. params.setPage(true);//是否生成分页接口
  579. params.setImport(false);//是否生成导入接口
  580. params.setExport(false);//是否生成导出接口
  581. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  582. params.setDs(ds);
  583. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  584. apiGeneratorService.generateCodes(params);
  585. }
  586. @Test
  587. public void gcBasestudentScholarshipApplicant() throws IOException {
  588. List<TableConfig> tableConfigs = new ArrayList<>();
  589. TableConfig mainTable = new TableConfig();
  590. mainTable.setTableName("base_student_scholarship_applicant");//init_sql中的表名
  591. mainTable.setIsMain(true);//是否是主表,一般默认为true
  592. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  593. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  594. mainTable.setRelationField("base_student_scholarship_category_id");//设置外键
  595. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  596. tableConfigs.add(mainTable);
  597. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  598. params.setAuthor("dzx");//作者名称
  599. params.setPackageName("student");//包名
  600. params.setTableConfigs(tableConfigs);
  601. params.setPage(true);//是否生成分页接口
  602. params.setImport(false);//是否生成导入接口
  603. params.setExport(false);//是否生成导出接口
  604. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  605. params.setDs(ds);
  606. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  607. apiGeneratorService.generateCodes(params);
  608. }
  609. /**
  610. * 助学金项目
  611. */
  612. @Test
  613. public void gcBaseStudentBursariesProject() throws IOException {
  614. List<TableConfig> tableConfigs = new ArrayList<>();
  615. TableConfig mainTable = new TableConfig();
  616. mainTable.setTableName("base_student_bursaries_project");//init_sql中的表名
  617. mainTable.setIsMain(true);//是否是主表,一般默认为true
  618. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  619. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  620. tableConfigs.add(mainTable);
  621. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  622. params.setAuthor("devil");//作者名称
  623. params.setPackageName("student");//包名
  624. params.setTableConfigs(tableConfigs);
  625. params.setPage(true);//是否生成分页接口
  626. params.setImport(false);//是否生成导入接口
  627. params.setExport(false);//是否生成导出接口
  628. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  629. params.setDs(ds);
  630. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  631. apiGeneratorService.generateCodes(params);
  632. }
  633. /**
  634. * 助学金申请学生信息
  635. */
  636. @Test
  637. public void gcBaseStudentBursariesStudent() throws IOException {
  638. List<TableConfig> tableConfigs = new ArrayList<>();
  639. TableConfig mainTable = new TableConfig();
  640. mainTable.setTableName("base_student_bursaries_student");//init_sql中的表名
  641. mainTable.setIsMain(true);//是否是主表,一般默认为true
  642. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  643. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  644. tableConfigs.add(mainTable);
  645. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  646. params.setAuthor("devil");//作者名称
  647. params.setPackageName("student");//包名
  648. params.setTableConfigs(tableConfigs);
  649. params.setPage(true);//是否生成分页接口
  650. params.setImport(false);//是否生成导入接口
  651. params.setExport(false);//是否生成导出接口
  652. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  653. params.setDs(ds);
  654. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  655. apiGeneratorService.generateCodes(params);
  656. }
  657. /**
  658. * 学籍异动类别
  659. * @throws IOException
  660. */
  661. @Test
  662. public void gcSchoolRollCategory() throws IOException {
  663. List<TableConfig> tableConfigs = new ArrayList<>();
  664. TableConfig mainTable = new TableConfig();
  665. mainTable.setTableName("school_roll_category");//init_sql中的表名
  666. mainTable.setIsMain(true);//是否是主表,一般默认为true
  667. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  668. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  669. tableConfigs.add(mainTable);
  670. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  671. params.setAuthor("phoenix");//作者名称
  672. params.setPackageName("student");//包名
  673. params.setTableConfigs(tableConfigs);
  674. params.setPage(true);//是否生成分页接口
  675. params.setImport(false);//是否生成导入接口
  676. params.setExport(false);//是否生成导出接口
  677. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  678. params.setDs(ds);
  679. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  680. apiGeneratorService.generateCodes(params);
  681. }
  682. /**
  683. * 学籍异动类别
  684. *
  685. * @throws IOException
  686. */
  687. @Test
  688. public void gcSchoolRollReason() throws IOException {
  689. List<TableConfig> tableConfigs = new ArrayList<>();
  690. TableConfig mainTable = new TableConfig();
  691. mainTable.setTableName("school_roll_reason");//init_sql中的表名
  692. mainTable.setIsMain(true);//是否是主表,一般默认为true
  693. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  694. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  695. tableConfigs.add(mainTable);
  696. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  697. params.setAuthor("szs");//作者名称
  698. params.setPackageName("student");//包名
  699. params.setTableConfigs(tableConfigs);
  700. params.setPage(true);//是否生成分页接口
  701. params.setImport(false);//是否生成导入接口
  702. params.setExport(false);//是否生成导出接口
  703. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  704. params.setDs(ds);
  705. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  706. apiGeneratorService.generateCodes(params);
  707. }
  708. /**
  709. * 升学管理
  710. *
  711. */
  712. @Test
  713. public void gcSchoolRollFurtherEducation() throws IOException {
  714. List<TableConfig> tableConfigs = new ArrayList<>();
  715. TableConfig mainTable = new TableConfig();
  716. mainTable.setTableName("school_roll_further_education");//init_sql中的表名
  717. mainTable.setIsMain(true);//是否是主表,一般默认为true
  718. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  719. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  720. tableConfigs.add(mainTable);
  721. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  722. params.setAuthor("szs");//作者名称
  723. params.setPackageName("student");//包名
  724. params.setTableConfigs(tableConfigs);
  725. params.setPage(true);//是否生成分页接口
  726. params.setImport(false);//是否生成导入接口
  727. params.setExport(false);//是否生成导出接口
  728. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  729. params.setDs(ds);
  730. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  731. apiGeneratorService.generateCodes(params);
  732. }
  733. /**
  734. * 班级荣誉
  735. *
  736. */
  737. @Test
  738. public void gcClassHonors() throws IOException {
  739. List<TableConfig> tableConfigs = new ArrayList<>();
  740. TableConfig mainTable = new TableConfig();
  741. mainTable.setTableName("class_honors");//init_sql中的表名
  742. mainTable.setIsMain(true);//是否是主表,一般默认为true
  743. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  744. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  745. tableConfigs.add(mainTable);
  746. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  747. params.setAuthor("szs");//作者名称
  748. params.setPackageName("student");//包名
  749. params.setTableConfigs(tableConfigs);
  750. params.setPage(true);//是否生成分页接口
  751. params.setImport(true);//是否生成导入接口
  752. params.setExport(false);//是否生成导出接口
  753. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  754. params.setDs(ds);
  755. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  756. apiGeneratorService.generateCodes(params);
  757. }
  758. /**
  759. * 考勤配置
  760. *
  761. */
  762. @Test
  763. public void gcAttendanceConfig() throws IOException {
  764. List<TableConfig> tableConfigs = new ArrayList<>();
  765. TableConfig mainTable = new TableConfig();
  766. mainTable.setTableName("attendance_config");//init_sql中的表名
  767. mainTable.setIsMain(true);//是否是主表,一般默认为true
  768. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  769. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  770. tableConfigs.add(mainTable);
  771. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  772. params.setAuthor("szs");//作者名称
  773. params.setPackageName("teacher");//包名
  774. params.setTableConfigs(tableConfigs);
  775. params.setPage(true);//是否生成分页接口
  776. params.setImport(false);//是否生成导入接口
  777. params.setExport(false);//是否生成导出接口
  778. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  779. params.setDs(ds);
  780. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  781. apiGeneratorService.generateCodes(params);
  782. }
  783. /**
  784. * 考勤记录
  785. *
  786. */
  787. @Test
  788. public void gcAttendanceRecord() throws IOException {
  789. List<TableConfig> tableConfigs = new ArrayList<>();
  790. TableConfig mainTable = new TableConfig();
  791. mainTable.setTableName("attendance_record");//init_sql中的表名
  792. mainTable.setIsMain(true);//是否是主表,一般默认为true
  793. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  794. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  795. tableConfigs.add(mainTable);
  796. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  797. params.setAuthor("szs");//作者名称
  798. params.setPackageName("teacher");//包名
  799. params.setTableConfigs(tableConfigs);
  800. params.setPage(true);//是否生成分页接口
  801. params.setImport(false);//是否生成导入接口
  802. params.setExport(true);//是否生成导出接口
  803. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  804. params.setDs(ds);
  805. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  806. apiGeneratorService.generateCodes(params);
  807. }
  808. /**
  809. * 需要考勤的人员管理
  810. *
  811. */
  812. @Test
  813. public void gcAttendancePersonneld() throws IOException {
  814. List<TableConfig> tableConfigs = new ArrayList<>();
  815. TableConfig mainTable = new TableConfig();
  816. mainTable.setTableName("attendance_personnel");//init_sql中的表名
  817. mainTable.setIsMain(true);//是否是主表,一般默认为true
  818. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  819. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  820. tableConfigs.add(mainTable);
  821. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  822. params.setAuthor("szs");//作者名称
  823. params.setPackageName("teacher");//包名
  824. params.setTableConfigs(tableConfigs);
  825. params.setPage(true);//是否生成分页接口
  826. params.setImport(false);//是否生成导入接口
  827. params.setExport(true);//是否生成导出接口
  828. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  829. params.setDs(ds);
  830. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  831. apiGeneratorService.generateCodes(params);
  832. }
  833. /**
  834. * 班主任事项请假
  835. *
  836. */
  837. @Test
  838. public void gcHeadTeacherLeave() throws IOException {
  839. List<TableConfig> tableConfigs = new ArrayList<>();
  840. TableConfig mainTable = new TableConfig();
  841. mainTable.setTableName("wf_head_teacher_leave");//init_sql中的表名
  842. mainTable.setIsMain(true);//是否是主表,一般默认为true
  843. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  844. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  845. tableConfigs.add(mainTable);
  846. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  847. params.setAuthor("szs");//作者名称
  848. params.setPackageName("teacher");//包名
  849. params.setTableConfigs(tableConfigs);
  850. params.setPage(true);//是否生成分页接口
  851. params.setImport(false);//是否生成导入接口
  852. params.setExport(true);//是否生成导出接口
  853. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  854. params.setDs(ds);
  855. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  856. apiGeneratorService.generateCodes(params);
  857. }
  858. /**
  859. * 干部部门管理
  860. *
  861. */
  862. @Test
  863. public void gcCadreDept() throws IOException {
  864. List<TableConfig> tableConfigs = new ArrayList<>();
  865. TableConfig mainTable = new TableConfig();
  866. mainTable.setTableName("cadre_dept");//init_sql中的表名
  867. mainTable.setIsMain(true);//是否是主表,一般默认为true
  868. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  869. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  870. tableConfigs.add(mainTable);
  871. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  872. params.setAuthor("szs");//作者名称
  873. params.setPackageName("student");//包名
  874. params.setTableConfigs(tableConfigs);
  875. params.setPage(true);//是否生成分页接口
  876. params.setImport(false);//是否生成导入接口
  877. params.setExport(false);//是否生成导出接口
  878. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  879. params.setDs(ds);
  880. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  881. apiGeneratorService.generateCodes(params);
  882. }
  883. /**
  884. * 干部候选人
  885. *
  886. */
  887. @Test
  888. public void gcWfCadreCandidate() throws IOException {
  889. List<TableConfig> tableConfigs = new ArrayList<>();
  890. TableConfig mainTable = new TableConfig();
  891. mainTable.setTableName("wf_cadre_candidate");//init_sql中的表名
  892. mainTable.setIsMain(true);//是否是主表,一般默认为true
  893. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  894. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  895. tableConfigs.add(mainTable);
  896. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  897. params.setAuthor("szs");//作者名称
  898. params.setPackageName("student");//包名
  899. params.setTableConfigs(tableConfigs);
  900. params.setPage(true);//是否生成分页接口
  901. params.setImport(false);//是否生成导入接口
  902. params.setExport(false);//是否生成导出接口
  903. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  904. params.setDs(ds);
  905. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  906. apiGeneratorService.generateCodes(params);
  907. }
  908. /**
  909. * 教师请假
  910. *
  911. */
  912. @Test
  913. public void gcWfTeacherleave() throws IOException {
  914. List<TableConfig> tableConfigs = new ArrayList<>();
  915. TableConfig mainTable = new TableConfig();
  916. mainTable.setTableName("wf_teacherleave");//init_sql中的表名
  917. mainTable.setIsMain(true);//是否是主表,一般默认为true
  918. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  919. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  920. tableConfigs.add(mainTable);
  921. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  922. params.setAuthor("szs");//作者名称
  923. params.setPackageName("teacher");//包名
  924. params.setTableConfigs(tableConfigs);
  925. params.setPage(true);//是否生成分页接口
  926. params.setImport(false);//是否生成导入接口
  927. params.setExport(true);//是否生成导出接口
  928. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  929. params.setDs(ds);
  930. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  931. apiGeneratorService.generateCodes(params);
  932. }
  933. /**
  934. * 学科组管理
  935. *
  936. */
  937. @Test
  938. public void gcSubjectGroup() throws IOException {
  939. List<TableConfig> tableConfigs = new ArrayList<>();
  940. TableConfig mainTable = new TableConfig();
  941. mainTable.setTableName("subject_group");//init_sql中的表名
  942. mainTable.setIsMain(true);//是否是主表,一般默认为true
  943. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  944. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  945. tableConfigs.add(mainTable);
  946. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  947. params.setAuthor("szs");//作者名称
  948. params.setPackageName("textbook");//包名
  949. params.setTableConfigs(tableConfigs);
  950. params.setPage(true);//是否生成分页接口
  951. params.setImport(false);//是否生成导入接口
  952. params.setExport(false);//是否生成导出接口
  953. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  954. params.setDs(ds);
  955. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  956. apiGeneratorService.generateCodes(params);
  957. }
  958. /**
  959. * 学科组课程管理
  960. *
  961. */
  962. @Test
  963. public void gcSubjectGroupCourse() throws IOException {
  964. List<TableConfig> tableConfigs = new ArrayList<>();
  965. TableConfig mainTable = new TableConfig();
  966. mainTable.setTableName("subject_group_course");//init_sql中的表名
  967. mainTable.setIsMain(true);//是否是主表,一般默认为true
  968. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  969. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  970. tableConfigs.add(mainTable);
  971. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  972. params.setAuthor("szs");//作者名称
  973. params.setPackageName("textbook");//包名
  974. params.setTableConfigs(tableConfigs);
  975. params.setPage(true);//是否生成分页接口
  976. params.setImport(false);//是否生成导入接口
  977. params.setExport(false);//是否生成导出接口
  978. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  979. params.setDs(ds);
  980. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  981. apiGeneratorService.generateCodes(params);
  982. }
  983. /**
  984. * 学科组课程管理
  985. *
  986. */
  987. @Test
  988. public void gcTextBookManage() throws IOException {
  989. List<TableConfig> tableConfigs = new ArrayList<>();
  990. TableConfig mainTable = new TableConfig();
  991. mainTable.setTableName("textbook");//init_sql中的表名
  992. mainTable.setIsMain(true);//是否是主表,一般默认为true
  993. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  994. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  995. tableConfigs.add(mainTable);
  996. mainTable = new TableConfig();
  997. mainTable.setTableName("textbook_class_relation");//init_sql中的表名
  998. mainTable.setIsMain(false);//是否是主表,一般默认为true
  999. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1000. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1001. mainTable.setRelationField("textbook_id");//设置外键
  1002. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1003. tableConfigs.add(mainTable);
  1004. mainTable = new TableConfig();
  1005. mainTable.setTableName("textbook_subscription_record");//init_sql中的表名
  1006. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1007. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1008. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1009. mainTable.setRelationField("wf_textbook_subscription_id");//设置外键
  1010. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1011. tableConfigs.add(mainTable);
  1012. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1013. params.setAuthor("szs");//作者名称
  1014. params.setPackageName("textbook");//包名
  1015. params.setTableConfigs(tableConfigs);
  1016. params.setPage(true);//是否生成分页接口
  1017. params.setImport(false);//是否生成导入接口
  1018. params.setExport(true);//是否生成导出接口
  1019. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1020. params.setDs(ds);
  1021. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1022. apiGeneratorService.generateCodes(params);
  1023. }
  1024. /**
  1025. * 教材教辅征订
  1026. *
  1027. */
  1028. @Test
  1029. public void gcWfTextbookSubscription() throws IOException {
  1030. List<TableConfig> tableConfigs = new ArrayList<>();
  1031. TableConfig mainTable = new TableConfig();
  1032. mainTable.setTableName("wf_textbook_subscription");//init_sql中的表名
  1033. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1034. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1035. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1036. tableConfigs.add(mainTable);
  1037. mainTable = new TableConfig();
  1038. mainTable.setTableName("wf_textbook_subscription_item");//init_sql中的表名
  1039. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1040. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1041. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1042. mainTable.setRelationField("wf_textbook_subscription_id");//设置外键
  1043. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1044. tableConfigs.add(mainTable);
  1045. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1046. params.setAuthor("szs");//作者名称
  1047. params.setPackageName("textbook");//包名
  1048. params.setTableConfigs(tableConfigs);
  1049. params.setPage(true);//是否生成分页接口
  1050. params.setImport(false);//是否生成导入接口
  1051. params.setExport(false);//是否生成导出接口
  1052. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1053. params.setDs(ds);
  1054. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1055. apiGeneratorService.generateCodes(params);
  1056. }
  1057. /**
  1058. * 学科组课程管理
  1059. *
  1060. */
  1061. @Test
  1062. public void gcTextbookClassWarehouse() throws IOException {
  1063. List<TableConfig> tableConfigs = new ArrayList<>();
  1064. TableConfig mainTable = new TableConfig();
  1065. mainTable.setTableName("textbook_class_warehouse");//init_sql中的表名
  1066. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1067. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1068. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1069. tableConfigs.add(mainTable);
  1070. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1071. params.setAuthor("szs");//作者名称
  1072. params.setPackageName("textbook");//包名
  1073. params.setTableConfigs(tableConfigs);
  1074. params.setPage(true);//是否生成分页接口
  1075. params.setImport(false);//是否生成导入接口
  1076. params.setExport(true);//是否生成导出接口
  1077. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1078. params.setDs(ds);
  1079. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1080. apiGeneratorService.generateCodes(params);
  1081. }
  1082. /**
  1083. * 教材申领
  1084. *
  1085. */
  1086. @Test
  1087. public void gcWfStudentTextbookClaim() throws IOException {
  1088. List<TableConfig> tableConfigs = new ArrayList<>();
  1089. TableConfig mainTable = new TableConfig();
  1090. mainTable.setTableName("wf_textbook_claim");//init_sql中的表名
  1091. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1092. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1093. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1094. tableConfigs.add(mainTable);
  1095. mainTable = new TableConfig();
  1096. mainTable.setTableName("wf_textbook_claim_item");//init_sql中的表名
  1097. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1098. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1099. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1100. mainTable.setRelationField("wf_textbook_claim_id");//设置外键
  1101. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1102. tableConfigs.add(mainTable);
  1103. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1104. params.setAuthor("szs");//作者名称
  1105. params.setPackageName("textbook");//包名
  1106. params.setTableConfigs(tableConfigs);
  1107. params.setPage(true);//是否生成分页接口
  1108. params.setImport(false);//是否生成导入接口
  1109. params.setExport(false);//是否生成导出接口
  1110. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1111. params.setDs(ds);
  1112. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1113. apiGeneratorService.generateCodes(params);
  1114. }
  1115. /**
  1116. * 学生教材认领记录
  1117. *
  1118. */
  1119. @Test
  1120. public void gcTextbookStudentClaim() throws IOException {
  1121. List<TableConfig> tableConfigs = new ArrayList<>();
  1122. TableConfig mainTable = new TableConfig();
  1123. mainTable.setTableName("textbook_student_claim");//init_sql中的表名
  1124. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1125. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1126. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1127. tableConfigs.add(mainTable);
  1128. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1129. params.setAuthor("szs");//作者名称
  1130. params.setPackageName("textbook");//包名
  1131. params.setTableConfigs(tableConfigs);
  1132. params.setPage(true);//是否生成分页接口
  1133. params.setImport(false);//是否生成导入接口
  1134. params.setExport(false);//是否生成导出接口
  1135. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1136. params.setDs(ds);
  1137. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1138. apiGeneratorService.generateCodes(params);
  1139. }
  1140. /**
  1141. * 教材出库记录
  1142. *
  1143. */
  1144. @Test
  1145. public void gcTextbookIssueRecord() throws IOException {
  1146. List<TableConfig> tableConfigs = new ArrayList<>();
  1147. TableConfig mainTable = new TableConfig();
  1148. mainTable.setTableName("textbook_issue_record");//init_sql中的表名
  1149. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1150. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1151. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1152. tableConfigs.add(mainTable);
  1153. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1154. params.setAuthor("szs");//作者名称
  1155. params.setPackageName("textbook");//包名
  1156. params.setTableConfigs(tableConfigs);
  1157. params.setPage(true);//是否生成分页接口
  1158. params.setImport(false);//是否生成导入接口
  1159. params.setExport(true);//是否生成导出接口
  1160. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1161. params.setDs(ds);
  1162. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1163. apiGeneratorService.generateCodes(params);
  1164. }
  1165. /**
  1166. * 作业本征订
  1167. *
  1168. */
  1169. @Test
  1170. public void gcWfExerciseBook() throws IOException {
  1171. List<TableConfig> tableConfigs = new ArrayList<>();
  1172. TableConfig mainTable = new TableConfig();
  1173. mainTable.setTableName("wf_exercise_book");//init_sql中的表名
  1174. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1175. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1176. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1177. tableConfigs.add(mainTable);
  1178. mainTable = new TableConfig();
  1179. mainTable.setTableName("wf_exercise_book_item");//init_sql中的表名
  1180. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1181. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1182. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1183. mainTable.setRelationField("wf_exercise_book_id");//设置外键
  1184. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1185. tableConfigs.add(mainTable);
  1186. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1187. params.setAuthor("szs");//作者名称
  1188. params.setPackageName("textbook");//包名
  1189. params.setTableConfigs(tableConfigs);
  1190. params.setPage(true);//是否生成分页接口
  1191. params.setImport(false);//是否生成导入接口
  1192. params.setExport(true);//是否生成导出接口
  1193. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1194. params.setDs(ds);
  1195. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1196. apiGeneratorService.generateCodes(params);
  1197. }
  1198. /**
  1199. * 寝室维护
  1200. * @throws IOException
  1201. */
  1202. @Test
  1203. public void gcRoom() throws IOException {
  1204. List<TableConfig> tableConfigs = new ArrayList<>();
  1205. TableConfig mainTable = new TableConfig();
  1206. mainTable.setTableName("room");//init_sql中的表名
  1207. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1208. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1209. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1210. tableConfigs.add(mainTable);
  1211. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1212. params.setAuthor("dzx");//作者名称
  1213. params.setPackageName("room");//包名
  1214. params.setTableConfigs(tableConfigs);
  1215. params.setPage(true);//是否生成分页接口
  1216. params.setImport(true);//是否生成导入接口
  1217. params.setExport(true);//是否生成导出接口
  1218. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1219. params.setDs(ds);
  1220. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1221. apiGeneratorService.generateCodes(params);
  1222. }
  1223. /**
  1224. * 寝室维护
  1225. * @throws IOException
  1226. */
  1227. @Test
  1228. public void gcRoomBed() throws IOException {
  1229. List<TableConfig> tableConfigs = new ArrayList<>();
  1230. TableConfig mainTable = new TableConfig();
  1231. mainTable.setTableName("room_bed");//init_sql中的表名
  1232. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1233. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1234. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1235. tableConfigs.add(mainTable);
  1236. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1237. params.setAuthor("dzx");//作者名称
  1238. params.setPackageName("room");//包名
  1239. params.setTableConfigs(tableConfigs);
  1240. params.setPage(true);//是否生成分页接口
  1241. params.setImport(true);//是否生成导入接口
  1242. params.setExport(true);//是否生成导出接口
  1243. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1244. params.setDs(ds);
  1245. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1246. apiGeneratorService.generateCodes(params);
  1247. }
  1248. /**
  1249. * 学生班级详细信息维护
  1250. * @throws IOException
  1251. */
  1252. @Test
  1253. public void gcBaseClassMajorSet() throws IOException {
  1254. List<TableConfig> tableConfigs = new ArrayList<>();
  1255. TableConfig mainTable = new TableConfig();
  1256. mainTable.setTableName("base_class_major_set");//init_sql中的表名
  1257. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1258. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1259. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1260. tableConfigs.add(mainTable);
  1261. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1262. params.setAuthor("szs");//作者名称
  1263. params.setPackageName("student");//包名
  1264. params.setTableConfigs(tableConfigs);
  1265. params.setPage(true);//是否生成分页接口
  1266. params.setImport(false);//是否生成导入接口
  1267. params.setExport(false);//是否生成导出接口
  1268. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1269. params.setDs(ds);
  1270. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1271. apiGeneratorService.generateCodes(params);
  1272. }
  1273. /**
  1274. * 寝室维护
  1275. * @throws IOException
  1276. */
  1277. @Test
  1278. public void gcRoomBedRecord() throws IOException {
  1279. List<TableConfig> tableConfigs = new ArrayList<>();
  1280. TableConfig mainTable = new TableConfig();
  1281. mainTable.setTableName("room_bed_record");//init_sql中的表名
  1282. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1283. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1284. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1285. tableConfigs.add(mainTable);
  1286. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1287. params.setAuthor("dzx");//作者名称
  1288. params.setPackageName("room");//包名
  1289. params.setTableConfigs(tableConfigs);
  1290. params.setPage(true);//是否生成分页接口
  1291. params.setImport(true);//是否生成导入接口
  1292. params.setExport(true);//是否生成导出接口
  1293. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1294. params.setDs(ds);
  1295. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1296. apiGeneratorService.generateCodes(params);
  1297. }
  1298. /**
  1299. * 教材领取人员
  1300. * @throws IOException
  1301. */
  1302. @Test
  1303. public void gcTextbookClaimUser() throws IOException {
  1304. List<TableConfig> tableConfigs = new ArrayList<>();
  1305. TableConfig mainTable = new TableConfig();
  1306. mainTable.setTableName("textbook_claim_user");//init_sql中的表名
  1307. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1308. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1309. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1310. tableConfigs.add(mainTable);
  1311. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1312. params.setAuthor("dzx");//作者名称
  1313. params.setPackageName("textbook");//包名
  1314. params.setTableConfigs(tableConfigs);
  1315. params.setPage(true);//是否生成分页接口
  1316. params.setImport(false);//是否生成导入接口
  1317. params.setExport(false);//是否生成导出接口
  1318. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1319. params.setDs(ds);
  1320. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1321. apiGeneratorService.generateCodes(params);
  1322. }
  1323. /**
  1324. * 宿管员管理
  1325. * @throws IOException
  1326. */
  1327. @Test
  1328. public void gcRoomTeacherAppoint() throws IOException {
  1329. List<TableConfig> tableConfigs = new ArrayList<>();
  1330. TableConfig mainTable = new TableConfig();
  1331. mainTable.setTableName("room_teacher_appoint");//init_sql中的表名
  1332. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1333. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1334. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1335. tableConfigs.add(mainTable);
  1336. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1337. params.setAuthor("dzx");//作者名称
  1338. params.setPackageName("room");//包名
  1339. params.setTableConfigs(tableConfigs);
  1340. params.setPage(true);//是否生成分页接口
  1341. params.setImport(true);//是否生成导入接口
  1342. params.setExport(true);//是否生成导出接口
  1343. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1344. params.setDs(ds);
  1345. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1346. apiGeneratorService.generateCodes(params);
  1347. }
  1348. /**
  1349. * 宿管员管理
  1350. * @throws IOException
  1351. */
  1352. @Test
  1353. public void gcWeeklyDutySchedule() throws IOException {
  1354. List<TableConfig> tableConfigs = new ArrayList<>();
  1355. TableConfig mainTable = new TableConfig();
  1356. mainTable.setTableName("weekly_duty_schedule");//init_sql中的表名
  1357. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1358. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1359. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1360. tableConfigs.add(mainTable);
  1361. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1362. params.setAuthor("dzx");//作者名称
  1363. params.setPackageName("weekly");//包名
  1364. params.setTableConfigs(tableConfigs);
  1365. params.setPage(true);//是否生成分页接口
  1366. params.setImport(true);//是否生成导入接口
  1367. params.setExport(true);//是否生成导出接口
  1368. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1369. params.setDs(ds);
  1370. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1371. apiGeneratorService.generateCodes(params);
  1372. }
  1373. /**
  1374. * 寝室干部任命(任命学生)
  1375. * @throws IOException
  1376. */
  1377. @Test
  1378. public void gcRoomStudentAppoint() throws IOException {
  1379. List<TableConfig> tableConfigs = new ArrayList<>();
  1380. TableConfig mainTable = new TableConfig();
  1381. mainTable.setTableName("room_student_appoint");//init_sql中的表名
  1382. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1383. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1384. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1385. tableConfigs.add(mainTable);
  1386. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1387. params.setAuthor("dzx");//作者名称
  1388. params.setPackageName("room");//包名
  1389. params.setTableConfigs(tableConfigs);
  1390. params.setPage(true);//是否生成分页接口
  1391. params.setImport(false);//是否生成导入接口
  1392. params.setExport(false);//是否生成导出接口
  1393. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1394. params.setDs(ds);
  1395. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1396. apiGeneratorService.generateCodes(params);
  1397. }
  1398. /**
  1399. * 寝室申请
  1400. * @throws IOException
  1401. */
  1402. @Test
  1403. public void gcWfRoomApplicant() throws IOException {
  1404. List<TableConfig> tableConfigs = new ArrayList<>();
  1405. TableConfig mainTable = new TableConfig();
  1406. mainTable.setTableName("wf_room_applicant");//init_sql中的表名
  1407. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1408. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1409. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1410. tableConfigs.add(mainTable);
  1411. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1412. params.setAuthor("dzx");//作者名称
  1413. params.setPackageName("room");//包名
  1414. params.setTableConfigs(tableConfigs);
  1415. params.setPage(true);//是否生成分页接口
  1416. params.setImport(false);//是否生成导入接口
  1417. params.setExport(true);//是否生成导出接口
  1418. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1419. params.setDs(ds);
  1420. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1421. apiGeneratorService.generateCodes(params);
  1422. }
  1423. /**
  1424. * 留校住宿申请
  1425. * @throws IOException
  1426. */
  1427. @Test
  1428. public void gcWfRoomStayOvernight() throws IOException {
  1429. List<TableConfig> tableConfigs = new ArrayList<>();
  1430. TableConfig mainTable = new TableConfig();
  1431. mainTable.setTableName("wf_room_stay_overnight");//init_sql中的表名
  1432. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1433. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1434. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1435. tableConfigs.add(mainTable);
  1436. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1437. params.setAuthor("szs");//作者名称
  1438. params.setPackageName("room");//包名
  1439. params.setTableConfigs(tableConfigs);
  1440. params.setPage(true);//是否生成分页接口
  1441. params.setImport(false);//是否生成导入接口
  1442. params.setExport(true);//是否生成导出接口
  1443. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1444. params.setDs(ds);
  1445. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1446. apiGeneratorService.generateCodes(params);
  1447. }
  1448. @Test
  1449. public void gcRoomRule() throws IOException {
  1450. List<TableConfig> tableConfigs = new ArrayList<>();
  1451. TableConfig mainTable = new TableConfig();
  1452. mainTable.setTableName("room_rule");//init_sql中的表名
  1453. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1454. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1455. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1456. tableConfigs.add(mainTable);
  1457. TableConfig childTable1 = new TableConfig();
  1458. childTable1.setTableName("room_rule_item");
  1459. childTable1.setIsMain(false);
  1460. childTable1.setPkField(GlobalConstant.DEFAULT_PK);
  1461. childTable1.setPkType(GlobalConstant.DEFAULT_PK_TYPE);
  1462. childTable1.setRelationField("room_rule_id");
  1463. childTable1.setRelationTableField(GlobalConstant.DEFAULT_PK);
  1464. tableConfigs.add(childTable1);
  1465. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1466. params.setAuthor("szs");//作者名称
  1467. params.setPackageName("room");//包名
  1468. params.setTableConfigs(tableConfigs);
  1469. params.setPage(true);//是否生成分页接口
  1470. params.setImport(false);//是否生成导入接口
  1471. params.setExport(true);//是否生成导出接口
  1472. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1473. params.setDs(ds);
  1474. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1475. apiGeneratorService.generateCodes(params);
  1476. }
  1477. /**
  1478. * 查寝记录
  1479. * @throws IOException
  1480. */
  1481. @Test
  1482. public void gcRoomBedCheckRecord() throws IOException {
  1483. List<TableConfig> tableConfigs = new ArrayList<>();
  1484. TableConfig mainTable = new TableConfig();
  1485. mainTable.setTableName("room_bed_check_record");//init_sql中的表名
  1486. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1487. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1488. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1489. tableConfigs.add(mainTable);
  1490. mainTable = new TableConfig();
  1491. mainTable.setTableName("room_bed_check_record_relation");//init_sql中的表名
  1492. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1493. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1494. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1495. mainTable.setRelationField("room_bed_check_record_id");//设置外键
  1496. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1497. tableConfigs.add(mainTable);
  1498. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1499. params.setAuthor("szs");//作者名称
  1500. params.setPackageName("room");//包名
  1501. params.setTableConfigs(tableConfigs);
  1502. params.setPage(true);//是否生成分页接口
  1503. params.setImport(false);//是否生成导入接口
  1504. params.setExport(true);//是否生成导出接口
  1505. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1506. params.setDs(ds);
  1507. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1508. apiGeneratorService.generateCodes(params);
  1509. }
  1510. /**
  1511. * 退书申请
  1512. * @throws IOException
  1513. */
  1514. @Test
  1515. public void gcWfTextbookRecede() throws IOException {
  1516. List<TableConfig> tableConfigs = new ArrayList<>();
  1517. TableConfig mainTable = new TableConfig();
  1518. mainTable.setTableName("wf_textbook_recede");//init_sql中的表名
  1519. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1520. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1521. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1522. tableConfigs.add(mainTable);
  1523. mainTable = new TableConfig();
  1524. mainTable.setTableName("wf_textbook_recede_item");//init_sql中的表名
  1525. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1526. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1527. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1528. mainTable.setRelationField("wf_textbook_recede_id");//设置外键
  1529. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1530. tableConfigs.add(mainTable);
  1531. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1532. params.setAuthor("szs");//作者名称
  1533. params.setPackageName("textbook");//包名
  1534. params.setTableConfigs(tableConfigs);
  1535. params.setPage(true);//是否生成分页接口
  1536. params.setImport(false);//是否生成导入接口
  1537. params.setExport(true);//是否生成导出接口
  1538. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1539. params.setDs(ds);
  1540. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1541. apiGeneratorService.generateCodes(params);
  1542. }
  1543. /**
  1544. * 寝室情况汇报
  1545. * @throws IOException
  1546. */
  1547. @Test
  1548. public void gcWfRoomReport() throws IOException {
  1549. List<TableConfig> tableConfigs = new ArrayList<>();
  1550. TableConfig mainTable = new TableConfig();
  1551. mainTable.setTableName("wf_room_report");//init_sql中的表名
  1552. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1553. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1554. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1555. tableConfigs.add(mainTable);
  1556. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1557. params.setAuthor("szs");//作者名称
  1558. params.setPackageName("room");//包名
  1559. params.setTableConfigs(tableConfigs);
  1560. params.setPage(true);//是否生成分页接口
  1561. params.setImport(false);//是否生成导入接口
  1562. params.setExport(true);//是否生成导出接口
  1563. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1564. params.setDs(ds);
  1565. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1566. apiGeneratorService.generateCodes(params);
  1567. }
  1568. /**
  1569. * 查寝记录
  1570. * @throws IOException
  1571. */
  1572. @Test
  1573. public void gcRoomValueWeek() throws IOException {
  1574. List<TableConfig> tableConfigs = new ArrayList<>();
  1575. TableConfig mainTable = new TableConfig();
  1576. mainTable.setTableName("room_value_week");//init_sql中的表名
  1577. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1578. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1579. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1580. tableConfigs.add(mainTable);
  1581. mainTable = new TableConfig();
  1582. mainTable.setTableName("room_value_week_item");//init_sql中的表名
  1583. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1584. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1585. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1586. mainTable.setRelationField("room_value_week_id");//设置外键
  1587. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1588. tableConfigs.add(mainTable);
  1589. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1590. params.setAuthor("dzx");//作者名称
  1591. params.setPackageName("room");//包名
  1592. params.setTableConfigs(tableConfigs);
  1593. params.setPage(true);//是否生成分页接口
  1594. params.setImport(false);//是否生成导入接口
  1595. params.setExport(true);//是否生成导出接口
  1596. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1597. params.setDs(ds);
  1598. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1599. apiGeneratorService.generateCodes(params);
  1600. }
  1601. /**
  1602. * 评价项
  1603. * @throws IOException
  1604. */
  1605. @Test
  1606. public void gcEvaluateItem() throws IOException {
  1607. List<TableConfig> tableConfigs = new ArrayList<>();
  1608. TableConfig mainTable = new TableConfig();
  1609. mainTable.setTableName("evaluate_item");//init_sql中的表名
  1610. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1611. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1612. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1613. tableConfigs.add(mainTable);
  1614. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1615. params.setAuthor("szs");//作者名称
  1616. params.setPackageName("evaluate");//包名
  1617. params.setTableConfigs(tableConfigs);
  1618. params.setPage(true);//是否生成分页接口
  1619. params.setImport(false);//是否生成导入接口
  1620. params.setExport(false);//是否生成导出接口
  1621. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1622. params.setDs(ds);
  1623. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1624. apiGeneratorService.generateCodes(params);
  1625. }
  1626. /**
  1627. * 评价项
  1628. * @throws IOException
  1629. */
  1630. @Test
  1631. public void gcEvaluateManage() throws IOException {
  1632. List<TableConfig> tableConfigs = new ArrayList<>();
  1633. TableConfig mainTable = new TableConfig();
  1634. mainTable.setTableName("evaluate_manage");//init_sql中的表名
  1635. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1636. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1637. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1638. tableConfigs.add(mainTable);
  1639. mainTable = new TableConfig();
  1640. mainTable.setTableName("evaluate_object");//init_sql中的表名
  1641. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1642. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1643. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1644. mainTable.setRelationField("evaluate_manage_id");//设置外键
  1645. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1646. tableConfigs.add(mainTable);
  1647. mainTable = new TableConfig();
  1648. mainTable.setTableName("evaluate_executer");//init_sql中的表名
  1649. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1650. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1651. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1652. mainTable.setRelationField("evaluate_manage_id");//设置外键
  1653. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1654. tableConfigs.add(mainTable);
  1655. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1656. params.setAuthor("dzx");//作者名称
  1657. params.setPackageName("evaluate");//包名
  1658. params.setTableConfigs(tableConfigs);
  1659. params.setPage(true);//是否生成分页接口
  1660. params.setImport(false);//是否生成导入接口
  1661. params.setExport(false);//是否生成导出接口
  1662. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1663. params.setDs(ds);
  1664. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1665. apiGeneratorService.generateCodes(params);
  1666. }
  1667. /**
  1668. * 评价结果
  1669. * @throws IOException
  1670. */
  1671. @Test
  1672. public void gcEvaluateResult() throws IOException {
  1673. List<TableConfig> tableConfigs = new ArrayList<>();
  1674. TableConfig mainTable = new TableConfig();
  1675. mainTable.setTableName("evaluate_result");//init_sql中的表名
  1676. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1677. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1678. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1679. tableConfigs.add(mainTable);
  1680. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1681. params.setAuthor("szs");//作者名称
  1682. params.setPackageName("evaluate");//包名
  1683. params.setTableConfigs(tableConfigs);
  1684. params.setPage(true);//是否生成分页接口
  1685. params.setImport(false);//是否生成导入接口
  1686. params.setExport(false);//是否生成导出接口
  1687. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1688. params.setDs(ds);
  1689. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1690. apiGeneratorService.generateCodes(params);
  1691. }
  1692. @Test
  1693. public void gcLaborManagement() throws IOException {
  1694. List<TableConfig> tableConfigs = new ArrayList<>();
  1695. TableConfig mainTable = new TableConfig();
  1696. mainTable.setTableName("base_teacher");//init_sql中的表名
  1697. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1698. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1699. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1700. tableConfigs.add(mainTable);
  1701. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1702. params.setAuthor("brealinxx");//作者名称
  1703. params.setPackageName("personnel");//包名
  1704. params.setTableConfigs(tableConfigs);
  1705. params.setPage(true);//是否生成分页接口
  1706. params.setImport(false);//是否生成导入接口
  1707. params.setExport(true);//是否生成导出接口
  1708. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1709. params.setDs(ds);
  1710. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1711. apiGeneratorService.generateCodes(params);
  1712. }
  1713. @Test
  1714. public void gcBaseStudentGraduate() throws IOException {
  1715. List<TableConfig> tableConfigs = new ArrayList<>();
  1716. TableConfig mainTable = new TableConfig();
  1717. mainTable.setTableName("base_student_graduate");//init_sql中的表名
  1718. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1719. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1720. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1721. tableConfigs.add(mainTable);
  1722. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1723. params.setAuthor("dzx");//作者名称
  1724. params.setPackageName("student");//包名
  1725. params.setTableConfigs(tableConfigs);
  1726. params.setPage(true);//是否生成分页接口
  1727. params.setImport(true);//是否生成导入接口
  1728. params.setExport(true);//是否生成导出接口
  1729. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1730. params.setDs(ds);
  1731. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1732. apiGeneratorService.generateCodes(params);
  1733. }
  1734. /**
  1735. * 指标公式规则管理
  1736. * @throws IOException
  1737. */
  1738. @Test
  1739. public void gcQuotaFormulaRule() throws IOException {
  1740. List<TableConfig> tableConfigs = new ArrayList<>();
  1741. TableConfig mainTable = new TableConfig();
  1742. mainTable.setTableName("quota_formula_rule");//init_sql中的表名
  1743. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1744. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1745. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1746. tableConfigs.add(mainTable);
  1747. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1748. params.setAuthor("szs");//作者名称
  1749. params.setPackageName("student");//包名
  1750. params.setTableConfigs(tableConfigs);
  1751. params.setPage(true);//是否生成分页接口
  1752. params.setImport(false);//是否生成导入接口
  1753. params.setExport(false);//是否生成导出接口
  1754. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1755. params.setDs(ds);
  1756. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1757. apiGeneratorService.generateCodes(params);
  1758. }
  1759. /**
  1760. * 考核表单属性
  1761. * @throws IOException
  1762. */
  1763. @Test
  1764. public void gcQuotaFormulaRuleAttribute() throws IOException {
  1765. List<TableConfig> tableConfigs = new ArrayList<>();
  1766. TableConfig mainTable = new TableConfig();
  1767. mainTable.setTableName("quota_formula_rule_attribute");//init_sql中的表名
  1768. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1769. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1770. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1771. tableConfigs.add(mainTable);
  1772. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1773. params.setAuthor("szs");//作者名称
  1774. params.setPackageName("student");//包名
  1775. params.setTableConfigs(tableConfigs);
  1776. params.setPage(true);//是否生成分页接口
  1777. params.setImport(false);//是否生成导入接口
  1778. params.setExport(false);//是否生成导出接口
  1779. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1780. params.setDs(ds);
  1781. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1782. apiGeneratorService.generateCodes(params);
  1783. }
  1784. /**
  1785. * 考核基数
  1786. * @throws IOException
  1787. */
  1788. @Test
  1789. public void gcQuotaFormulaRuleConstante() throws IOException {
  1790. List<TableConfig> tableConfigs = new ArrayList<>();
  1791. TableConfig mainTable = new TableConfig();
  1792. mainTable.setTableName("quota_formula_rule_constant");//init_sql中的表名
  1793. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1794. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1795. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1796. tableConfigs.add(mainTable);
  1797. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1798. params.setAuthor("szs");//作者名称
  1799. params.setPackageName("student");//包名
  1800. params.setTableConfigs(tableConfigs);
  1801. params.setPage(true);//是否生成分页接口
  1802. params.setImport(false);//是否生成导入接口
  1803. params.setExport(false);//是否生成导出接口
  1804. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1805. params.setDs(ds);
  1806. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1807. apiGeneratorService.generateCodes(params);
  1808. }
  1809. /**
  1810. * 评价提交记录
  1811. * @throws IOException
  1812. */
  1813. @Test
  1814. public void gcEvaluateSubmitRecord() throws IOException {
  1815. List<TableConfig> tableConfigs = new ArrayList<>();
  1816. TableConfig mainTable = new TableConfig();
  1817. mainTable.setTableName("evaluate_submit_record");//init_sql中的表名
  1818. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1819. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1820. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1821. tableConfigs.add(mainTable);
  1822. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1823. params.setAuthor("szs");//作者名称
  1824. params.setPackageName("evaluate");//包名
  1825. params.setTableConfigs(tableConfigs);
  1826. params.setPage(true);//是否生成分页接口
  1827. params.setImport(false);//是否生成导入接口
  1828. params.setExport(false);//是否生成导出接口
  1829. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1830. params.setDs(ds);
  1831. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1832. apiGeneratorService.generateCodes(params);
  1833. }
  1834. /**
  1835. * 评价项
  1836. * @throws IOException
  1837. */
  1838. @Test
  1839. public void gcWfSubscription() throws IOException {
  1840. List<TableConfig> tableConfigs = new ArrayList<>();
  1841. TableConfig mainTable = new TableConfig();
  1842. mainTable.setTableName("wf_subscription");//init_sql中的表名
  1843. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1844. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1845. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1846. tableConfigs.add(mainTable);
  1847. mainTable = new TableConfig();
  1848. mainTable.setTableName("wf_subscription_list");//init_sql中的表名
  1849. mainTable.setIsMain(false);//是否是主表,一般默认为true
  1850. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1851. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1852. mainTable.setRelationField("parent_id");//设置外键
  1853. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  1854. tableConfigs.add(mainTable);
  1855. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1856. params.setAuthor("dzx");//作者名称
  1857. params.setPackageName("ledger");//包名
  1858. params.setTableConfigs(tableConfigs);
  1859. params.setPage(true);//是否生成分页接口
  1860. params.setImport(false);//是否生成导入接口
  1861. params.setExport(true);//是否生成导出接口
  1862. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1863. params.setDs(ds);
  1864. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1865. apiGeneratorService.generateCodes(params);
  1866. }
  1867. /**
  1868. * 评价项
  1869. * @throws IOException
  1870. */
  1871. @Test
  1872. public void gcWorkflowOperateRecord() throws IOException {
  1873. List<TableConfig> tableConfigs = new ArrayList<>();
  1874. TableConfig mainTable = new TableConfig();
  1875. mainTable.setTableName("xjr_workflow_operate_record");//init_sql中的表名
  1876. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1877. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1878. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1879. tableConfigs.add(mainTable);
  1880. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1881. params.setAuthor("dzx");//作者名称
  1882. params.setPackageName("workflow");//包名
  1883. params.setTableConfigs(tableConfigs);
  1884. params.setPage(true);//是否生成分页接口
  1885. params.setImport(false);//是否生成导入接口
  1886. params.setExport(false);//是否生成导出接口
  1887. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1888. params.setDs(ds);
  1889. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1890. apiGeneratorService.generateCodes(params);
  1891. }
  1892. /**
  1893. * 考核项目表
  1894. *
  1895. * @throws IOException
  1896. */
  1897. @Test
  1898. public void gcStudentAssessmentItem() throws IOException {
  1899. List<TableConfig> tableConfigs = new ArrayList<>();
  1900. TableConfig mainTable = new TableConfig();
  1901. mainTable.setTableName("base_student_assessment_item");//init_sql中的表名
  1902. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1903. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1904. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1905. tableConfigs.add(mainTable);
  1906. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1907. params.setAuthor("dzx");//作者名称
  1908. params.setPackageName("student");//包名
  1909. params.setTableConfigs(tableConfigs);
  1910. params.setPage(true);//是否生成分页接口
  1911. params.setImport(false);//是否生成导入接口
  1912. params.setExport(false);//是否生成导出接口
  1913. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1914. params.setDs(ds);
  1915. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1916. apiGeneratorService.generateCodes(params);
  1917. }
  1918. /**
  1919. * 考核项目表
  1920. *
  1921. * @throws IOException
  1922. */
  1923. @Test
  1924. public void gcLedgerConfigRelease() throws IOException {
  1925. List<TableConfig> tableConfigs = new ArrayList<>();
  1926. TableConfig mainTable = new TableConfig();
  1927. mainTable.setTableName("ledger_config_release");//init_sql中的表名
  1928. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1929. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1930. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1931. tableConfigs.add(mainTable);
  1932. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1933. params.setAuthor("dzx");//作者名称
  1934. params.setPackageName("ledger");//包名
  1935. params.setTableConfigs(tableConfigs);
  1936. params.setPage(true);//是否生成分页接口
  1937. params.setImport(false);//是否生成导入接口
  1938. params.setExport(false);//是否生成导出接口
  1939. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1940. params.setDs(ds);
  1941. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1942. apiGeneratorService.generateCodes(params);
  1943. }
  1944. @Test
  1945. public void gcPbVXssfdetail() throws IOException {
  1946. List<TableConfig> tableConfigs = new ArrayList<>();
  1947. TableConfig mainTable = new TableConfig();
  1948. mainTable.setTableName("pb_v_xsxxsfytb");//init_sql中的表名
  1949. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1950. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1951. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1952. tableConfigs.add(mainTable);
  1953. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1954. params.setAuthor("dzx");//作者名称
  1955. params.setPackageName("student");//包名
  1956. params.setTableConfigs(tableConfigs);
  1957. params.setPage(true);//是否生成分页接口
  1958. params.setImport(false);//是否生成导入接口
  1959. params.setExport(false);//是否生成导出接口
  1960. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1961. params.setDs(ds);
  1962. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1963. apiGeneratorService.generateCodes(params);
  1964. }
  1965. @Test
  1966. public void gcOfficialDocumentReceived() throws IOException {
  1967. List<TableConfig> tableConfigs = new ArrayList<>();
  1968. TableConfig mainTable = new TableConfig();
  1969. mainTable.setTableName("official_document_received");//init_sql中的表名
  1970. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1971. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1972. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1973. tableConfigs.add(mainTable);
  1974. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  1975. params.setAuthor("szs");//作者名称
  1976. params.setPackageName("oa");//包名
  1977. params.setTableConfigs(tableConfigs);
  1978. params.setPage(true);//是否生成分页接口
  1979. params.setImport(false);//是否生成导入接口
  1980. params.setExport(false);//是否生成导出接口
  1981. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  1982. params.setDs(ds);
  1983. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  1984. apiGeneratorService.generateCodes(params);
  1985. }
  1986. /**
  1987. * 攀宝学期对应配置表
  1988. *
  1989. * @throws IOException
  1990. */
  1991. @Test
  1992. public void gcpbSemesterConfig() throws IOException {
  1993. List<TableConfig> tableConfigs = new ArrayList<>();
  1994. TableConfig mainTable = new TableConfig();
  1995. mainTable.setTableName("pb_semester_config");//init_sql中的表名
  1996. mainTable.setIsMain(true);//是否是主表,一般默认为true
  1997. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  1998. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  1999. tableConfigs.add(mainTable);
  2000. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2001. params.setAuthor("zsz");//作者名称
  2002. params.setPackageName("student");//包名
  2003. params.setTableConfigs(tableConfigs);
  2004. params.setPage(true);//是否生成分页接口
  2005. params.setImport(false);//是否生成导入接口
  2006. params.setExport(false);//是否生成导出接口
  2007. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2008. params.setDs(ds);
  2009. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2010. apiGeneratorService.generateCodes(params);
  2011. }
  2012. /**
  2013. * 攀宝学期对应配置表
  2014. *
  2015. * @throws IOException
  2016. */
  2017. @Test
  2018. public void gcWfAssetManage() throws IOException {
  2019. List<TableConfig> tableConfigs = new ArrayList<>();
  2020. TableConfig mainTable = new TableConfig();
  2021. mainTable.setTableName("wf_asset_manage");//init_sql中的表名
  2022. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2023. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2024. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2025. tableConfigs.add(mainTable);
  2026. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2027. params.setAuthor("dzx");//作者名称
  2028. params.setPackageName("asset");//包名
  2029. params.setTableConfigs(tableConfigs);
  2030. params.setPage(true);//是否生成分页接口
  2031. params.setImport(false);//是否生成导入接口
  2032. params.setExport(false);//是否生成导出接口
  2033. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2034. params.setDs(ds);
  2035. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2036. apiGeneratorService.generateCodes(params);
  2037. }
  2038. /**
  2039. * 攀宝学生档案信息表
  2040. *
  2041. * @throws IOException
  2042. */
  2043. @Test
  2044. public void gcPbCseFeeobjupdate() throws IOException {
  2045. List<TableConfig> tableConfigs = new ArrayList<>();
  2046. TableConfig mainTable = new TableConfig();
  2047. mainTable.setTableName("pb_cse_feeobjupdate");//init_sql中的表名
  2048. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2049. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2050. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2051. tableConfigs.add(mainTable);
  2052. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2053. params.setAuthor("szs");//作者名称
  2054. params.setPackageName("student");//包名
  2055. params.setTableConfigs(tableConfigs);
  2056. params.setPage(true);//是否生成分页接口
  2057. params.setImport(true);//是否生成导入接口
  2058. params.setExport(true);//是否生成导出接口
  2059. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2060. params.setDs(ds);
  2061. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2062. apiGeneratorService.generateCodes(params);
  2063. }
  2064. /**
  2065. * 考核
  2066. *
  2067. * @throws IOException
  2068. */
  2069. @Test
  2070. public void gcAssessment() throws IOException {
  2071. List<TableConfig> tableConfigs = new ArrayList<>();
  2072. TableConfig mainTable = new TableConfig();
  2073. mainTable.setTableName("assessment_template");//init_sql中的表名
  2074. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2075. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2076. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2077. tableConfigs.add(mainTable);
  2078. mainTable = new TableConfig();
  2079. mainTable.setTableName("assessment_question");//init_sql中的表名
  2080. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2081. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2082. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2083. mainTable.setRelationField("assessment_template_id");//设置外键
  2084. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2085. tableConfigs.add(mainTable);
  2086. mainTable = new TableConfig();
  2087. mainTable.setTableName("assessment_question_options");//init_sql中的表名
  2088. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2089. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2090. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2091. mainTable.setRelationField("assessment_question_id");//设置外键
  2092. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2093. tableConfigs.add(mainTable);
  2094. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2095. params.setAuthor("dzx");//作者名称
  2096. params.setPackageName("assessment");//包名
  2097. params.setTableConfigs(tableConfigs);
  2098. params.setPage(true);//是否生成分页接口
  2099. params.setImport(false);//是否生成导入接口
  2100. params.setExport(false);//是否生成导出接口
  2101. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2102. params.setDs(ds);
  2103. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2104. apiGeneratorService.generateCodes(params);
  2105. }
  2106. /**
  2107. * 专业大类
  2108. *
  2109. * @throws IOException
  2110. */
  2111. @Test
  2112. public void gcBaseMajorCategor() throws IOException {
  2113. List<TableConfig> tableConfigs = new ArrayList<>();
  2114. TableConfig mainTable = new TableConfig();
  2115. mainTable.setTableName("base_major_categor");//init_sql中的表名
  2116. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2117. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2118. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2119. tableConfigs.add(mainTable);
  2120. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2121. params.setAuthor("szs");//作者名称
  2122. params.setPackageName("student");//包名
  2123. params.setTableConfigs(tableConfigs);
  2124. params.setPage(true);//是否生成分页接口
  2125. params.setImport(true);//是否生成导入接口
  2126. params.setExport(true);//是否生成导出接口
  2127. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2128. params.setDs(ds);
  2129. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2130. apiGeneratorService.generateCodes(params);
  2131. }
  2132. /**
  2133. * 考核
  2134. *
  2135. * @throws IOException
  2136. */
  2137. @Test
  2138. public void gcAssessmentPlan() throws IOException {
  2139. List<TableConfig> tableConfigs = new ArrayList<>();
  2140. TableConfig mainTable = new TableConfig();
  2141. mainTable.setTableName("assessment_template_plan");//init_sql中的表名
  2142. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2143. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2144. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2145. tableConfigs.add(mainTable);
  2146. mainTable = new TableConfig();
  2147. mainTable.setTableName("assessment_plan_question");//init_sql中的表名
  2148. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2149. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2150. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2151. mainTable.setRelationField("assessment_template_plan_id");//设置外键
  2152. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2153. tableConfigs.add(mainTable);
  2154. mainTable = new TableConfig();
  2155. mainTable.setTableName("assessment_plan_answer_class");//init_sql中的表名
  2156. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2157. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2158. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2159. mainTable.setRelationField("assessment_template_plan_id");//设置外键
  2160. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2161. tableConfigs.add(mainTable);
  2162. mainTable = new TableConfig();
  2163. mainTable.setTableName("assessment_plan_answer_student");//init_sql中的表名
  2164. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2165. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2166. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2167. mainTable.setRelationField("assessment_template_plan_id");//设置外键
  2168. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2169. tableConfigs.add(mainTable);
  2170. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2171. params.setAuthor("dzx");//作者名称
  2172. params.setPackageName("assessment");//包名
  2173. params.setTableConfigs(tableConfigs);
  2174. params.setPage(true);//是否生成分页接口
  2175. params.setImport(false);//是否生成导入接口
  2176. params.setExport(false);//是否生成导出接口
  2177. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2178. params.setDs(ds);
  2179. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2180. apiGeneratorService.generateCodes(params);
  2181. }
  2182. /**
  2183. * 专业大类
  2184. *
  2185. * @throws IOException
  2186. */
  2187. @Test
  2188. public void gcPbCseFeeitem() throws IOException {
  2189. List<TableConfig> tableConfigs = new ArrayList<>();
  2190. TableConfig mainTable = new TableConfig();
  2191. mainTable.setTableName("pb_cse_feeitem2");//init_sql中的表名
  2192. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2193. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2194. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2195. tableConfigs.add(mainTable);
  2196. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2197. params.setAuthor("szs");//作者名称
  2198. params.setPackageName("student");//包名
  2199. params.setTableConfigs(tableConfigs);
  2200. params.setPage(true);//是否生成分页接口
  2201. params.setImport(true);//是否生成导入接口
  2202. params.setExport(true);//是否生成导出接口
  2203. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2204. params.setDs(ds);
  2205. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2206. apiGeneratorService.generateCodes(params);
  2207. }
  2208. /**
  2209. * 专业大类
  2210. *
  2211. * @throws IOException
  2212. */
  2213. @Test
  2214. public void gcPbCseSpecplan() throws IOException {
  2215. List<TableConfig> tableConfigs = new ArrayList<>();
  2216. TableConfig mainTable = new TableConfig();
  2217. mainTable.setTableName("pb_cse_specplan");//init_sql中的表名
  2218. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2219. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2220. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2221. tableConfigs.add(mainTable);
  2222. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2223. params.setAuthor("szs");//作者名称
  2224. params.setPackageName("student");//包名
  2225. params.setTableConfigs(tableConfigs);
  2226. params.setPage(true);//是否生成分页接口
  2227. params.setImport(false);//是否生成导入接口
  2228. params.setExport(false);//是否生成导出接口
  2229. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2230. params.setDs(ds);
  2231. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2232. apiGeneratorService.generateCodes(params);
  2233. }
  2234. /**
  2235. * 资产管理盘点
  2236. *
  2237. * @throws IOException
  2238. */
  2239. @Test
  2240. public void gcWfAssetManageInventory() throws IOException {
  2241. List<TableConfig> tableConfigs = new ArrayList<>();
  2242. TableConfig mainTable = new TableConfig();
  2243. mainTable.setTableName("wf_asset_manage_inventory");//init_sql中的表名
  2244. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2245. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2246. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2247. tableConfigs.add(mainTable);
  2248. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2249. params.setAuthor("szs");//作者名称
  2250. params.setPackageName("asset");//包名
  2251. params.setTableConfigs(tableConfigs);
  2252. params.setPage(true);//是否生成分页接口
  2253. params.setImport(true);//是否生成导入接口
  2254. params.setExport(true);//是否生成导出接口
  2255. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2256. params.setDs(ds);
  2257. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2258. apiGeneratorService.generateCodes(params);
  2259. }
  2260. /**
  2261. * 教材核心信息管理
  2262. *
  2263. * @throws IOException
  2264. */
  2265. @Test
  2266. public void gcTextbookCoreAttribute() throws IOException {
  2267. List<TableConfig> tableConfigs = new ArrayList<>();
  2268. TableConfig mainTable = new TableConfig();
  2269. mainTable.setTableName("textbook_core_attribute");//init_sql中的表名
  2270. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2271. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2272. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2273. tableConfigs.add(mainTable);
  2274. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2275. params.setAuthor("szs");//作者名称
  2276. params.setPackageName("textbook");//包名
  2277. params.setTableConfigs(tableConfigs);
  2278. params.setPage(true);//是否生成分页接口
  2279. params.setImport(true);//是否生成导入接口
  2280. params.setExport(true);//是否生成导出接口
  2281. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2282. params.setDs(ds);
  2283. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2284. apiGeneratorService.generateCodes(params);
  2285. }
  2286. @Test
  2287. public void gcXjrMenuDeptRelation() throws IOException {
  2288. List<TableConfig> tableConfigs = new ArrayList<>();
  2289. TableConfig mainTable = new TableConfig();
  2290. mainTable.setTableName("xjr_menu_dept_relation");//init_sql中的表名
  2291. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2292. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2293. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2294. tableConfigs.add(mainTable);
  2295. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2296. params.setAuthor("brealinxx");//作者名称
  2297. params.setPackageName("system");//包名
  2298. params.setTableConfigs(tableConfigs);
  2299. params.setPage(true);//是否生成分页接口
  2300. params.setImport(false);//是否生成导入接口
  2301. params.setExport(false);//是否生成导出接口
  2302. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2303. params.setDs(ds);
  2304. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2305. apiGeneratorService.generateCodes(params);
  2306. }
  2307. @Test
  2308. public void gcSystemUpdateMessage() throws IOException {
  2309. List<TableConfig> tableConfigs = new ArrayList<>();
  2310. TableConfig mainTable = new TableConfig();
  2311. mainTable.setTableName("system_update_message");//init_sql中的表名
  2312. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2313. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2314. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2315. tableConfigs.add(mainTable);
  2316. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2317. params.setAuthor("brealinxx");//作者名称
  2318. params.setPackageName("system");//包名
  2319. params.setTableConfigs(tableConfigs);
  2320. params.setPage(true);//是否生成分页接口
  2321. params.setImport(false);//是否生成导入接口
  2322. params.setExport(false);//是否生成导出接口
  2323. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2324. params.setDs(ds);
  2325. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2326. apiGeneratorService.generateCodes(params);
  2327. }
  2328. @Test
  2329. public void gcSystemUpdateMessageNotice() throws IOException {
  2330. List<TableConfig> tableConfigs = new ArrayList<>();
  2331. TableConfig mainTable = new TableConfig();
  2332. mainTable.setTableName("system_update_message_notice");//init_sql中的表名
  2333. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2334. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2335. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2336. tableConfigs.add(mainTable);
  2337. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2338. params.setAuthor("brealinxx");//作者名称
  2339. params.setPackageName("system");//包名
  2340. params.setTableConfigs(tableConfigs);
  2341. params.setPage(true);//是否生成分页接口
  2342. params.setImport(false);//是否生成导入接口
  2343. params.setExport(false);//是否生成导出接口
  2344. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2345. params.setDs(ds);
  2346. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2347. apiGeneratorService.generateCodes(params);
  2348. }
  2349. @Test
  2350. public void gcSystemMenuCommonlyUsed() throws IOException {
  2351. List<TableConfig> tableConfigs = new ArrayList<>();
  2352. TableConfig mainTable = new TableConfig();
  2353. mainTable.setTableName("system_menu_commonly_used");//init_sql中的表名
  2354. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2355. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2356. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2357. tableConfigs.add(mainTable);
  2358. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2359. params.setAuthor("brealinxx");//作者名称
  2360. params.setPackageName("system");//包名
  2361. params.setTableConfigs(tableConfigs);
  2362. params.setPage(true);//是否生成分页接口
  2363. params.setImport(false);//是否生成导入接口
  2364. params.setExport(false);//是否生成导出接口
  2365. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2366. params.setDs(ds);
  2367. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2368. apiGeneratorService.generateCodes(params);
  2369. }
  2370. @Test
  2371. public void gcDataExpertSource() throws IOException {
  2372. List<TableConfig> tableConfigs = new ArrayList<>();
  2373. TableConfig mainTable = new TableConfig();
  2374. mainTable.setTableName("data_expert_source");//init_sql中的表名
  2375. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2376. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2377. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2378. tableConfigs.add(mainTable);
  2379. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2380. params.setAuthor("dzx");//作者名称
  2381. params.setPackageName("dataexpert");//包名
  2382. params.setTableConfigs(tableConfigs);
  2383. params.setPage(true);//是否生成分页接口
  2384. params.setImport(false);//是否生成导入接口
  2385. params.setExport(false);//是否生成导出接口
  2386. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2387. params.setDs(ds);
  2388. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2389. apiGeneratorService.generateCodes(params);
  2390. }
  2391. @Test
  2392. public void gcDataExpertTemplate() throws IOException {
  2393. List<TableConfig> tableConfigs = new ArrayList<>();
  2394. TableConfig mainTable = new TableConfig();
  2395. mainTable.setTableName("data_expert_template");//init_sql中的表名
  2396. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2397. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2398. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2399. tableConfigs.add(mainTable);
  2400. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2401. params.setAuthor("dzx");//作者名称
  2402. params.setPackageName("dataexpert");//包名
  2403. params.setTableConfigs(tableConfigs);
  2404. params.setPage(true);//是否生成分页接口
  2405. params.setImport(false);//是否生成导入接口
  2406. params.setExport(false);//是否生成导出接口
  2407. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2408. params.setDs(ds);
  2409. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2410. apiGeneratorService.generateCodes(params);
  2411. }
  2412. @Test
  2413. public void gcAttendanceRuleCategory() throws IOException {
  2414. List<TableConfig> tableConfigs = new ArrayList<>();
  2415. TableConfig mainTable = new TableConfig();
  2416. mainTable.setTableName("attendance_rule_category");//init_sql中的表名
  2417. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2418. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2419. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2420. tableConfigs.add(mainTable);
  2421. mainTable = new TableConfig();
  2422. mainTable.setTableName("attendance_rule_details");//init_sql中的表名
  2423. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2424. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2425. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2426. mainTable.setRelationField("attendance_rule_category_id");//设置外键
  2427. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2428. tableConfigs.add(mainTable);
  2429. mainTable = new TableConfig();
  2430. mainTable.setTableName("attendance_user_relation");//init_sql中的表名
  2431. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2432. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2433. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2434. mainTable.setRelationField("attendance_rule_category_id");//设置外键
  2435. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2436. tableConfigs.add(mainTable);
  2437. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2438. params.setAuthor("dzx");//作者名称
  2439. params.setPackageName("attendance");//包名
  2440. params.setTableConfigs(tableConfigs);
  2441. params.setPage(true);//是否生成分页接口
  2442. params.setImport(false);//是否生成导入接口
  2443. params.setExport(false);//是否生成导出接口
  2444. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2445. params.setDs(ds);
  2446. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2447. apiGeneratorService.generateCodes(params);
  2448. }
  2449. @Test
  2450. public void gcFaceTeacherManage() throws IOException {
  2451. List<TableConfig> tableConfigs = new ArrayList<>();
  2452. TableConfig mainTable = new TableConfig();
  2453. mainTable.setTableName("teacher_face_process");//init_sql中的表名
  2454. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2455. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2456. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2457. tableConfigs.add(mainTable);
  2458. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2459. params.setAuthor("dzx");//作者名称
  2460. params.setPackageName("personnel");//包名
  2461. params.setTableConfigs(tableConfigs);
  2462. params.setPage(true);//是否生成分页接口
  2463. params.setImport(false);//是否生成导入接口
  2464. params.setExport(false);//是否生成导出接口
  2465. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2466. params.setDs(ds);
  2467. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2468. apiGeneratorService.generateCodes(params);
  2469. }
  2470. @Test
  2471. public void gcFaceStudentManage() throws IOException {
  2472. List<TableConfig> tableConfigs = new ArrayList<>();
  2473. TableConfig mainTable = new TableConfig();
  2474. mainTable.setTableName("stundent_face_process");//init_sql中的表名
  2475. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2476. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2477. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2478. tableConfigs.add(mainTable);
  2479. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2480. params.setAuthor("dzx");//作者名称
  2481. params.setPackageName("personnel");//包名
  2482. params.setTableConfigs(tableConfigs);
  2483. params.setPage(true);//是否生成分页接口
  2484. params.setImport(false);//是否生成导入接口
  2485. params.setExport(false);//是否生成导出接口
  2486. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2487. params.setDs(ds);
  2488. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2489. apiGeneratorService.generateCodes(params);
  2490. }
  2491. @Test
  2492. public void gcReservationSchool() throws IOException {
  2493. List<TableConfig> tableConfigs = new ArrayList<>();
  2494. TableConfig mainTable = new TableConfig();
  2495. mainTable.setTableName("reservation_school");//init_sql中的表名
  2496. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2497. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2498. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2499. tableConfigs.add(mainTable);
  2500. mainTable = new TableConfig();
  2501. mainTable.setTableName("reservation_school_people");//init_sql中的表名
  2502. mainTable.setIsMain(false);//是否是主表,一般默认为true
  2503. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2504. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2505. mainTable.setRelationField("reservation_school_id");//设置外键
  2506. mainTable.setRelationTableField(GlobalConstant.DEFAULT_PK);//设置外键
  2507. tableConfigs.add(mainTable);
  2508. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2509. params.setAuthor("dzx");//作者名称
  2510. params.setPackageName("personnel");//包名
  2511. params.setTableConfigs(tableConfigs);
  2512. params.setPage(true);//是否生成分页接口
  2513. params.setImport(false);//是否生成导入接口
  2514. params.setExport(false);//是否生成导出接口
  2515. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2516. params.setDs(ds);
  2517. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2518. apiGeneratorService.generateCodes(params);
  2519. }
  2520. @Test
  2521. public void gcCarMessageApply() throws IOException {
  2522. List<TableConfig> tableConfigs = new ArrayList<>();
  2523. TableConfig mainTable = new TableConfig();
  2524. mainTable.setTableName("car_message_apply");//init_sql中的表名
  2525. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2526. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2527. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2528. tableConfigs.add(mainTable);
  2529. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2530. params.setAuthor("dzx");//作者名称
  2531. params.setPackageName("personnel");//包名
  2532. params.setTableConfigs(tableConfigs);
  2533. params.setPage(true);//是否生成分页接口
  2534. params.setImport(false);//是否生成导入接口
  2535. params.setExport(false);//是否生成导出接口
  2536. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2537. params.setDs(ds);
  2538. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2539. apiGeneratorService.generateCodes(params);
  2540. }
  2541. @Test
  2542. public void gcStudentOutInRecord() throws IOException {
  2543. List<TableConfig> tableConfigs = new ArrayList<>();
  2544. TableConfig mainTable = new TableConfig();
  2545. mainTable.setTableName("car_out_in_record");//init_sql中的表名
  2546. mainTable.setIsMain(true);//是否是主表,一般默认为true
  2547. mainTable.setPkField(GlobalConstant.DEFAULT_PK);//设置主键
  2548. mainTable.setPkType(GlobalConstant.DEFAULT_PK_TYPE);//设置主键类型
  2549. tableConfigs.add(mainTable);
  2550. ApiGenerateCodesDto params = new ApiGenerateCodesDto();
  2551. params.setAuthor("dzx");//作者名称
  2552. params.setPackageName("outint");//包名
  2553. params.setTableConfigs(tableConfigs);
  2554. params.setPage(true);//是否生成分页接口
  2555. params.setImport(false);//是否生成导入接口
  2556. params.setExport(false);//是否生成导出接口
  2557. params.setOutMainDir(true);//是否生成在主目录,前期测试可设置成false
  2558. params.setDs(ds);
  2559. IApiGeneratorService apiGeneratorService = new ApiGeneratorServiceImpl();
  2560. apiGeneratorService.generateCodes(params);
  2561. }
  2562. }