Former-commit-id: 5a63ce88bfb3eeb5d6f04aa1b5a77c178a9bf1fa
master
wangbing 5 years ago
parent 137275a8cd
commit 2bcce3ed7a

@ -692,7 +692,12 @@ public class SpringBootCallable implements Callable {
{
File system = Tool.createPath(dbtool.getAbsolutePath(), "system_table");
freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), "ALL_TABLE.sql"), option + "/resources/dbtool/system/ALL_TABLE_" + dataBase.toString() + ".sql", ctx);
File file = new File(system.getAbsolutePath(), "ALL_TABLE.sql");
if (file.exists()){
freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), "ALL_TABLE_.sql"), option + "/resources/dbtool/system/ALL_TABLE_" + dataBase.toString() + ".sql", ctx);
}else {
freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), "ALL_TABLE.sql"), option + "/resources/dbtool/system/ALL_TABLE_" + dataBase.toString() + ".sql", ctx);
}
freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), "DICT.sql"), option + "/resources/dbtool/system/DICT_" + dataBase.toString() + ".sql", ctx);
freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), "DICT_ITEM.sql"), option + "/resources/dbtool/system/DICT_ITEM_" + dataBase.toString() + ".sql", ctx);
freeMarkerManager.outputTemp(Tool.createFile(system.getAbsolutePath(), "FILE.sql"), option + "/resources/dbtool/system/FILE_" + dataBase.toString() + ".sql", ctx);

@ -38,6 +38,7 @@ public class DictValidator implements ConstraintValidator<Dict, String> {
if (dictLoadResponse.hasError()) {
constraintValidatorContext.disableDefaultConstraintViolation();
constraintValidatorContext.buildConstraintViolationWithTemplate("验证字典[" + name + "]值出现异常->" + dictLoadResponse.getErrors().get(0).getMessage()).addConstraintViolation();
return false;
}
List<DictItem> dictItems = dictLoadResponse.getDictItems();

@ -32,9 +32,6 @@
<include refid="table"/>
WHERE
`IS_DELETED` = 0
<if test="request.dictName != null and request.dictName != ''">
AND `DICT_NAME` = ${r"#"}{request.dictName}
</if>
<if test="request.key != null and request.key != ''">
AND `KEY` = ${r"#"}{request.key}
</if>

@ -32,9 +32,6 @@
<include refid="table"/>
WHERE
"IS_DELETED" = 0
<if test="request.dictName != null and request.dictName != ''">
AND "DICT_NAME" = ${r"#"}{request.dictName}
</if>
<if test="request.key != null and request.key != ''">
AND "KEY" = ${r"#"}{request.key}
</if>

@ -32,9 +32,6 @@
<include refid="table"/>
WHERE
"IS_DELETED" = 0
<if test="request.dictName != null and request.dictName != ''">
AND DICT_NAME = ${r"#"}{request.dictName}
</if>
<if test="request.key != null and request.key != ''">
AND KEY = ${r"#"}{request.key}
</if>

@ -92,17 +92,18 @@ public class ${table.getCName()}Test {
${table.getCName()}CreateResponse createResponse = ${table.getFName()}Manager.create(createRequest, token);
assertTrue(!createResponse.hasError());
//更新数据
${table.getCName()}UpdateRequest request = new ${table.getCName()}UpdateRequest();
<#if table.getSys()>
request.setId(createResponse.getId());
<#else>
</#if>
<#list table.fields as field>
<#if !field.isSystem>
request.${field.setterName()}(${field.getTestValue()});
</#if>
</#list>
</#if>
${table.getCName()}UpdateResponse response = ${table.getFName()}Manager.update(request,token);
@ -139,6 +140,8 @@ public class ${table.getCName()}Test {
${table.getCName()}CreateResponse createResponse = ${table.getFName()}Manager.create(createRequest, token);
assertTrue(!createResponse.hasError());
//获得数据
${table.getCName()}GetRequest request = new ${table.getCName()}GetRequest();
<#if table.getSys()>

Loading…
Cancel
Save

Powered by TurnKey Linux.