前端优化升级

master
wangbing 4 years ago
parent 7e156284d7
commit d20ae4629c

@ -271,9 +271,16 @@ public class SpringBootCallable implements Callable {
freeMarkerManager.outputTemp(Tool.createFile(mpr, Tool.ABB2Abb(table.getTableName()) + "Mapper" + ".xml"), "SpringBoot/java/module/mpr/" + project.getDatabase().name() + "_NSYS_mapper.xml", ctx);
}
if (table.getCreate() || table.getDelete() || table.getUpdate() || table.getFind() || table.getGet() || table.getSearch()) {
freeMarkerManager.outputTemp(Tool.createFile(mgr, Tool.ABB2Abb(table.getTableName()) + "Manager" + ".java"), "SpringBoot/java/module/mgr/manager.ftl", ctx);
freeMarkerManager.outputTemp(Tool.createFile(mgr, Tool.ABB2Abb(table.getTableName()) + "ManagerImpl" + ".java"), "SpringBoot/java/module/mgr/managerImpl.ftl", ctx);
if (table.getSys()) {
if (table.getCreate() || table.getDelete() || table.getUpdate() || table.getFind() || table.getGet() || table.getSearch()) {
freeMarkerManager.outputTemp(Tool.createFile(mgr, Tool.ABB2Abb(table.getTableName()) + "Manager" + ".java"), "SpringBoot/java/module/mgr/manager.ftl", ctx);
freeMarkerManager.outputTemp(Tool.createFile(mgr, Tool.ABB2Abb(table.getTableName()) + "ManagerImpl" + ".java"), "SpringBoot/java/module/mgr/managerImpl.ftl", ctx);
}
} else {
if (table.getCreate() || table.getDelete() || table.getUpdate() || table.getFind() || table.getGet() || table.getSearch()) {
freeMarkerManager.outputTemp(Tool.createFile(mgr, Tool.ABB2Abb(table.getTableName()) + "Manager" + ".java"), "SpringBoot/java/module/mgr/manager_NSYS.ftl", ctx);
freeMarkerManager.outputTemp(Tool.createFile(mgr, Tool.ABB2Abb(table.getTableName()) + "ManagerImpl" + ".java"), "SpringBoot/java/module/mgr/managerImpl_NSYS.ftl", ctx);
}
}
if (table.getCreate()) {

@ -25,6 +25,9 @@ import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
@ -40,6 +43,9 @@ import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>

@ -14,6 +14,9 @@ import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
@ -29,6 +32,9 @@ import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>

@ -12,6 +12,9 @@ import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
@ -27,6 +30,9 @@ import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>

@ -20,6 +20,9 @@ import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
@ -35,6 +38,9 @@ import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>

@ -0,0 +1,306 @@
package ${domain}.module.${moduleName}.mgr;
import ${domain}.frame.utils.IDgenerator;
import ${domain}.frame.utils.Message;
import ${domain}.frame.base.ErrorType;
import ${domain}.frame.auth.Token;
import ${domain}.frame.utils.MapperUtil;
import ${domain}.frame.utils.ValidationUtil;
import ${domain}.module.${moduleName}.ent.${table.getCName()};
import ${domain}.module.${moduleName}.mpr.${table.getCName()}Mapper;
<#if table.getCreate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}CreateRequest;
</#if>
<#if table.getDelete()>
import ${domain}.module.${moduleName}.req.${table.getCName()}DeleteRequest;
</#if>
<#if table.getFind()>
import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
</#if>
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
<#if table.getCreate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}CreateResponse;
</#if>
<#if table.getDelete()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}DeleteResponse;
</#if>
<#if table.getFind()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
</#if>
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>
<#list table.methods as item>
<#if item.selected>
import ${domain}.module.${moduleName}.req.${table.getCName()}${item.getAbbName()?default("")}Request;
import ${domain}.module.${moduleName}.rsp.${table.getCName()}${item.getAbbName()?default("")}Response;
</#if>
</#list>
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.github.pagehelper.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* ${table.tableName} - ${table.tableComment}
*
* @author ${author?default("")}
* @version 0.0.1
* @since ${.now?string["yyyy-MM-dd"]}
*/
@Transactional
@Service
public class ${table.getCName()}ManagerImpl implements ${table.getCName()}Manager {
@Autowired
private ${table.getCName()}Mapper ${table.getFName()}Mapper;
<#if table.getCreate()>
/**
* 插入
*
* @param request 请求对象
* @param token 令牌
* @return 响应
*/
public ${table.getCName()}CreateResponse create(${table.getCName()}CreateRequest request, Token token) {
${table.getCName()}CreateResponse response = new ${table.getCName()}CreateResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
<#list table.fields as field>
<#if field.isUnique>
{// ${field.fieldComment}唯一检查
${table.getCName()}FindRequest ${table.getFName()}FindRequest = new ${table.getCName()}FindRequest();
${table.getFName()}FindRequest.${field.setterName()}(request.${field.getterName()}());
${table.getCName()}FindResponse ${table.getFName()}FindResponse = this.find(${table.getFName()}FindRequest);
if (${table.getFName()}FindResponse.hasError()) {
response.addErrors(${table.getFName()}FindResponse.getErrors());
return response;
} else if (${table.getFName()}FindResponse.getTotalCount() > 0) {
response.addError(ErrorType.UNIQUENESS_ERROR, "[${field.getFName()}]${field.fieldComment}已存在,请检查!");
return response;
}
}
</#if>
</#list>
<#if table.sys>
long id = IDgenerator.nextId();
${table.getCName()} entity = MapperUtil.map(request, ${table.getCName()}.class);
entity.setId(id);
<#else>
${table.getCName()} entity = MapperUtil.map(request, ${table.getCName()}.class);
</#if>
long result = ${table.getFName()}Mapper.insert(entity);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.CREATE_FAILURE);
return response;
}
<#if table.sys>
response.setId(id);
</#if>
return response;
}
</#if>
<#if table.getDelete()>
/**
* 逻辑删除
*
* @param request 请求对象
* @param token 令牌
* @return 响应
*/
public ${table.getCName()}DeleteResponse delete(${table.getCName()}DeleteRequest request, Token token) {
${table.getCName()}DeleteResponse response = new ${table.getCName()}DeleteResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
${table.getCName()} id = MapperUtil.map(request, ${table.getCName()}.class);
long result = ${table.getFName()}Mapper.delete(id);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.DELETE_FAILURE);
return response;
}
response.setResult(result);
return response;
}
</#if>
<#if table.getUpdate()>
/**
* 更新
*
* @param request 请求对象
* @param token 令牌
* @return 响应
*/
public ${table.getCName()}UpdateResponse update(${table.getCName()}UpdateRequest request, Token token) {
${table.getCName()}UpdateResponse response = new ${table.getCName()}UpdateResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
${table.getCName()} id = MapperUtil.map(request, ${table.getCName()}.class);
${table.getCName()} entity = ${table.getFName()}Mapper.getById(id);
if (entity == null) {
response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE);
return response;
}
MapperUtil.map(request, entity);
long result = ${table.getFName()}Mapper.update(entity);
if (1L != result) {
response.addError(ErrorType.BUSINESS_ERROR, Message.UPDATE_FAILURE);
return response;
}
response.setResult(result);
return response;
}
</#if>
<#if table.getFind()>
/**
* 查询
*
* @param request 请求对象
* @param token 令牌
* @return 响应
*/
@Transactional(readOnly = true)
public ${table.getCName()}FindResponse find(${table.getCName()}FindRequest request, Token token) {
${table.getCName()}FindResponse response = new ${table.getCName()}FindResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
if (request.getPageSize() != 0) {
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
}
if (StringUtil.isNotEmpty(request.getSortKey())) {
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
}
PageInfo<${table.getCName()}> pageInfo = new PageInfo<>(${table.getFName()}Mapper.find(request));
response.setResult(pageInfo.getList());
response.setTotalCount(pageInfo.getTotal());
return response;
}
</#if>
<#if table.getGet()>
/**
* 获得对象
*
* @param request 请求对象
* @param token 令牌
* @return 响应
*/
@Transactional(readOnly = true)
public ${table.getCName()}GetResponse get(${table.getCName()}GetRequest request, Token token) {
${table.getCName()}GetResponse response = new ${table.getCName()}GetResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
${table.getCName()} id = MapperUtil.map(request, ${table.getCName()}.class);
${table.getCName()} po = ${table.getFName()}Mapper.getById(id);
if (po != null) {
response.set${table.getCName()}(po);
} else {
response.addError(ErrorType.BUSINESS_ERROR, Message.GET_FAILURE);
}
return response;
}
</#if>
<#if table.getSearch()>
/**
* 模糊查询
*
* @param request 请求对象
* @param token 令牌
* @return 响应
*/
@Transactional(readOnly = true)
public ${table.getCName()}SearchResponse search(${table.getCName()}SearchRequest request, Token token) {
${table.getCName()}SearchResponse response = new ${table.getCName()}SearchResponse();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
if (request.getPageSize() != 0) {
PageHelper.startPage(request.getPageNumber(), request.getPageSize());
}
if (StringUtil.isNotEmpty(request.getSortKey())) {
PageHelper.orderBy(request.getSortKey() + " " + request.getSortType());
}
PageInfo<${table.getCName()}> pageInfo = new PageInfo<>(${table.getFName()}Mapper.search(request));
response.setResult(pageInfo.getList());
response.setTotalCount(pageInfo.getTotal());
return response;
}
</#if>
<#list table.methods as item>
<#if item.selected>
/**
* ${item.note?default("")}
*
* @param request 请求对象
* @param token 令牌
* @return
*/
public ${table.getCName()}${item.getAbbName()?default("")}Response ${item.name}(${table.getCName()}${item.getAbbName()?default("")}Request request, Token token) {
${table.getCName()}${item.getAbbName()?default("")}Response response = new ${table.getCName()}${item.getAbbName()?default("")}Response();
ValidationUtil.validate(request, response);
if (response.hasError()) {
return response;
}
return response;
}
</#if>
</#list>
}

