Commit da8b2eab6da53da5a8eaa05af53561aad159f210
1 parent
4dd2d808
合并冲突
Showing
2 changed files
with
30 additions
and
30 deletions
sql/mysql/member_level.sql
| ... | ... | @@ -5,40 +5,40 @@ alter table member_user add column level_id bigint comment '等级编号'; |
| 5 | 5 | -- 增加3张表 |
| 6 | 6 | create table member_level |
| 7 | 7 | ( |
| 8 | - id bigint auto_increment comment '编号' primary key, | |
| 9 | - name varchar(30) default '' not null comment '等级名称', | |
| 10 | - experience int default 0 not null comment '升级经验', | |
| 11 | - level int default 0 not null comment '等级', | |
| 12 | - discount tinyint default 100 not null comment '享受折扣', | |
| 13 | - icon varchar(255) default '' not null comment '等级图标', | |
| 14 | - background_url varchar(255) default '' not null comment '等级背景图', | |
| 15 | - status tinyint default 0 not null comment '状态', | |
| 16 | - creator varchar(64) default '' null comment '创建者', | |
| 17 | - create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', | |
| 18 | - updater varchar(64) default '' null comment '更新者', | |
| 19 | - update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间', | |
| 20 | - deleted bit default b'0' not null comment '是否删除', | |
| 21 | - tenant_id bigint default 0 not null comment '租户编号' | |
| 8 | + id bigint auto_increment comment '编号' primary key, | |
| 9 | + name varchar(30) default '' not null comment '等级名称', | |
| 10 | + experience int default 0 not null comment '升级经验', | |
| 11 | + level int default 0 not null comment '等级', | |
| 12 | + discount_percent tinyint default 100 not null comment '享受折扣', | |
| 13 | + icon varchar(255) default '' not null comment '等级图标', | |
| 14 | + background_url varchar(255) default '' not null comment '等级背景图', | |
| 15 | + status tinyint default 0 not null comment '状态', | |
| 16 | + creator varchar(64) default '' null comment '创建者', | |
| 17 | + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', | |
| 18 | + updater varchar(64) default '' null comment '更新者', | |
| 19 | + update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间', | |
| 20 | + deleted bit default b'0' not null comment '是否删除', | |
| 21 | + tenant_id bigint default 0 not null comment '租户编号' | |
| 22 | 22 | ) |
| 23 | 23 | comment '会员等级'; |
| 24 | 24 | |
| 25 | 25 | create table member_level_record |
| 26 | 26 | ( |
| 27 | - id bigint auto_increment comment '编号' primary key, | |
| 28 | - user_id bigint default 0 not null comment '用户编号', | |
| 29 | - level_id bigint default 0 not null comment '等级编号', | |
| 30 | - level int default 0 not null comment '会员等级', | |
| 31 | - discount tinyint default 100 not null comment '享受折扣', | |
| 32 | - experience int default 0 not null comment '升级经验', | |
| 33 | - user_experience int default 0 not null comment '会员此时的经验', | |
| 34 | - remark varchar(255) default '' not null comment '备注', | |
| 35 | - description varchar(255) default '' not null comment '描述', | |
| 36 | - creator varchar(64) default '' null comment '创建者', | |
| 37 | - create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', | |
| 38 | - updater varchar(64) default '' null comment '更新者', | |
| 39 | - update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间', | |
| 40 | - deleted bit default b'0' not null comment '是否删除', | |
| 41 | - tenant_id bigint default 0 not null comment '租户编号' | |
| 27 | + id bigint auto_increment comment '编号' primary key, | |
| 28 | + user_id bigint default 0 not null comment '用户编号', | |
| 29 | + level_id bigint default 0 not null comment '等级编号', | |
| 30 | + level int default 0 not null comment '会员等级', | |
| 31 | + discount_percent tinyint default 100 not null comment '享受折扣', | |
| 32 | + experience int default 0 not null comment '升级经验', | |
| 33 | + user_experience int default 0 not null comment '会员此时的经验', | |
| 34 | + remark varchar(255) default '' not null comment '备注', | |
| 35 | + description varchar(255) default '' not null comment '描述', | |
| 36 | + creator varchar(64) default '' null comment '创建者', | |
| 37 | + create_time datetime default CURRENT_TIMESTAMP not null comment '创建时间', | |
| 38 | + updater varchar(64) default '' null comment '更新者', | |
| 39 | + update_time datetime default CURRENT_TIMESTAMP not null on update CURRENT_TIMESTAMP comment '更新时间', | |
| 40 | + deleted bit default b'0' not null comment '是否删除', | |
| 41 | + tenant_id bigint default 0 not null comment '租户编号' | |
| 42 | 42 | ) |
| 43 | 43 | comment '会员等级记录'; |
| 44 | 44 | ... | ... |
yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/convert/level/MemberLevelRecordConvert.java
| ... | ... | @@ -29,7 +29,7 @@ public interface MemberLevelRecordConvert { |
| 29 | 29 | if (from != null) { |
| 30 | 30 | to.setLevelId(from.getId()); |
| 31 | 31 | to.setLevel(from.getLevel()); |
| 32 | - to.setDiscount(from.getDiscount()); | |
| 32 | + to.setDiscountPercent(from.getDiscountPercent()); | |
| 33 | 33 | to.setExperience(from.getExperience()); |
| 34 | 34 | } |
| 35 | 35 | return to; | ... | ... |