记得上下班打卡 | git大法好,push需谨慎

Commit f18d0b9d authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/dev_member_voucher_refund' into dev_member_voucher_refund

parents 0d017a78 276ee79e
......@@ -35,7 +35,7 @@ create table candy_mgt_coupon
coupon_id varchar(64) not null comment '~candy_coupon.coupon_id',
state tinyint comment '发放状态[0-未发放|1-已发放|2-无效|9-发放中]',
bind_type smallint comment '领取方式[0-用户输入兑换|1-发放至用户]',
# bind_type smallint comment '领取方式[0-用户输入兑换|1-发放至用户]',
event_amt int comment '发放量',
event_type tinyint comment '发放类型[10-全体用户|1-会员|2-手机号]',
event_limit text comment '`发放类型`为2-手机号时发放手机号以,分隔',
......@@ -56,7 +56,7 @@ create table candy_coupon
(
mid bigint unsigned auto_increment primary key,
coupon_id varchar(64) not null,
state tinyint default 0 comment '券状态[0-INIT|1-NORMAL|2-INVALID]',
state tinyint comment '券状态[0-INIT|1-NORMAL|2-INVALID]',
title varchar(50) not null comment '券标题',
label varchar(50) comment '标注',
......@@ -65,6 +65,7 @@ create table candy_coupon
busi_type smallint comment '业务类别[0-全场|1-演出|2-商品|3-优先购|4-会员]',
cou_type smallint comment '券类型[1-代金券|2-满减券|3-兑换券|4-折扣券]',
bind_type smallint comment '领取方式[0-用户输入兑换|1-发放至用户]',
discount decimal(8, 2) comment '折扣[8折即0.8]',
val_face decimal(8, 2) comment '面值',
val_over decimal(8, 2) comment '满减~满',
......@@ -80,6 +81,10 @@ create table candy_coupon
effect_at datetime(3) comment '生效时间',
expire_at datetime(3) comment '过期时间',
operator varchar(64) not null comment '操作人',
created_at datetime(3) not null,
updated_at datetime(3),
comment varchar(255)
) engine = InnoDB comment '券基础信息';
create unique index uidx_candy_coupon_id on candy_coupon (coupon_id);
......@@ -106,12 +111,11 @@ drop table if exists candy_coupon_code;
create table candy_coupon_code
(
mid bigint unsigned auto_increment primary key,
ccode_id varchar(64) not null comment '兑换码',
ccode varchar(64) not null comment '券码',
coupon_id varchar(64) not null comment '~candy_coupon.coupon_id',
state tinyint comment '状态[0-未使用|1-已使用|2-失效|3-退回]',
target_uid varchar(64) comment '目标用户UID',
redeem_uid varchar(64) comment '兑换用户UID',
used_uid varchar(64) comment '兑换用户UID',
created_at datetime(3) not null,
updated_at datetime(3),
......@@ -119,7 +123,7 @@ create table candy_coupon_code
comment varchar(255)
) engine = InnoDB comment '券码信息';
create unique index uidx_candy_coupon_code_id on candy_coupon_code (ccode_id);
create unique index uidx_candy_coupon_code_id on candy_coupon_code (ccode);
# 用户券信息
......@@ -131,14 +135,14 @@ create table candy_user_coupon
mcoupon_id varchar(64) not null comment '~candy_mgt_coupon.mcoupon_id',
uid varchar(64) not null comment '~adam_user.uid',
coupon_id varchar(64) not null comment '~candy_coupon.coupon_id',
state tinyint default 0 comment '券状态[0-待兑换|1-可用|2-无效|3-已使用]',
state tinyint comment '用户券状态[1-可用|2-无效|3-已过期|5-已使用]',
bind_at datetime(3) comment '入账时间',
redeem_code varchar(64) comment '兑换码',
redeem_at datetime(3) comment '兑换时间',
ccode varchar(64) comment '券码~candy_coupon_code.ccode',
bind_at datetime(3) comment '激活时间',
used_at datetime(3) comment '使用时间',
used_for varchar(255) comment '用于记录购买的内容',
comment varchar(255)
) engine = InnoDB comment '用户券信息';
create unique index uidx_candy_user_coupon_id on candy_user_coupon (ucoupon_id);
create index idx_candy_ucoupon_uid_state on candy_user_coupon (uid, state);
-- >>------------------------------------------------------------------------------------
\ No newline at end of file
......@@ -5,7 +5,6 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;
@Data
......@@ -45,7 +44,7 @@ public class CandyUserCouponBasicDto implements Serializable {
private String uid;
//private String couponId;
private Integer state;
private String redeemCode;
private String ccode;
private LocalDateTime bindAt;
private LocalDateTime usedAt;
private String usedFor;
......
......@@ -25,9 +25,9 @@ public class CandyCouponCode implements Serializable {
private Long mid;
/**
* 兑换
*
*/
private String ccodeId;
private String ccode;
/**
* ~candy_coupon.coupon_id
......@@ -39,15 +39,10 @@ public class CandyCouponCode implements Serializable {
*/
private Integer state;
/**
* 目标用户UID
*/
private String targetUid;
/**
* 兑换用户UID
*/
private String redeemUid;
private String usedUid;
private LocalDateTime createdAt;
......
......@@ -34,7 +34,7 @@
<result column="uid" jdbcType="VARCHAR" property="uid"/>
<!-- <result column="coupon_id" jdbcType="VARCHAR" property="couponId" />-->
<result column="state" jdbcType="TINYINT" property="state"/>
<result column="redeem_code" jdbcType="VARCHAR" property="redeemCode"/>
<result column="ccode" jdbcType="VARCHAR" property="ccode"/>
<result column="bind_at" jdbcType="TIMESTAMP" property="bindAt"/>
<result column="used_at" jdbcType="TIMESTAMP" property="usedAt"/>
<result column="used_for" jdbcType="VARCHAR" property="usedFor"/>
......@@ -49,7 +49,7 @@
cc.discount, cc.val_face, cc.val_over, cc.val_minus, cc.`overlay`, cc.overlay_level,
cc.validity,cc.redeem_validity, cc.redeem_start, cc.redeem_stop, cc.effect_at, cc.expire_at,
cuc.ucoupon_id, cuc.`uid`, cuc.`state`, cuc.bind_at, cuc.redeem_code, cuc.redeem_at, cuc.used_at, cuc.used_for
cuc.ucoupon_id, cuc.`uid`, cuc.`state`, cuc.bind_at, cuc.ccode, cuc.redeem_at, cuc.used_at, cuc.used_for
</sql>
<select id="selectMultiForUserCouponBasicDto" resultMap="Rst_UserCouponBasicDto">
......
......@@ -86,12 +86,11 @@ drop table if exists candy_coupon_code;
create table candy_coupon_code
(
mid bigint unsigned auto_increment primary key,
ccode_id varchar(64) not null comment '兑换码',
ccode varchar(64) not null comment '券码',
coupon_id varchar(64) not null comment '~candy_coupon.coupon_id',
state tinyint comment '状态[0-未使用|1-已使用|2-失效|3-退回]',
target_uid varchar(64) comment '目标用户UID',
redeem_uid varchar(64) comment '兑换用户UID',
used_uid varchar(64) comment '兑换用户UID',
created_at datetime(3) not null,
updated_at datetime(3),
......@@ -99,7 +98,7 @@ create table candy_coupon_code
comment varchar(255)
) engine = InnoDB comment '券码信息';
create unique index uidx_candy_coupon_code_id on candy_coupon_code (ccode_id);
create unique index uidx_candy_coupon_code_id on candy_coupon_code (ccode);
# 用户券信息
......@@ -113,7 +112,7 @@ create table candy_user_coupon
coupon_id varchar(64) not null comment '~candy_coupon.coupon_id',
state tinyint comment '用户券状态[1-可用|2-无效|3-已过期|5-已使用]',
redeem_code varchar(64) comment '兑换码',
ccode varchar(64) comment '券码~candy_coupon_code.ccode',
bind_at datetime(3) comment '激活时间',
used_at datetime(3) comment '使用时间',
used_for varchar(255) comment '用于记录购买的内容',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment