system:将 api 的方法名的负数都换成 List
parent
245e557309
commit
837345ed95
|
@ -49,7 +49,7 @@ public class ErrorCodeAutoGeneratorImpl implements ErrorCodeAutoGenerator {
|
||||||
log.info("[execute][解析到错误码数量为 ({}) 个]", autoGenerateDTOs.size());
|
log.info("[execute][解析到错误码数量为 ({}) 个]", autoGenerateDTOs.size());
|
||||||
|
|
||||||
// 第二步,写入到 system 服务
|
// 第二步,写入到 system 服务
|
||||||
errorCodeApi.autoGenerateErrorCodes(autoGenerateDTOs);
|
errorCodeApi.autoGenerateErrorCodeList(autoGenerateDTOs);
|
||||||
log.info("[execute][写入到 system 组件完成]");
|
log.info("[execute][写入到 system 组件完成]");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> load(Object key) {
|
public List<Long> load(Object key) {
|
||||||
return tenantApi.getTenantIds();
|
return tenantApi.getTenantIdList();
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -47,7 +47,7 @@ public class TenantFrameworkServiceImpl implements TenantFrameworkService {
|
||||||
@Override
|
@Override
|
||||||
public ServiceException load(Long id) {
|
public ServiceException load(Long id) {
|
||||||
try {
|
try {
|
||||||
tenantApi.validTenant(id);
|
tenantApi.validateTenant(id);
|
||||||
return SERVICE_EXCEPTION_NULL;
|
return SERVICE_EXCEPTION_NULL;
|
||||||
} catch (ServiceException ex) {
|
} catch (ServiceException ex) {
|
||||||
return ex;
|
return ex;
|
||||||
|
|
|
@ -19,7 +19,7 @@ public interface ErrorCodeApi {
|
||||||
*
|
*
|
||||||
* @param autoGenerateDTOs 错误码信息
|
* @param autoGenerateDTOs 错误码信息
|
||||||
*/
|
*/
|
||||||
void autoGenerateErrorCodes(@Valid List<ErrorCodeAutoGenerateReqDTO> autoGenerateDTOs);
|
void autoGenerateErrorCodeList(@Valid List<ErrorCodeAutoGenerateReqDTO> autoGenerateDTOs);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 增量获得错误码数组
|
* 增量获得错误码数组
|
||||||
|
|
|
@ -14,13 +14,13 @@ public interface TenantApi {
|
||||||
*
|
*
|
||||||
* @return 租户编号数组
|
* @return 租户编号数组
|
||||||
*/
|
*/
|
||||||
List<Long> getTenantIds();
|
List<Long> getTenantIdList();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 校验租户是否合法
|
* 校验租户是否合法
|
||||||
*
|
*
|
||||||
* @param id 租户编号
|
* @param id 租户编号
|
||||||
*/
|
*/
|
||||||
void validTenant(Long id);
|
void validateTenant(Long id);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -21,7 +21,7 @@ public class ErrorCodeApiImpl implements ErrorCodeApi {
|
||||||
private ErrorCodeService errorCodeService;
|
private ErrorCodeService errorCodeService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void autoGenerateErrorCodes(List<ErrorCodeAutoGenerateReqDTO> autoGenerateDTOs) {
|
public void autoGenerateErrorCodeList(List<ErrorCodeAutoGenerateReqDTO> autoGenerateDTOs) {
|
||||||
errorCodeService.autoGenerateErrorCodes(autoGenerateDTOs);
|
errorCodeService.autoGenerateErrorCodes(autoGenerateDTOs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -18,12 +18,12 @@ public class TenantApiImpl implements TenantApi {
|
||||||
private TenantService tenantService;
|
private TenantService tenantService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> getTenantIds() {
|
public List<Long> getTenantIdList() {
|
||||||
return tenantService.getTenantIds();
|
return tenantService.getTenantIds();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void validTenant(Long id) {
|
public void validateTenant(Long id) {
|
||||||
tenantService.validTenant(id);
|
tenantService.validTenant(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue