This commit is contained in:
2026-09-29 18:47:37 +08:00
parent 2c60a29e0f
commit c2927ab9a6
291 changed files with 4008 additions and 6298 deletions
@@ -1,6 +0,0 @@
spring:
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${WAREHOUSE_DB_URL:jdbc:mysql://127.0.0.1:3306/baiyue_warehouse?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&rewriteBatchedStatements=true}
username: ${WAREHOUSE_DB_USERNAME:root}
password: ${WAREHOUSE_DB_PASSWORD:123456}
@@ -1,15 +0,0 @@
spring:
cloud:
nacos:
config:
namespace: ${NACOS_NAMESPACE:test}
group: ${NACOS_GROUP:BAIYUE}
encode: UTF-8
discovery:
namespace: ${NACOS_NAMESPACE:test}
group: ${NACOS_GROUP:BAIYUE}
datasource:
driver-class-name: com.mysql.cj.jdbc.Driver
url: ${WAREHOUSE_TEST_DB_URL:jdbc:mysql://${TEST_DB_HOST:8.163.30.128}:${TEST_DB_PORT:3306}/baiyue_warehouse?useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&allowPublicKeyRetrieval=true&rewriteBatchedStatements=true}
username: ${WAREHOUSE_TEST_DB_USERNAME:${TEST_DB_USERNAME:root}}
password: ${WAREHOUSE_TEST_DB_PASSWORD:${TEST_DB_PASSWORD}}
+9 -10
View File
@@ -2,28 +2,27 @@ server:
port: ${WAREHOUSE_PORT:9205}
spring:
profiles:
active: ${SPRING_PROFILES_ACTIVE:dev}
active: ${SPRING_PROFILES_ACTIVE:test}
application:
name: warehouse-service
config:
import:
- optional:nacos:baiyue-common.yml?group=BAIYUE&refreshEnabled=true
- optional:nacos:${spring.application.name}.yml?group=BAIYUE&refreshEnabled=true
- nacos:baiyue-common.yml?group=${NACOS_GROUP:BAIYUE}&refreshEnabled=true
- nacos:${spring.application.name}.yml?group=${NACOS_GROUP:BAIYUE}&refreshEnabled=true
cloud:
nacos:
server-addr: ${NACOS_SERVER_ADDR:127.0.0.1:8848}
username: ${NACOS_USERNAME:nacos}
password: ${NACOS_PASSWORD:nacos}
server-addr: ${NACOS_SERVER_ADDR}
username: ${NACOS_USERNAME}
password: ${NACOS_PASSWORD}
discovery:
enabled: ${NACOS_DISCOVERY_ENABLED:true}
register-enabled: ${NACOS_REGISTER_ENABLED:true}
group: ${NACOS_GROUP:BAIYUE}
namespace: ${NACOS_NAMESPACE:public}
namespace: ${NACOS_NAMESPACE}
config:
namespace: ${NACOS_NAMESPACE:public}
namespace: ${NACOS_NAMESPACE}
encode: UTF-8
baiyue:
security:
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}
internal-service-token: ${INTERNAL_SERVICE_TOKEN}
management.endpoints.web.exposure.include: health,info,prometheus
@@ -1,8 +1,46 @@
openapi: 3.0.3
info:
title: Warehouse internal order catalog
title: Warehouse catalog and receiving options
version: 1.0.0
paths:
/api/platform/v1/warehouse-admin/overseas-receiving-options:
get:
summary: 分页查询启用的公共海外收货仓
description: 仅允许平台主体(appCode=PLATFORM、tenantId=0)且具有 platform:overseas-warehouse:warehouse:list 权限。固定筛选公共 OVERSEAS、ACTIVE、RECEIVING 仓,不授予仓库主档维护权限。统一 Gateway 入口,统一 Access Token。
security:
- bearerAuth: []
parameters:
- name: page
in: query
schema: {type: integer, format: int64, minimum: 1, default: 1}
- name: size
in: query
schema: {type: integer, format: int64, minimum: 1, maximum: 200, default: 200}
responses:
'200':
description: 统一响应;code字符串200为成功,业务拒绝返回非200字符串code。Long字段序列化为十进制字符串。
content:
application/json:
schema:
type: object
required: [code, message, data]
properties:
code: {type: string, example: '200'}
message: {type: string}
data:
type: object
nullable: true
properties:
page: {type: string, example: '1'}
size: {type: string, example: '200'}
total: {type: string, example: '2'}
pages: {type: string, example: '1'}
records:
type: array
items:
$ref: '#/components/schemas/ReceivingWarehouseOption'
'401': {description: 无有效统一会话}
'403': {description: 无访问权限}
/internal/warehouses/order-catalog:
get:
summary: 查询订单可引用的启用公共仓库目录
@@ -12,7 +50,22 @@ paths:
responses:
'200': {description: 返回仓库 ID、编码、名称、类型和国家编码}
components:
schemas:
ReceivingWarehouseOption:
type: object
required: [id, customerId, warehouseCode, warehouseName, warehouseType, status]
properties:
id: {type: string, description: 权威仓库ID}
customerId: {type: string, enum: ['0'], description: 平台公共资源作用域}
warehouseCode: {type: string}
warehouseName: {type: string}
warehouseType: {type: string, enum: [OVERSEAS]}
status: {type: string, enum: [ACTIVE]}
securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
internalServiceToken:
type: apiKey
in: header