Quellcode durchsuchen

feat(store): 新增商户运营活动相关实体类

- 新增运营活动表 StoreOperationalActivity 及其 DTO、VO 类
- 新增商户证照历史记录相关实体类 StoreLicenseHistory 及其 DTO、VO 类
- 新增团购相关平台实体类 LifeGroupBuyMainPlatform、LifeGroupBuyPlatformDto 等
- 新增优惠券平台相关 VO 类 DiscountCouponPlatformVo、LifeCouponPlatformDto 等
- 完善各类实体的 Swagger 注解和 JSON 序列化配置
yindp vor 2 Wochen
Ursprung
Commit
8df3392bdc

+ 43 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/LifeGroupBuyMainPlatform.java

@@ -0,0 +1,43 @@
+package shop.alien.entity.storePlatform;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.LifeGroupBuyMain;
+
+import java.util.List;
+
+/**
+ * 团购主表
+ * @TableName life_group_buy_main
+ */
+@JsonInclude
+@Data
+public class LifeGroupBuyMainPlatform extends LifeGroupBuyMain {
+
+    /**
+     * 有效期类型
+     */
+    @ApiModelProperty(value = "有效期时间")
+    private String expirationDate;
+
+    /**
+     * 有效期时间数组
+     */
+    @ApiModelProperty(value = "有效期时间数组")
+    private List<String> expirationDateList;
+
+    /**
+     * 不可用日期类型
+     */
+    @ApiModelProperty(value = "不可用日期二维数组")
+    private List<List<String>> disableDateList;
+
+    /**
+     * 图片list
+     */
+    @ApiModelProperty(value = "图片list")
+    private List<String> imageValueStr;
+
+
+}

+ 71 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/StoreLicenseHistory.java

@@ -0,0 +1,71 @@
+package shop.alien.entity.storePlatform;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.baomidou.mybatisplus.extension.activerecord.Model;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 商户证照历史记录
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Data
+@JsonInclude
+@TableName("store_license_history")
+@ApiModel(value = "StoreLicenseHistory对象", description = "商户证照历史记录")
+public class StoreLicenseHistory extends Model<StoreLicenseHistory> {
+
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    @TableField("store_id")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "证照类型: 1-合同管理, 2-食品经营许可证")
+    @TableField("license_status")
+    private Integer licenseStatus;
+
+    @ApiModelProperty(value = "审核状态: 1-审核中, 2-审核拒绝, 3-审核通过")
+    @TableField("license_execute_status")
+    private Integer licenseExecuteStatus;
+
+    @ApiModelProperty(value = "图片URL")
+    @TableField("img_url")
+    private String imgUrl;
+
+    @ApiModelProperty(value = "拒绝原因")
+    @TableField("reason_refusal")
+    private String reasonRefusal;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    @TableField("delete_flag")
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("created_user_id")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField(value = "updated_time", fill = FieldFill.INSERT_UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField("updated_user_id")
+    private Integer updatedUserId;
+}
+

+ 101 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/StoreOperationalActivity.java

@@ -0,0 +1,101 @@
+package shop.alien.entity.storePlatform;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 运营活动表
+ *
+ * @author system
+ * @since 2025-11-26
+ */
+@Data
+@JsonInclude
+@TableName("store_operational_activity")
+@ApiModel(value = "StoreOperationalActivity对象", description = "运营活动表")
+public class StoreOperationalActivity {
+
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    @TableField("store_id")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "活动名称")
+    @TableField("activity_name")
+    private String activityName;
+
+    @ApiModelProperty(value = "活动宣传图URL")
+    @TableField("promotional_image")
+    private String promotionalImage;
+
+    @ApiModelProperty(value = "活动开始时间")
+    @TableField("start_time")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date startTime;
+
+    @ApiModelProperty(value = "活动结束时间")
+    @TableField("end_time")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date endTime;
+
+    @ApiModelProperty(value = "用户可参与次数,0表示不限制")
+    @TableField("participation_limit")
+    private Integer participationLimit;
+
+    @ApiModelProperty(value = "活动规则:VERIFY_AND_COMMENT-核销并评论, VERIFY-核销, CHECK_IN-打卡")
+    @TableField("activity_rule")
+    private String activityRule;
+
+    @ApiModelProperty(value = "奖励类型:COUPON-优惠券, RED_PACKET-红包")
+    @TableField("reward_type")
+    private String rewardType;
+
+    @ApiModelProperty(value = "优惠券ID,关联优惠券表")
+    @TableField("coupon_id")
+    private Integer couponId;
+
+    @ApiModelProperty(value = "优惠券发放数量")
+    @TableField("coupon_quantity")
+    private Integer couponQuantity;
+
+    @ApiModelProperty(value = "状态:0-禁用, 1-启用")
+    @TableField("status")
+    private Integer status;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    @TableField("delete_flag")
+    @TableLogic
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @TableField(value = "created_time", fill = FieldFill.INSERT)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    @TableField("created_user_id")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @TableField(value = "updated_time", fill = FieldFill.UPDATE)
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    @TableField("updated_user_id")
+    private Integer updatedUserId;
+
+    @ApiModelProperty(value = "拒绝原因")
+    @TableField("approval_comments")
+    private String approvalComments;
+}
+

