MCPcopy Create free account
hub / github.com/diyhi/bbs / create

Method create

src/main/java/cms/utils/CreateEntityFile.java:15–239  ·  view source on GitHub ↗

创建分表实体类文件

()

Source from the content-addressed store, hash-verified

13 * 创建分表实体类文件
14 */
15 public static void create(){
16
17 String path = PathUtil.rootPath()+File.separator+"cms"+File.separator+"model"+File.separator;
18 File file = new File(path);
19 if (!file.exists()) {
20 return;
21 }
22
23 Properties properties = YmlUtils.getYml("application.yml");
24
25
26
27
28 //积分日志分表数量
29 int pointLogConfig_tableQuantity = Integer.parseInt(properties.getProperty("bbs.sharding.pointLogConfig_tableQuantity"));
30 if(pointLogConfig_tableQuantity >1){
31 for(int i =1; i<pointLogConfig_tableQuantity; i++){
32
33 //初始化积分日志bean
34 CreateBean.createPointLogBean(i);
35 }
36 }
37 //用户登录日志分表数量
38 int userLoginLogConfig_tableQuantity = Integer.parseInt(properties.getProperty("bbs.sharding.userLoginLogConfig_tableQuantity"));
39 if(userLoginLogConfig_tableQuantity >1){
40 for(int i =1; i<userLoginLogConfig_tableQuantity; i++){
41
42 //初始化登录日志bean
43 CreateBean.createUserLoginLogBean(i);
44 }
45 }
46
47 //员工登录日志分表数量
48 int staffLoginLogConfig_tableQuantity = Integer.parseInt(properties.getProperty("bbs.sharding.staffLoginLogConfig_tableQuantity"));
49 if(staffLoginLogConfig_tableQuantity >1){
50 for(int i =1; i<staffLoginLogConfig_tableQuantity; i++){
51 //初始化登录日志bean
52 CreateBean.createStaffLoginLogBean(i);
53 }
54 }
55 //私信分表数量
56 int privateMessageConfig_tableQuantity = Integer.parseInt(properties.getProperty("bbs.sharding.privateMessageConfig_tableQuantity"));
57 if(privateMessageConfig_tableQuantity >1){
58 for(int i =1; i<privateMessageConfig_tableQuantity; i++){
59
60 //初始化私信bean
61 CreateBean.createPrivateMessageBean(i);
62 }
63 }
64 //订阅系统通知分表数量
65 int subscriptionSystemNotifyConfig_tableQuantity = Integer.parseInt(properties.getProperty("bbs.sharding.subscriptionSystemNotifyConfig_tableQuantity"));
66 if(subscriptionSystemNotifyConfig_tableQuantity >1){
67 for(int i =1; i<subscriptionSystemNotifyConfig_tableQuantity; i++){
68
69 //初始化订阅系统通知bean
70 CreateBean.createSubscriptionSystemNotifyBean(i);
71 }
72 }

Callers 15

mainMethod · 0.95
callMethod · 0.80
doPostFileMethod · 0.80
createPointLogObjectMethod · 0.80
createLikeObjectMethod · 0.80
createTopicLikeObjectMethod · 0.80

Calls 15

rootPathMethod · 0.95
getYmlMethod · 0.95
createPointLogBeanMethod · 0.95
createRemindBeanMethod · 0.95
createFavoritesBeanMethod · 0.95
createTopicUnhideBeanMethod · 0.95
createUserDynamicBeanMethod · 0.95

Tested by

no test coverage detected