Skip to content

Commit 65f79b7

Browse files
committed
Merge remote-tracking branch 'origin/master'
2 parents 3823c07 + 19bf88e commit 65f79b7

3 files changed

Lines changed: 39 additions & 0 deletions

File tree

generator-web/src/main/java/com/softdev/system/generator/controller/IndexController.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ public ReturnT<Map<String, String>> codeGenerate(String tableSql,
8383
//beetsql
8484
result.put("beetlmd", freemarkerTool.processString("code-generator/beetlsql/beetlmd.ftl", params));
8585
result.put("beetlentity", freemarkerTool.processString("code-generator/beetlsql/beetlentity.ftl", params));
86+
result.put("beetlentitydto", freemarkerTool.processString("code-generator/beetlsql/beetlentitydto.ftl", params));
8687
result.put("beetlcontroller", freemarkerTool.processString("code-generator/beetlsql/beetlcontroller.ftl", params));
8788
//mybatis plus
8889
result.put("pluscontroller", freemarkerTool.processString("code-generator/mybatis-plus/pluscontroller.ftl", params));
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
import io.swagger.annotations.ApiModel;
2+
import io.swagger.annotations.ApiModelProperty;
3+
import java.io.Serializable;
4+
import lombok.Data;
5+
import java.util.Date;
6+
import java.util.List;
7+
8+
/**
9+
* ${classInfo.classComment}
10+
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
11+
*/
12+
@Data
13+
@ApiModel("${classInfo.classComment}")
14+
public class ${classInfo.className}DTO {
15+
16+
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
17+
<#list classInfo.fieldList as fieldItem >
18+
@ApiModelProperty("${fieldItem.fieldComment}")
19+
private ${fieldItem.fieldClass} ${fieldItem.fieldName};
20+
21+
</#list>
22+
public ${classInfo.className}() {
23+
}
24+
</#if>
25+
26+
}

generator-web/src/main/resources/templates/index.ftl

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,18 @@ CREATE TABLE `userinfo` (
229229
</div>
230230
</div>
231231
</div>
232+
<div class="row" style="margin-top: 10px;">
233+
<div class="btn-toolbar col-md-5" role="toolbar" aria-label="Toolbar with button groups">
234+
<div class="input-group">
235+
<div class="input-group-prepend">
236+
<div class="btn btn-secondary disabled" id="btnGroupAddon">DTO</div>
237+
</div>
238+
</div>
239+
<div class="btn-group" role="group" aria-label="First group">
240+
<button type="button" class="btn btn-default generator" id="beetlentitydto">entitydto(lombok+swagger)</button>
241+
</div>
242+
</div>
243+
</div>
232244
<hr>
233245
<textarea id="genCodeArea" class="form-control btn-lg" ></textarea>
234246
</div>

0 commit comments

Comments
 (0)