佣金账户和用户积分修正

This commit is contained in:
2026-02-12 15:42:43 +08:00
parent 28f13a5db3
commit 64ad185fc4
2 changed files with 51 additions and 69 deletions

View File

@@ -38,10 +38,9 @@ create table benefit_point_log
amount decimal(14, 2) default 0,
last_amount decimal(14, 2) default 0, -- 上一笔金额
fee decimal(14, 2) default 0,
source_type int4, -- 来源类型 0-福利包产出 1-福利包兑换 2-用户直推 3-otc交易
source_id int8,
user_pack_id int8,
source_detail text,
order_id int8,
type int4 default 1,
is_complete int4 default 0, -- 0-未完成 1-已完成
statistical_date timestamp(6),
@@ -63,10 +62,9 @@ comment on column benefit_point_log.user_id is '用户id';
comment on column benefit_point_log.amount is '金额';
comment on column benefit_point_log.last_amount is '上一笔金额';
comment on column benefit_point_log.fee is '手续费';
comment on column benefit_point_log.source_type is '来源类型 0-福利包产出 1-福利包兑换 2-用户直推 3-otc交易';
comment on column benefit_point_log.source_id is '来源id';
comment on column benefit_point_log.user_pack_id is '用户积分包id';
comment on column benefit_point_log.source_detail is '来源详情';
comment on column benefit_point_log.order_id is '订单id';
comment on column benefit_point_log.type is '消费类型 1-收入 2-支出';
comment on column benefit_point_log.is_complete is '是否完成 0-未完成 1-已完成';
comment on column benefit_point_log.statistical_date is '统计时间';
@@ -121,9 +119,9 @@ create table cash_coupon_log
user_id int8,
amount decimal(14, 2) default 0,
last_amount decimal(14, 2) default 0, -- 上一笔金额
source_type int4, -- 来源类型 0-商城抽奖 1-福利包兑换
source_id int8,
source_detail text,
order_id int8,
type int4 default 1,
is_complete int4 default 0, -- 0-未完成 1-已完成
statistical_date timestamp(6),
@@ -145,9 +143,9 @@ comment on column cash_coupon_log.id is '主键';
comment on column cash_coupon_log.user_id is '用户id';
comment on column cash_coupon_log.amount is '金额';
comment on column cash_coupon_log.last_amount is '上一笔金额';
comment on column cash_coupon_log.source_type is '来源类型 0-商城抽奖 1-福利包兑换';
comment on column cash_coupon_log.source_id is '来源id';
comment on column cash_coupon_log.source_detail is '来源详情';
comment on column cash_coupon_log.order_id is '订单id';
comment on column cash_coupon_log.type is '消费类型 1-收入 2-支出';
comment on column cash_coupon_log.statistical_date is '统计时间';
comment on column cash_coupon_log.is_complete is '是否完成 0-未完成 1-已完成';
@@ -201,11 +199,10 @@ create table user_point_log
id int8 not null primary key,
user_id int8,
amount decimal(14, 2) default 0,
last_amount decimal(14, 2) default 0, -- 上一笔金额
source_module int4, -- 来源模块 0-商城订单
last_amount decimal(14, 2) default 0, -- 上一笔金额
source_type int4, -- 来源类型 0-商城订单 1-商城抽奖
source_id int8,
source_detail text,
order_id int8,
type int4 default 1,
is_complete int4 default 0, -- 0-未完成 1-已完成
statistical_date timestamp(6),
@@ -227,10 +224,9 @@ comment on column user_point_log.id is '主键';
comment on column user_point_log.user_id is '用户id';
comment on column user_point_log.amount is '金额';
comment on column user_point_log.last_amount is '上一笔金额';
comment on column user_point_log.source_module is '来源模块 0-商城订单';
comment on column user_point_log.source_type is '0-商城订单 1-商城抽奖';
comment on column user_point_log.source_id is '来源id';
comment on column user_point_log.source_detail is '来源详情';
comment on column user_point_log.order_id is '订单id';
comment on column user_point_log.type is '消费类型 1-收入 2-支出';
comment on column user_point_log.statistical_date is '统计时间';
comment on column user_point_log.is_complete is '是否完成 0-未完成 1-已完成';