feat:钱包规则代码生成

This commit is contained in:
dzc committed 2025-03-26 11:26:59 +08:00
1 parent 656dd8f376
commit 31760af911
13 files changed
+476 -7

No files matched your search

@@ -0,0 +1,24 @@
package com.bsd.pjcloud.wallet.api.constant;
import cn.hutool.core.util.ObjectUtil;
import lombok.AllArgsConstructor;
import lombok.Getter;
import java.util.Arrays;
@Getter
@AllArgsConstructor
public enum WalletRulePriceTypeEnum {
STRIDE_LIMIT("10", "跨单位额外支付"),
EVERY_LIMIT("20", "每餐额度额外支付"),
;
private final String code;
private final String desc;
public static WalletRulePriceTypeEnum valueOfByCode(String code) {
if (ObjectUtil.isEmpty(code)) return null;
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(code, v.getCode())).findFirst().get();
}
}
@@ -0,0 +1,90 @@
package com.bsd.pjcloud.wallet.api.entity.rule;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.time.LocalDateTime;
/**
* 商户规格配置表
*
* @author pjcloud
* @date 2025-03-26 11:14:39
*/
@Data
@TenantTable
@TableName("wallet_rule_mch_config")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "商户规格配置表")
public class WalletRuleMchConfigEntity extends Model<WalletRuleMchConfigEntity> {
/**
* 主键
*/
@Schema(description="主键")
private Long id;
/**
* 源商户id
*/
@Schema(description="源商户id")
private Long sourceMchId;
/**
* 目标商户id
*/
@Schema(description="目标商户id")
private Long tragetMchId;
/**
* 规则配置id
*/
@Schema(description="规则配置id")
private Long rulePriceConfigId;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description="创建时间")
private LocalDateTime createTime;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="修改人")
private String updateBy;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description="修改时间")
private LocalDateTime updateTime;
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description="删除标记")
private String delFlag;
/**
* 租户ID
*/
@Schema(description="租户ID")
private Long tenantId;
}
@@ -0,0 +1,86 @@
package com.bsd.pjcloud.wallet.api.entity.rule;
import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import com.bsd.pjcloud.common.core.util.TenantTable;
import java.time.LocalDateTime;
@Data
@TenantTable
@TableName("wallet_rule_price_config")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "钱包规则")
public class WalletRulePriceConfigEntity extends Model<WalletRulePriceConfigEntity> {
/**
* 主键
*/
@Schema(description = "主键")
private Long id;
/**
* 规则类型
*/
@Schema(description = "规则类型")
private String rulePriceType;
/**
* 基础金额
*/
@Schema(description = "基础金额")
private Long basePrice;
/**
* 金额的倍数必须大于1
*/
@Schema(description = "金额的倍数必须大于1")
private Long multiple;
/**
* 创建人
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建人")
private String createBy;
/**
* 创建时间
*/
@TableField(fill = FieldFill.INSERT)
@Schema(description = "创建时间")
private LocalDateTime createTime;
/**
* 修改人
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改人")
private String updateBy;
/**
* 修改时间
*/
@TableField(fill = FieldFill.INSERT_UPDATE)
@Schema(description = "修改时间")
private LocalDateTime updateTime;
/**
* 删除标记
*/
@TableLogic
@TableField(fill = FieldFill.INSERT)
@Schema(description = "删除标记")
private String delFlag;
/**
* 租户ID
*/
@Schema(description = "租户ID")
private Long tenantId;
}