master
wangbing 6 years ago
parent cc93742422
commit 3dd95cd2c5

@ -128,6 +128,12 @@ public class JavaClassReader {
break;
}
}
if ("".equals(body.get(0))){
body.remove(0);
}
if ("".equals(body.get(body.size()-1))){
body.remove(body.size()-1);
}
bufferedReader.close();
}

@ -5,8 +5,6 @@ import okhttp3.*;
import java.io.*;
import java.net.ConnectException;
import java.net.SocketTimeoutException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import java.security.PublicKey;

@ -18,6 +18,7 @@ import ${domain}.ApiSearchRequest;
${i}
</#list>
public class ${className}Request <#if findOrSearchflag == '0'>implements ApiRequest<#elseif findOrSearchflag=='1'>extends ApiFindRequest<#elseif findOrSearchflag=='2'>extends ApiSearchRequest</#if><${className}Response> {
<#list body as i>
<#if !i?contains("@")>
${i}

@ -12,7 +12,8 @@ import ${domain}.ApiResponse;
<#list annotation as i>
${i}
</#list>
public class ${className}Response extends<#if hasList> ApiFindResponse<${Tclass}> <#else> ApiResponse</#if>{
public class ${className}Response extends<#if hasList> ApiFindResponse<${Tclass}><#else> ApiResponse</#if> {
<#list body as i>
${i}
</#list>

@ -29,6 +29,20 @@ import org.springframework.beans.factory.annotation.Value;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
/**
* 全局请求Controller如果无特殊请求则不需再增加其他Controller
* 全局htm后缀入口{@link GlobalController#hold}
* 全局异常捕捉{@link GlobalController#excepitonHandler}
* 全局上传接口{@link GlobalController#upload}
* 全局下载接口{@link GlobalController#download}
* <p>
* 说明Request命名规则驼峰式命名
* Api#Example#Request ==> 目标#动作#Request
*
* @author author
* @version 0.0.1
* @since 2019-06-16
*/
@Controller
@ControllerAdvice
public class GlobalController implements ErrorController {

@ -16,6 +16,16 @@ import org.springframework.core.type.filter.TypeFilter;
import java.io.IOException;
/**
* ScreenControl
* <p>
* Screen {@link ActionConfig#registryScreen}
* Control {@link ActionConfig#registryControl}
*
* @author wangbing
* @version 0.0.1
* @since 2017-01-01
*/
@Configuration
public class ActionConfig implements BeanDefinitionRegistryPostProcessor {
public static final String SCREEN_PREFIX = "screen";

@ -4,9 +4,9 @@ import ${basePackage}.frame.base.BaseRequest;
/**
* ApiExampleRequest - Api
*
* <p>
* Request
* {Api}{Example}{Request} ==> {}{}{Request}
* Api#Example#Request ==> ##Request
*
* @author ${author?default("")}
* @version 0.0.1

@ -4,9 +4,10 @@ import ${basePackage}.frame.base.BaseResponse;
/**
* ApiExampleResponse - Api
*
* <p>
* Response
* {Api}{Example}{Response} ==> {}{}{Response}
* Api#Example#Response ==> ##Response
*
* @author ${author?default("")}
* @version 0.0.1
* @since ${date?string("yyyy-MM-dd")}

@ -33,8 +33,10 @@ Date: ${date?string("yyyy-MM-dd")}
CREATE TABLE `${module.modulePrefix?default("")}${table.tableName}` (
<#list table.fields as field>
${dBmapper.getFieldSql(field)},
${dBmapper.getFieldSql(field)}<#if field_has_next||module.hasSysFields>,</#if>
</#list>
<#if module.hasSysFields>
PRIMARY KEY (`ID`)
</#if>
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='${table.tableComment?default("")}';
</#if>

@ -23,9 +23,11 @@ COMMENT ON COLUMN "${module.modulePrefix?default("")}${table.tableName}"."${fiel
-- ----------------------------
CREATE TABLE `${module.modulePrefix?default("")}${table.tableName}` (
<#list table.fields as field>
${dBmapper.getFieldSql(field)},
${dBmapper.getFieldSql(field)}<#if field_has_next||module.hasSysFields>,</#if>
</#list>
<#if module.hasSysFields>
PRIMARY KEY (`ID`)
</#if>
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='${table.tableComment?default("")}';
</#list>

@ -125,7 +125,7 @@ public class ${table.getCName()}Test {
assertTrue(!response.hasError());
}
</#if>
<#if table.getGet()>
<#if table.getGet() && module.hasSysFields>
@Test
public void testGet() {

Loading…
Cancel
Save

Powered by TurnKey Linux.