-- =============================================================
-- 测试门店 S001 种子数据
-- 用法: sh scripts/dev.sh seed S001
-- 前置条件: 数据库表结构已创建（启动一次后端即可）
-- 说明: 每次执行会清空并重新写入所有业务数据
-- =============================================================

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ── 清空（子表先清）────────────────────────────────────────
TRUNCATE TABLE inventory_check_items;
TRUNCATE TABLE inventory_checks;
TRUNCATE TABLE inventory_logs;
TRUNCATE TABLE inventories;
TRUNCATE TABLE stock_out_items;
TRUNCATE TABLE stock_out_orders;
TRUNCATE TABLE stock_in_items;
TRUNCATE TABLE stock_in_orders;
TRUNCATE TABLE finance_records;
TRUNCATE TABLE number_rules;
TRUNCATE TABLE product_images;
TRUNCATE TABLE partners;
TRUNCATE TABLE warehouses;
TRUNCATE TABLE products;
TRUNCATE TABLE product_spec_options;
TRUNCATE TABLE product_series_options;
TRUNCATE TABLE product_name_options;
TRUNCATE TABLE product_categories;
TRUNCATE TABLE users;
TRUNCATE TABLE shops;

SET FOREIGN_KEY_CHECKS = 1;

-- ── 门店 ────────────────────────────────────────────────────
-- id=1
INSERT INTO shops (id, name, code, address, phone, manager_name, created_at, updated_at)
VALUES (1, '测试酒库门店', 'S001', '北京市朝阳区建国路88号', '010-12345678', '张总', NOW(), NOW());

-- ── 用户（密码均为 password123）────────────────────────────
-- bcrypt(password123, cost=10)
SET @pwd = '$2a$10$[REDACTED]';

-- id=1 admin, id=2 operator, id=3 readonly
INSERT INTO users (id, shop_id, username, password_hash, real_name, phone, role, is_active, created_at, updated_at) VALUES
(1, 1, 'admin',    @pwd, '张三（管理员）', '13800000001', 'admin',    1, NOW(), NOW()),
(2, 1, 'operator', @pwd, '李四（操作员）', '13800000002', 'operator', 1, NOW(), NOW()),
(3, 1, 'test',     @pwd, '王五（只读）',   '13800000003', 'readonly', 1, NOW(), NOW());

-- ── 仓库 ────────────────────────────────────────────────────
-- id=1 主仓库, id=2 进口酒专库
INSERT INTO warehouses (id, shop_id, name, location, is_default, created_at, updated_at) VALUES
(1, 1, '主仓库',     'A栋1层东侧',   1, NOW(), NOW()),
(2, 1, '进口酒专库', 'B栋2层恒温区', 0, NOW(), NOW());

-- ── 商品分类 ────────────────────────────────────────────────
-- id=1 白酒, id=2 进口烈酒
INSERT INTO product_categories (id, shop_id, name, sort_order, created_at, updated_at) VALUES
(1, 1, '白酒',   1, NOW(), NOW()),
(2, 1, '进口烈酒', 2, NOW(), NOW());

-- ── 商品 ────────────────────────────────────────────────────
-- id=1~6 白酒, id=7~8 进口烈酒
INSERT INTO products (id, shop_id, public_id, code, barcode, name, series, spec, unit, category_id, brand,
                      purchase_price, sale_price, min_stock, remark, created_at, updated_at) VALUES
