diff --git a/deploy/sql/头程数据库统一增量-MySQL8.sql b/deploy/sql/头程数据库统一增量-MySQL8.sql index 9b2ad6089..bc33156b2 100644 --- a/deploy/sql/头程数据库统一增量-MySQL8.sql +++ b/deploy/sql/头程数据库统一增量-MySQL8.sql @@ -3189,8 +3189,12 @@ CREATE TABLE IF NOT EXISTS fl_price_book_channel ( reference_transit VARCHAR(128) NULL COMMENT '参考时效', surcharge_description VARCHAR(2000) NULL COMMENT '附加费说明,仅展示', remark VARCHAR(2000) NULL COMMENT '渠道备注', + created_by BIGINT UNSIGNED NOT NULL COMMENT '创建人ID', created_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3), + updated_by BIGINT UNSIGNED NOT NULL COMMENT '最后修改人ID', updated_at DATETIME(3) NOT NULL DEFAULT CURRENT_TIMESTAMP(3) ON UPDATE CURRENT_TIMESTAMP(3), + deleted TINYINT(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除标记', + version INT NOT NULL DEFAULT 0 COMMENT '乐观锁版本号', PRIMARY KEY (id), UNIQUE KEY uk_price_book_channel (price_book_version_id, channel_code), KEY idx_price_book_channel_code (channel_code, price_book_version_id) diff --git a/firstleg/src/main/java/com/baiyue/firstleg/client/PrintPdfClient.java b/firstleg/src/main/java/com/baiyue/firstleg/client/PrintPdfClient.java new file mode 100644 index 000000000..c15672df4 --- /dev/null +++ b/firstleg/src/main/java/com/baiyue/firstleg/client/PrintPdfClient.java @@ -0,0 +1,32 @@ +package com.baiyue.firstleg.client; + +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.http.ResponseEntity; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestHeader; + +import java.math.BigDecimal; +import java.util.List; + +/** Print Service contract for stateless inbound carton label rendering. */ +@FeignClient(name = "print-service", contextId = "firstlegPrintPdfClient", + url = "${baiyue.clients.print.url:}", path = "/internal/print/v1/pdfs") +public interface PrintPdfClient { + @PostMapping(value = "/inbound-marks", consumes = "application/json") + ResponseEntity generateInboundMarks( + @RequestHeader("X-Internal-Service-Token") String token, + @RequestHeader(value = "X-Request-Id", required = false) String requestId, + @RequestBody InboundMarkPdfRequest request); + + record InboundMarkPdfRequest(String templateCode, PageSpec pageSpec, + String downloadFileName, List