功能:更新消息中心和 YumiNail 模块

This commit is contained in:
xiaowang
2026-05-13 12:43:01 +08:00
parent 6b9eba5aca
commit 2074addc40
284 changed files with 21031 additions and 4533 deletions
@@ -0,0 +1,32 @@
server:
port: 8097
servlet:
encoding:
charset: UTF-8
force: true
enabled: true
spring:
application:
name: yuminail-calendar-core
datasource:
url: jdbc:mysql://localhost:3306/yumi_nail_calendar?useUnicode=true&characterEncoding=utf-8&serverTimezone=Asia/Shanghai
username: root
password: root
driver-class-name: com.mysql.cj.jdbc.Driver
jackson:
time-zone: Asia/Shanghai
default-property-inclusion: non_null
serialization:
write-dates-as-timestamps: false
mybatis-plus:
configuration:
map-underscore-to-camel-case: true
global-config:
db-config:
table-underline: true
logging:
pattern:
console: "%d{yyyy-MM-dd HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n"
@@ -0,0 +1,75 @@
CREATE DATABASE IF NOT EXISTS `yumi_nail_calendar`
DEFAULT CHARACTER SET utf8mb4
COLLATE utf8mb4_unicode_ci;
USE `yumi_nail_calendar`;
CREATE TABLE IF NOT EXISTS `t_calendar_customer` (
`id` BIGINT NOT NULL,
`name` VARCHAR(50) NOT NULL COMMENT '客户姓名',
`phone` VARCHAR(20) DEFAULT NULL COMMENT '联系电话',
`notes` TEXT DEFAULT NULL COMMENT '常规备注',
`preferences` TEXT DEFAULT NULL COMMENT '偏好记录',
`cautions` TEXT DEFAULT NULL COMMENT '禁忌或注意事项',
`tags` VARCHAR(255) DEFAULT NULL COMMENT '标签',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_calendar_customer_name` (`name`),
KEY `idx_calendar_customer_phone` (`phone`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='美甲客户档案表';
CREATE TABLE IF NOT EXISTS `t_calendar_order` (
`id` BIGINT NOT NULL,
`customer_id` BIGINT DEFAULT NULL COMMENT '客户ID',
`appointment_id` BIGINT DEFAULT NULL COMMENT '预约ID',
`customer_name` VARCHAR(50) NOT NULL COMMENT '客户姓名快照',
`customer_phone` VARCHAR(20) DEFAULT NULL COMMENT '客户电话快照',
`service_name` VARCHAR(100) NOT NULL COMMENT '服务项目快照',
`appointment_time` DATETIME DEFAULT NULL COMMENT '预约时间快照',
`amount` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '成交金额',
`deposit_amount` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '定金金额',
`received_amount` DECIMAL(10,2) NOT NULL DEFAULT 0.00 COMMENT '实收金额',
`payment_status` VARCHAR(32) NOT NULL DEFAULT 'UNPAID' COMMENT '支付状态',
`completed_at` DATETIME DEFAULT NULL COMMENT '订单完成时间',
`notes` TEXT DEFAULT NULL COMMENT '备注',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_calendar_order_customer_id` (`customer_id`),
KEY `idx_calendar_order_appointment_id` (`appointment_id`),
KEY `idx_calendar_order_payment_status` (`payment_status`),
KEY `idx_calendar_order_appointment_time` (`appointment_time`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='美甲服务订单表';
CREATE TABLE IF NOT EXISTS `t_calendar_appointment` (
`id` BIGINT NOT NULL,
`series_id` BIGINT DEFAULT NULL COMMENT '重复预约系列ID',
`customer_id` BIGINT DEFAULT NULL COMMENT '客户ID',
`order_id` BIGINT DEFAULT NULL COMMENT '关联订单ID',
`customer_name` VARCHAR(50) NOT NULL COMMENT '客户姓名快照',
`customer_phone` VARCHAR(20) DEFAULT NULL COMMENT '联系电话快照',
`appointment_date` DATE NOT NULL COMMENT '预约日期',
`appointment_start_time` DATETIME NOT NULL COMMENT '预约开始时间',
`appointment_end_time` DATETIME NOT NULL COMMENT '预约结束时间',
`service_name` VARCHAR(100) NOT NULL COMMENT '服务项目',
`appointment_type` VARCHAR(32) NOT NULL COMMENT '预约类型',
`order_reference` VARCHAR(64) DEFAULT NULL COMMENT '对应订单号',
`notes` TEXT DEFAULT NULL COMMENT '备注',
`reminder_minutes` INT NOT NULL DEFAULT 60 COMMENT '提前提醒分钟数',
`repeat_type` VARCHAR(32) NOT NULL DEFAULT 'NONE' COMMENT '重复类型',
`repeat_until` DATE DEFAULT NULL COMMENT '重复截止日期',
`status` VARCHAR(32) NOT NULL DEFAULT 'SCHEDULED' COMMENT '预约状态',
`notification_enabled` TINYINT(1) NOT NULL DEFAULT 1 COMMENT '是否启用提醒',
`sync_status` VARCHAR(32) NOT NULL DEFAULT 'SYNCED' COMMENT '同步状态',
`create_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
`update_time` DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
PRIMARY KEY (`id`),
KEY `idx_calendar_appointment_date` (`appointment_date`),
KEY `idx_calendar_appointment_start_time` (`appointment_start_time`),
KEY `idx_calendar_appointment_series_id` (`series_id`),
KEY `idx_calendar_appointment_customer_id` (`customer_id`),
KEY `idx_calendar_appointment_order_id` (`order_id`),
KEY `idx_calendar_appointment_status` (`status`),
KEY `idx_calendar_appointment_customer_name` (`customer_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='美甲师日历预约表';
@@ -0,0 +1,63 @@
<?xml version="1.0" encoding="UTF-8"?>
<Configuration status="WARN">
<Properties>
<Property name="LOG_PATTERN">%d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %-5level %logger{36} - %msg%n</Property>
<Property name="LOG_HOME">E:/code/xiaowang/YumiNail-Core/logs</Property>
</Properties>
<Appenders>
<Console name="Console" target="SYSTEM_OUT">
<ThresholdFilter level="INFO" onMatch="ACCEPT" onMismatch="DENY"/>
<PatternLayout pattern="${LOG_PATTERN}"/>
</Console>
<RollingFile name="RollingFile" fileName="${LOG_HOME}/yuminail-core.log"
filePattern="${LOG_HOME}/yuminail-core-%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="${LOG_PATTERN}"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="30">
<Delete basePath="${LOG_HOME}" maxDepth="1">
<IfFileName glob="yuminail-core-*.log.gz"/>
<IfLastModified age="30d"/>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
<RollingFile name="ErrorRollingFile" fileName="${LOG_HOME}/yuminail-core-error.log"
filePattern="${LOG_HOME}/yuminail-core-error-%d{yyyy-MM-dd}-%i.log.gz">
<PatternLayout pattern="${LOG_PATTERN}"/>
<ThresholdFilter level="ERROR" onMatch="ACCEPT" onMismatch="DENY"/>
<Policies>
<TimeBasedTriggeringPolicy interval="1" modulate="true"/>
<SizeBasedTriggeringPolicy size="100 MB"/>
</Policies>
<DefaultRolloverStrategy max="30">
<Delete basePath="${LOG_HOME}" maxDepth="1">
<IfFileName glob="yuminail-core-error-*.log.gz"/>
<IfLastModified age="30d"/>
</Delete>
</DefaultRolloverStrategy>
</RollingFile>
</Appenders>
<Loggers>
<Root level="INFO">
<AppenderRef ref="Console"/>
<AppenderRef ref="RollingFile"/>
<AppenderRef ref="ErrorRollingFile"/>
</Root>
<Logger name="com.xiaowang.yuminailcore" level="DEBUG" additivity="false">
<AppenderRef ref="Console"/>
<AppenderRef ref="RollingFile"/>
<AppenderRef ref="ErrorRollingFile"/>
</Logger>
<Logger name="org.springframework" level="INFO"/>
<Logger name="com.alibaba.nacos" level="INFO"/>
<Logger name="org.mybatis" level="DEBUG"/>
</Loggers>
</Configuration>