Commit 967e578d547534d3e59eb65f940f60b464a83866

Authored by owen
1 parent 9856e179

分销:重命名提现类型字段

sql/mysql/brokerage.sql
1 -- 增加配置表 1 -- 增加配置表
2 -create table trade_config 2 +CREATE TABLE trade_config
3 ( 3 (
4 - id bigint auto_increment comment '自增主键' primary key,  
5 - brokerage_enabled bit default 1 not null comment '是否启用分佣',  
6 - brokerage_enabled_condition tinyint default 1 not null comment '分佣模式:1-人人分销 2-指定分销',  
7 - brokerage_bind_mode tinyint default 1 not null comment '分销关系绑定模式: 1-没有推广人,2-新用户, 3-扫码覆盖',  
8 - brokerage_post_urls varchar(2000) default '' null comment '分销海报图地址数组',  
9 - brokerage_first_percent int default 0 not null comment '一级返佣比例',  
10 - brokerage_second_percent int default 0 not null comment '二级返佣比例',  
11 - brokerage_withdraw_min_price int default 0 not null comment '用户提现最低金额',  
12 - brokerage_withdraw_fee_percent int default 0 not null comment '提现手续费百分比',  
13 - brokerage_bank_names varchar(200) default '' not null comment '提现银行(字典类型=brokerage_bank_name)',  
14 - brokerage_frozen_days int default 7 not null comment '佣金冻结时间(天)',  
15 - brokerage_withdraw_type varchar(32) default '1,2,3,4' not null comment '提现方式:1-钱包;2-银行卡;3-微信;4-支付宝',  
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 -) comment '交易中心配置'; 4 + id BIGINT AUTO_INCREMENT COMMENT '自增主键' PRIMARY KEY,
  5 + brokerage_enabled BIT DEFAULT 1 NOT NULL COMMENT '是否启用分佣',
  6 + brokerage_enabled_condition TINYINT DEFAULT 1 NOT NULL COMMENT '分佣模式:1-人人分销 2-指定分销',
  7 + brokerage_bind_mode TINYINT DEFAULT 1 NOT NULL COMMENT '分销关系绑定模式: 1-没有推广人,2-新用户, 3-扫码覆盖',
  8 + brokerage_post_urls VARCHAR(2000) DEFAULT '' NULL COMMENT '分销海报图地址数组',
  9 + brokerage_first_percent INT DEFAULT 0 NOT NULL COMMENT '一级返佣比例',
  10 + brokerage_second_percent INT DEFAULT 0 NOT NULL COMMENT '二级返佣比例',
  11 + brokerage_withdraw_min_price INT DEFAULT 0 NOT NULL COMMENT '用户提现最低金额',
  12 + brokerage_withdraw_fee_percent INT DEFAULT 0 NOT NULL COMMENT '提现手续费百分比',
  13 + brokerage_bank_names VARCHAR(200) DEFAULT '' NOT NULL COMMENT '提现银行(字典类型=brokerage_bank_name)',
  14 + brokerage_frozen_days INT DEFAULT 7 NOT NULL COMMENT '佣金冻结时间(天)',
  15 + brokerage_withdraw_types VARCHAR(32) DEFAULT '1,2,3,4' NOT NULL COMMENT '提现方式:1-钱包;2-银行卡;3-微信;4-支付宝',
  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 +) COMMENT '交易中心配置';
23 23
24 # alter table trade_config 24 # alter table trade_config
25 # add brokerage_withdraw_fee_percent int default 0 not null comment '提现手续费百分比' after brokerage_withdraw_min_price; 25 # add brokerage_withdraw_fee_percent int default 0 not null comment '提现手续费百分比' after brokerage_withdraw_min_price;
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/admin/config/vo/TradeConfigBaseVO.java
@@ -82,6 +82,6 @@ public class TradeConfigBaseVO { @@ -82,6 +82,6 @@ public class TradeConfigBaseVO {
82 @Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[0, 1]") 82 @Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[0, 1]")
83 @NotNull(message = "提现方式不能为空") 83 @NotNull(message = "提现方式不能为空")
84 @InEnum(value = BrokerageWithdrawTypeEnum.class, message = "提现方式必须是 {value}") 84 @InEnum(value = BrokerageWithdrawTypeEnum.class, message = "提现方式必须是 {value}")
85 - private List<Integer> brokerageWithdrawType; 85 + private List<Integer> brokerageWithdrawTypes;
86 86
87 } 87 }
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/config/vo/AppTradeConfigRespVO.java
@@ -18,8 +18,7 @@ public class AppTradeConfigRespVO { @@ -18,8 +18,7 @@ public class AppTradeConfigRespVO {
18 @Schema(description = "佣金提现最小金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100") 18 @Schema(description = "佣金提现最小金额,单位:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "100")
19 private Integer brokerageWithdrawMinPrice; 19 private Integer brokerageWithdrawMinPrice;
20 20
21 - // TODO @疯狂:如果是 list,要不加个 s,复数;  
22 @Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]") 21 @Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[1, 2]")
23 - private List<Integer> brokerageWithdrawType; 22 + private List<Integer> brokerageWithdrawTypes;
24 23
25 } 24 }
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/dal/dataobject/config/TradeConfigDO.java
@@ -100,6 +100,6 @@ public class TradeConfigDO extends BaseDO { @@ -100,6 +100,6 @@ public class TradeConfigDO extends BaseDO {
100 * 枚举 {@link BrokerageWithdrawTypeEnum 对应的类} 100 * 枚举 {@link BrokerageWithdrawTypeEnum 对应的类}
101 */ 101 */
102 @TableField(typeHandler = IntegerListTypeHandler.class) 102 @TableField(typeHandler = IntegerListTypeHandler.class)
103 - private List<Integer> brokerageWithdrawType; 103 + private List<Integer> brokerageWithdrawTypes;
104 104
105 } 105 }