diff --git a/.gitignore b/.gitignore index 5ff6309..d51d64e 100644 --- a/.gitignore +++ b/.gitignore @@ -4,10 +4,8 @@ target/ !**/src/test/**/target/ ### IntelliJ IDEA ### -.idea/modules.xml -.idea/jarRepositories.xml -.idea/compiler.xml -.idea/libraries/ +# 忽略整个 .idea 目录 +.idea/ *.iws *.iml *.ipr diff --git a/.idea/misc.xml b/.idea/misc.xml deleted file mode 100644 index 6ed2cda..0000000 --- a/.idea/misc.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - \ No newline at end of file diff --git a/docs/dev-ops/docker-compose-environment-aliyun.yml b/docs/dev-ops/docker-compose-environment-aliyun.yml index 87bdbe0..d21ae7a 100644 --- a/docs/dev-ops/docker-compose-environment-aliyun.yml +++ b/docs/dev-ops/docker-compose-environment-aliyun.yml @@ -1,5 +1,4 @@ # 命令执行 docker-compose -f docker-compose-environment-aliyun.yml up -d -# docker 代理和使用文档;https://bugstack.cn/md/road-map/docker.html version: '3.9' services: mysql: diff --git a/docs/dev-ops/docker-compose-environment.yml b/docs/dev-ops/docker-compose-environment.yml index 2a270b8..eff81f6 100644 --- a/docs/dev-ops/docker-compose-environment.yml +++ b/docs/dev-ops/docker-compose-environment.yml @@ -1,9 +1,7 @@ -# 命令执行 docker-compose -f docker-compose-environment-aliyun.yml up -d -# docker 代理和使用文档;https://bugstack.cn/md/road-map/docker.html version: '3.9' services: mysql: - image: mysql:8.0.32 + image: mysql:8.0 container_name: mysql command: --default-authentication-plugin=mysql_native_password restart: always diff --git a/docs/dev-ops/mysql/sql/group_buy_market.sql b/docs/dev-ops/mysql/sql/group_buy_market.sql new file mode 100644 index 0000000..1cbd800 --- /dev/null +++ b/docs/dev-ops/mysql/sql/group_buy_market.sql @@ -0,0 +1,101 @@ +# ************************************************************ +# Sequel Ace SQL dump +# 版本号: 20050 +# +# https://sequel-ace.com/ +# https://github.com/Sequel-Ace/Sequel-Ace +# +# 主机: 127.0.0.1 (MySQL 5.6.39) +# 数据库: group_buy_market +# 生成时间: 2024-12-07 03:48:52 +0000 +# ************************************************************ + + +/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; +/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; +/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */; +SET NAMES utf8mb4; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE='NO_AUTO_VALUE_ON_ZERO', SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +CREATE database if NOT EXISTS `group_buying_sys` default character set utf8mb4 collate utf8mb4_0900_ai_ci; +use `group_buying_sys`; + +# 转储表 group_buy_activity +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `group_buy_activity`; + +CREATE TABLE `group_buy_activity` ( + `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增', + `activity_id` bigint(8) NOT NULL COMMENT '活动ID', + `activity_name` varchar(128) NOT NULL COMMENT '活动名称', + `source` varchar(8) NOT NULL COMMENT '来源', + `channel` varchar(8) NOT NULL COMMENT '渠道', + `goods_id` varchar(12) NOT NULL COMMENT '商品ID', + `discount_id` varchar(8) NOT NULL COMMENT '折扣ID', + `group_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '拼团方式(0自动成团、1达成目标拼团)', + `take_limit_count` int(4) NOT NULL DEFAULT '1' COMMENT '拼团次数限制', + `target` int(5) NOT NULL DEFAULT '1' COMMENT '拼团目标', + `valid_time` int(4) NOT NULL DEFAULT '15' COMMENT '拼团时长(分钟)', + `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '活动状态(0创建、1生效、2过期、3废弃)', + `start_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活动开始时间', + `end_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '活动结束时间', + `tag_id` varchar(8) DEFAULT NULL COMMENT '人群标签规则标识', + `tag_scope` varchar(4) DEFAULT NULL COMMENT '人群标签规则范围(多选;1可见限制、2参与限制)', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uq_activity_id` (`activity_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='拼团活动'; + +LOCK TABLES `group_buy_activity` WRITE; +/*!40000 ALTER TABLE `group_buy_activity` DISABLE KEYS */; + +INSERT INTO `group_buy_activity` (`id`, `activity_id`, `activity_name`, `source`, `channel`, `goods_id`, `discount_id`, `group_type`, `take_limit_count`, `target`, `valid_time`, `status`, `start_time`, `end_time`, `tag_id`, `tag_scope`, `create_time`, `update_time`) +VALUES + (1,100123,'测试活动','s01','c01','9890001','25120207',0,1,1,15,0,'2024-12-07 10:19:40','2024-12-07 10:19:40','1','1','2024-12-07 10:19:40','2024-12-07 11:47:27'); + +/*!40000 ALTER TABLE `group_buy_activity` ENABLE KEYS */; +UNLOCK TABLES; + + +# 转储表 group_buy_discount +# ------------------------------------------------------------ + +DROP TABLE IF EXISTS `group_buy_discount`; + +CREATE TABLE `group_buy_discount` ( + `id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '自增ID', + `discount_id` int(8) NOT NULL COMMENT '折扣ID', + `discount_name` varchar(64) NOT NULL COMMENT '折扣标题', + `discount_desc` varchar(256) NOT NULL COMMENT '折扣描述', + `discount_type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '折扣类型(0:base、1:tag)', + `market_plan` varchar(4) NOT NULL DEFAULT 'ZJ' COMMENT '营销优惠计划(ZJ:直减、MJ:满减、N元购)', + `market_expr` varchar(32) NOT NULL COMMENT '营销优惠表达式', + `tag_id` varchar(8) DEFAULT NULL COMMENT '人群标签,特定优惠限定', + `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', + `update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间', + PRIMARY KEY (`id`), + UNIQUE KEY `uq_discount_id` (`discount_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +LOCK TABLES `group_buy_discount` WRITE; +/*!40000 ALTER TABLE `group_buy_discount` DISABLE KEYS */; + +INSERT INTO `group_buy_discount` (`id`, `discount_id`, `discount_name`, `discount_desc`, `discount_type`, `market_plan`, `market_expr`, `tag_id`, `create_time`, `update_time`) +VALUES + (1,25120207,'测试优惠','测试优惠',0,'ZJ','20',NULL,'2024-12-07 10:20:15','2024-12-07 10:20:15'); + +/*!40000 ALTER TABLE `group_buy_discount` ENABLE KEYS */; +UNLOCK TABLES; + + + +/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; +/*!40101 SET SQL_MODE=@OLD_SQL_MODE */; +/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */; +/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */; +/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */; +/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; diff --git a/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql b/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql deleted file mode 100644 index 8b598d3..0000000 --- a/docs/dev-ops/mysql/sql/xfg-frame-archetype.sql +++ /dev/null @@ -1,108 +0,0 @@ -/* - Navicat Premium Data Transfer - - Source Server : 127.0.0.1 - Source Server Type : MySQL - Source Server Version : 50639 - Source Host : localhost:3306 - Source Schema : road-map - - Target Server Type : MySQL - Target Server Version : 50639 - File Encoding : 65001 - - Date: 15/07/2023 09:26:39 -*/ - -SET NAMES utf8mb4; -SET FOREIGN_KEY_CHECKS = 0; - -CREATE database if NOT EXISTS `xfg_frame_archetype` default character set utf8mb4 collate utf8mb4_0900_ai_ci; -use `xfg_frame_archetype`; - --- ---------------------------- --- Table structure for employee --- ---------------------------- -DROP TABLE IF EXISTS `employee`; -CREATE TABLE `employee` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员ID', - `employee_name` varchar(32) NOT NULL DEFAULT '' COMMENT '雇员姓名', - `employee_level` varchar(8) NOT NULL DEFAULT '' COMMENT '雇员级别', - `employee_title` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员岗位Title', - `create_time` datetime NOT NULL COMMENT '创建时间', - `update_time` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - UNIQUE KEY `idx_employee_number` (`employee_number`) -) ENGINE=InnoDB AUTO_INCREMENT=40 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of employee --- ---------------------------- -BEGIN; -INSERT INTO `employee` VALUES (1, '10000001', 'sXvfDpsWnJdLsCVk64tJgw==', 'T-3', '中级工程师', '2023-07-14 15:26:26', '2023-07-14 15:26:26'); -INSERT INTO `employee` VALUES (2, '10000010', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40'); -INSERT INTO `employee` VALUES (3, '10000011', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40'); -INSERT INTO `employee` VALUES (4, '10000012', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40'); -INSERT INTO `employee` VALUES (5, '10000013', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40'); -INSERT INTO `employee` VALUES (6, '10000014', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-14 15:34:40', '2023-07-14 15:34:40'); -INSERT INTO `employee` VALUES (9, '10000002', 'sXvfDpsWnJdLsCVk64tJgw==', 'T2', '见习工程师', '2023-07-15 07:42:52', '2023-07-15 07:42:52'); -INSERT INTO `employee` VALUES (22, '10000015', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31'); -INSERT INTO `employee` VALUES (23, '10000016', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31'); -INSERT INTO `employee` VALUES (24, '10000017', 'hMCgLG6WV3CsNBQ1UD6PEQ==', 'T2', '见习工程师', '2023-07-15 08:02:31', '2023-07-15 08:02:31'); -INSERT INTO `employee` VALUES (39, '10000022', 'GyG+V0r6mBCNsdusuKl03g==', 'T1', '实习工程师', '2023-07-15 09:17:49', '2023-07-15 09:17:49'); -COMMIT; - --- ---------------------------- --- Table structure for employee_salary --- ---------------------------- -DROP TABLE IF EXISTS `employee_salary`; -CREATE TABLE `employee_salary` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员编号', - `salary_total_amount` decimal(8,2) NOT NULL COMMENT '薪资总额', - `salary_merit_amount` decimal(8,2) NOT NULL COMMENT '绩效工资', - `salary_base_amount` decimal(8,2) NOT NULL COMMENT '基础工资', - `create_time` datetime NOT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - KEY `idx_employee_number` (`employee_number`) -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of employee_salary --- ---------------------------- -BEGIN; -INSERT INTO `employee_salary` VALUES (1, '10000001', 5100.00, 1020.00, 4080.00, '2023-07-14 16:09:06', '2023-07-14 16:09:06'); -INSERT INTO `employee_salary` VALUES (2, '10000010', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10'); -INSERT INTO `employee_salary` VALUES (3, '10000011', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10'); -INSERT INTO `employee_salary` VALUES (4, '10000012', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10'); -INSERT INTO `employee_salary` VALUES (5, '10000013', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10'); -INSERT INTO `employee_salary` VALUES (6, '10000014', 5000.00, 1000.00, 4000.00, '2023-07-14 16:17:10', '2023-07-14 16:17:10'); -INSERT INTO `employee_salary` VALUES (8, '10000022', 100.00, 10.00, 90.00, '2023-07-15 09:17:49', '2023-07-15 09:17:49'); -COMMIT; - --- ---------------------------- --- Table structure for employee_salary_adjust --- ---------------------------- -DROP TABLE IF EXISTS `employee_salary_adjust`; -CREATE TABLE `employee_salary_adjust` ( - `id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `employee_number` varchar(16) NOT NULL DEFAULT '' COMMENT '雇员编号', - `adjust_order_id` varchar(32) NOT NULL DEFAULT '' COMMENT '调薪单号', - `adjust_total_amount` decimal(8,2) NOT NULL COMMENT '总额调薪', - `adjust_base_amount` decimal(8,2) NOT NULL COMMENT '基础调薪', - `adjust_merit_amount` decimal(8,2) NOT NULL COMMENT '绩效调薪', - `create_time` datetime NOT NULL COMMENT '创建时间', - `update_time` datetime NOT NULL COMMENT '更新时间', - PRIMARY KEY (`id`), - UNIQUE KEY `idx_order_id` (`adjust_order_id`) -) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; - --- ---------------------------- --- Records of employee_salary_adjust --- ---------------------------- -BEGIN; -INSERT INTO `employee_salary_adjust` VALUES (1, '10000001', '109089990198888811', 1000.00, 800.00, 200.00, '2023-07-14 16:55:53', '2023-07-14 16:55:53'); -INSERT INTO `employee_salary_adjust` VALUES (2, '10000001', '100908977676001', 100.00, 20.00, 80.00, '2023-07-14 21:57:39', '2023-07-14 21:57:39'); -COMMIT; \ No newline at end of file diff --git a/group-buying-sys-app/src/main/resources/application-dev.yml b/group-buying-sys-app/src/main/resources/application-dev.yml index cc20ba7..4f042b1 100644 --- a/group-buying-sys-app/src/main/resources/application-dev.yml +++ b/group-buying-sys-app/src/main/resources/application-dev.yml @@ -17,7 +17,7 @@ spring: datasource: username: root password: 123456 - url: jdbc:mysql://127.0.0.1:3306/xfg_frame_archetype?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=UTC&useSSL=true + url: jdbc:mysql://127.0.0.1:13306/group_buying_sys?useUnicode=true&characterEncoding=utf8&autoReconnect=true&zeroDateTimeBehavior=convertToNull&serverTimezone=Asia/Shanghai&useSSL=true driver-class-name: com.mysql.cj.jdbc.Driver hikari: pool-name: Retail_HikariCP @@ -31,9 +31,9 @@ spring: type: com.zaxxer.hikari.HikariDataSource # MyBatis 配置【如需使用记得打开】 -#mybatis: -# mapper-locations: classpath:/mybatis/mapper/*.xml -# config-location: classpath:/mybatis/config/mybatis-config.xml +mybatis: + mapper-locations: classpath:/mybatis/mapper/*.xml + config-location: classpath:/mybatis/config/mybatis-config.xml # 日志 logging: diff --git a/group-buying-sys-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml b/group-buying-sys-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml deleted file mode 100644 index 4e14eaf..0000000 --- a/group-buying-sys-app/src/main/resources/mybatis/mapper/frame_case_mapper.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - - - - - - - INSERT INTO table(a,b,c) VALUES(#{a}, #{b}, #{c}) - - - - UPDATE table SET a = #{a} WHERE b = #{b} - - - - - diff --git a/group-buying-sys-app/src/main/resources/mybatis/mapper/group_buy_activity_mapper.xml b/group-buying-sys-app/src/main/resources/mybatis/mapper/group_buy_activity_mapper.xml new file mode 100644 index 0000000..dc395c3 --- /dev/null +++ b/group-buying-sys-app/src/main/resources/mybatis/mapper/group_buy_activity_mapper.xml @@ -0,0 +1,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/group-buying-sys-app/src/main/resources/mybatis/mapper/group_buy_discount_mapper.xml b/group-buying-sys-app/src/main/resources/mybatis/mapper/group_buy_discount_mapper.xml new file mode 100644 index 0000000..24dffe4 --- /dev/null +++ b/group-buying-sys-app/src/main/resources/mybatis/mapper/group_buy_discount_mapper.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/group-buying-sys-app/src/test/java/edu/whut/test/dao/GroupBuyActivityDaoTest.java b/group-buying-sys-app/src/test/java/edu/whut/test/dao/GroupBuyActivityDaoTest.java new file mode 100644 index 0000000..9ed0447 --- /dev/null +++ b/group-buying-sys-app/src/test/java/edu/whut/test/dao/GroupBuyActivityDaoTest.java @@ -0,0 +1,29 @@ +package edu.whut.test.dao; + +import com.alibaba.fastjson.JSON; +import edu.whut.infrastructure.dao.IGroupBuyActivityDao; +import edu.whut.infrastructure.dao.po.GroupBuyActivity; +import lombok.extern.slf4j.Slf4j; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import javax.annotation.Resource; +import java.util.List; + +@Slf4j +@RunWith(SpringRunner.class) +@SpringBootTest +public class GroupBuyActivityDaoTest { + + @Resource + private IGroupBuyActivityDao groupBuyActivityDao; + + @Test + public void test_queryGroupBuyActivityList() { + List groupBuyActivities = groupBuyActivityDao.queryGroupBuyActivityList(); + log.info("测试结果:{}", JSON.toJSONString(groupBuyActivities)); + } + +} diff --git a/group-buying-sys-app/src/test/java/edu/whut/test/dao/GroupBuyDiscountDaoTest.java b/group-buying-sys-app/src/test/java/edu/whut/test/dao/GroupBuyDiscountDaoTest.java new file mode 100644 index 0000000..923d63f --- /dev/null +++ b/group-buying-sys-app/src/test/java/edu/whut/test/dao/GroupBuyDiscountDaoTest.java @@ -0,0 +1,28 @@ +package edu.whut.test.dao; +import com.alibaba.fastjson.JSON; +import edu.whut.infrastructure.dao.IGroupBuyDiscountDao; +import edu.whut.infrastructure.dao.po.GroupBuyDiscount; +import lombok.extern.slf4j.Slf4j; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.springframework.boot.test.context.SpringBootTest; +import org.springframework.test.context.junit4.SpringRunner; + +import javax.annotation.Resource; +import java.util.List; + +@Slf4j +@RunWith(SpringRunner.class) +@SpringBootTest +public class GroupBuyDiscountDaoTest { + + @Resource + private IGroupBuyDiscountDao groupBuyDiscountDao; + + @Test + public void test_queryGroupBuyDiscountList(){ + List groupBuyDiscounts = groupBuyDiscountDao.queryGroupBuyDiscountList(); + log.info("测试结果:{}", JSON.toJSONString(groupBuyDiscounts)); + } + +} diff --git a/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/IGroupBuyActivityDao.java b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/IGroupBuyActivityDao.java new file mode 100644 index 0000000..faa30aa --- /dev/null +++ b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/IGroupBuyActivityDao.java @@ -0,0 +1,14 @@ +package edu.whut.infrastructure.dao; +import edu.whut.infrastructure.dao.po.GroupBuyActivity; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @description 拼团活动Dao + */ +@Mapper +public interface IGroupBuyActivityDao { + List queryGroupBuyActivityList(); + +} diff --git a/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/IGroupBuyDiscountDao.java b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/IGroupBuyDiscountDao.java new file mode 100644 index 0000000..149689c --- /dev/null +++ b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/IGroupBuyDiscountDao.java @@ -0,0 +1,14 @@ +package edu.whut.infrastructure.dao; +import edu.whut.infrastructure.dao.po.GroupBuyDiscount; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @description 折扣配置Dao + */ +@Mapper +public interface IGroupBuyDiscountDao { + List queryGroupBuyDiscountList(); + +} diff --git a/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/GroupBuyActivity.java b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/GroupBuyActivity.java new file mode 100644 index 0000000..95c49ac --- /dev/null +++ b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/GroupBuyActivity.java @@ -0,0 +1,56 @@ +package edu.whut.infrastructure.dao.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description 拼团活动 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class GroupBuyActivity { + + /** 自增 */ + private Long id; + /** 活动ID */ + private Long activityId; + /** 活动名称 */ + private String activityName; + /** 来源 */ + private String source; + /** 渠道 */ + private String channel; + /** 商品ID */ + private String goodsId; + /** 折扣ID */ + private String discountId; + /** 拼团方式(0自动成团、1达成目标拼团) */ + private Integer groupType; + /** 拼团次数限制 */ + private Integer takeLimitCount; + /** 拼团目标 */ + private Integer target; + /** 拼团时长(分钟) */ + private Integer validTime; + /** 活动状态(0创建、1生效、2过期、3废弃) */ + private Integer status; + /** 活动开始时间 */ + private Date startTime; + /** 活动结束时间 */ + private Date endTime; + /** 人群标签规则标识 */ + private String tagId; + /** 人群标签规则范围 */ + private String tagScope; + /** 创建时间 */ + private Date createTime; + /** 更新时间 */ + private Date updateTime; + +} diff --git a/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/GroupBuyDiscount.java b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/GroupBuyDiscount.java new file mode 100644 index 0000000..d5ca995 --- /dev/null +++ b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/GroupBuyDiscount.java @@ -0,0 +1,69 @@ +package edu.whut.infrastructure.dao.po; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.Date; + +/** + * @description 折扣配置 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class GroupBuyDiscount { + + /** + * 自增ID + */ + private Long id; + + /** + * 折扣ID + */ + private Integer discountId; + + /** + * 折扣标题 + */ + private String discountName; + + /** + * 折扣描述 + */ + private String discountDesc; + + /** + * 折扣类型(0:base、1:tag) + */ + private Byte discountType; + + /** + * 营销优惠计划(ZJ:直减、MJ:满减、N元购) + */ + private String marketPlan; + + /** + * 营销优惠表达式 + */ + private String marketExpr; + + /** + * 人群标签,特定优惠限定 + */ + private String tagId; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新时间 + */ + private Date updateTime; + +} diff --git a/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/package-info.java b/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/package-info.java deleted file mode 100644 index ddeef77..0000000 --- a/group-buying-sys-infrastructure/src/main/java/edu/whut/infrastructure/dao/po/package-info.java +++ /dev/null @@ -1,4 +0,0 @@ -/** - * 持久化对象;XxxPO 最后的 PO 是大写,UserPO - */ -package edu.whut.infrastructure.dao.po; \ No newline at end of file