(1, 1, 'a1b2c3d4-0001-0001-0001-000000000001', 'MT-001',  '6901234567890', '飞天茅台 53度', '茅台',     '500ml/瓶', '瓶', 1, '贵州茅台',       2350, 2800, 10, '酱香型白酒，53度，飞天系列', NOW(), NOW()),
(2, 1, 'a1b2c3d4-0001-0001-0001-000000000002', 'WLY-001', '6902345678901', '五粮液 52度',   '五粮液',   '500ml/瓶', '瓶', 1, '宜宾五粮液',     950,  1200, 6,  '浓香型白酒，52度，普五系列', NOW(), NOW()),
(3, 1, 'a1b2c3d4-0001-0001-0001-000000000003', 'YH-001',  '6903456789012', '洋河梦之蓝 M6', '洋河',     '500ml/瓶', '瓶', 1, '江苏洋河',       560,  680,  6,  '浓香型，绵柔苏酒代表',       NOW(), NOW()),
(4, 1, 'a1b2c3d4-0001-0001-0001-000000000004', 'LZ-001',  '6904567890123', '泸州老窖 特曲', '泸州老窖', '500ml/瓶', '瓶', 1, '泸州老窖',       420,  520,  6,  '浓香鼻祖，特曲系列',         NOW(), NOW()),
(5, 1, 'a1b2c3d4-0001-0001-0001-000000000005', 'JNC-001', '6905678901234', '剑南春 水晶剑', '剑南春',   '500ml/瓶', '瓶', 1, '剑南春',         390,  480,  6,  '浓香型，绵竹名酒',           NOW(), NOW()),
(6, 1, 'a1b2c3d4-0001-0001-0001-000000000006', 'LJ-001',  '6906789012345', '郎酒 红花郎10', '郎酒',     '500ml/瓶', '瓶', 1, '古蔺郎酒',       320,  420,  6,  '酱香型，赤水河畔酿造',       NOW(), NOW()),
(7, 1, 'a1b2c3d4-0001-0001-0001-000000000007', 'LF-001',  '3760093550058', '拉菲古堡 2018', '波尔多',   '750ml/瓶', '瓶', 2, 'Château Lafite', 3800, 5200, 3,  '波尔多一级名庄，2018年份',   NOW(), NOW()),
(8, 1, 'a1b2c3d4-0001-0001-0001-000000000008', 'RTM-001', '3021691010008', '人头马 VSOP',   '人头马',   '700ml/瓶', '瓶', 2, 'Rémy Martin',    480,  680,  3,  '法国干邑，VSOP级别',         NOW(), NOW());

-- ── 商品名称选项 ────────────────────────────────────────────
INSERT INTO product_name_options (shop_id, code, name, created_at, updated_at) VALUES
(1, 'NA001', '飞天茅台 53度', NOW(), NOW()),
(1, 'NA002', '五粮液 52度',   NOW(), NOW()),
(1, 'NA003', '洋河梦之蓝 M6', NOW(), NOW()),
(1, 'NA004', '泸州老窖 特曲', NOW(), NOW()),
(1, 'NA005', '剑南春 水晶剑', NOW(), NOW()),
(1, 'NA006', '郎酒 红花郎10', NOW(), NOW()),
(1, 'NA007', '拉菲古堡 2018', NOW(), NOW()),
(1, 'NA008', '人头马 VSOP',   NOW(), NOW());

-- ── 商品系列选项 ────────────────────────────────────────────
INSERT INTO product_series_options (shop_id, code, name, created_at, updated_at) VALUES
(1, 'SE001', '茅台',     NOW(), NOW()),
(1, 'SE002', '五粮液',   NOW(), NOW()),
(1, 'SE003', '洋河',     NOW(), NOW()),
(1, 'SE004', '泸州老窖', NOW(), NOW()),
(1, 'SE005', '剑南春',   NOW(), NOW()),
(1, 'SE006', '郎酒',     NOW(), NOW()),
(1, 'SE007', '波尔多',   NOW(), NOW()),
(1, 'SE008', '人头马',   NOW(), NOW());

-- ── 商品规格选项 ────────────────────────────────────────────
INSERT INTO product_spec_options (shop_id, code, name, quantity, created_at, updated_at) VALUES
(1, 'GG001', '500ml/瓶', 1, NOW(), NOW()),
(1, 'GG002', '750ml/瓶', 1, NOW(), NOW()),
(1, 'GG003', '700ml/瓶', 1, NOW(), NOW());

-- ── 往来单位 ────────────────────────────────────────────────
-- id=1~4 供应商, id=5~7 客户
INSERT INTO partners (id, shop_id, code, name, type, contact, phone, address, bank_account,
                      credit_limit, balance, remark, created_at, updated_at) VALUES
(1, 1, 'SUP001', '贵州茅台酒股份有限公司',   'supplier', '张经理', '0851-22222001', '贵州省仁怀市茅台镇',         '工商银行仁怀支行 6222 0000 0001 0001', 5000000, 0, '茅台系列直供，账期30天',     NOW(), NOW()),
(2, 1, 'SUP002', '四川五粮液股份有限公司',   'supplier', '王总监', '0831-33333001', '四川省宜宾市翠屏区',         '建设银行宜宾支行 6227 0000 0001 0002', 3000000, 0, '五粮液系列授权经销',         NOW(), NOW()),
(3, 1, 'SUP003', '江苏洋河酒厂股份有限公司', 'supplier', '赵主任', '0527-44444001', '江苏省宿迁市洋河新区',       '农业银行宿迁支行 6228 0000 0001 0003', 2000000, 0, '洋河梦之蓝系列直供',         NOW(), NOW()),
(4, 1, 'SUP004', '四川郎酒股份有限公司',     'supplier', '刘经理', '0830-55555001', '四川省古蔺县二郎镇',         '中国银行古蔺支行 6013 0000 0001 0004', 1500000, 0, '郎酒红花郎系列',             NOW(), NOW()),
(5, 1, 'CUS001', '北京君悦大酒店',           'customer', '李采购', '010-65888001',  '北京市朝阳区建国门外大街2号', '中信银行北京朝阳支行 6217 0000 0002 0001', 500000, 0, '五星级酒店，月结',         NOW(), NOW()),
(6, 1, 'CUS002', '上海外滩华尔道夫酒店',     'customer', '陈主任', '021-62308001',  '上海市黄浦区中山东一路2号',   '浦发银行上海黄浦支行 6210 0000 0002 0002', 800000, 0, '豪华酒店，按季结算',       NOW(), NOW()),
(7, 1, 'CUS003', '广州白天鹅宾馆',           'customer', '吴采购', '020-81886001',  '广州市荔湾区沙面南街1号',     '招商银行广州荔湾支行 6225 0000 0002 0003', 300000, 0, '高端宾馆，月结30天',       NOW(), NOW());

-- ── 编号规则 ────────────────────────────────────────────────
INSERT INTO number_rules (id, shop_id, type, prefix, current_no, date_format, updated_at) VALUES
(1, 1, 'stock_in',        'RK', 5, 'YYYYMMDD', NOW()),
(2, 1, 'stock_out',       'CK', 4, 'YYYYMMDD', NOW()),
(3, 1, 'inventory_check', 'PD', 1, 'YYYYMMDD', NOW());

-- ── 入库单 ──────────────────────────────────────────────────
-- #1 已审核: 飞天茅台+五粮液，主仓库，茅台供应商 | 总额=339000
INSERT INTO stock_in_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    reviewer_id, status, order_date, total_amount, reviewed_at, remark, created_at, updated_at) VALUES
(1, 1, 'RK20260401001', 'purchase', 1, 1, 1,
    1, 'approved', DATE_SUB(CURDATE(), INTERVAL 6 DAY), 339000,
    DATE_SUB(NOW(), INTERVAL 5 DAY), '茅台系列首批入库，含飞天茅台及五粮液', NOW(), NOW());

INSERT INTO stock_in_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    batch_no, remark, created_at, updated_at) VALUES
(1, 1, 1, 1, 120, 2350, 282000, 'BATCH-MT-2024001',  '飞天茅台 2024年第一批次', NOW(), NOW()),
(2, 1, 1, 2,  60,  950,  57000, 'BATCH-WLY-2024001', '五粮液普五 2024年批次',   NOW(), NOW());

-- #2 已审核: 洋河+泸州+剑南春，主仓库，五粮液供应商 | 总额=51360
INSERT INTO stock_in_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    reviewer_id, status, order_date, total_amount, reviewed_at, remark, created_at, updated_at) VALUES
(2, 1, 'RK20260403001', 'purchase', 1, 2, 2,
    1, 'approved', DATE_SUB(CURDATE(), INTERVAL 4 DAY), 51360,
    DATE_SUB(NOW(), INTERVAL 3 DAY), '浓香型白酒补货入库', NOW(), NOW());

