mirror of
https://gitee.com/coder-xiaomo/flashsale
synced 2025-01-10 19:58:14 +08:00
抢购1
This commit is contained in:
parent
4ecd497e00
commit
c52644be19
@ -11,7 +11,7 @@
|
||||
Target Server Version : 50726
|
||||
File Encoding : 65001
|
||||
|
||||
Date: 04/03/2022 17:15:21
|
||||
Date: 05/03/2022 12:39:01
|
||||
*/
|
||||
|
||||
SET NAMES utf8mb4;
|
||||
@ -38,7 +38,7 @@ INSERT INTO `item_info` VALUES (1, 'item-h7p0wt-22680', 22.00, '0sddhs4aeowc2663
|
||||
INSERT INTO `item_info` VALUES (2, '电视机', 1800.00, '一台电视机', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
INSERT INTO `item_info` VALUES (3, '电冰箱', 2800.00, '一台电冰箱', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
INSERT INTO `item_info` VALUES (4, '空调', 3600.00, '一台空调', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
INSERT INTO `item_info` VALUES (5, 'item-2xmm6g-5492', 235.00, 'lsudsf67ghobos3q1olbwx27', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
INSERT INTO `item_info` VALUES (5, '小米手机', 2235.00, 'lsudsf67ghobos3q1olbwx27', 0, 'https://ss0.baidu.com/7Po3dSag_xI4khGko9WTAnF6hhy/image/h%3D300/sign=edc83f8851f431ada3d245397b37ac0f/d058ccbf6c81800a46a75314ec3533fa828b476e.jpg');
|
||||
INSERT INTO `item_info` VALUES (6, 'item-wlx9gu-1220', 270.00, '3q234qqp3wwo53mtdv0qjuvg', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
INSERT INTO `item_info` VALUES (7, 'item-cqru11-3487', 259.00, '04q6lopvj3ubb4458k4wldok', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
INSERT INTO `item_info` VALUES (8, 'item-7f7qa1-5168', 314.00, 'jqkgc5ks2r9e2k8za3zs9rlc', 0, 'https://ns-strategy.cdn.bcebos.com/ns-strategy/upload/fc_big_pic/part-00015-3050.jpg');
|
||||
@ -94,12 +94,32 @@ CREATE TABLE `order_info` (
|
||||
`amount` int(255) NOT NULL,
|
||||
`order_price` decimal(10, 2) NOT NULL,
|
||||
PRIMARY KEY (`id`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of order_info
|
||||
-- ----------------------------
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for promo_info
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `promo_info`;
|
||||
CREATE TABLE `promo_info` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`promo_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
|
||||
`start_date` datetime NOT NULL DEFAULT '0000-01-01 00:00:00',
|
||||
`item_id` int(11) NOT NULL DEFAULT 0,
|
||||
`prome_item_price` decimal(10, 2) NOT NULL DEFAULT 0.00,
|
||||
PRIMARY KEY (`id`) USING BTREE,
|
||||
INDEX `item_id`(`item_id`) USING BTREE,
|
||||
CONSTRAINT `promo_info_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `item_info` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT
|
||||
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of promo_info
|
||||
-- ----------------------------
|
||||
INSERT INTO `promo_info` VALUES (1, '小米手机抢购活动', '2022-03-05 14:00:00', 1, 1999.00);
|
||||
|
||||
-- ----------------------------
|
||||
-- Table structure for sequence_info
|
||||
-- ----------------------------
|
||||
@ -109,7 +129,7 @@ CREATE TABLE `sequence_info` (
|
||||
`current_value` int(11) NOT NULL DEFAULT 0,
|
||||
`step` int(11) NOT NULL DEFAULT 0,
|
||||
PRIMARY KEY (`name`) USING BTREE
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = Dynamic;
|
||||
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_unicode_ci ROW_FORMAT = DYNAMIC;
|
||||
|
||||
-- ----------------------------
|
||||
-- Records of sequence_info
|
||||
|
8
pom.xml
8
pom.xml
@ -72,6 +72,14 @@
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>5.4.3.Final</version>
|
||||
</dependency>
|
||||
|
||||
<!--日期时间-->
|
||||
<dependency>
|
||||
<groupId>joda-time</groupId>
|
||||
<artifactId>joda-time</artifactId>
|
||||
<version>2.9.1</version>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
@ -0,0 +1,63 @@
|
||||
package com.cxyxiaomo.flashsale.service.model;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class PromoModel {
|
||||
|
||||
private Integer id;
|
||||
|
||||
// 秒杀活动名称
|
||||
private String promoName;
|
||||
|
||||
// 活动开始时间
|
||||
private DateTime startDate;
|
||||
|
||||
// 秒杀活动适用商品
|
||||
private Integer itemId;
|
||||
|
||||
// 秒杀活动的价格
|
||||
private BigDecimal promoPrice;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getPromoName() {
|
||||
return promoName;
|
||||
}
|
||||
|
||||
public void setPromoName(String promoName) {
|
||||
this.promoName = promoName;
|
||||
}
|
||||
|
||||
public DateTime getStartDate() {
|
||||
return startDate;
|
||||
}
|
||||
|
||||
public void setStartDate(DateTime startDate) {
|
||||
this.startDate = startDate;
|
||||
}
|
||||
|
||||
public Integer getItemId() {
|
||||
return itemId;
|
||||
}
|
||||
|
||||
public void setItemId(Integer itemId) {
|
||||
this.itemId = itemId;
|
||||
}
|
||||
|
||||
public BigDecimal getPromoPrice() {
|
||||
return promoPrice;
|
||||
}
|
||||
|
||||
public void setPromoPrice(BigDecimal promoPrice) {
|
||||
this.promoPrice = promoPrice;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user