暂存提交

This commit is contained in:
2026-07-31 18:10:32 +08:00
parent e834482717
commit 9a37657148
35 changed files with 435 additions and 44 deletions
@@ -15,8 +15,10 @@ public class PartnerQueryService {
return repository.activeCandidates(tenantId, keyword, type);
}
public PartnerEntity active(long tenantId, long id) {
PartnerEntity value=repository.findActive(tenantId,id);
if (value==null) throw new BizException(ResultCode.NOT_FOUND,"往来单位不存在、已停用或不属于当前企业");
PartnerEntity value=repository.findOwned(tenantId,id);
if (value==null) throw new BizException(ResultCode.NOT_FOUND,"往来单位不存在或不属于当前企业");
if (!"ACTIVE".equals(value.getStatus()))
throw new BizException(ResultCode.CONFLICT,"往来单位已停用");
return value;
}
}
@@ -79,9 +79,12 @@ public class WarehouseApplicationService {
}
public WarehouseDetailResponse activeDetail(long tenantId, long id) {
WarehouseEntity warehouse = repository.findActiveOwned(tenantId, id);
WarehouseEntity warehouse = repository.findOwned(tenantId, id);
if (warehouse == null) {
throw new BizException(ResultCode.NOT_FOUND, "仓库不存在、已停用或不属于当前企业");
throw new BizException(ResultCode.NOT_FOUND, "仓库不存在或不属于当前企业");
}
if (!"ACTIVE".equals(warehouse.getStatus())) {
throw new BizException(ResultCode.CONFLICT, "仓库已停用");
}
return new WarehouseDetailResponse(warehouse, repository.findAddresses(tenantId, id),
repository.findCapabilities(tenantId, id).stream().filter(item -> Boolean.TRUE.equals(item.getEnabled())).toList());
@@ -25,3 +25,14 @@ baiyue:
jwt-secret: ${JWT_SECRET:change-me-to-at-least-32-bytes-long-before-start}
internal-service-token: ${INTERNAL_SERVICE_TOKEN:change-me-to-an-internal-token-at-least-32-bytes-long}
management.endpoints.web.exposure.include: health,info,prometheus
logging:
file:
name: "${LOGGING_FILE_NAME:${LOG_PATH:./logs}/${spring.application.name}.log}"
logback:
rollingpolicy:
file-name-pattern: "${LOGGING_ROLLING_FILE_NAME_PATTERN:${LOG_PATH:./logs}/${spring.application.name}.%d{yyyy-MM-dd}.%i.log.gz}"
max-file-size: "${LOGGING_ROLLING_MAX_FILE_SIZE:100MB}"
max-history: "${LOGGING_ROLLING_MAX_HISTORY:30}"
total-size-cap: "${LOGGING_ROLLING_TOTAL_SIZE_CAP:5GB}"
clean-history-on-start: "${LOGGING_ROLLING_CLEAN_HISTORY_ON_START:false}"