@ -0,0 +1,134 @@
package ${domain}.module.${moduleName}.mgr;
import ${domain}.frame.auth.Token;
<#if table.getCreate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}CreateRequest;
</#if>
<#if table.getDelete()>
import ${domain}.module.${moduleName}.req.${table.getCName()}DeleteRequest;
</#if>
<#if table.getFind()>
import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
</#if>
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
<#if table.getCreate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}CreateResponse;
</#if>
<#if table.getDelete()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}DeleteResponse;
</#if>
<#if table.getFind()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
</#if>
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>
<#list table.methods as item>
<#if item.selected>
import ${domain}.module.${moduleName}.req.${table.getCName()}${item.getAbbName()?default("")}Request;
import ${domain}.module.${moduleName}.rsp.${table.getCName()}${item.getAbbName()?default("")}Response;
</#if>
</#list>
/**
* ${table.tableComment}
*
* @author ${author?default("")}
* @version 0.0.1
* @since ${.now?string["yyyy-MM-dd"]}
*/
public interface ${table.getCName()}Manager {
<#if table.getCreate()>
/**
* 插入
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}CreateResponse create(${table.getCName()}CreateRequest request, Token token);
</#if>
<#if table.getDelete()>
/**
* 逻辑删除
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}DeleteResponse delete(${table.getCName()}DeleteRequest request, Token token);
</#if>
<#if table.getUpdate()>
/**
* 更新
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}UpdateResponse update(${table.getCName()}UpdateRequest request, Token token);
</#if>
<#if table.getFind()>
/**
* 查询
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}FindResponse find(${table.getCName()}FindRequest request, Token token);
</#if>
<#if table.getSearch()>
/**
* 模糊查询
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}SearchResponse search(${table.getCName()}SearchRequest request, Token token);
</#if>
<#if table.getGet()>
/**
* 获得对象
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}GetResponse get(${table.getCName()}GetRequest request, Token token);
</#if>
<#list table.methods as item>
<#if item.selected>
/**
* ${item.note?default("")}
*
* @param request 请求对象
* @param token 令牌
* @return
*/
${table.getCName()}${item.getAbbName()?default("")}Response ${item.name}(${table.getCName()}${item.getAbbName()?default("")}Request request, Token token);
</#if>
</#list>
}

@ -2,13 +2,15 @@ package ${domain}.module.${moduleName}.mpr;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
import ${domain}.module.${moduleName}.ent.${table.getCName()};
<#if table.getFind()>
import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
import ${domain}.frame.auth.Token;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
import java.util.List;
/**
* ${table.tableName} - ${table.tableComment}
@ -23,56 +25,50 @@ public interface ${table.getCName()}Mapper {
*
*
* @param request
* @param token
* @return
*/
long insert(@Param("request") ${table.getCName()} request, @Param("token") Token token);
long insert(@Param("request") ${table.getCName()} request);
/**
*
*
* @param request
* @param token
* @return
*/
long insertBatch(@Param("list") List<${table.getCName()}> request, @Param("token") Token token);
long insertBatch(@Param("list") List<${table.getCName()}> request);
/**
*
*
* @param request
* @param token
* @return
*/
long delete(@Param("request") ${table.getCName()} request, @Param("token") Token token);
long delete(@Param("request") ${table.getCName()} request);
/**
*
*
* @param request
* @param token
* @return
*/
long update(@Param("request") ${table.getCName()} request, @Param("token") Token token);
long update(@Param("request") ${table.getCName()} request);
/**
*
*
* @param request
* @param token
* @return
*/
List<${table.getCName()}> find(@Param("request") ${table.getCName()} request, @Param("token") Token token);
List<${table.getCName()}> find(@Param("request") ${table.getCName()} request);
<#if table.getFind()>
/**
*
*
* @param request
* @param token
* @return
*/
List<${table.getCName()}> find(@Param("request") ${table.getCName()}FindRequest request, @Param("token") Token token);
List<${table.getCName()}> find(@Param("request") ${table.getCName()}FindRequest request);
</#if>
<#if table.getSearch()>
@ -80,18 +76,16 @@ public interface ${table.getCName()}Mapper {
*
*
* @param request
* @param token
* @return
*/
List<${table.getCName()}> search(@Param("request") ${table.getCName()}SearchRequest request, @Param("token") Token token);
List<${table.getCName()}> search(@Param("request") ${table.getCName()}SearchRequest request);
</#if>
/**
*
*
* @param request
* @param token
* @return
*/
${table.getCName()} get(@Param("request") ${table.getCName()} request, @Param("token") Token token);
${table.getCName()} getById(@Param("request") ${table.getCName()} request);
}