+ 20 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/DiscountCouponPlatformVo.java

@@ -0,0 +1,20 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import shop.alien.entity.store.vo.LifeDiscountCouponVo;
+
+/**
+ * 优惠券
+ */
+@Data
+@JsonInclude
+public class DiscountCouponPlatformVo {
+
+    // 代金券列表
+    public IPage<LifeCouponPlatformDto> couponList;
+    // 优惠券列表
+    public IPage<LifeDiscountCouponVo> discountList;
+
+}

+ 30 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/LifeCouponPlatformDto.java

@@ -0,0 +1,30 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.baomidou.mybatisplus.annotation.*;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.LifeCoupon;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 优惠券
+ */
+@Data
+@JsonInclude
+public class LifeCouponPlatformDto extends LifeCoupon {
+
+    // 分组名称
+    @ApiModelProperty(value = "分组名称")
+    private String reviewType;
+
+    // 状态名称
+    @ApiModelProperty(value = "状态名称")
+    private String statusName;
+
+    @ApiModelProperty(value = "销量")
+    private String saleNum;
+}

+ 30 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/LifeCouponPlatformVo.java

@@ -0,0 +1,30 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+
+/**
+ * 优惠券
+ */
+@Data
+@JsonInclude
+public class LifeCouponPlatformVo {
+
+    // 通用参数
+    public Integer pageNum;
+    public Integer pageSize;
+    public String storeId;
+    public String name;
+
+    // 代金券列表
+    public String status;
+    public Integer dataType;
+
+    // 优惠券列表
+    public Integer couponsFromType; // 默认1
+    public Integer couponStatus;//优惠券状态:1:进行中 2:已结束 3:草稿
+
+    // 优惠券还是代金券
+    public Integer couponType; // 1代金券 2优惠券
+
+}

+ 22 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/LifeGroupBuyPlatformDto.java

@@ -0,0 +1,22 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import shop.alien.entity.store.LifeGroupBuyThali;
+import shop.alien.entity.storePlatform.LifeGroupBuyMainPlatform;
+
+import java.util.List;
+
+/**
+ * 团购
+ */
+@Data
+@JsonInclude
+public class LifeGroupBuyPlatformDto {
+
+    private String isCollect;
+
+    private LifeGroupBuyMainPlatform lifeGroupBuyMain;
+
+    private List<LifeGroupThalisPlatformDto> lifeGroupBuyThalis;
+}

+ 23 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/LifeGroupThalisPlatformDto.java

@@ -0,0 +1,23 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import shop.alien.entity.store.LifeGroupBuyThali;
+import shop.alien.entity.storePlatform.LifeGroupBuyMainPlatform;
+
+import java.util.List;
+
+/**
+ * 团购
+ */
+@Data
+@JsonInclude
+public class LifeGroupThalisPlatformDto {
+
+    // 分组名称
+    private String groupName;
+
+    // 菜品
+    private List<LifeGroupBuyThali> dishes;
+
+}

+ 40 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/StoreLicenseHistoryDto.java

