From f5079b1c57de4b60fd4424118ea5aa21d3eeeffa Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 31 Jul 2023 18:36:21 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E7=A0=8D=E4=BB=B7?= =?UTF-8?q?=E6=B4=BB=E5=8A=A8=E7=9B=B8=E5=85=B3=20DO?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dataobject/bargain/BargainActivityDO.java | 102 ++++++++++++++++++ .../dataobject/bargain/BargainAssistDO.java | 50 +++++++++ .../dataobject/bargain/BargainRecordDO.java | 87 +++++++++++++++ 3 files changed, 239 insertions(+) create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainActivityDO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainAssistDO.java create mode 100644 yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainRecordDO.java diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainActivityDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainActivityDO.java new file mode 100644 index 000000000..380eb28c3 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainActivityDO.java @@ -0,0 +1,102 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.bargain; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +import java.time.LocalDateTime; + +/** + * 砍价活动 DO + * + * @author HUIHUI + */ +@TableName("promotion_bargain_activity") +@KeySequence("promotion_bargain_activity_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BargainActivityDO extends BaseDO { + + /** + * 砍价活动编号 + */ + @TableId + private Long id; + + /** + * 砍价活动名称 + */ + private String name; + + /** + * 活动开始时间 + */ + private LocalDateTime startTime; + + /** + * 活动结束时间 + */ + private LocalDateTime endTime; + + /** + * 活动状态 + */ + private Integer status; + + /** + * 商品 SPU 编号 + */ + private Long spuId; + + /** + * 商品 SKU 编号 + */ + private Long skuId; + + /** + * 应付金额,单位分 + */ + private Integer bargainFirstPrice; + + /** + * 砍价底价,单位:分 + */ + private Integer bargainPrice; + + /** + * 达到该人数,才能砍到低价 + */ + private Integer userSize; + + /** + * 最大帮砍次数 + */ + private Integer bargainCount; + + /** + * 砍价库存 + */ + private Integer stock; + + /** + * 用户每次砍价的最小金额,单位:分 + */ + private Integer randomMinPrice; + + /** + * 用户每次砍价的最大金额,单位:分 + */ + private Integer randomMaxPrice; + + /** + * 砍价成功数量 + */ + private Integer successCount; + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainAssistDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainAssistDO.java new file mode 100644 index 000000000..a9101defe --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainAssistDO.java @@ -0,0 +1,50 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.bargain; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +/** + * 砍价助力 DO + * + * @author HUIHUI + */ +@TableName("promotion_bargain_assist") +@KeySequence("promotion_bargain_assist_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BargainAssistDO extends BaseDO { + + /** + * 编号 + */ + @TableId + private Long id; + + /** + * 砍价活动编号 + */ + private Long activityId; + + /** + * 砍价记录编号 + */ + private Long recordId; + + /** + * 用户编号 + */ + private Long userId; + + /** + * 减少价格。单位分 + */ + private Integer reducePrice; + +} diff --git a/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainRecordDO.java b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainRecordDO.java new file mode 100644 index 000000000..d29f5c1f4 --- /dev/null +++ b/yudao-module-mall/yudao-module-promotion-biz/src/main/java/cn/iocoder/yudao/module/promotion/dal/dataobject/bargain/BargainRecordDO.java @@ -0,0 +1,87 @@ +package cn.iocoder.yudao.module.promotion.dal.dataobject.bargain; + +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; + +import java.time.LocalDateTime; + +/** + * 砍价记录 DO + * + * @author HUIHUI + */ +@TableName("promotion_bargain_record") +@KeySequence("promotion_bargain_record_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class BargainRecordDO extends BaseDO { + + /** + * 编号 + */ + @TableId + private Long id; + + /** + * 砍价活动编号 + */ + private Long activityId; + + /** + * 用户编号 + */ + private Long userId; + + /** + * 商品 SPU 编号 + */ + private Long spuId; + + /** + * 商品 SKU 编号 + */ + private Long skuId; + + /** + * 砍价底价,单位分 + */ + private Integer bargainPrice; + + /** + * 商品原价,单位分 + */ + private Integer price; + + /** + * 应付金额,单位分 + */ + private Integer payPrice; + + /** + * 状态1 - 砍价中;2- 砍价成功;3 - 砍价失败 + */ + private Integer status; + + /** + * 订单编号 + */ + private Long orderId; + + /** + * 结束时间 + */ + private LocalDateTime endTime; + + /** + * 过期时间 + */ + private Data expireTime; + +}