提交新功能 分销商 积分 会员体系

This commit is contained in:
xwxuan
2024-02-08 20:44:58 +08:00
parent 0e255d6c3a
commit 6f5e6e4662
928 changed files with 39318 additions and 1408 deletions

View File

@ -31,4 +31,11 @@ public interface DictTypeConstants {
String DEFAULT_HEAD = "default_head"; // 用户默认头像
String CLOSE_AFTER_SALE_DAYS = "close_after_sale_days"; //关闭售后天数
String INTEGRAL_CONFIG = "integral_config"; //积分配置
String INTEGRAL_DEDUCTION_RULE = "integral_deduction_rule"; //积分抵扣规则
String INTEGRAL_ENABLE = "integral_enable"; //积分抵扣是否开启
String INTEGRAL_NAME = "integral_name"; //积分名称
}

View File

@ -0,0 +1,33 @@
package co.yixiang.yshop.module.system.enums;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Objects;
import java.util.stream.Stream;
/**
* 分销商字典枚举
*/
@Getter
@AllArgsConstructor
public enum DistributorDictEnum {
DISTRIBUTOR_USER_EXPIRE("distributor_user_expire","客户保护天数"),
DISTRIBUTOR_APPLY("distributor_apply","自动审核开关"),
DISTRIBUTOR_PURCHASE("distributor_purchase","自购返佣开关"),
DISTRIBUTOR_AGREEMENT("distributor_agreement","分销商协议"),
;
private String dictType;
private String label;
public static DistributorDictEnum toDictType(Integer dictType) {
return Stream.of(DistributorDictEnum.values())
.filter(p -> Objects.equals(p.dictType, dictType))
.findAny()
.orElse(null);
}
}