调整超时时间配置,API编码验证规则
This commit is contained in:
parent
fbec1d3137
commit
91701462b3
@ -33,7 +33,7 @@ public class InsertGatewayInterfaceInfoDTO {
|
|||||||
/** api编码 */
|
/** api编码 */
|
||||||
@Excel(name = "接口编码")
|
@Excel(name = "接口编码")
|
||||||
@NotBlank(message = "接口编码不能为空")
|
@NotBlank(message = "接口编码不能为空")
|
||||||
@Pattern(regexp = "^[a-zA-Z_]\\w{0,63}$",message = "接口编码只能以字母或下划线开头,只能包含字母、数字、下划线,不超过64个字符")
|
@Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9.-]{0,63}$",message = "接口编码只能以字母开头,只能包含字母、数字和.-,不超过64个字符")
|
||||||
private String apiCode;
|
private String apiCode;
|
||||||
|
|
||||||
@Length(max = 200,message = "接口名称不能超过200个字符")
|
@Length(max = 200,message = "接口名称不能超过200个字符")
|
||||||
|
@ -36,7 +36,7 @@ public class UpdateGatewayInterfaceInfoDTO {
|
|||||||
/** api编码 */
|
/** api编码 */
|
||||||
@Excel(name = "接口编码")
|
@Excel(name = "接口编码")
|
||||||
@NotBlank(message = "接口编码不能为空")
|
@NotBlank(message = "接口编码不能为空")
|
||||||
@Pattern(regexp = "^[a-zA-Z_]\\w{0,63}$",message = "接口编码只能以字母或下划线开头,只能包含字母、数字、下划线,不超过64个字符")
|
@Pattern(regexp = "^[a-zA-Z][a-zA-Z0-9.-]{0,63}$",message = "接口编码只能以字母开头,只能包含字母、数字和.-,不超过64个字符")
|
||||||
private String apiCode;
|
private String apiCode;
|
||||||
|
|
||||||
@Length(max = 200,message = "接口名称不能超过200个字符")
|
@Length(max = 200,message = "接口名称不能超过200个字符")
|
||||||
|
@ -85,7 +85,7 @@ public class GatewayServerServiceImpl implements IGatewayServerService
|
|||||||
if (GatewayServiceType.OPEN.getCode().equals(gatewayServer.getServiceType())){
|
if (GatewayServiceType.OPEN.getCode().equals(gatewayServer.getServiceType())){
|
||||||
// 类型为开放服务的,默认生成一条接口配置
|
// 类型为开放服务的,默认生成一条接口配置
|
||||||
GatewayInterfaceInfo interfaceInfo = new GatewayInterfaceInfo();
|
GatewayInterfaceInfo interfaceInfo = new GatewayInterfaceInfo();
|
||||||
interfaceInfo.setApiCode("sac_" + UUID.fastUUID().toString(true));
|
interfaceInfo.setApiCode("sac" + UUID.fastUUID().toString(true));
|
||||||
interfaceInfo.setInterfaceName("[" + gatewayServer.getServerName() + "]开放服务默认接口配置");
|
interfaceInfo.setInterfaceName("[" + gatewayServer.getServerName() + "]开放服务默认接口配置");
|
||||||
interfaceInfo.setInterfacePath("*");
|
interfaceInfo.setInterfacePath("*");
|
||||||
interfaceInfo.setRequestMethod(RequestMethod.POST.getCode());
|
interfaceInfo.setRequestMethod(RequestMethod.POST.getCode());
|
||||||
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="serverId != null">server_id = #{serverId},</if>
|
<if test="serverId != null">server_id = #{serverId},</if>
|
||||||
<if test="mockStatus != null">mock_status = #{mockStatus},</if>
|
<if test="mockStatus != null">mock_status = #{mockStatus},</if>
|
||||||
<if test="mockResponse != null">mock_response = #{mockResponse},</if>
|
<if test="mockResponse != null">mock_response = #{mockResponse},</if>
|
||||||
<if test="timeout != null">timeout = #{timeout},</if>
|
timeout = #{timeout}
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
@ -119,7 +119,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<if test="serviceModel != null">service_model = #{serviceModel},</if>
|
<if test="serviceModel != null">service_model = #{serviceModel},</if>
|
||||||
<if test="routeId != null">route_id = #{routeId},</if>
|
<if test="routeId != null">route_id = #{routeId},</if>
|
||||||
<if test="serviceType != null">service_type = #{serviceType},</if>
|
<if test="serviceType != null">service_type = #{serviceType},</if>
|
||||||
<if test="timeout != null">timeout = #{timeout},</if>
|
timeout = #{timeout},
|
||||||
</trim>
|
</trim>
|
||||||
where id = #{id}
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user