@ -410,7 +410,7 @@
}.bind(this))
}.bind(this), function () {
nav.tipClose();
nav.s("批量删除成功.")
nav.i("批量删除结束.")
this.onFind();
}.bind(this))
}.bind(this)).catch(function (action) {

@ -323,11 +323,17 @@
</el-pagination>
</el-card>
<el-dialog
:custom-class="'dialog'"
<el-dialog
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<#list fields as item>
<#if !item.isSystem>
@ -435,8 +441,13 @@
pageNumber: 1,
pageSize: 10,
totalCount: 0,
<#if table.getSys()>
sortKey:'CREATE_TIME',
sortType:'DESC'
<#else>
sortKey:null,
sortType:null
</#if>
},
form: {//待提交表单
formTitle: "",

@ -203,10 +203,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="部门代码" prop="deptCode">

@ -137,10 +137,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="字典名称" prop="dictName">

@ -139,10 +139,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="字典键" prop="key">

@ -129,10 +129,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="文件名称" prop="name">

@ -121,11 +121,17 @@
</el-pagination>
</el-card>
<el-dialog
:custom-class="'dialog'"
<el-dialog
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="环境" prop="active">
<el-select v-model="form.active" clearable size="mini" filterable placeholder="请输入环境">

@ -170,9 +170,9 @@
</el-card>
<el-dialog
:width="'610px'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"

@ -123,10 +123,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="角色代码" prop="code">

@ -159,10 +159,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="任务名称" prop="taskName">
<el-input v-model="form.taskName" clearable size="mini" placeholder="请输入任务名称"></el-input>

@ -156,10 +156,16 @@
</el-card>
<el-dialog
:custom-class="'dialog'"
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class=form" :model="form" :inline="true" :rules="formRules" ref="form"
label-position="right" label-width="90px">
<el-form-item label="用户账户" prop="userName">

@ -143,11 +143,17 @@
</el-pagination>
</el-card>
<el-dialog
:custom-class="'dialog'"
<el-dialog
:fullscreen="false"
:title="form.formTitle"
:custom-class="'dialog'"
:close-on-click-modal="false"
:close-on-press-escape="false"
:modal-append-to-body="true"
:visible.sync="form.formShow">
<el-page-header slot="title" @back="form.formShow = false" :content="form.formTitle"></el-page-header>
<el-form class="form" :model="form" :inline="true" :rules="formRules" ref="form" label-position="right" label-width="90px">
<el-form-item label="应用名称" prop="appName">
<el-input v-model="form.appName" clearable size="mini" placeholder="请输入应用名称" maxlength="50"></el-input>

@ -25,6 +25,9 @@ import ${domain}.module.${moduleName}.req.${table.getCName()}FindRequest;
<#if table.getGet()>
import ${domain}.module.${moduleName}.req.${table.getCName()}GetRequest;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.req.${table.getCName()}SearchRequest;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.req.${table.getCName()}UpdateRequest;
</#if>
@ -40,6 +43,9 @@ import ${domain}.module.${moduleName}.rsp.${table.getCName()}FindResponse;
<#if table.getGet()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}GetResponse;
</#if>
<#if table.getSearch()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}SearchResponse;
</#if>
<#if table.getUpdate()>
import ${domain}.module.${moduleName}.rsp.${table.getCName()}UpdateResponse;
</#if>
@ -160,26 +166,14 @@ public class ${table.getCName()}Test {
assertTrue(!response.hasError());
}
</#if>
<#if table.getGet() && table.getSys()>
<#if table.getGet()>
@Test
public void testGet() {
//创建数据
${table.getCName()}CreateRequest createRequest = new ${table.getCName()}CreateRequest();
<#list table.fields as field>
<#if !field.isSystem>
createRequest.${field.setterName()}(${field.getTestValue()});
</#if>
</#list>
${table.getCName()}CreateResponse createResponse = ${table.getFName()}Manager.create(createRequest, token);
assertTrue(!createResponse.hasError());
//获得数据
${table.getCName()}GetRequest request = new ${table.getCName()}GetRequest();
<#if table.getSys()>
request.setId(createResponse.getId());
request.setId(0L);
</#if>
${table.getCName()}GetResponse response = ${table.getFName()}Manager.get(request,token);

Loading…
Cancel
Save

Powered by TurnKey Linux.