修改计费逻辑
This commit is contained in:
@@ -1427,7 +1427,7 @@ CREATE TABLE `prc_price_set_product` (
|
||||
-- ----------------------------
|
||||
CREATE TABLE `prc_quote` (
|
||||
`quote_id` varchar(36) COLLATE utf8mb4_unicode_ci NOT NULL,
|
||||
`quote_key` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '试算指纹 MD5(客户|产品|国家|重量|计费日期)',
|
||||
`quote_key` char(32) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '试算指纹 MD5(客户|产品|国家|重量|计费时间)',
|
||||
`customer_id` bigint(20) NOT NULL COMMENT '客户ID',
|
||||
`customer_code` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT 'customer code',
|
||||
`product_code` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '产品代码',
|
||||
@@ -1437,7 +1437,7 @@ CREATE TABLE `prc_quote` (
|
||||
`dest_postcode` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT 'dest postcode',
|
||||
`quote_postcode_key` varchar(20) COLLATE utf8mb4_unicode_ci GENERATED ALWAYS AS (ifnull(`dest_postcode`,'')) STORED COMMENT 'dest_postcode for unique key',
|
||||
`weight` decimal(10,3) NOT NULL COMMENT '计费重量KG',
|
||||
`biz_date` date NOT NULL COMMENT '计费日期',
|
||||
`biz_date` datetime NOT NULL COMMENT '计费时间',
|
||||
`tms_id` bigint(20) DEFAULT NULL COMMENT '多租户系统ID',
|
||||
`match_source` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '命中来源 PACKAGE_FIXED/套餐固定价 PACKAGE_DISCOUNT/套餐折扣 PRODUCT_DEFAULT/产品默认价',
|
||||
`match_message` varchar(200) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '命中说明',
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
-- prc_quote.biz_date: date -> datetime (same-day different bill times)
|
||||
ALTER TABLE prc_quote
|
||||
MODIFY COLUMN `biz_date` datetime NOT NULL COMMENT '计费时间',
|
||||
MODIFY COLUMN `quote_key` char(32) NOT NULL COMMENT 'MD5(customer|product|country|weight|biz_datetime)';
|
||||
Reference in New Issue
Block a user