Merge pull request #25 from neatlife/master

生成beetlentitydto,lombok+swagger文档注解
This commit is contained in:
moshowgame 2019-04-12 16:46:44 +08:00 committed by GitHub
commit 19bf88e740
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 39 additions and 0 deletions

View File

@ -81,6 +81,7 @@ public class IndexController {
//beetsql
result.put("beetlmd", freemarkerTool.processString("code-generator/beetlsql/beetlmd.ftl", params));
result.put("beetlentity", freemarkerTool.processString("code-generator/beetlsql/beetlentity.ftl", params));
result.put("beetlentitydto", freemarkerTool.processString("code-generator/beetlsql/beetlentitydto.ftl", params));
result.put("beetlcontroller", freemarkerTool.processString("code-generator/beetlsql/beetlcontroller.ftl", params));
//mybatis plus
result.put("pluscontroller", freemarkerTool.processString("code-generator/mybatis-plus/pluscontroller.ftl", params));

View File

@ -0,0 +1,26 @@
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.io.Serializable;
import lombok.Data;
import java.util.Date;
import java.util.List;
/**
* ${classInfo.classComment}
* @author ${authorName} ${.now?string('yyyy-MM-dd')}
*/
@Data
@ApiModel("${classInfo.classComment}")
public class ${classInfo.className}DTO {
<#if classInfo.fieldList?exists && classInfo.fieldList?size gt 0>
<#list classInfo.fieldList as fieldItem >
@ApiModelProperty("${fieldItem.fieldComment}")
private ${fieldItem.fieldClass} ${fieldItem.fieldName};
</#list>
public ${classInfo.className}() {
}
</#if>
}

View File

@ -222,6 +222,18 @@ CREATE TABLE `userinfo` (
</div>
</div>
</div>
<div class="row" style="margin-top: 10px;">
<div class="btn-toolbar col-md-5" role="toolbar" aria-label="Toolbar with button groups">
<div class="input-group">
<div class="input-group-prepend">
<div class="btn btn-secondary disabled" id="btnGroupAddon">DTO</div>
</div>
</div>
<div class="btn-group" role="group" aria-label="First group">
<button type="button" class="btn btn-default generator" id="beetlentitydto">entitydto(lombok+swagger)</button>
</div>
</div>
</div>
<hr>
<textarea id="genCodeArea" class="form-control btn-lg" ></textarea>
</div>