mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-07-25 16:35:06 +08:00
member: 分销配置
This commit is contained in:
@ -1,9 +1,17 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.point.vo.config;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.validation.InEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.brokerage.BrokerageBindModeEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.brokerage.BrokerageEnabledConditionEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.brokerage.BrokerageWithdrawTypeEnum;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Range;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import javax.validation.constraints.PositiveOrZero;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员积分配置 Base VO,提供给添加、修改、详细的子 VO 使用
|
||||
@ -28,4 +36,53 @@ public class MemberPointConfigBaseVO {
|
||||
@NotNull(message = "1 元赠送积分不能为空")
|
||||
private Integer tradeGivePoint;
|
||||
|
||||
// ========== 分销相关 ==========
|
||||
|
||||
@Schema(description = "是否启用分佣", requiredMode = Schema.RequiredMode.REQUIRED, example = "true")
|
||||
@NotNull(message = "是否启用分佣不能为空")
|
||||
private Boolean brokerageEnabled;
|
||||
|
||||
@Schema(description = "分佣模式", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@NotNull(message = "分佣模式不能为空")
|
||||
@InEnum(value = BrokerageEnabledConditionEnum.class, message = "分佣模式必须是 {value}")
|
||||
private Integer brokerageEnabledCondition;
|
||||
|
||||
@Schema(description = "分销关系绑定模式", requiredMode = Schema.RequiredMode.REQUIRED, example = "0")
|
||||
@NotNull(message = "分销关系绑定模式不能为空")
|
||||
@InEnum(value = BrokerageBindModeEnum.class, message = "分销关系绑定模式必须是 {value}")
|
||||
private Integer brokerageBindMode;
|
||||
|
||||
@Schema(description = "分销海报图地址数组", requiredMode = Schema.RequiredMode.REQUIRED, example = "[https://www.iocoder.cn/yudao.jpg]")
|
||||
private List<String> brokeragePostUrls;
|
||||
|
||||
@Schema(description = "一级返佣比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
|
||||
@NotNull(message = "一级返佣比例不能为空")
|
||||
@Range(min = 0, max = 100, message = "一级返佣比例必须在 0 - 100 之间")
|
||||
private Integer brokerageFirstPercent;
|
||||
|
||||
@Schema(description = "二级返佣比例", requiredMode = Schema.RequiredMode.REQUIRED, example = "5")
|
||||
@NotNull(message = "二级返佣比例不能为空")
|
||||
@Range(min = 0, max = 100, message = "二级返佣比例必须在 0 - 100 之间")
|
||||
private Integer brokerageSecondPercent;
|
||||
|
||||
@Schema(description = "用户提现最低金额", requiredMode = Schema.RequiredMode.REQUIRED, example = "1000")
|
||||
@NotNull(message = "用户提现最低金额不能为空")
|
||||
@PositiveOrZero(message = "用户提现最低金额不能是负数")
|
||||
private Integer brokerageWithdrawMinPrice;
|
||||
|
||||
@Schema(description = "提现银行", requiredMode = Schema.RequiredMode.REQUIRED, example = "[0, 1]")
|
||||
@NotEmpty(message = "提现银行不能为空")
|
||||
private List<Integer> brokerageBankNames;
|
||||
|
||||
@Schema(description = "佣金冻结时间(天)", requiredMode = Schema.RequiredMode.REQUIRED, example = "7")
|
||||
@NotNull(message = "佣金冻结时间(天)不能为空")
|
||||
@PositiveOrZero(message = "佣金冻结时间不能是负数")
|
||||
private Integer brokerageFrozenDays;
|
||||
|
||||
@Schema(description = "提现方式", requiredMode = Schema.RequiredMode.REQUIRED, example = "[0, 1]")
|
||||
@NotNull(message = "提现方式不能为空")
|
||||
@InEnum(value = BrokerageWithdrawTypeEnum.class, message = "提现方式必须是 {value}")
|
||||
private List<Integer> brokerageWithdrawType;
|
||||
|
||||
|
||||
}
|
||||
|
@ -1,19 +1,25 @@
|
||||
package cn.iocoder.yudao.module.member.dal.dataobject.point;
|
||||
|
||||
import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO;
|
||||
import cn.iocoder.yudao.framework.mybatis.core.type.IntegerListTypeHandler;
|
||||
import cn.iocoder.yudao.module.member.enums.brokerage.BrokerageBindModeEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.brokerage.BrokerageEnabledConditionEnum;
|
||||
import cn.iocoder.yudao.module.member.enums.brokerage.BrokerageWithdrawTypeEnum;
|
||||
import com.baomidou.mybatisplus.annotation.KeySequence;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler;
|
||||
import lombok.*;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 会员积分配置 DO
|
||||
*
|
||||
* @author QingX
|
||||
*/
|
||||
@TableName("member_point_config")
|
||||
@TableName(value = "member_point_config", autoResultMap = true)
|
||||
@KeySequence("member_point_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ -47,4 +53,56 @@ public class MemberPointConfigDO extends BaseDO {
|
||||
*/
|
||||
private Integer tradeGivePoint;
|
||||
|
||||
// ========== 分销相关 ==========
|
||||
|
||||
/**
|
||||
* 是否启用分佣
|
||||
*/
|
||||
private Boolean brokerageEnabled;
|
||||
/**
|
||||
* 分佣模式
|
||||
*
|
||||
* 枚举 {@link BrokerageEnabledConditionEnum 对应的类}
|
||||
*/
|
||||
private Integer brokerageEnabledCondition;
|
||||
/**
|
||||
* 分销关系绑定模式
|
||||
*
|
||||
* 枚举 {@link BrokerageBindModeEnum 对应的类}
|
||||
*/
|
||||
private Integer brokerageBindMode;
|
||||
/**
|
||||
* 分销海报图地址数组
|
||||
*/
|
||||
@TableField(typeHandler = JacksonTypeHandler.class)
|
||||
private List<String> brokeragePostUrls;
|
||||
/**
|
||||
* 一级返佣比例
|
||||
*/
|
||||
private Integer brokerageFirstPercent;
|
||||
/**
|
||||
* 二级返佣比例
|
||||
*/
|
||||
private Integer brokerageSecondPercent;
|
||||
/**
|
||||
* 用户提现最低金额
|
||||
*/
|
||||
private Integer brokerageWithdrawMinPrice;
|
||||
/**
|
||||
* 提现银行
|
||||
*/
|
||||
@TableField(typeHandler = IntegerListTypeHandler.class)
|
||||
private List<Integer> brokerageBankNames;
|
||||
/**
|
||||
* 佣金冻结时间(天)
|
||||
*/
|
||||
private Integer brokerageFrozenDays;
|
||||
/**
|
||||
* 提现方式
|
||||
*
|
||||
* 枚举 {@link BrokerageWithdrawTypeEnum 对应的类}
|
||||
*/
|
||||
@TableField(typeHandler = IntegerListTypeHandler.class)
|
||||
private List<Integer> brokerageWithdrawType;
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user