feat:钱包规则代码生成
This commit is contained in:
1 parent
bb80b19925
commit
00e53e3f4d
17 files changed
+323
-16
No files matched your search
+3
-3
@@ -1,4 +1,4 @@
|
||||
package com.bsd.pjcloud.wallet.api.constant;
|
||||
package com.bsd.pjcloud.wallet.api.constant.mch;
|
||||
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import lombok.AllArgsConstructor;
|
||||
@@ -11,7 +11,7 @@ import java.util.Arrays;
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public enum WalletRulePriceTypeEnum {
|
||||
public enum WalletMchRulePriceTypeEnum {
|
||||
STRIDE_LIMIT("10", "跨单位额外支付"),
|
||||
EVERY_LIMIT("20", "每餐额外支付"),
|
||||
;
|
||||
@@ -19,7 +19,7 @@ public enum WalletRulePriceTypeEnum {
|
||||
private final String code;
|
||||
private final String desc;
|
||||
|
||||
public static WalletRulePriceTypeEnum valueOfByCode(String code) {
|
||||
public static WalletMchRulePriceTypeEnum valueOfByCode(String code) {
|
||||
if (ObjectUtil.isEmpty(code)) return null;
|
||||
return Arrays.stream(values()).filter(v -> ObjectUtil.equals(code, v.getCode())).findFirst().get();
|
||||
}
|
||||
+14
@@ -0,0 +1,14 @@
|
||||
package com.bsd.pjcloud.wallet.api.dto.rule;
|
||||
|
||||
import com.bsd.pjcloud.wallet.api.entity.rule.WalletRuleJoinEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WalletRuleJoinDto extends WalletRuleJoinEntity {
|
||||
}
|
||||
+1
@@ -25,6 +25,7 @@ public class MchRulePriceConfigEntity extends Model<MchRulePriceConfigEntity> {
|
||||
|
||||
/**
|
||||
* 规则类型
|
||||
* @see
|
||||
*/
|
||||
@Schema(description = "规则类型")
|
||||
private String rulePriceType;
|
||||
|
||||
+94
@@ -0,0 +1,94 @@
|
||||
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_join")
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@Schema(description = "钱包规则配置")
|
||||
public class WalletRuleJoinEntity extends Model<WalletRuleJoinEntity> {
|
||||
|
||||
|
||||
/**
|
||||
* 主键
|
||||
*/
|
||||
@TableId(type = IdType.ASSIGN_ID)
|
||||
@Schema(description="主键")
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 源钱包类型id
|
||||
*/
|
||||
@Schema(description="源钱包类型id")
|
||||
private Long sourceWalletTypeId;
|
||||
|
||||
/**
|
||||
* 目标钱包类型id
|
||||
*/
|
||||
@Schema(description="目标钱包类型id")
|
||||
private Long targetWalletTypeId;
|
||||
|
||||
/**
|
||||
* 钱包转换百分比
|
||||
*/
|
||||
@Schema(description="钱包转换百分比")
|
||||
private Integer balanceMultiple;
|
||||
|
||||
/**
|
||||
* 是否启用
|
||||
*/
|
||||
@Schema(description="是否启用")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
@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;
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.bsd.pjcloud.wallet.api.vo.rule;
|
||||
|
||||
import com.bsd.pjcloud.wallet.api.entity.rule.WalletRuleJoinEntity;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class WalletRuleJoinVo extends WalletRuleJoinEntity {
|
||||
}
|
||||
Reference in new issue
Block a user