提交 | 用户 | age
|
d1f230
|
1 |
package com.hx.phip; |
F |
2 |
|
|
3 |
|
|
4 |
import com.hx.auto.GeneratorUtil; |
|
5 |
import com.hx.auto.common.UrlData; |
0147f8
|
6 |
import com.hx.phiappt.model.ComparePhotoRecord; |
C |
7 |
import com.hx.phiappt.model.ComparePhotoRecordPictures; |
e3aeb9
|
8 |
import com.hx.phiappt.model.appeal.AppealType; |
C |
9 |
import com.hx.phiappt.model.appeal.AppealTypeRelate; |
328cb5
|
10 |
import com.hx.phiappt.model.cardItem.CardEquity; |
7a77e3
|
11 |
import com.hx.phiappt.model.consume.ConsumeNotify; |
34a2cf
|
12 |
import com.hx.phiappt.model.consume.PayNo; |
d83d72
|
13 |
import com.hx.phiappt.model.market.system.MarketSystem; |
C |
14 |
import com.hx.phiappt.model.market.system.MarketSystemProject; |
e3aeb9
|
15 |
import com.hx.phiappt.model.order.*; |
227b3e
|
16 |
import com.hx.phiappt.model.project.ProjectShopPrice; |
d8daa1
|
17 |
import com.hx.phiappt.model.refund.*; |
ea4351
|
18 |
import com.hx.phiappt.model.user.*; |
d83d72
|
19 |
import com.hx.phiappt.model.user.club.UserClubMember; |
d1f230
|
20 |
|
F |
21 |
/** |
|
22 |
* 自动生成工具 |
|
23 |
* 2019-08-29 |
|
24 |
* @author cjh |
|
25 |
* |
|
26 |
*/ |
|
27 |
public class AutoDomeUtil { |
|
28 |
|
|
29 |
public static void main(String[] args) throws Exception { |
|
30 |
|
|
31 |
System.out.println("开始"); |
|
32 |
String packageName = AutoDomeUtil.class.getPackage().getName(); |
|
33 |
|
|
34 |
String commonPackRoot = "phi_platform_common.src.main.java"; |
|
35 |
String commonPackRootResourse = "phi_platform_common.src.main.resources"; |
|
36 |
|
|
37 |
String controllerPackRoot = "phi_platform_common.src.main.java"; |
|
38 |
String controllerPackRootResourse = "phi_platform_common.src.main.resources"; |
|
39 |
|
|
40 |
UrlData urlData = new UrlData(); |
|
41 |
urlData.setTotalUrl(packageName); |
|
42 |
urlData.actionUrlData(controllerPackRoot,packageName + ".controller"); |
|
43 |
urlData.daoUrlData(commonPackRoot,packageName + ".dao.mapper"); |
|
44 |
urlData.serviceUrlData(controllerPackRoot,packageName + ".service"); |
|
45 |
urlData.serviceImplUrlData(controllerPackRoot,packageName + ".service.impl"); |
|
46 |
urlData.mapperUrlData(commonPackRootResourse, "mapper.platform"); |
|
47 |
|
d83d72
|
48 |
Class<?> clas = UserClubMember.class; |
d1f230
|
49 |
//dao |
F |
50 |
GeneratorUtil.generatorDao(clas,urlData); |
|
51 |
//mapper |
|
52 |
GeneratorUtil.generatorMapper(clas, urlData); |
|
53 |
// 生成service |
|
54 |
//GeneratorUtil.generatorService(clas,urlData); |
|
55 |
|
|
56 |
//通过实体类的包获取所有的表,直接全部生成 |
|
57 |
//GeneratorUtil.generatorTableByPackUrl("com.hx.model", urlData); |
|
58 |
//generatorTableByPackUrl(packPath, urlData); |
|
59 |
|
|
60 |
/*Class cl = TestM2.class; |
|
61 |
Field[] fields = cl.getDeclaredFields(); |
|
62 |
for(Field field:fields) { |
|
63 |
System.out.println("field.getName():"+field.getName()); |
|
64 |
System.out.println("field.getType():"+field.getType()); |
|
65 |
System.out.println("field.getGenericType():"+field.getGenericType()); |
|
66 |
System.out.println("field.getModifiers():"+field.getModifiers()); |
|
67 |
}*/ |
|
68 |
|
|
69 |
//StringBuffer stringBuffer = SimpleToolUtil.getFileContent("com/cjh/auto/file/test.txt"); |
|
70 |
//System.out.println("stringBuffer:"+stringBuffer); |
|
71 |
|
|
72 |
//System.out.println(AesUtil.aesEncryp("88.88")); |
|
73 |
} |
|
74 |
|
|
75 |
} |