CouponDO 理解
来源:4-17 结合业务场景分析分布式锁的特性和作用

律吕
2023-01-06
CouponDO 的定义如下:
public class CouponDO extends BaseBean {
private Long id;
private String title;
private BigDecimal withAmount;
private BigDecimal usedAmount;
private Long quota;
private Long takeCount;
private Long usedCount;
...
}
请问 withAmount,usedAmount 分别代表什么,takeCount 和 userCount 呢?感觉取名不太直观
写回答
1回答
-
大能老师
2023-01-06
同学你好,工程代码里面有详细的表结构说明,同学可以进行查看coding-539/distributedSystem: java分布式专题实战利器 - 慕课网Git (imooc.com)
优惠券表结构说明:
create table `t_coupon` ( `id` bigint unsigned auto_increment comment '主键', `title` varchar(64) not null comment '优惠券标题', `with_amount` decimal(10, 2) not null default 0 comment '满减金额', `used_amount` decimal(10, 2) not null default 0 comment '优惠金额', `quota` bigint unsigned not null default 0 comment '发券数量', `take_count` bigint unsigned not null default 0 comment '已领取数量', `used_count` bigint unsigned not null default 0 comment '已使用数量', `status` tinyint unsigned not null default 1 comment '状态 1-生效 2-失效', `create_time` datetime default current_timestamp comment '创建时间', `update_time` datetime default current_timestamp on update current_timestamp comment '更新时间', primary key pk_id (`id`) ) engine=innodb default charset=utf8mb4
00
相似问题