INSERT INTO stock_in_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    batch_no, remark, created_at, updated_at) VALUES
(3, 2, 1, 3, 48, 560, 26880, 'BATCH-YH-2024003',  '洋河梦之蓝 M6 3月批次',  NOW(), NOW()),
(4, 2, 1, 4, 36, 420, 15120, 'BATCH-LZ-2024002',  '泸州老窖特曲 春季批次',  NOW(), NOW()),
(5, 2, 1, 5, 24, 390,  9360, 'BATCH-JNC-2024001', '剑南春水晶剑 首批',      NOW(), NOW());

-- #3 已审核: 拉菲+人头马，进口酒专库，郎酒供应商（代理进口）| 总额=108480
INSERT INTO stock_in_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    reviewer_id, status, order_date, total_amount, reviewed_at, remark, created_at, updated_at) VALUES
(3, 1, 'RK20260404001', 'purchase', 2, 4, 2,
    1, 'approved', DATE_SUB(CURDATE(), INTERVAL 3 DAY), 108480,
    DATE_SUB(NOW(), INTERVAL 2 DAY), '进口烈酒专库入库，含拉菲及人头马', NOW(), NOW());

INSERT INTO stock_in_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    batch_no, remark, created_at, updated_at) VALUES
(6, 3, 1, 7, 24, 3800,  91200, 'BATCH-LF-2018001',  '拉菲古堡2018，原箱',     NOW(), NOW()),
(7, 3, 1, 8, 36,  480,  17280, 'BATCH-RTM-2024001', '人头马VSOP，2024年进口', NOW(), NOW());

-- #4 待审核: 郎酒补货，主仓库 | 总额=19200
INSERT INTO stock_in_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    status, order_date, total_amount, remark, created_at, updated_at) VALUES
(4, 1, 'RK20260406001', 'purchase', 1, 4, 2,
    'pending', DATE_SUB(CURDATE(), INTERVAL 1 DAY), 19200,
    '郎酒红花郎补货，待仓库管理员审核', NOW(), NOW());

INSERT INTO stock_in_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    batch_no, remark, created_at, updated_at) VALUES
(8, 4, 1, 6, 60, 320, 19200, 'BATCH-LJ-2024002', '郎酒红花郎10 第二批次', NOW(), NOW());

-- #5 草稿: 追加茅台，主仓库 | 总额=142800
INSERT INTO stock_in_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    status, order_date, total_amount, remark, created_at, updated_at) VALUES
(5, 1, 'RK20260407001', 'purchase', 1, 1, 2,
    'draft', CURDATE(), 142800,
    '茅台追加订货，草稿中', NOW(), NOW());

INSERT INTO stock_in_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    batch_no, remark, created_at, updated_at) VALUES
(9, 5, 1, 1, 60, 2380, 142800, 'BATCH-MT-2024002', '飞天茅台 第二批次', NOW(), NOW());

-- ── 出库单 ──────────────────────────────────────────────────
-- #1 已审核: 君悦大酒店，主仓库 | 总额=48960
INSERT INTO stock_out_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    reviewer_id, status, order_date, total_amount, reviewed_at, remark, created_at, updated_at) VALUES
(1, 1, 'CK20260404001', 'sale', 1, 5, 2,
    1, 'approved', DATE_SUB(CURDATE(), INTERVAL 3 DAY), 48960,
    DATE_SUB(NOW(), INTERVAL 2 DAY), '北京君悦大酒店 4月份定期供货', NOW(), NOW());

INSERT INTO stock_out_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    remark, created_at, updated_at) VALUES
(1, 1, 1, 1, 12, 2800, 33600, '飞天茅台 12瓶，整箱出库', NOW(), NOW()),
(2, 1, 1, 2,  6, 1200,  7200, '五粮液普五 6瓶',          NOW(), NOW()),
(3, 1, 1, 3, 12,  680,  8160, '洋河梦之蓝 M6 12瓶',      NOW(), NOW());

