From ec6d43aa07ee0e8faf34498057ebcfbb446aa015 Mon Sep 17 00:00:00 2001 From: hjl <1657978663@qq.com> Date: 星期二, 16 七月 2024 09:21:51 +0800 Subject: [PATCH] feat: 代码重构 --- ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/RecoveryClassify.java | 10 +++++++++- 1 files changed, 9 insertions(+), 1 deletions(-) diff --git a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/RecoveryClassify.java b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/RecoveryClassify.java index 198b4ea..a91252b 100644 --- a/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/RecoveryClassify.java +++ b/ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/entity/RecoveryClassify.java @@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.ruoyi.common.core.constant.Constants; import com.ruoyi.common.core.domain.BaseEntity; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; @@ -24,7 +25,7 @@ @ApiModel(value = "RecoveryClassify对象", description = "回收分类表") public class RecoveryClassify extends BaseEntity { - @TableId(value = "id",type = IdType.AUTO) + @TableId(value = "id", type = IdType.AUTO) private Integer id; @ApiModelProperty("上级分类名称") @@ -59,4 +60,11 @@ @TableField("is_recommend") private Integer isRecommend; + @ApiModelProperty("服务类型(0:以旧换新,1:家电回收)") + @TableField(exist = false) + private Integer type; + + public Integer getType() { + return supClassify.equals(Constants.TRADE_IN) ? Constants.ZERO : Constants.ONE; + } } -- Gitblit v1.7.1