xuhy
2025-01-09 d35af5a67df8592fd4698e8beb8f66f9d23bb6b4
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
package com.stylefeng.guns.generator.engine.config;
 
 
import com.stylefeng.guns.core.util.ToolUtil;
 
/**
 * 全局配置
 *
 * @author fengshuonan
 * @date 2017-05-08 20:21
 */
public class ContextConfig {
 
    private String templatePrefixPath = "gunsTemplate/advanced";
    private String projectPath = "D:\\ideaSpace\\guns";//模板输出的项目目录
    private String bizChName;   //业务名称
    private String bizEnName;   //业务英文名称
    private String bizEnBigName;//业务英文名称(大写)
    private String moduleName = "system";  //模块名称
 
    private String proPackage = "com.stylefeng.guns.admin";
    private String coreBasePackage = "com.stylefeng.guns.core";
    private String modelPackageName = "com.stylefeng.guns.modular.system.model";        //model的包名
    private String modelMapperPackageName = "com.stylefeng.guns.modular.system.dao";    //model的dao
    private String entityName;              //实体的名称
 
    private Boolean controllerSwitch = true;    //是否生成控制器代码开关
    private Boolean indexPageSwitch = true;     //主页
    private Boolean addPageSwitch = true;       //添加页面
    private Boolean editPageSwitch = true;      //编辑页面
    private Boolean jsSwitch = true;            //js
    private Boolean infoJsSwitch = true;        //详情页面js
    private Boolean daoSwitch = true;           //dao
    private Boolean serviceSwitch = true;       //service
    private Boolean entitySwitch = true;        //生成实体的开关
    private Boolean sqlSwitch = true;           //生成sql的开关
 
    public void init() {
        if (entityName == null) {
            entityName = bizEnBigName;
        }
        modelPackageName = proPackage + "." + "modular.system.model";
        modelMapperPackageName = proPackage + "." + "modular.system.dao";
    }
 
    public String getBizEnBigName() {
        return bizEnBigName;
    }
 
    public void setBizEnBigName(String bizEnBigName) {
        this.bizEnBigName = bizEnBigName;
    }
 
    public String getBizChName() {
        return bizChName;
    }
 
    public void setBizChName(String bizChName) {
        this.bizChName = bizChName;
    }
 
    public String getBizEnName() {
        return bizEnName;
    }
 
    public void setBizEnName(String bizEnName) {
        this.bizEnName = bizEnName;
        this.bizEnBigName = ToolUtil.firstLetterToUpper(this.bizEnName);
    }
 
    public String getProjectPath() {
        return projectPath;
    }
 
    public void setProjectPath(String projectPath) {
        this.projectPath = projectPath;
    }
 
    public String getModuleName() {
        return moduleName;
    }
 
    public void setModuleName(String moduleName) {
        this.moduleName = moduleName;
    }
 
    public Boolean getControllerSwitch() {
        return controllerSwitch;
    }
 
    public void setControllerSwitch(Boolean controllerSwitch) {
        this.controllerSwitch = controllerSwitch;
    }
 
    public Boolean getIndexPageSwitch() {
        return indexPageSwitch;
    }
 
    public void setIndexPageSwitch(Boolean indexPageSwitch) {
        this.indexPageSwitch = indexPageSwitch;
    }
 
    public Boolean getAddPageSwitch() {
        return addPageSwitch;
    }
 
    public void setAddPageSwitch(Boolean addPageSwitch) {
        this.addPageSwitch = addPageSwitch;
    }
 
    public Boolean getEditPageSwitch() {
        return editPageSwitch;
    }
 
    public void setEditPageSwitch(Boolean editPageSwitch) {
        this.editPageSwitch = editPageSwitch;
    }
 
    public Boolean getJsSwitch() {
        return jsSwitch;
    }
 
    public void setJsSwitch(Boolean jsSwitch) {
        this.jsSwitch = jsSwitch;
    }
 
    public Boolean getInfoJsSwitch() {
        return infoJsSwitch;
    }
 
    public void setInfoJsSwitch(Boolean infoJsSwitch) {
        this.infoJsSwitch = infoJsSwitch;
    }
 
    public Boolean getDaoSwitch() {
        return daoSwitch;
    }
 
    public void setDaoSwitch(Boolean daoSwitch) {
        this.daoSwitch = daoSwitch;
    }
 
    public Boolean getServiceSwitch() {
        return serviceSwitch;
    }
 
    public void setServiceSwitch(Boolean serviceSwitch) {
        this.serviceSwitch = serviceSwitch;
    }
 
    public String getTemplatePrefixPath() {
        return templatePrefixPath;
    }
 
    public void setTemplatePrefixPath(String templatePrefixPath) {
        this.templatePrefixPath = templatePrefixPath;
    }
 
    public String getModelPackageName() {
        return modelPackageName;
    }
 
    public void setModelPackageName(String modelPackageName) {
        this.modelPackageName = modelPackageName;
    }
 
    public String getEntityName() {
        return entityName;
    }
 
    public void setEntityName(String entityName) {
        this.entityName = entityName;
    }
 
    public String getModelMapperPackageName() {
        return modelMapperPackageName;
    }
 
    public void setModelMapperPackageName(String modelMapperPackageName) {
        this.modelMapperPackageName = modelMapperPackageName;
    }
 
    public Boolean getEntitySwitch() {
        return entitySwitch;
    }
 
    public void setEntitySwitch(Boolean entitySwitch) {
        this.entitySwitch = entitySwitch;
    }
 
    public Boolean getSqlSwitch() {
        return sqlSwitch;
    }
 
    public void setSqlSwitch(Boolean sqlSwitch) {
        this.sqlSwitch = sqlSwitch;
    }
 
    public String getProPackage() {
        return proPackage;
    }
 
    public void setProPackage(String proPackage) {
        this.proPackage = proPackage;
    }
 
    public String getCoreBasePackage() {
        return coreBasePackage;
    }
 
    public void setCoreBasePackage(String coreBasePackage) {
        this.coreBasePackage = coreBasePackage;
    }
}