From 2bfa3addbbf666a0f129fb40913a288f211ad220 Mon Sep 17 00:00:00 2001 From: chen-xin-zhi <3588068430@qq.com> Date: Sat, 9 Nov 2024 22:18:38 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E5=96=84=E4=BA=86=E8=AE=A2=E5=8D=95?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/good/CartRecordController.java | 3 ++ .../controller/good/GoodController.java | 2 - .../mapper/AppointmentDateMapper.java | 7 +++ .../mapper/AppointmentNumberMapper.java | 7 +++ .../model/entity/AppointmentDate.java | 47 +++++++++++++++++++ .../model/entity/AppointmentNumber.java | 43 +++++++++++++++++ .../service/good/AppointmentDateService.java | 7 +++ .../good/AppointmentNumberService.java | 7 +++ .../good/impl/AppointmentDateServiceImpl.java | 11 +++++ .../impl/AppointmentNumberServiceImpl.java | 11 +++++ .../mapper/AppointmentDateMapper.xml | 7 +++ .../mapper/AppointmentNumberMapper.xml | 7 +++ 12 files changed, 157 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/cultural/heritage/mapper/AppointmentDateMapper.java create mode 100644 src/main/java/com/cultural/heritage/mapper/AppointmentNumberMapper.java create mode 100644 src/main/java/com/cultural/heritage/model/entity/AppointmentDate.java create mode 100644 src/main/java/com/cultural/heritage/model/entity/AppointmentNumber.java create mode 100644 src/main/java/com/cultural/heritage/service/good/AppointmentDateService.java create mode 100644 src/main/java/com/cultural/heritage/service/good/AppointmentNumberService.java create mode 100644 src/main/java/com/cultural/heritage/service/good/impl/AppointmentDateServiceImpl.java create mode 100644 src/main/java/com/cultural/heritage/service/good/impl/AppointmentNumberServiceImpl.java create mode 100644 src/main/resources/mapper/AppointmentDateMapper.xml create mode 100644 src/main/resources/mapper/AppointmentNumberMapper.xml diff --git a/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java b/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java index e250a98..2a7bf38 100644 --- a/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java +++ b/src/main/java/com/cultural/heritage/controller/good/CartRecordController.java @@ -112,4 +112,7 @@ public class CartRecordController { } + + + } diff --git a/src/main/java/com/cultural/heritage/controller/good/GoodController.java b/src/main/java/com/cultural/heritage/controller/good/GoodController.java index 0d6ac17..a969725 100644 --- a/src/main/java/com/cultural/heritage/controller/good/GoodController.java +++ b/src/main/java/com/cultural/heritage/controller/good/GoodController.java @@ -43,8 +43,6 @@ public class GoodController { private GoodService goodService; - - /** * 添加商品 * @param goodAddRequest 商品添加请求体 diff --git a/src/main/java/com/cultural/heritage/mapper/AppointmentDateMapper.java b/src/main/java/com/cultural/heritage/mapper/AppointmentDateMapper.java new file mode 100644 index 0000000..11d9579 --- /dev/null +++ b/src/main/java/com/cultural/heritage/mapper/AppointmentDateMapper.java @@ -0,0 +1,7 @@ +package com.cultural.heritage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.cultural.heritage.model.entity.AppointmentDate; + +public interface AppointmentDateMapper extends BaseMapper { +} diff --git a/src/main/java/com/cultural/heritage/mapper/AppointmentNumberMapper.java b/src/main/java/com/cultural/heritage/mapper/AppointmentNumberMapper.java new file mode 100644 index 0000000..71bd256 --- /dev/null +++ b/src/main/java/com/cultural/heritage/mapper/AppointmentNumberMapper.java @@ -0,0 +1,7 @@ +package com.cultural.heritage.mapper; + +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import com.cultural.heritage.model.entity.AppointmentNumber; + +public interface AppointmentNumberMapper extends BaseMapper { +} diff --git a/src/main/java/com/cultural/heritage/model/entity/AppointmentDate.java b/src/main/java/com/cultural/heritage/model/entity/AppointmentDate.java new file mode 100644 index 0000000..61899e0 --- /dev/null +++ b/src/main/java/com/cultural/heritage/model/entity/AppointmentDate.java @@ -0,0 +1,47 @@ +package com.cultural.heritage.model.entity; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 预约日期表 + * @TableName appointment_date + */ +@Data +@TableName("appointment_date") +public class AppointmentDate implements Serializable { + + + /** + * 预约日期id + */ + @TableId(type = IdType.AUTO) + private Long id; + + + /** + * 具体日期 + */ + private String specificDate; + + + /** + * 预约时间段 + */ + private String timeSlot; + + + /** + * 商品id + */ + private Long goodId; + + + @Serial + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/cultural/heritage/model/entity/AppointmentNumber.java b/src/main/java/com/cultural/heritage/model/entity/AppointmentNumber.java new file mode 100644 index 0000000..0d7d970 --- /dev/null +++ b/src/main/java/com/cultural/heritage/model/entity/AppointmentNumber.java @@ -0,0 +1,43 @@ +package com.cultural.heritage.model.entity; + +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serial; +import java.io.Serializable; + +/** + * 预约人数范围表 + * @TableName appointment_number + */ +@Data +@TableName("appointment_number") +public class AppointmentNumber implements Serializable { + + /** + * 预约人数范围id + */ + private Long id; + + + /** + * 最小预约人数 + */ + private Integer minNumber; + + + /** + * 最大预约人数 + */ + private Integer maxNumber; + + + /** + * 商品id + */ + private Integer goodId; + + + @Serial + private static final long serialVersionUID = 1L; +} diff --git a/src/main/java/com/cultural/heritage/service/good/AppointmentDateService.java b/src/main/java/com/cultural/heritage/service/good/AppointmentDateService.java new file mode 100644 index 0000000..15831c2 --- /dev/null +++ b/src/main/java/com/cultural/heritage/service/good/AppointmentDateService.java @@ -0,0 +1,7 @@ +package com.cultural.heritage.service.good; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cultural.heritage.model.entity.AppointmentDate; + +public interface AppointmentDateService extends IService { +} diff --git a/src/main/java/com/cultural/heritage/service/good/AppointmentNumberService.java b/src/main/java/com/cultural/heritage/service/good/AppointmentNumberService.java new file mode 100644 index 0000000..9a80d69 --- /dev/null +++ b/src/main/java/com/cultural/heritage/service/good/AppointmentNumberService.java @@ -0,0 +1,7 @@ +package com.cultural.heritage.service.good; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.cultural.heritage.model.entity.AppointmentNumber; + +public interface AppointmentNumberService extends IService { +} diff --git a/src/main/java/com/cultural/heritage/service/good/impl/AppointmentDateServiceImpl.java b/src/main/java/com/cultural/heritage/service/good/impl/AppointmentDateServiceImpl.java new file mode 100644 index 0000000..4f6cfc4 --- /dev/null +++ b/src/main/java/com/cultural/heritage/service/good/impl/AppointmentDateServiceImpl.java @@ -0,0 +1,11 @@ +package com.cultural.heritage.service.good.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.cultural.heritage.mapper.AppointmentDateMapper; +import com.cultural.heritage.model.entity.AppointmentDate; +import com.cultural.heritage.service.good.AppointmentDateService; +import org.springframework.stereotype.Service; + +@Service +public class AppointmentDateServiceImpl extends ServiceImpl implements AppointmentDateService { +} diff --git a/src/main/java/com/cultural/heritage/service/good/impl/AppointmentNumberServiceImpl.java b/src/main/java/com/cultural/heritage/service/good/impl/AppointmentNumberServiceImpl.java new file mode 100644 index 0000000..f548ee9 --- /dev/null +++ b/src/main/java/com/cultural/heritage/service/good/impl/AppointmentNumberServiceImpl.java @@ -0,0 +1,11 @@ +package com.cultural.heritage.service.good.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.cultural.heritage.mapper.AppointmentNumberMapper; +import com.cultural.heritage.model.entity.AppointmentNumber; +import com.cultural.heritage.service.good.AppointmentNumberService; +import org.springframework.stereotype.Service; + +@Service +public class AppointmentNumberServiceImpl extends ServiceImpl implements AppointmentNumberService { +} diff --git a/src/main/resources/mapper/AppointmentDateMapper.xml b/src/main/resources/mapper/AppointmentDateMapper.xml new file mode 100644 index 0000000..9e374b7 --- /dev/null +++ b/src/main/resources/mapper/AppointmentDateMapper.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/src/main/resources/mapper/AppointmentNumberMapper.xml b/src/main/resources/mapper/AppointmentNumberMapper.xml new file mode 100644 index 0000000..c60196b --- /dev/null +++ b/src/main/resources/mapper/AppointmentNumberMapper.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file