日志
订单表字段改名 视频返回新增字段
This commit is contained in:
@@ -29,7 +29,7 @@ public class OrderItemEntity implements Serializable {
|
|||||||
|
|
||||||
/** 商品ID */
|
/** 商品ID */
|
||||||
@JsonSerialize(using = ToStringSerializer.class)
|
@JsonSerialize(using = ToStringSerializer.class)
|
||||||
private Long productId;
|
private Long listingId;
|
||||||
|
|
||||||
/** 商品名称 */
|
/** 商品名称 */
|
||||||
private String productName;
|
private String productName;
|
||||||
@@ -40,9 +40,6 @@ public class OrderItemEntity implements Serializable {
|
|||||||
/** 成交单价(HK$) */
|
/** 成交单价(HK$) */
|
||||||
private BigDecimal price;
|
private BigDecimal price;
|
||||||
|
|
||||||
/** 购买数量 */
|
|
||||||
private Integer quantity;
|
|
||||||
|
|
||||||
/** 创建时间 */
|
/** 创建时间 */
|
||||||
@TableField(fill = FieldFill.INSERT)
|
@TableField(fill = FieldFill.INSERT)
|
||||||
private LocalDateTime createTime;
|
private LocalDateTime createTime;
|
||||||
|
|||||||
@@ -108,7 +108,7 @@ public class OrderServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfoEnti
|
|||||||
List<OrderItemEntity> items = itemsMap.getOrDefault(order.getId(), new ArrayList<>());
|
List<OrderItemEntity> items = itemsMap.getOrDefault(order.getId(), new ArrayList<>());
|
||||||
List<OrderVO.ItemVO> itemVOs = items.stream().map(item -> {
|
List<OrderVO.ItemVO> itemVOs = items.stream().map(item -> {
|
||||||
OrderVO.ItemVO itemVO = new OrderVO.ItemVO();
|
OrderVO.ItemVO itemVO = new OrderVO.ItemVO();
|
||||||
itemVO.setProductId(item.getProductId());
|
itemVO.setProductId(item.getListingId());
|
||||||
itemVO.setProductName(item.getProductName());
|
itemVO.setProductName(item.getProductName());
|
||||||
itemVO.setThumbnailUrl(minioUtil.processMinioResource(item.getThumbnailUrl(), CommonConstants.MINIO_PATH_TIMEOUT));
|
itemVO.setThumbnailUrl(minioUtil.processMinioResource(item.getThumbnailUrl(), CommonConstants.MINIO_PATH_TIMEOUT));
|
||||||
return itemVO;
|
return itemVO;
|
||||||
|
|||||||
@@ -30,5 +30,3 @@ minio:
|
|||||||
default-bucket: aida-user
|
default-bucket: aida-user
|
||||||
|
|
||||||
logging:
|
logging:
|
||||||
level:
|
|
||||||
com.aida: debug
|
|
||||||
|
|||||||
@@ -69,7 +69,6 @@ CREATE TABLE seller_orders (
|
|||||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '下单时间',
|
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '下单时间',
|
||||||
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
update_time DATETIME DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
||||||
deleted INT(1) DEFAULT 0 COMMENT '是否删除:0-否,1-是',
|
deleted INT(1) DEFAULT 0 COMMENT '是否删除:0-否,1-是',
|
||||||
INDEX idx_order_id (order_id),
|
|
||||||
INDEX idx_seller_id (seller_id),
|
INDEX idx_seller_id (seller_id),
|
||||||
INDEX idx_deleted (deleted),
|
INDEX idx_deleted (deleted),
|
||||||
INDEX idx_create_time (create_time)
|
INDEX idx_create_time (create_time)
|
||||||
@@ -79,14 +78,13 @@ CREATE TABLE seller_orders (
|
|||||||
CREATE TABLE seller_order_item (
|
CREATE TABLE seller_order_item (
|
||||||
id BIGINT PRIMARY KEY COMMENT '主键ID',
|
id BIGINT PRIMARY KEY COMMENT '主键ID',
|
||||||
order_id VARCHAR(50) NOT NULL COMMENT '订单ID',
|
order_id VARCHAR(50) NOT NULL COMMENT '订单ID',
|
||||||
product_id BIGINT NOT NULL COMMENT '商品ID',
|
listing_id BIGINT NOT NULL COMMENT '商品ID',
|
||||||
product_name VARCHAR(255) COMMENT '商品名称',
|
product_name VARCHAR(255) COMMENT '商品名称',
|
||||||
thumbnail_url VARCHAR(200) COMMENT '商品缩略图URL',
|
thumbnail_url VARCHAR(200) COMMENT '商品缩略图URL',
|
||||||
price DECIMAL(10,2) COMMENT '成交单价(HK$)',
|
price DECIMAL(10,2) COMMENT '成交单价(HK$)',
|
||||||
quantity INT NOT NULL COMMENT '购买数量',
|
|
||||||
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
create_time DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
||||||
deleted INT(1) DEFAULT 0 COMMENT '是否删除:0-否,1-是',
|
deleted INT(1) DEFAULT 0 COMMENT '是否删除:0-否,1-是',
|
||||||
INDEX idx_order_id (order_id),
|
INDEX idx_order_id (order_id),
|
||||||
INDEX idx_product_id (product_id),
|
INDEX idx_listing_id (listing_id),
|
||||||
INDEX idx_deleted (deleted)
|
INDEX idx_deleted (deleted)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单商品明细表';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='订单商品明细表';
|
||||||
|
|||||||
67
src/main/resources/logback-spring.xml
Normal file
67
src/main/resources/logback-spring.xml
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<configuration>
|
||||||
|
<include resource="org/springframework/boot/logging/logback/defaults.xml" />
|
||||||
|
|
||||||
|
<!-- 日志存放路径(可通过环境变量覆盖) -->
|
||||||
|
<property name="log.path" value="${LOG_PATH:-./log}" />
|
||||||
|
<!-- 各服务独立文件名 -->
|
||||||
|
<property name="log.file.name" value="aida-seller" />
|
||||||
|
|
||||||
|
<property name="log.pattern.console" value="${CONSOLE_LOG_PATTERN:-%clr(%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
|
||||||
|
<property name="log.pattern.file" value="${FILE_LOG_PATTERN:-%d{${LOG_DATEFORMAT_PATTERN:-yyyy-MM-dd HH:mm:ss.SSS}} ${LOG_LEVEL_PATTERN:-%5p} ${PID:- } --- [%15t] %-40.40logger{39} : %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}" />
|
||||||
|
|
||||||
|
<!-- 控制台输出 -->
|
||||||
|
<appender name="console" class="ch.qos.logback.core.ConsoleAppender">
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern.console}</pattern>
|
||||||
|
</encoder>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- Info 日志文件 -->
|
||||||
|
<appender name="file_info" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/${log.file.name}-info.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<fileNamePattern>${log.path}/${log.file.name}-info.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern.file}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>ERROR</level>
|
||||||
|
<onMatch>DENY</onMatch>
|
||||||
|
<onMismatch>ACCEPT</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- Error 日志文件 -->
|
||||||
|
<appender name="file_error" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||||
|
<file>${log.path}/${log.file.name}-error.log</file>
|
||||||
|
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||||
|
<fileNamePattern>${log.path}/${log.file.name}-error.%d{yyyy-MM-dd}.log</fileNamePattern>
|
||||||
|
<maxHistory>60</maxHistory>
|
||||||
|
</rollingPolicy>
|
||||||
|
<encoder>
|
||||||
|
<pattern>${log.pattern.file}</pattern>
|
||||||
|
</encoder>
|
||||||
|
<filter class="ch.qos.logback.classic.filter.LevelFilter">
|
||||||
|
<level>ERROR</level>
|
||||||
|
<onMatch>ACCEPT</onMatch>
|
||||||
|
<onMismatch>DENY</onMismatch>
|
||||||
|
</filter>
|
||||||
|
</appender>
|
||||||
|
|
||||||
|
<!-- 服务日志级别控制(由 Nacos 的 logging.level 统一管理,此处仅作兜底) -->
|
||||||
|
<logger name="com.aida" level="${LOG_LEVEL_SELLER:-info}" />
|
||||||
|
<!-- MyBatis-Plus 日志 -->
|
||||||
|
<logger name="com.aida.seller.mapper" level="warn" />
|
||||||
|
<!-- Spring 框架日志 -->
|
||||||
|
<logger name="org.springframework" level="warn" />
|
||||||
|
|
||||||
|
<root level="${LOG_LEVEL_ROOT:-info}">
|
||||||
|
<appender-ref ref="console" />
|
||||||
|
<appender-ref ref="file_info" />
|
||||||
|
<appender-ref ref="file_error" />
|
||||||
|
</root>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
Reference in New Issue
Block a user