123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- CREATE TABLE `distri_daily_bill` (
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '账单编号',
- `price` bigint NOT NULL DEFAULT '0' COMMENT '金额,单位:分',
- `received_price` bigint NOT NULL DEFAULT '0' COMMENT '确收金额,单位:分',
- `order_count` bigint NOT NULL DEFAULT '0' COMMENT '订单数,默认为0',
- `shop_id` bigint DEFAULT NULL COMMENT '店铺ID',
- `merchant_id` bigint DEFAULT NULL COMMENT '商户ID',
- `order_ids` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '订单ID列表',
- `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '创建者',
- `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '更新者',
- `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT='每日账单表'; --添加每日账单表
- CREATE TABLE `distri_daily_award_records` (
- `id` bigint NOT NULL AUTO_INCREMENT COMMENT '奖励记录ID',
- `user_id` bigint unsigned NOT NULL COMMENT '用户编号',
- `amount` bigint NOT NULL COMMENT '合赢奖金额,必填',
- `settled` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已结算,默认为未结算',
- `log_id` bigint NOT NULL COMMENT '日志Id',
- `creator` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '创建者',
- `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
- `updater` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin DEFAULT '' COMMENT '更新者',
- `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
- `deleted` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除',
- PRIMARY KEY (`id`) USING BTREE
- ) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='每日用户获得合赢奖记录';
- ALTER TABLE trade_order_item
- ADD COLUMN transition_time datetime DEFAULT NULL COMMENT '订单项金额转换冻结的时间(合赢奖)';
- ALTER TABLE distri_integral
- ADD freeze_high_quota BIGINT NOT NULL DEFAULT '0' COMMENT '冻结的最高可获取积分';
- ALTER TABLE distri_pt_profit_log
- ADD COLUMN freeze_high_quota BIGINT DEFAULT NULL COMMENT '变动的冻结最大可用额度',
- ADD COLUMN after_freeze_high_quota BIGINT DEFAULT NULL COMMENT '变动后的冻结最大可用额度';
- ALTER TABLE trade_order_item
- ADD COLUMN freeze_high_quota BIGINT DEFAULT NULL COMMENT '用户获得冻结最大可用额度';
- ALTER TABLE trade_order_item
- ADD COLUMN high_precision_price DECIMAL(11,6) DEFAULT 0 COMMENT '高精度价格';
- ALTER TABLE distri_integral
- ADD COLUMN `high_quota_total` bigint(11) DEFAULT '0' COMMENT '累计获取的峰值';
|