-- #2 已审核: 外滩华尔道夫，进口酒专库 | 总额=39360
INSERT INTO stock_out_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    reviewer_id, status, order_date, total_amount, reviewed_at, remark, created_at, updated_at) VALUES
(2, 1, 'CK20260405001', 'sale', 2, 6, 2,
    1, 'approved', DATE_SUB(CURDATE(), INTERVAL 2 DAY), 39360,
    DATE_SUB(NOW(), INTERVAL 1 DAY), '上海外滩华尔道夫 进口酒专属采购', NOW(), NOW());

INSERT INTO stock_out_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    remark, created_at, updated_at) VALUES
(4, 2, 1, 7,  6, 5200, 31200, '拉菲古堡2018 6瓶',  NOW(), NOW()),
(5, 2, 1, 8, 12,  680,  8160, '人头马VSOP 12瓶',   NOW(), NOW());

-- #3 待审核: 广州白天鹅宾馆，主仓库 | 总额=23280
INSERT INTO stock_out_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    status, order_date, total_amount, remark, created_at, updated_at) VALUES
(3, 1, 'CK20260406001', 'sale', 1, 7, 2,
    'pending', DATE_SUB(CURDATE(), INTERVAL 1 DAY), 23280,
    '广州白天鹅宾馆 月度供货申请', NOW(), NOW());

INSERT INTO stock_out_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    remark, created_at, updated_at) VALUES
(6, 3, 1, 4, 24, 520, 12480, '泸州老窖特曲 24瓶',   NOW(), NOW()),
(7, 3, 1, 5, 12, 480,  5760, '剑南春水晶剑 12瓶',   NOW(), NOW()),
(8, 3, 1, 6, 12, 420,  5040, '郎酒红花郎10 12瓶',   NOW(), NOW());

-- #4 草稿: 君悦追加，主仓库 | 总额=16800
INSERT INTO stock_out_orders (id, shop_id, order_no, type, warehouse_id, partner_id, operator_id,
    status, order_date, total_amount, remark, created_at, updated_at) VALUES
(4, 1, 'CK20260407001', 'sale', 1, 5, 2,
    'draft', CURDATE(), 16800,
    '北京君悦追加订单，草稿中', NOW(), NOW());

INSERT INTO stock_out_items (id, order_id, shop_id, product_id, quantity, unit_price, total_price,
    remark, created_at, updated_at) VALUES
(9, 4, 1, 1, 6, 2800, 16800, '飞天茅台 追加 6瓶', NOW(), NOW());

-- ── 库存（已审核单据计算后的实时库存）────────────────────
-- wh1: 飞天茅台 120-12=108, 五粮液 60-6=54, 洋河 48-12=36, 泸州 36, 剑南春 24
-- wh2: 拉菲 24-6=18, 人头马 36-12=24
INSERT INTO inventories (id, shop_id, warehouse_id, product_id, quantity, updated_at) VALUES
(1, 1, 1, 1, 108, NOW()),
(2, 1, 1, 2,  54, NOW()),
(3, 1, 1, 3,  36, NOW()),
(4, 1, 1, 4,  36, NOW()),
(5, 1, 1, 5,  24, NOW()),
(6, 1, 2, 7,  18, NOW()),
(7, 1, 2, 8,  24, NOW());

-- ── 库存流水 ────────────────────────────────────────────────
-- 入库单 #1 (ref_id=1): 飞天茅台+五粮液 → wh1
INSERT INTO inventory_logs (id, shop_id, warehouse_id, product_id, direction, quantity, qty_before, qty_after,
    ref_type, ref_id, operator_id, created_at) VALUES
( 1, 1, 1, 1, 'in', 120,   0, 120, 'stock_in', 1, 1, NOW()),
( 2, 1, 1, 2, 'in',  60,   0,  60, 'stock_in', 1, 1, NOW());

-- 入库单 #2 (ref_id=2): 洋河+泸州+剑南春 → wh1
INSERT INTO inventory_logs (id, shop_id, warehouse_id, product_id, direction, quantity, qty_before, qty_after,
    ref_type, ref_id, operator_id, created_at) VALUES
