Browse Source

add tenant code check

pull/2/head
qiaozhanwei 6 years ago
parent
commit
3a0ca2a934
  1. 4
      escheduler-api/src/main/java/cn/escheduler/api/service/TenantService.java

4
escheduler-api/src/main/java/cn/escheduler/api/service/TenantService.java

@ -80,6 +80,10 @@ public class TenantService extends BaseService{
Tenant tenant = new Tenant();
Date now = new Date();
if (!tenantCode.matches("^[0-9a-zA-Z_.]{1,}$") || tenantCode.startsWith("-")){
putMsg(result, Status.VERIFY_TENANT_CODE_ERROR);
return result;
}
tenant.setTenantCode(tenantCode);
tenant.setTenantName(tenantName);
tenant.setQueueId(queueId);

Loading…
Cancel
Save