@@ -0,0 +1,40 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import org.apache.ibatis.type.Alias;
+import shop.alien.entity.storePlatform.StoreLicenseHistory;
+
+import java.util.List;
+
+/**
+ * 商户证照历史记录展示DTO
+ * <p>
+ * 继承自 StoreLicenseHistory,添加了格式化的展示字段
+ * 注意:此类不用于数据库操作,仅用于数据展示
+ * </p>
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@JsonInclude
+@Alias("LicenseHistoryDisplayDto")  // 指定 MyBatis 别名,避免与 StoreLicenseHistoryDTO 冲突
+@ApiModel(value = "StoreLicenseHistoryDto对象", description = "商户证照历史记录展示DTO")
+public class StoreLicenseHistoryDto extends StoreLicenseHistory {
+
+    @ApiModelProperty(value = "格式化后的创建时间 (yyyy-MM-dd HH:mm:ss)")
+    private String createdDateFormat;
+
+    @ApiModelProperty(value = "审核状态名称")
+    private String licenseExecuteName;
+
+    @ApiModelProperty(value = "相同时间的证照历史记录列表")
+    private List<StoreLicenseHistoryDto> licenseList;
+
+}
+

+ 63 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/StoreLicenseHistoryVO.java

@@ -0,0 +1,63 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 商户证照历史记录VO
+ *
+ * @author system
+ * @since 2025-11-24
+ */
+@Data
+@JsonInclude
+@ApiModel(value = "StoreLicenseHistoryVO对象", description = "商户证照历史记录VO")
+public class StoreLicenseHistoryVO {
+
+    @ApiModelProperty(value = "主键")
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "商户名称")
+    private String storeName;
+
+    @ApiModelProperty(value = "证照类型: 1-合同管理, 2-食品经营许可证")
+    private Integer licenseStatus;
+
+    @ApiModelProperty(value = "证照类型名称")
+    private String licenseStatusName;
+
+    @ApiModelProperty(value = "审核状态: 1-审核中, 2-审核拒绝, 3-审核通过")
+    private Integer licenseExecuteStatus;
+
+    @ApiModelProperty(value = "审核状态名称")
+    private String licenseExecuteStatusName;
+
+    @ApiModelProperty(value = "图片URL")
+    private String imgUrl;
+
+    @ApiModelProperty(value = "删除标记, 0:未删除, 1:已删除")
+    private Integer deleteFlag;
+
+    @ApiModelProperty(value = "创建时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date createdTime;
+
+    @ApiModelProperty(value = "创建人ID")
+    private Integer createdUserId;
+
+    @ApiModelProperty(value = "修改时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
+    private Date updatedTime;
+
+    @ApiModelProperty(value = "修改人ID")
+    private Integer updatedUserId;
+}
+

+ 77 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/StoreOperationalActivityDTO.java

@@ -0,0 +1,77 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.StoreImg;
+
+import java.util.Date;
+
+/**
+ * 运营活动 DTO
+ * 用于接收前端请求参数
+ *
+ * @author system
+ * @since 2025-11-26
+ */
+@Data
+@ApiModel(value = "StoreOperationalActivityDTO", description = "运营活动传输对象")
+public class StoreOperationalActivityDTO {
+
+    @ApiModelProperty(value = "主键ID(更新时必填)")
+    private Integer id;
+
+    @ApiModelProperty(value = "商户ID")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "活动名称", required = true)
+    private String activityName;
+
+    @ApiModelProperty(value = "活动宣传图URL")
+    private String promotionalImage;
+
+    @ApiModelProperty(value = "活动开始时间", required = true)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date startTime;
+
+    @ApiModelProperty(value = "活动结束时间", required = true)
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date endTime;
+
+    @ApiModelProperty(value = "用户可参与次数,0表示不限制")
+    private Integer participationLimit;
+
+    @ApiModelProperty(value = "活动规则:VERIFY_AND_COMMENT-核销并评论, VERIFY-核销, CHECK_IN-打卡", required = true)
+    private String activityRule;
+
+    @ApiModelProperty(value = "奖励类型:COUPON-优惠券, RED_PACKET-红包")
+    private String rewardType;
+
+    @ApiModelProperty(value = "优惠券ID")
+    private Integer couponId;
+
+    @ApiModelProperty(value = "优惠券发放数量")
+    private Integer couponQuantity;
+
+    @ApiModelProperty(value = "状态:0-禁用, 1-启用")
+    private Integer status;
+
+    @ApiModelProperty(value = "拒绝原因")
+    private String approvalComments;
+
+    @ApiModelProperty(value = "活动标题图片")
+    private StoreImg activityTitleImg;
+
+    @ApiModelProperty(value = "活动详情图片")
+    private StoreImg activityDetailImg;
+
+    @ApiModelProperty(value = "页码")
+    private Integer pageNum;
+
+    @ApiModelProperty(value = "页数")
+    private Integer pageSize;
+
+}
+

+ 58 - 0
alien-entity/src/main/java/shop/alien/entity/storePlatform/vo/StoreOperationalActivityVO.java

@@ -0,0 +1,58 @@
+package shop.alien.entity.storePlatform.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import shop.alien.entity.store.StoreImg;
+import shop.alien.entity.storePlatform.StoreOperationalActivity;
+
+/**
+ * 运营活动 VO
+ * 用于返回给前端的数据对象
+ *
+ * @author system
+ * @since 2025-11-26
+ */
+@Data
+@JsonInclude
+@ApiModel(value = "StoreOperationalActivityVO", description = "运营活动返回对象")
+public class StoreOperationalActivityVO extends StoreOperationalActivity {
+
+    @ApiModelProperty(value = "活动状态名称")
+    private String statusName;
+
+    @ApiModelProperty(value = "活动规则名称")
+    private String activityRuleName;
+
+    @ApiModelProperty(value = "奖励类型名称")
+    private String rewardTypeName;
+
+    @ApiModelProperty(value = "优惠券名称")
+    private String couponName;
+
+    @ApiModelProperty(value = "商户名称")
+    private String storeName;
+
+    @ApiModelProperty(value = "活动状态:0-未开始, 1-进行中, 2-已结束")
+    private Integer activityStatus;
+
+    @ApiModelProperty(value = "已参与人数")
+    private Integer participationCount;
+
+    @ApiModelProperty(value = "剩余优惠券数量")
+    private Integer remainingCouponQuantity;
+
+    @ApiModelProperty(value = "活动标题图片")
+    private StoreImg activityTitleImg;
+
+    @ApiModelProperty(value = "活动详情图片")
+    private StoreImg activityDetailImg;
+
+    @ApiModelProperty(value = "活动标题图片")
+    private String activityTitleImgUrl;
+
+    @ApiModelProperty(value = "活动详情图片")
+    private String activityDetailImgUrl;
+}
+