( 3, 1, 1, 3, 'in',  48,   0,  48, 'stock_in', 2, 1, NOW()),
( 4, 1, 1, 4, 'in',  36,   0,  36, 'stock_in', 2, 1, NOW()),
( 5, 1, 1, 5, 'in',  24,   0,  24, 'stock_in', 2, 1, NOW());

-- 入库单 #3 (ref_id=3): 拉菲+人头马 → wh2
INSERT INTO inventory_logs (id, shop_id, warehouse_id, product_id, direction, quantity, qty_before, qty_after,
    ref_type, ref_id, operator_id, created_at) VALUES
( 6, 1, 2, 7, 'in',  24,   0,  24, 'stock_in', 3, 1, NOW()),
( 7, 1, 2, 8, 'in',  36,   0,  36, 'stock_in', 3, 1, NOW());

-- 出库单 #1 (ref_id=1): 飞天茅台+五粮液+洋河 ← wh1
INSERT INTO inventory_logs (id, shop_id, warehouse_id, product_id, direction, quantity, qty_before, qty_after,
    ref_type, ref_id, operator_id, created_at) VALUES
( 8, 1, 1, 1, 'out',  12, 120, 108, 'stock_out', 1, 1, NOW()),
( 9, 1, 1, 2, 'out',   6,  60,  54, 'stock_out', 1, 1, NOW()),
(10, 1, 1, 3, 'out',  12,  48,  36, 'stock_out', 1, 1, NOW());

-- 出库单 #2 (ref_id=2): 拉菲+人头马 ← wh2
INSERT INTO inventory_logs (id, shop_id, warehouse_id, product_id, direction, quantity, qty_before, qty_after,
    ref_type, ref_id, operator_id, created_at) VALUES
(11, 1, 2, 7, 'out',   6,  24,  18, 'stock_out', 2, 1, NOW()),
(12, 1, 2, 8, 'out',  12,  36,  24, 'stock_out', 2, 1, NOW());

-- ── 财务记录 ────────────────────────────────────────────────
-- 应收账款：出库单 #1 (君悦大酒店) + #2 (外滩华尔道夫)
-- 收款：出库单 #1 已回款
-- 应付账款：入库单 #1 (茅台 339000) + #2 (五粮液代理 51360) + #3 (郎酒 108480)
-- 付款：入库单 #1 已付款
INSERT INTO finance_records (id, shop_id, partner_id, type, amount, balance, ref_type, ref_id,
    operator_id, record_date, remark, created_at, updated_at) VALUES
(1, 1, 5, 'receivable', 48960,  48960, 'stock_out', 1, 1,
    DATE_SUB(CURDATE(), INTERVAL 6 DAY), '君悦大酒店4月供货应收款',      NOW(), NOW()),
(2, 1, 6, 'receivable', 39360,  39360, 'stock_out', 2, 1,
    DATE_SUB(CURDATE(), INTERVAL 5 DAY), '外滩华尔道夫进口酒应收款',     NOW(), NOW()),
(3, 1, 5, 'receipt',    48960,      0, 'stock_out', 1, 1,
    DATE_SUB(CURDATE(), INTERVAL 2 DAY), '君悦大酒店回款，结清',          NOW(), NOW()),
(4, 1, 1, 'payable',   339000, 339000, 'stock_in',  1, 1,
    DATE_SUB(CURDATE(), INTERVAL 6 DAY), '茅台系列首批入库应付款',        NOW(), NOW()),
(5, 1, 2, 'payable',    51360,  51360, 'stock_in',  2, 1,
    DATE_SUB(CURDATE(), INTERVAL 4 DAY), '浓香型白酒入库应付款',          NOW(), NOW()),
(6, 1, 4, 'payable',   108480, 108480, 'stock_in',  3, 1,
    DATE_SUB(CURDATE(), INTERVAL 3 DAY), '进口烈酒专库入库应付款',        NOW(), NOW()),
(7, 1, 1, 'payment',   100000,      0, 'stock_in',  1, 1,
    DATE_SUB(CURDATE(), INTERVAL 3 DAY), '预付茅台货款10万，银行转账',    NOW(), NOW());
