diff --git a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebAppAccountResource.java b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebAppAccountResource.java index 688a7d8c7d..b30b2ebd99 100644 --- a/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebAppAccountResource.java +++ b/src/backend/job-manage/api-job-manage/src/main/java/com/tencent/bk/job/manage/api/web/WebAppAccountResource.java @@ -33,6 +33,7 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; @@ -71,7 +72,7 @@ Response saveAccount( @PathVariable(value = "scopeId") String scopeId, @ApiParam(value = "创建账号请求") - @RequestBody + @RequestBody @Validated AccountCreateUpdateReq accountCreateUpdateReq ); @@ -91,7 +92,7 @@ Response updateAccount( @PathVariable(value = "scopeId") String scopeId, @ApiParam(value = "更新账号请求") - @RequestBody + @RequestBody @Validated AccountCreateUpdateReq accountCreateUpdateReq ); diff --git a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/GlobalSettingsServiceImpl.java b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/GlobalSettingsServiceImpl.java index f6495e1625..abddf5d7fb 100644 --- a/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/GlobalSettingsServiceImpl.java +++ b/src/backend/job-manage/service-job-manage/src/main/java/com/tencent/bk/job/manage/service/impl/GlobalSettingsServiceImpl.java @@ -112,7 +112,7 @@ @Service public class GlobalSettingsServiceImpl implements GlobalSettingsService { - private static final Pattern PATTERN = Pattern.compile("^([+\\-]?\\d+)([a-zA-Z]{0,2})$"); + private static final Pattern PATTERN = Pattern.compile("^([.0-9]+)([a-zA-Z]{0,2})$"); private static final String STRING_TPL_KEY_CURRENT_VERSION = "current_ver"; private static final String STRING_TPL_KEY_CURRENT_YEAR = "current_year"; private final DSLContext dslContext;