瀏覽代碼

Merge remote-tracking branch 'origin/master'

wxd 5 天之前
父節點
當前提交
6e529c8421
共有 59 個文件被更改,包括 2722 次插入79 次删除
  1. 5 1
      alien-entity/src/main/java/shop/alien/entity/second/SecondGoods.java
  2. 240 0
      alien-entity/src/main/java/shop/alien/entity/store/LifeGroupBuyMain.java
  3. 97 0
      alien-entity/src/main/java/shop/alien/entity/store/LifeGroupBuyThali.java
  4. 4 0
      alien-entity/src/main/java/shop/alien/entity/store/StoreDictionary.java
  5. 3 2
      alien-entity/src/main/java/shop/alien/entity/store/StoreImg.java
  6. 3 0
      alien-entity/src/main/java/shop/alien/entity/store/StoreInfo.java
  7. 62 0
      alien-entity/src/main/java/shop/alien/entity/store/StoreOfficialAlbum.java
  8. 64 0
      alien-entity/src/main/java/shop/alien/entity/store/TagBusinessRelation.java
  9. 88 0
      alien-entity/src/main/java/shop/alien/entity/store/TagCategory.java
  10. 151 0
      alien-entity/src/main/java/shop/alien/entity/store/TagStoreRelation.java
  11. 20 0
      alien-entity/src/main/java/shop/alien/entity/store/dto/LifeGroupBuyDto.java
  12. 15 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LabelButtonOptionVo.java
  13. 245 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyThaliVo.java
  14. 28 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreImgInfoVo.java
  15. 6 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMenuVo.java
  16. 17 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/StoreOfficialAlbumVo.java
  17. 38 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/TagCategoryVo.java
  18. 24 0
      alien-entity/src/main/java/shop/alien/entity/store/vo/TagStoreInfoVo.java
  19. 35 0
      alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyMainMapper.java
  20. 18 0
      alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyThaliMapper.java
  21. 32 0
      alien-entity/src/main/java/shop/alien/mapper/StoreOfficialAlbumMapper.java
  22. 11 0
      alien-entity/src/main/java/shop/alien/mapper/TagBusinessRelationMapper.java
  23. 26 0
      alien-entity/src/main/java/shop/alien/mapper/TagCategoryMapper.java
  24. 10 0
      alien-entity/src/main/java/shop/alien/mapper/TagStoreRelationMapper.java
  25. 8 0
      alien-entity/src/main/resources/mapper/LifeGroupBuyMainMapper.xml
  26. 8 0
      alien-entity/src/main/resources/mapper/LifeGroupBuyThaliMapper.xml
  27. 5 1
      alien-entity/src/main/resources/mapper/second/SecondGoodsInfoMapper.xml
  28. 1 1
      alien-second/src/main/java/shop/alien/second/service/impl/SecondGoodsReportingServiceImpl.java
  29. 49 37
      alien-second/src/main/java/shop/alien/second/service/impl/SecondRecommendServiceImpl.java
  30. 1 1
      alien-store/src/main/java/shop/alien/store/config/WebSocketProcess.java
  31. 88 0
      alien-store/src/main/java/shop/alien/store/controller/LifeGroupBuyController.java
  32. 12 10
      alien-store/src/main/java/shop/alien/store/controller/StoreBusinessInfoController.java
  33. 7 0
      alien-store/src/main/java/shop/alien/store/controller/StoreDictController.java
  34. 29 0
      alien-store/src/main/java/shop/alien/store/controller/StoreImgController.java
  35. 19 1
      alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java
  36. 27 4
      alien-store/src/main/java/shop/alien/store/controller/StoreMenuController.java
  37. 62 0
      alien-store/src/main/java/shop/alien/store/controller/StoreOfficialAlbumController.java
  38. 143 0
      alien-store/src/main/java/shop/alien/store/controller/TagCategoryController.java
  39. 25 0
      alien-store/src/main/java/shop/alien/store/service/LifeGroupBuyService.java
  40. 2 0
      alien-store/src/main/java/shop/alien/store/service/LifeUserDynamicsService.java
  41. 4 0
      alien-store/src/main/java/shop/alien/store/service/StoreDictService.java
  42. 8 0
      alien-store/src/main/java/shop/alien/store/service/StoreImgService.java
  43. 8 0
      alien-store/src/main/java/shop/alien/store/service/StoreInfoService.java
  44. 16 0
      alien-store/src/main/java/shop/alien/store/service/StoreMenuService.java
  45. 16 0
      alien-store/src/main/java/shop/alien/store/service/StoreOfficialAlbumService.java
  46. 16 0
      alien-store/src/main/java/shop/alien/store/service/StoreTagBusinessRelationService.java
  47. 22 0
      alien-store/src/main/java/shop/alien/store/service/StoreTagService.java
  48. 16 0
      alien-store/src/main/java/shop/alien/store/service/TagStoreRelationService.java
  49. 158 0
      alien-store/src/main/java/shop/alien/store/service/impl/LifeGroupBuyServiceImpl.java
  50. 71 2
      alien-store/src/main/java/shop/alien/store/service/impl/StoreDictServiceImpl.java
  51. 21 2
      alien-store/src/main/java/shop/alien/store/service/impl/StoreImgServiceImpl.java
  52. 48 14
      alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java
  53. 102 3
      alien-store/src/main/java/shop/alien/store/service/impl/StoreMenuServiceImpl.java
  54. 100 0
      alien-store/src/main/java/shop/alien/store/service/impl/StoreOfficialAlbumServiceImpl.java
  55. 69 0
      alien-store/src/main/java/shop/alien/store/service/impl/StoreTagBusinessRelationServiceImpl.java
  56. 211 0
      alien-store/src/main/java/shop/alien/store/service/impl/StoreTagServiceImpl.java
  57. 54 0
      alien-store/src/main/java/shop/alien/store/service/impl/TagStoreRelationServiceImpl.java
  58. 51 0
      alien-store/src/main/java/shop/alien/store/util/CommonConstant.java
  59. 3 0
      alien-store/src/main/java/shop/alien/store/util/GroupConstant.java

+ 5 - 1
alien-entity/src/main/java/shop/alien/entity/second/SecondGoods.java

@@ -50,7 +50,11 @@ public class SecondGoods implements Serializable {
 
     @TableField("price")
     @ApiModelProperty(value = "商品价格(元,保留小数后两位)")
-    private BigDecimal price;
+    private String price;
+
+    @TableField("price")
+    @ApiModelProperty(value = "商品价格(元,保留小数后两位)")
+    private BigDecimal amount;
 
     @TableField(exist = false)
     private Integer auditRecordId;

+ 240 - 0
alien-entity/src/main/java/shop/alien/entity/store/LifeGroupBuyMain.java

@@ -0,0 +1,240 @@
+package shop.alien.entity.store;
+
+import com.baomidou.mybatisplus.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 团购主表
+ * @TableName life_group_buy_main
+ */
+@TableName(value ="life_group_buy_main")
+@JsonInclude
+@Data
+public class LifeGroupBuyMain {
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 团购类型(1美食)
+     */
+    @ApiModelProperty(value = "团购类型(1美食)")
+    @TableField("group_type")
+    private Integer groupType;
+
+    /**
+     * 状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束)
+     */
+    @ApiModelProperty(value = "状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束)")
+    @TableField("status")
+    private Integer status;
+
+    /**
+     * 商铺id
+     */
+    @ApiModelProperty(value = "商铺id")
+    @TableField("store_id")
+    private String storeId;
+
+    /**
+     * 图片id
+     */
+    @ApiModelProperty(value = "图片id")
+    @TableField("image_id")
+    private String imageId;
+
+    /**
+     * 团购名称
+     */
+    @ApiModelProperty(value = "团购名称")
+    @TableField("group_name")
+    private String groupName;
+
+    /**
+     * 开始时间类型(0审核通过立即开始/1手动设置)
+     */
+    @ApiModelProperty(value = "开始时间类型(0审核通过立即开始/1手动设置)")
+    @TableField("start_time_type")
+    private Integer startTimeType;
+
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty(value = "开始时间")
+    @TableField("start_time_value")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date startTimeValue;
+
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty(value = "结束时间")
+    @TableField("end_time")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date endTime;
+
+    /**
+     * 库存数量
+     */
+    @ApiModelProperty(value = "库存数量")
+    @TableField("inventory_num")
+    private Integer inventoryNum;
+
+    /**
+     * 限购类型(0不限量/1自定义)
+     */
+    @ApiModelProperty(value = "限购类型(0不限量/1自定义)")
+    @TableField("quota_type")
+    private Integer quotaType;
+
+    /**
+     * 限购值
+     */
+    @ApiModelProperty(value = "限购值")
+    @TableField("quota_value")
+    private String quotaValue;
+
+    /**
+     * 原价
+     */
+    @ApiModelProperty(value = "原价")
+    @TableField("original_price")
+    private BigDecimal originalPrice;
+
+    /**
+     * 优惠价
+     */
+    @ApiModelProperty(value = "优惠价")
+    @TableField("preferential_price")
+    private BigDecimal preferentialPrice;
+
+    /**
+     * 有效期类型(0指定天数/1指定时间段)
+     */
+    @ApiModelProperty(value = "有效期类型(0指定天数/1指定时间段)")
+    @TableField("effective_date_type")
+    private Integer effectiveDateType;
+
+    /**
+     * 有效期值
+     */
+    @ApiModelProperty(value = "有效期值")
+    @TableField("effective_date_value")
+    private String effectiveDateValue;
+
+    /**
+     * 不可用日期类型(0全部日期可用/1限制日期:1234567;节日id/2自定义不可用日期)
+     */
+    @ApiModelProperty(value = "不可用日期类型(0全部日期可用/1限制日期:1234567;节日id/2自定义不可用日期)")
+    @TableField("disable_date_type")
+    private Integer disableDateType;
+
+    /**
+     * 不可用日期值
+     */
+    @ApiModelProperty(value = "不可用日期值")
+    @TableField("disable_date_value")
+    private String disableDateValue;
+
+    /**
+     * 核销方式
+     */
+    @ApiModelProperty(value = "核销方式")
+    @TableField("write_off")
+    private String writeOff;
+
+    /**
+     * 预约规则
+     */
+    @ApiModelProperty(value = "预约规则")
+    @TableField("reservation_rules")
+    private String reservationRules;
+
+    /**
+     * 使用规则
+     */
+    @ApiModelProperty(value = "使用规则")
+    @TableField("use_rules")
+    private String useRules;
+
+    /**
+     * 适用人数
+     */
+    @ApiModelProperty(value = "适用人数")
+    @TableField("applicable_num")
+    private String applicableNum;
+
+    /**
+     * 其他规则
+     */
+    @ApiModelProperty(value = "其他规则")
+    @TableField("other_rules")
+    private String otherRules;
+
+    /**
+     * 发票类型(0电子发票/1纸质发票)
+     */
+    @ApiModelProperty(value = "发票类型(0电子发票/1纸质发票)")
+    @TableField("invoice_type")
+    private String invoiceType;
+
+    /**
+     * 发票说明
+     */
+    @ApiModelProperty(value = "发票说明")
+    @TableField("invoice_describe")
+    private String invoiceDescribe;
+
+    /**
+     * 是否保价(0否/1是)
+     */
+    @ApiModelProperty(value = "是否保价(0否/1是)")
+    @TableField("insured_flag")
+    private Integer insuredFlag;
+
+    /**
+     * 当价格低于当前价格
+     */
+    @ApiModelProperty(value = "当价格低于当前价格")
+    @TableField("insured_price")
+    private BigDecimal insuredPrice;
+
+    /**
+     * 自动为用户补偿优惠券id
+     */
+    @ApiModelProperty(value = "自动为用户补偿优惠券id")
+    @TableField("coupon_id")
+    private Integer couponId;
+
+    @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;
+}

+ 97 - 0
alien-entity/src/main/java/shop/alien/entity/store/LifeGroupBuyThali.java

@@ -0,0 +1,97 @@
+package shop.alien.entity.store;
+
+import com.baomidou.mybatisplus.annotation.*;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 团购套餐详情子表
+ * @TableName life_group_buy_thali
+ */
+@TableName(value ="life_group_buy_thali")
+@JsonInclude
+@Data
+public class LifeGroupBuyThali {
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 团购主表id
+     */
+    @ApiModelProperty(value = "团购主表id")
+    @TableField("parent_id")
+    private String parentId;
+
+    /**
+     * 团购分类名称
+     */
+    @ApiModelProperty(value = "团购分类名称")
+    @TableField("group_name")
+    private String groupName;
+
+    /**
+     * 团购详情关联id
+     */
+    @ApiModelProperty(value = "团购详情关联id")
+    @TableField("detail_id")
+    private String detailId;
+
+    /**
+     * 数量
+     */
+    @ApiModelProperty(value = "数量")
+    @TableField("qty")
+    private Integer qty;
+
+    /**
+     * 价格
+     */
+    @ApiModelProperty(value = "价格")
+    @TableField("price")
+    private BigDecimal price;
+
+    @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;
+
+    @TableField(exist = false)
+    private String detailName;
+
+    @TableField(exist = false)
+    private String detailImg;
+
+    @TableField(exist = false)
+    private String detailPrice;
+
+    @TableField(exist = false)
+    private String detailUnit;
+}

+ 4 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreDictionary.java

@@ -11,6 +11,7 @@ import lombok.experimental.Accessors;
 
 import java.io.Serializable;
 import java.util.Date;
+import java.util.List;
 
 /**
  * <p>
@@ -75,6 +76,9 @@ public class StoreDictionary extends Model<StoreDictionary> {
     @TableField("updated_user_id")
     private Integer updatedUserId;
 
+    @ApiModelProperty(value = "子节点")
+    @TableField(exist = false)
+    private List<StoreDictionary> storeDictionaryList;
 
     @Override
     protected Serializable pkVal() {

+ 3 - 2
alien-entity/src/main/java/shop/alien/entity/store/StoreImg.java

@@ -1,6 +1,7 @@
 package shop.alien.entity.store;
 
 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;
@@ -19,7 +20,7 @@ import java.util.Date;
 @JsonInclude
 @TableName("store_img")
 @ApiModel(value = "StoreImg对象", description = "门店图片")
-public class StoreImg {
+public class StoreImg extends Model<StoreImg> {
 
     @ApiModelProperty(value = "主键")
     @TableId(value = "id", type = IdType.AUTO)
@@ -29,7 +30,7 @@ public class StoreImg {
     @TableField("store_id")
     private Integer storeId;
 
-    @ApiModelProperty(value = "图片类型, 0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉,10:商家头像,11:店铺轮播图,12:联名卡图片,13:动态折扣, 14:套餐图片,15:合同照片,17:打卡广场小人图片 18: 商品发布图片")
+    @ApiModelProperty(value = "图片类型, 0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉,10:商家头像,11:店铺轮播图,12:联名卡图片,13:动态折扣, 14:套餐图片,15:合同照片,17:打卡广场小人图片 18: 商品发布图片 19:二手商品与用户举报图片,20头图单图模式,21头图多图模式 , 22续签合同")
     @TableField("img_type")
     private Integer imgType;
 

+ 3 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreInfo.java

@@ -185,4 +185,7 @@ public class StoreInfo {
     @TableField("contract_reason")
     private String contractReason;
 
+    @ApiModelProperty(value = "图片模式")
+    @TableField("img_mode")
+    private Integer ImgMode;
 }

+ 62 - 0
alien-entity/src/main/java/shop/alien/entity/store/StoreOfficialAlbum.java

@@ -0,0 +1,62 @@
+package shop.alien.entity.store;
+
+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;
+
+/**
+ * 官方相册信息
+ */
+
+@Data
+@JsonInclude
+@TableName("store_official_album")
+@ApiModel(value = "store_official_album", description = "store_official_album")
+public class StoreOfficialAlbum extends Model<StoreOfficialAlbum> {
+    private static final long serialVersionUID = 1L;
+
+    @ApiModelProperty(value = "主键")
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "店铺ID")
+    @TableField("store_id")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "相册名称")
+    @TableField("album_name")
+    private String albumName;
+
+    @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 = "店铺ID")
+    @TableField("img_count")
+    private Integer imgCount;
+}

+ 64 - 0
alien-entity/src/main/java/shop/alien/entity/store/TagBusinessRelation.java

@@ -0,0 +1,64 @@
+package shop.alien.entity.store;
+
+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;
+
+/**
+ * 标签
+ */
+@Data
+@JsonInclude
+@TableName("tag_business_relation")
+@ApiModel(value = "tag_business_relation", description = "tag_business_relation")
+public class TagBusinessRelation extends Model<TagBusinessRelation> {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "标签id")
+    @TableField("tag_id")
+    private Integer tagId;
+
+    @ApiModelProperty(value = "删除标识")
+    @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.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("business_section")
+    private Integer businessSection;
+
+    @ApiModelProperty(value = "标签类型")
+    @TableField("business_section_name")
+    private String businessSectionName;
+
+    @ApiModelProperty(value = "标签名称")
+    @TableField("tag_name")
+    private String tagName;
+}

+ 88 - 0
alien-entity/src/main/java/shop/alien/entity/store/TagCategory.java

@@ -0,0 +1,88 @@
+package shop.alien.entity.store;
+
+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 com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import java.util.Date;
+
+/**
+ * 标签
+ */
+@Data
+@JsonInclude
+@TableName("tag_category")
+@ApiModel(value = "tag_category", description = "tag_category")
+public class TagCategory extends Model<TagCategory> {
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "标签名称")
+    @TableField("tag_name")
+    @JsonProperty("label")
+    private String tagName;
+
+    @ApiModelProperty(value = "标签排序")
+    @TableField("tag_sort")
+    private Integer tagSort;
+
+    @ApiModelProperty(value = "删除标识")
+    @TableLogic
+    @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.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("label_type")
+    private String labelType;
+
+    @ApiModelProperty(value = "标签按钮类型")
+    @TableField("label_button_type")
+    private String labelButtonType;
+
+
+    @ApiModelProperty(value = "按钮名称1")
+    @TableField("label_button_option_one")
+    private String labelButtonOptionOne;
+
+    @ApiModelProperty(value = "按钮名称2")
+    @TableField("label_button_option_two")
+    private String labelButtonOptionTwo;
+
+    @ApiModelProperty(value = "标签描述")
+    @TableField("label_describe")
+    private String labelDescribe;
+
+    @ApiModelProperty(value = "预留字段1")
+    @JsonProperty("field_1")
+    @TableField("field_one")
+    private String fieldOne;
+
+    @ApiModelProperty(value = "预留字段2")
+    @JsonProperty("field_2")
+    @TableField("field_two")
+    private String fieldTwo;
+}

+ 151 - 0
alien-entity/src/main/java/shop/alien/entity/store/TagStoreRelation.java

@@ -0,0 +1,151 @@
+package shop.alien.entity.store;
+
+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;
+
+/**
+ * 门店标签信息表
+ */
+@Data
+@JsonInclude
+@TableName("tag_store_relation")
+@ApiModel(value = "tag_store_relation", description = "tag_store_relation")
+public class TagStoreRelation extends Model<TagStoreRelation> {
+    private static final long serialVersionUID = 1L;
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @ApiModelProperty(value = "店铺ID")
+    @TableField("store_id")
+    private Integer storeId;
+
+    @ApiModelProperty(value = "标签信息1")
+    @TableField("tag_column_a")
+    private String  tagColumn1;
+
+    @ApiModelProperty(value = "标签信息2")
+    @TableField("tag_column_b")
+    private String tagColumn2;
+
+    @ApiModelProperty(value = "标签信息3")
+    @TableField("tag_column_c")
+    private String  tagColumn3;
+
+    @ApiModelProperty(value = "标签信息4")
+    @TableField("tag_column_d")
+    private String tagColumn4;
+
+    @ApiModelProperty(value = "标签信息5")
+    @TableField("tag_column_e")
+    private String  tagColumn5;
+
+    @ApiModelProperty(value = "标签信息6")
+    @TableField("tag_column_f")
+    private String tagColumn6;
+
+    @ApiModelProperty(value = "标签信息7")
+    @TableField("tag_column_g")
+    private String  tagColumn7;
+
+    @ApiModelProperty(value = "标签信息8")
+    @TableField("tag_column_h")
+    private String tagColumn8;
+
+    @ApiModelProperty(value = "标签信息9")
+    @TableField("tag_column_i")
+    private String  tagColumn9;
+
+    @ApiModelProperty(value = "标签信息10")
+    @TableField("tag_column_j")
+    private String tagColumn10;
+
+    @ApiModelProperty(value = "标签信息11")
+    @TableField("tag_column_k")
+    private String  tagColumn11;
+
+    @ApiModelProperty(value = "标签信息12")
+    @TableField("tag_column_l")
+    private String tagColumn12;
+
+    @ApiModelProperty(value = "标签信息13")
+    @TableField("tag_column_m")
+    private String  tagColumn13;
+
+    @ApiModelProperty(value = "标签信息14")
+    @TableField("tag_column_n")
+    private String tagColumn14;
+
+    @ApiModelProperty(value = "标签信息15")
+    @TableField("tag_column_o")
+    private String  tagColumn15;
+
+    @ApiModelProperty(value = "标签信息16")
+    @TableField("tag_column_p")
+    private String tagColumn16;
+
+    @ApiModelProperty(value = "标签信息17")
+    @TableField("tag_column_q")
+    private String  tagColumn17;
+
+    @ApiModelProperty(value = "标签信息18")
+    @TableField("tag_column_r")
+    private String tagColumn18;
+
+    @ApiModelProperty(value = "标签信息19")
+    @TableField("tag_column_s")
+    private String  tagColumn19;
+
+    @ApiModelProperty(value = "标签信息20")
+    @TableField("tag_column_t")
+    private String tagColumn20;
+
+    @ApiModelProperty(value = "标签信息21")
+    @TableField("tag_column_u")
+    private String tagColumn21;
+
+    @ApiModelProperty(value = "标签信息22")
+    @TableField("tag_column_v")
+    private String tagColumn22;
+
+    @ApiModelProperty(value = "标签信息23")
+    @TableField("tag_column_w")
+    private String tagColumn23;
+
+    @ApiModelProperty(value = "标签信息24")
+    @TableField("tag_column_x")
+    private String tagColumn24;
+
+    @ApiModelProperty(value = "标签信息25")
+    @TableField("tag_column_y")
+    private String tagColumn25;
+
+    @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 = "删除标记, 0:未删除, 1:已删除")
+    @TableField("delete_flag")
+    @TableLogic
+    private Integer deleteFlag;
+}

+ 20 - 0
alien-entity/src/main/java/shop/alien/entity/store/dto/LifeGroupBuyDto.java

@@ -0,0 +1,20 @@
+package shop.alien.entity.store.dto;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import lombok.Data;
+import shop.alien.entity.store.LifeGroupBuyMain;
+import shop.alien.entity.store.LifeGroupBuyThali;
+
+import java.util.List;
+
+/**
+ * 团购
+ */
+@Data
+@JsonInclude
+public class LifeGroupBuyDto {
+
+    private LifeGroupBuyMain lifeGroupBuyMain;
+
+    private List<LifeGroupBuyThali> lifeGroupBuyThalis;
+}

+ 15 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LabelButtonOptionVo.java

@@ -0,0 +1,15 @@
+package shop.alien.entity.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+@Data
+@JsonInclude
+public class LabelButtonOptionVo {
+    @ApiModelProperty(value = "名称")
+    private String name;
+
+    @ApiModelProperty(value = "值")
+    private String value;
+}

+ 245 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/LifeGroupBuyThaliVo.java

@@ -0,0 +1,245 @@
+package shop.alien.entity.store.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.LifeGroupBuyThali;
+
+import java.math.BigDecimal;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 团购
+ */
+@Data
+@JsonInclude
+public class LifeGroupBuyThaliVo {
+
+    /**
+     * 主键
+     */
+    @TableId(type = IdType.AUTO)
+    private Integer id;
+
+    /**
+     * 团购类型(1美食)
+     */
+    @ApiModelProperty(value = "团购类型(1美食)")
+    @TableField("group_type")
+    private Integer groupType;
+
+    /**
+     * 状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束)
+     */
+    @ApiModelProperty(value = "状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束)")
+    @TableField("status")
+    private Integer status;
+
+    /**
+     * 商铺id
+     */
+    @ApiModelProperty(value = "商铺id")
+    @TableField("store_id")
+    private String storeId;
+
+    /**
+     * 图片id
+     */
+    @ApiModelProperty(value = "图片id")
+    @TableField("image_id")
+    private String imageId;
+    private String imageValueStr;
+
+    /**
+     * 团购名称
+     */
+    @ApiModelProperty(value = "团购名称")
+    @TableField("group_name")
+    private String groupName;
+
+    /**
+     * 开始时间类型(0审核通过立即开始/1手动设置)
+     */
+    @ApiModelProperty(value = "开始时间类型(0审核通过立即开始/1手动设置)")
+    @TableField("start_time_type")
+    private Integer startTimeType;
+
+    /**
+     * 开始时间
+     */
+    @ApiModelProperty(value = "开始时间")
+    @TableField("start_time_value")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date startTimeValue;
+
+    /**
+     * 结束时间
+     */
+    @ApiModelProperty(value = "结束时间")
+    @TableField("end_time")
+    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
+    private Date endTime;
+
+    /**
+     * 库存数量
+     */
+    @ApiModelProperty(value = "库存数量")
+    @TableField("inventory_num")
+    private Integer inventoryNum;
+
+    /**
+     * 限购类型(0不限量/1自定义)
+     */
+    @ApiModelProperty(value = "限购类型(0不限量/1自定义)")
+    @TableField("quota_type")
+    private Integer quotaType;
+
+    /**
+     * 限购值
+     */
+    @ApiModelProperty(value = "限购值")
+    @TableField("quota_value")
+    private String quotaValue;
+
+    /**
+     * 原价
+     */
+    @ApiModelProperty(value = "原价")
+    @TableField("original_price")
+    private BigDecimal originalPrice;
+
+    /**
+     * 优惠价
+     */
+    @ApiModelProperty(value = "优惠价")
+    @TableField("preferential_price")
+    private BigDecimal preferentialPrice;
+
+    /**
+     * 有效期类型(0指定天数/1指定时间段)
+     */
+    @ApiModelProperty(value = "有效期类型(0指定天数/1指定时间段)")
+    @TableField("effective_date_type")
+    private String effectiveDateType;
+
+    /**
+     * 有效期值
+     */
+    @ApiModelProperty(value = "有效期值")
+    @TableField("effective_date_value")
+    private String effectiveDateValue;
+
+    /**
+     * 不可用日期类型(0全部日期可用/1限制日期:1234567;节日id/2自定义不可用日期)
+     */
+    @ApiModelProperty(value = "不可用日期类型(0全部日期可用/1限制日期:1234567;节日id/2自定义不可用日期)")
+    @TableField("disable_date_type")
+    private Integer disableDateType;
+
+    /**
+     * 不可用日期值
+     */
+    @ApiModelProperty(value = "不可用日期值")
+    @TableField("disable_date_value")
+    private String disableDateValue;
+    private String disableDateValueStr;
+
+    /**
+     * 核销方式
+     */
+    @ApiModelProperty(value = "核销方式")
+    @TableField("write_off")
+    private String writeOff;
+
+    /**
+     * 预约规则
+     */
+    @ApiModelProperty(value = "预约规则")
+    @TableField("reservation_rules")
+    private String reservationRules;
+
+    /**
+     * 使用规则
+     */
+    @ApiModelProperty(value = "使用规则")
+    @TableField("use_rules")
+    private String useRules;
+
+    /**
+     * 适用人数
+     */
+    @ApiModelProperty(value = "适用人数")
+    @TableField("applicable_num")
+    private String applicableNum;
+
+    /**
+     * 其他规则
+     */
+    @ApiModelProperty(value = "其他规则")
+    @TableField("other_rules")
+    private String otherRules;
+
+    /**
+     * 发票类型(0电子发票/1纸质发票)
+     */
+    @ApiModelProperty(value = "发票类型(0电子发票/1纸质发票)")
+    @TableField("invoice_type")
+    private Integer invoiceType;
+
+    /**
+     * 发票说明
+     */
+    @ApiModelProperty(value = "发票说明")
+    @TableField("invoice_describe")
+    private String invoiceDescribe;
+
+    /**
+     * 是否保价(0否/1是)
+     */
+    @ApiModelProperty(value = "是否保价(0否/1是)")
+    @TableField("insured_flag")
+    private Integer insuredFlag;
+
+    /**
+     * 当价格低于当前价格
+     */
+    @ApiModelProperty(value = "当价格低于当前价格")
+    @TableField("insured_price")
+    private BigDecimal insuredPrice;
+
+    /**
+     * 自动为用户补偿优惠券id
+     */
+    @ApiModelProperty(value = "自动为用户补偿优惠券id")
+    @TableField("coupon_id")
+    private Integer couponId;
+
+    @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 = "子信息")
+    private List<LifeGroupBuyThali> details;
+}

+ 28 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreImgInfoVo.java

@@ -0,0 +1,28 @@
+package shop.alien.entity.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import shop.alien.entity.store.StoreImg;
+
+import java.util.List;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@JsonInclude
+@NoArgsConstructor
+@ApiModel(value = "StoreImgInfoVo", description = "店铺及图片信息vo")
+public class StoreImgInfoVo{
+
+    @ApiModelProperty(value = "图片列表")
+    private List<StoreImg> storeImgList;
+    @ApiModelProperty(value = "店铺ID")
+    private Integer storeId;
+    @ApiModelProperty(value = "图片类型")
+    private Integer imgType;
+    @ApiModelProperty(value = "图片模式")
+    private Integer imgMode;
+}

+ 6 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreMenuVo.java

@@ -28,6 +28,12 @@ public class StoreMenuVo extends StoreMenu {
     @ApiModelProperty(value = "是否点赞")
     private Integer isLike;
 
+    @ApiModelProperty(value = "菜品数量")
+    private Integer menuCount;
+
+    @ApiModelProperty(value = "推荐数量")
+    private Integer suggestCount;
+
     @ApiModelProperty(value = "菜品排序")
     private List<StoreMenuVo> sortList;
 

+ 17 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/StoreOfficialAlbumVo.java

@@ -0,0 +1,17 @@
+package shop.alien.entity.store.vo;
+
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.experimental.Accessors;
+import shop.alien.entity.store.StoreOfficialAlbum;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@Accessors(chain = true)
+@ApiModel(value="StoreOfficialAlbumVo对象", description="官方相册vo")
+public class StoreOfficialAlbumVo extends StoreOfficialAlbum {
+    @ApiModelProperty(value = "图片链接")
+    private String imgUrl;
+}

+ 38 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/TagCategoryVo.java

@@ -0,0 +1,38 @@
+package shop.alien.entity.store.vo;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+import shop.alien.entity.store.TagCategory;
+
+import java.util.List;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@JsonInclude
+@NoArgsConstructor
+@ApiModel(value = "TagCategoryVo", description = "标签对象")
+public class TagCategoryVo extends TagCategory {
+
+    @ApiModelProperty(value = "标签类型")
+    private Integer businessSection;
+
+    @ApiModelProperty(value = "标签类型")
+    private String businessSectionName;
+
+    @ApiModelProperty(value = "标签类型名称")
+    private String labelName;
+
+    @ApiModelProperty(value = "按钮名称1列表")
+    @JsonProperty("labelButtonOption_1")
+    private List<LabelButtonOptionVo> labelButtonOption1;
+
+    @ApiModelProperty(value = "按钮名称2列表")
+    @JsonProperty("labelButtonOption_2")
+    private List<LabelButtonOptionVo> labelButtonOption2;
+}

+ 24 - 0
alien-entity/src/main/java/shop/alien/entity/store/vo/TagStoreInfoVo.java

@@ -0,0 +1,24 @@
+package shop.alien.entity.store.vo;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.NoArgsConstructor;
+
+@Data
+@EqualsAndHashCode(callSuper = false)
+@JsonInclude
+@NoArgsConstructor
+@ApiModel(value = "TagStoreInfoVo", description = "标签商户信息对象")
+public class TagStoreInfoVo {
+    @ApiModelProperty(value = "新增标签列表")
+    private String tagId;
+
+    @ApiModelProperty(value = "删除标签列表")
+    private String labelOption;
+
+    @ApiModelProperty(value = "更新标签列表")
+    private String isNull;
+}

+ 35 - 0
alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyMainMapper.java

@@ -0,0 +1,35 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.Constants;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.store.LifeGroupBuyMain;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
+
+/**
+* @author youch
+* @description 针对表【life_group_buy_main(团购主表)】的数据库操作Mapper
+* @createDate 2025-07-28 14:31:30
+* @Entity shop.alien.entity.store.LifeGroupBuyMain
+*/
+@Mapper
+public interface LifeGroupBuyMainMapper extends BaseMapper<LifeGroupBuyMain> {
+
+    @Select("select id,group_type,status,store_id,image_id,group_name,start_time_type,\n" +
+            "        start_time_value,end_time,inventory_num,quota_type,quota_value,\n" +
+            "        original_price,preferential_price,effective_date_type,effective_date_value,disable_date_type,\n" +
+            "        disable_date_value,write_off,reservation_rules,use_rules,applicable_num,\n" +
+            "        other_rules,invoice_type,invoice_describe,insured_flag,insured_price,\n" +
+            "        coupon_id,delete_flag,created_time,updated_time,created_user_id,\n" +
+            "        updated_user_id from life_group_buy_main ${ew.customSqlSegment}")
+    IPage<LifeGroupBuyThaliVo> selectPageByThaliVo(IPage<LifeGroupBuyThaliVo> lifeGroupBuyThaliVoIPage,@Param(Constants.WRAPPER) QueryWrapper<LifeGroupBuyThaliVo> queryWrapper);
+}
+
+
+
+

+ 18 - 0
alien-entity/src/main/java/shop/alien/mapper/LifeGroupBuyThaliMapper.java

@@ -0,0 +1,18 @@
+package shop.alien.mapper;
+
+import shop.alien.entity.store.LifeGroupBuyThali;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+
+/**
+* @author youch
+* @description 针对表【life_group_buy_thali(团购套餐详情子表)】的数据库操作Mapper
+* @createDate 2025-07-28 14:31:30
+* @Entity shop.alien.entity.store.LifeGroupBuyThali
+*/
+public interface LifeGroupBuyThaliMapper extends BaseMapper<LifeGroupBuyThali> {
+
+}
+
+
+
+

+ 32 - 0
alien-entity/src/main/java/shop/alien/mapper/StoreOfficialAlbumMapper.java

@@ -0,0 +1,32 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.store.StoreOfficialAlbum;
+import shop.alien.entity.store.vo.StoreOfficialAlbumVo;
+
+import java.util.List;
+
+/**
+ * 官方相册信息
+ */
+@Mapper
+public interface StoreOfficialAlbumMapper extends BaseMapper<StoreOfficialAlbum> {
+
+    /**
+     * 获取菜单
+     *
+     * @param storeId  门店id
+     * @return List<StoreOfficialAlbumVo>
+     */
+    //"图片类型, 0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉, 10:商家头像, 11:店铺轮播图"
+    @Select("SELECT a.*, b.img_url FROM store_official_album a LEFT JOIN store_img b ON b.id = " +
+            "(SELECT b2.id FROM store_img b2 WHERE b2.business_id = a.id and b2.img_type = '2' " +
+            "order by b2.img_sort LIMIT 1) where a.delete_flag = '0' and  a.store_id = #{storeId}")
+    List<StoreOfficialAlbumVo> getStoreOfficialAlbumList(@Param("storeId") Integer storeId);
+
+    @Select("select si.business_id as id ,count(*) as img_count from store_img si where si.delete_flag = '0' and si.store_id = #{storeId} group by si.business_id ")
+    List<StoreOfficialAlbum> getStoreOfficialAlbumImgCount(@Param("storeId") Integer storeId);
+}

+ 11 - 0
alien-entity/src/main/java/shop/alien/mapper/TagBusinessRelationMapper.java

@@ -0,0 +1,11 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+import shop.alien.entity.store.TagBusinessRelation;
+
+/**
+ * 标签 Mapper 接口
+ */
+public interface TagBusinessRelationMapper extends BaseMapper<TagBusinessRelation> {
+}

+ 26 - 0
alien-entity/src/main/java/shop/alien/mapper/TagCategoryMapper.java

@@ -0,0 +1,26 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Param;
+import org.apache.ibatis.annotations.Select;
+import shop.alien.entity.store.TagCategory;
+import shop.alien.entity.store.vo.StoreMenuVo;
+import shop.alien.entity.store.vo.TagCategoryVo;
+
+import java.util.List;
+
+/**
+ * 标签 Mapper 接口
+ */
+public interface TagCategoryMapper extends BaseMapper<TagCategory> {
+
+    /**
+     * 获取菜单
+     *
+     * @param businessSection  门店id
+     * @return List<StoreMenuVo>
+     */
+    //"图片类型, 0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉, 10:商家头像, 11:店铺轮播图"
+    @Select("select tc.*, tbr.business_section,tbr.business_section_name, case when tc.label_type = 'infrastructure' then '基础设施' when tc.label_type = 'storeIntroduction' then '门店介绍' else '基础设施' end as label_name from tag_business_relation tbr left join tag_category tc on tc.id = tbr.tag_id and tc.delete_flag =0  where tbr.business_section  = #{businessSection} and tbr.delete_flag = 0 order by tc.tag_sort")
+    List<TagCategoryVo> getBusinessRelationTagList(@Param("businessSection") Integer businessSection);
+}

+ 10 - 0
alien-entity/src/main/java/shop/alien/mapper/TagStoreRelationMapper.java

@@ -0,0 +1,10 @@
+package shop.alien.mapper;
+
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import shop.alien.entity.store.TagStoreRelation;
+
+/**
+ * 门店标签信息表 Mapper 接口
+ */
+public interface TagStoreRelationMapper extends BaseMapper<TagStoreRelation> {
+}

+ 8 - 0
alien-entity/src/main/resources/mapper/LifeGroupBuyMainMapper.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="shop.alien.mapper.LifeGroupBuyMainMapper">
+
+
+</mapper>

+ 8 - 0
alien-entity/src/main/resources/mapper/LifeGroupBuyThaliMapper.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="shop.alien.mapper.LifeGroupBuyThaliMapper">
+
+
+</mapper>

+ 5 - 1
alien-entity/src/main/resources/mapper/second/SecondGoodsInfoMapper.xml

@@ -8,6 +8,7 @@
         <result column="title" property="title" jdbcType="VARCHAR"/>
         <result column="description" property="description" jdbcType="VARCHAR"/>
         <result column="price" property="price" jdbcType="DECIMAL"/>
+        <result column="amount" property="amount" jdbcType="DECIMAL"/>
         <result column="position" property="position" jdbcType="VARCHAR"/>
         <result column="like_count" property="likeCount" jdbcType="INTEGER"/>
         <result column="collect_count" property="collectCount" jdbcType="INTEGER"/>
@@ -44,6 +45,7 @@
             g.title,
             g.description,
             g.price,
+            g.price as amount,
             g.position,
             g.like_count,
             g.collect_count,
@@ -85,6 +87,7 @@
             g.title,
             g.description,
             g.price,
+            g.price as amount,
             ROUND(ST_Distance_Sphere(ST_GeomFromText(CONCAT('POINT(', REPLACE(#{position}, ',', ' '), ')' )), ST_GeomFromText(CONCAT('POINT(', REPLACE(g.position, ',', ' '), ')' ))) / 1000, 2) AS dist,
             g.like_count,
             g.collect_count,
@@ -158,6 +161,7 @@
             g.title,
             g.description,
             g.price,
+            g.price as amount,
             g.position,
             g.like_count,
             g.collect_count,
@@ -198,7 +202,7 @@
             g.user_id,
             g.title,
             g.description,
-            g.price,
+            g.price as amount,
             g.position,
             g.like_count,
             g.collect_count,

+ 1 - 1
alien-second/src/main/java/shop/alien/second/service/impl/SecondGoodsReportingServiceImpl.java

@@ -78,7 +78,7 @@ public class SecondGoodsReportingServiceImpl implements SecondGoodsReportingServ
         if (lifeUserViolation.getReportContextType().equals("4")) {
             // 获取商品信息
             SecondGoods secondGoods = secondGoodsMapper.selectById(lifeUserViolation.getBusinessId());
-            secondReportingVo.setPrice(secondGoods.getPrice() != null ? secondGoods.getPrice().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
+            secondReportingVo.setPrice(secondGoods.getPrice() != null ? secondGoods.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
             secondReportingVo.setHomeImage(secondGoods.getHomeImage());
             secondReportingVo.setTitle(secondGoods.getTitle());
             secondReportingVo.setDescription(secondGoods.getDescription());

+ 49 - 37
alien-second/src/main/java/shop/alien/second/service/impl/SecondRecommendServiceImpl.java

@@ -20,6 +20,7 @@ import shop.alien.mapper.second.SecondRecommendMapper;
 import shop.alien.second.service.SecondRecommendService;
 import shop.alien.util.common.JwtUtil;
 
+import java.math.BigDecimal;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Collectors;
@@ -61,6 +62,9 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
             }
             IPage<SecondGoodsRecommendVo> result = mapper.getSecondRecommendByPage(page, userId, longitude + "," + latitude, typeId, "user_" + phoneId);
             for (SecondGoodsRecommendVo row : result.getRecords()) {
+                // 价格保留两位小数
+                row.setPrice(row.getPrice() != null ? row.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
+                // 距离拼接
                 if (StringUtil.isNotBlank(row.getDist())) {
                     row.setPosition("距离" + row.getDist() + "km");
                 }
@@ -101,6 +105,8 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
                 if (StringUtil.isNotBlank(item.getDist())) {
                     item.setPosition("距离" + item.getDist() + "km");
                 }
+                // 价格保留两位小数
+                item.setPrice(item.getPrice() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
 
                 // 评论列表
                 List<SecondCommentVo> cList = new ArrayList<>();
@@ -152,6 +158,8 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
                 if (StringUtil.isNotBlank(item.getDist())) {
                     item.setPosition("距离" + item.getDist() + "km");
                 }
+                // 价格保留两位小数
+                item.setPrice(item.getPrice() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
 
                 // 评论列表
                 List<SecondCommentVo> cList = new ArrayList<>();
@@ -183,46 +191,50 @@ public class SecondRecommendServiceImpl extends ServiceImpl<SecondRecommendMappe
             }
             SecondGoodsRecommendVo item = mapper.querySecondGoodsDetail(goodsId, "user_" + phoneId, position);
 
-            // 设置图片信息
-            QueryWrapper<StoreImg> query = new QueryWrapper<>();
-            query.lambda()
-                    .eq(StoreImg::getImgType, 18) // 商品 图片
-                    .eq(StoreImg::getDeleteFlag, 0)
-                    .eq(StoreImg::getStoreId, goodsId);
-            List<StoreImg> storeImgs = storeImgMapper.selectList(query);
-            // 设置图片信息
-            if (storeImgs.size() > 0) {
-                // 先按视频后缀排序,再按ImgSort排序
-                String[] items = storeImgs.stream()
-                        .sorted((o1, o2) -> {
-                            boolean o1IsMp4 = isVideoUrl(o1.getImgUrl());
-                            boolean o2IsMp4 = isVideoUrl(o2.getImgUrl());
-                            // 如果都是.mp4或都不是.mp4,则按ImgSort排序
-                            if (o1IsMp4 && o2IsMp4 || !o1IsMp4 && !o2IsMp4) {
-                                return o1.getImgSort().compareTo(o2.getImgSort());
-                            }
-                            // 否则,.mp4的排在前面
-                            return o1IsMp4 ? -1 : 1;
-                        }).map(StoreImg::getImgUrl).toArray(String[]::new);
-                item.setImgList(items);
-            }
+            if (item != null) {
+                // 设置图片信息
+                QueryWrapper<StoreImg> query = new QueryWrapper<>();
+                query.lambda()
+                        .eq(StoreImg::getImgType, 18) // 商品 图片
+                        .eq(StoreImg::getDeleteFlag, 0)
+                        .eq(StoreImg::getStoreId, goodsId);
+                List<StoreImg> storeImgs = storeImgMapper.selectList(query);
+                // 设置图片信息
+                if (storeImgs.size() > 0) {
+                    // 先按视频后缀排序,再按ImgSort排序
+                    String[] items = storeImgs.stream()
+                            .sorted((o1, o2) -> {
+                                boolean o1IsMp4 = isVideoUrl(o1.getImgUrl());
+                                boolean o2IsMp4 = isVideoUrl(o2.getImgUrl());
+                                // 如果都是.mp4或都不是.mp4,则按ImgSort排序
+                                if (o1IsMp4 && o2IsMp4 || !o1IsMp4 && !o2IsMp4) {
+                                    return o1.getImgSort().compareTo(o2.getImgSort());
+                                }
+                                // 否则,.mp4的排在前面
+                                return o1IsMp4 ? -1 : 1;
+                            }).map(StoreImg::getImgUrl).toArray(String[]::new);
+                    item.setImgList(items);
+                }
 
-            // 查看是否关注
-            QueryWrapper<LifeFans> query1 = new QueryWrapper<>();
-            query1.lambda()
-                    .eq(LifeFans::getFollowedId, item.getUserPhone()) // 商品图片
-                    .eq(LifeFans::getDeleteFlag, 0)
-                    .eq(LifeFans::getFansId, "user_" + phoneId);
-            List<LifeFans> lifeFans = lifeFansMapper.selectList(query1);
-            // 关注状态添加
-            if (lifeFans.size() > 0) {
-                item.setFansStatus(1);
-            }
+                // 查看是否关注
+                QueryWrapper<LifeFans> query1 = new QueryWrapper<>();
+                query1.lambda()
+                        .eq(LifeFans::getFollowedId, item.getUserPhone()) // 商品图片
+                        .eq(LifeFans::getDeleteFlag, 0)
+                        .eq(LifeFans::getFansId, "user_" + phoneId);
+                List<LifeFans> lifeFans = lifeFansMapper.selectList(query1);
+                // 关注状态添加
+                if (lifeFans.size() > 0) {
+                    item.setFansStatus(1);
+                }
 
-            // 距离拼接
-            if (StringUtil.isNotBlank(item.getDist())) {
-                item.setPosition("距离" + item.getDist() + "km");
+                // 距离拼接
+                if (StringUtil.isNotBlank(item.getDist())) {
+                    item.setPosition("距离" + item.getDist() + "km");
+                }
+                item.setPrice(item.getPrice() != null ? item.getAmount().setScale(2, BigDecimal.ROUND_HALF_UP).toString() : null);
             }
+
             return item;
         } catch (Exception e) {
             log.error("SecondRecommendServiceImpl.querySecondGoodsDetail Error Mgs={}", e.getMessage());

+ 1 - 1
alien-store/src/main/java/shop/alien/store/config/WebSocketProcess.java

@@ -79,7 +79,7 @@ public class WebSocketProcess {
         //客户端连接关闭时,移除map中存储的键值对
         concurrentHashMap.remove(id);
         log.info("WebSocketProcess.onClose() close a websocket, concurrentHashMap remove sessionId= {}", id);
-        baseRedisService.delete("blackList_" + id);
+        if (baseRedisService.hasKey("blackList_" + id)) baseRedisService.delete("blackList_" + id);
     }
 
     /**

+ 88 - 0
alien-store/src/main/java/shop/alien/store/controller/LifeGroupBuyController.java

@@ -0,0 +1,88 @@
+package shop.alien.store.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import shop.alien.entity.result.R;
+import shop.alien.entity.store.dto.LifeGroupBuyDto;
+import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
+import shop.alien.store.service.LifeGroupBuyService;
+
+/**
+ * 团购
+ */
+@Api(tags = {"重构-团购"})
+@Slf4j
+@CrossOrigin
+@RestController
+@RequestMapping("/groupBuy")
+@RequiredArgsConstructor
+public class LifeGroupBuyController {
+
+    private final LifeGroupBuyService lifeGroupBuyService;
+
+    @ApiOperation("保存套餐团购")
+    @PostMapping("/saveThali")
+    public R<Boolean> saveThali(@RequestBody LifeGroupBuyDto lifeGroupBuyDto) {
+        log.info("LifeGroupBuyController.saveThali?lifeGroupBuyDto={}", lifeGroupBuyDto.toString());
+        if (lifeGroupBuyService.saveThali(lifeGroupBuyDto)) {
+            return R.success("成功");
+        }
+        return R.fail("失败");
+    }
+
+    @ApiOperation("套餐团购列表")
+    @ApiImplicitParams({@ApiImplicitParam(name = "page", value = "页数", dataType = "Integer", paramType = "query", required = true),
+            @ApiImplicitParam(name = "size", value = "页容", dataType = "Integer", paramType = "query", required = true),
+            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "String", paramType = "query", required = true),
+            @ApiImplicitParam(name = "status", value = "状态(0草稿/1待审核/2未开始/3审核拒绝/4已售罄/5进行中/6已下架/7已结束)", dataType = "String", paramType = "query", required = false),
+            @ApiImplicitParam(name = "groupName", value = "名称", dataType = "String", paramType = "query", required = false),
+            @ApiImplicitParam(name = "groupType", value = "团购类型", dataType = "String", paramType = "query", required = false)
+    })
+    @GetMapping("/getThaliList")
+    private R<IPage<LifeGroupBuyThaliVo>> getThaliList(@RequestParam(value = "page", defaultValue = "1") int page,
+                                                       @RequestParam(value = "size", defaultValue = "10") int size,
+                                                       @RequestParam(value = "storeId") String storeId,
+                                                       @RequestParam(value = "status", required = false) String status,
+                                                       @RequestParam(value = "groupName", required = false) String groupName,
+                                                       @RequestParam(value = "groupType", required = false) String groupType) {
+        log.info("LifeGroupBuyController.getThaliList?page={},size={},storeId={},status={},groupName={},groupType={}", page, size, storeId, status, groupName, groupType);
+        return R.data(lifeGroupBuyService.getThaliList(page, size, storeId, status, groupName, groupType));
+    }
+
+    @ApiOperation("id查询套餐团购")
+    @GetMapping("/getThaliById")
+    private R getThaliById(@RequestParam("id") String id) {
+        log.info("LifeGroupBuyController.getThaliById?id={}", id);
+        return R.data(lifeGroupBuyService.getThaliById(id));
+    }
+
+    @ApiOperation("修改团购状态")
+    @GetMapping("/updateStatus")
+    private R updateStatus(@RequestParam("id") String id, @RequestParam("status") String status) {
+        log.info("LifeGroupBuyController.updateStatus?id={},status={}", id, status);
+        if (lifeGroupBuyService.updateStatus(id, status)) {
+            return R.success("成功");
+        }
+        return R.fail("失败");
+    }
+
+    @ApiOperation("删除套餐团购")
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "id", value = "id", dataType = "String", paramType = "query", required = true),
+            @ApiImplicitParam(name = "groupType", value = "团购类型(1美食)", dataType = "String", paramType = "query", required = true)
+    })
+    @GetMapping("/delThaliById")
+    private R delThaliById(@RequestParam("id") String id, @RequestParam("groupType") String groupType) {
+        log.info("LifeGroupBuyController.delThaliById?id={},groupType={}", id, groupType);
+        if (lifeGroupBuyService.delThaliById(id, groupType)) {
+            return R.success("成功");
+        }
+        return R.fail("失败");
+    }
+}

+ 12 - 10
alien-store/src/main/java/shop/alien/store/controller/StoreBusinessInfoController.java

@@ -1,21 +1,21 @@
 package shop.alien.store.controller;
 
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+
+
+
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import io.swagger.annotations.*;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.util.CollectionUtils;
 import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.StoreBusinessInfo;
-import shop.alien.entity.store.vo.StoreBusinessInfoVo;
 import shop.alien.mapper.StoreBusinessInfoMapper;
 import shop.alien.store.service.StoreBusinessInfoService;
-
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Optional;
-import java.util.stream.Collectors;
+
 
 
 /**
@@ -79,11 +79,13 @@ public class StoreBusinessInfoController {
         }
 
         if (!toSave.isEmpty()) {
-            businessInfoList.stream().forEach(str -> {
-                LambdaQueryWrapper<StoreBusinessInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-                lambdaQueryWrapper.eq(StoreBusinessInfo::getStoreId,str.getStoreId());
-                storeBusinessInfoService.remove(lambdaQueryWrapper);
-            });
+            //清除该店铺原始营业数据
+            Optional<Integer> storeId = businessInfoList.stream().map(StoreBusinessInfo::getStoreId).findFirst();
+            int value = storeId.orElse(0);
+            LambdaUpdateWrapper<StoreBusinessInfo> lambdaQueryWrapper = new LambdaUpdateWrapper<>();
+            lambdaQueryWrapper.eq(StoreBusinessInfo::getStoreId,value);
+            lambdaQueryWrapper.set(StoreBusinessInfo::getDeleteFlag,1);
+            storeBusinessInfoMapper.update(null,lambdaQueryWrapper);
             flag = storeBusinessInfoService.saveBatch(toSave); // 批量保存
         }
         if(!toUpdate.isEmpty()){

+ 7 - 0
alien-store/src/main/java/shop/alien/store/controller/StoreDictController.java

@@ -11,6 +11,7 @@ import shop.alien.store.service.StoreDictService;
 
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * 字典Controller
@@ -92,4 +93,10 @@ public class StoreDictController {
         return R.success("删除成功");
     }
 
+    @ApiOperation("获取字典集合")
+    @ApiOperationSupport(order = 1)
+    @GetMapping("/getDictList")
+    public R<Map<String, List<StoreDictionary>>> getDictList() {
+        return R.data(storeDictService.getDictList());
+    }
 }

+ 29 - 0
alien-store/src/main/java/shop/alien/store/controller/StoreImgController.java

@@ -6,8 +6,10 @@ import lombok.extern.slf4j.Slf4j;
 import org.springframework.web.bind.annotation.*;
 import shop.alien.entity.result.R;
 import shop.alien.entity.store.StoreImg;
+import shop.alien.entity.store.vo.StoreImgInfoVo;
 import shop.alien.entity.store.vo.StoreImgTypeVo;
 import shop.alien.store.service.StoreImgService;
+import shop.alien.store.service.StoreInfoService;
 
 import java.util.List;
 
@@ -27,6 +29,8 @@ import java.util.List;
 public class StoreImgController {
 
     private final StoreImgService storeImgService;
+    private final StoreInfoService storeInfoService;
+
 
     @ApiOperation("获取图片")
     @ApiOperationSupport(order = 1)
@@ -62,6 +66,31 @@ public class StoreImgController {
         return R.fail("失败");
     }
 
+    @ApiOperation("新增/修改/删除图片")
+    @ApiOperationSupport(order = 3)
+    @PostMapping("/saveOrUpdateImg")
+    public R<String> saveOrUpdateImg(@RequestBody StoreImgInfoVo storeImgInfoVo) {
+        log.info("StoreImgController.saveOrUpdateImg?storeImgInfoVo={}", storeImgInfoVo);
+        List<StoreImg> storeImgList = storeImgInfoVo.getStoreImgList();
+        if (storeImgInfoVo.getStoreId()==null || storeImgInfoVo.getImgType()==null) {
+            return R.fail("失败");
+        }
+        // 清空storeid,imgType下图片
+        int deleteCount = storeImgService.saveOrUpdateImg(storeImgInfoVo.getStoreId(),storeImgInfoVo.getImgType());
+        log.info("StoreImgController.updateStoreImgModeInfo?deleteCount={}", deleteCount);
+        int result = storeInfoService.updateStoreImgModeInfo(storeImgInfoVo);
+        log.info("StoreImgController.updateStoreImgModeInfo?result={}", result);
+        Integer id = storeImgList.get(0).getId();
+        if (storeImgService.saveOrUpdateBatch(storeImgList)) {
+            if (null != id) {
+                return R.success("修改成功");
+            }
+            return R.success("新增成功");
+        }
+        return R.fail("失败");
+    }
+
+
     @ApiOperation(value = "删除图片")
     @ApiOperationSupport(order = 4)
     @PostMapping("/delete")

+ 19 - 1
alien-store/src/main/java/shop/alien/store/controller/StoreInfoController.java

@@ -14,6 +14,7 @@ import shop.alien.entity.store.StoreInfo;
 import shop.alien.entity.store.StoreInfoDraft;
 import shop.alien.entity.store.dto.StoreInfoDto;
 import shop.alien.entity.store.vo.*;
+import shop.alien.mapper.StoreImgMapper;
 import shop.alien.store.service.StoreInfoService;
 
 import java.io.IOException;
@@ -38,6 +39,8 @@ public class StoreInfoController {
 
     private final StoreInfoService storeInfoService;
 
+    private final StoreImgMapper storeImgMapper;
+
     @ApiOperation("获取所有门店")
     @ApiOperationSupport(order = 1)
     @GetMapping("/getAll")
@@ -567,11 +570,26 @@ public class StoreInfoController {
         if (storeInfo != null) {
             if (renewContractStatus == 3) {
                 storeInfo.setContractReason(contractReason);
+                storeInfo.setRenewContractStatus(renewContractStatus);
+                storeInfo.setContractReason(contractReason);
+                boolean flag = storeInfoService.updateById(storeInfo);
+                if (flag) {
+                    return R.success("拒绝审核成功");
+                } else {
+                    return R.fail("拒绝审核失败");
+                }
             }
             storeInfo.setRenewContractStatus(renewContractStatus);
+            storeInfo.setContractReason(contractReason);
             boolean flag = storeInfoService.updateById(storeInfo);
             if (flag) {
-                return R.success("审核成功");
+                //审核通过后删除原店铺合同 续签合同类型变为合同
+                int num = storeInfoService.conversionContract(id);
+                if (num > 0) {
+                    return R.success("审核通过成功");
+                } else {
+                    return R.fail("审核通过失败");
+                }
             }
         }
         return R.fail("审核失败 店铺不存在");

+ 27 - 4
alien-store/src/main/java/shop/alien/store/controller/StoreMenuController.java

@@ -33,7 +33,7 @@ public class StoreMenuController {
     @ApiImplicitParams({
             @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true),
             @ApiImplicitParam(name = "dishType", value = "菜品类型, 0:菜单, 1:推荐", dataType = "Integer", paramType = "query"),
-            @ApiImplicitParam(name = "phoneId", value = "消息标识", dataType = "Integer", paramType = "query", required = true)
+            @ApiImplicitParam(name = "phoneId", value = "消息标识", dataType = "Integer", paramType = "query")
     })
     @GetMapping("/getMenuByStoreId")
     public R<List<StoreMenuVo>> getMenuByStoreId(Integer storeId, Integer dishType, String phoneId) {
@@ -44,9 +44,9 @@ public class StoreMenuController {
     @ApiOperation("新增或修改门店菜单")
     @ApiOperationSupport(order = 2)
     @PostMapping("/saveOrUpdate")
-    public R<String> saveOrUpdate(@RequestBody StoreMenu storeMenu) {
-        log.info("StoreRecommendController.saveOrUpdate?storeMenu={}", storeMenu);
-        return storeMenuService.saveOrUpdateMenu(storeMenu);
+    public R<String> saveOrUpdate(@RequestBody StoreMenuVo storeMenuVo) {
+        log.info("StoreRecommendController.saveOrUpdateMenu?storeMenu={}", storeMenuVo);
+        return storeMenuService.saveOrUpdateMenus(storeMenuVo);
     }
 
     @ApiOperation(value = "删除门店菜单")
@@ -86,5 +86,28 @@ public class StoreMenuController {
         }
     }
 
+    @ApiOperation("保存菜品排序")
+    @ApiOperationSupport(order = 6)
+    @PostMapping("/saveMenuSort")
+    public R<Boolean> saveMenuSort(@RequestBody List<StoreMenu> storeMenuList) {
+        log.info("StoreRecommendController.saveMenuSort?storeMenuList={}", storeMenuList);
+        Boolean flag = false;
+        flag = storeMenuService.saveMenuSort(storeMenuList);
+        if(flag){
+            return R.success("已更新排序");
+        }else{
+            return R.fail("排序失败");
+        }
+    }
 
+    @ApiOperation("获取门店菜品推荐数量")
+    @ApiOperationSupport(order = 1)
+    @ApiImplicitParams({
+            @ApiImplicitParam(name = "storeId", value = "门店id", dataType = "Integer", paramType = "query", required = true)
+    })
+    @GetMapping("/getMenuCountByStoreId")
+    public R<StoreMenuVo> getMenuCountByStoreId(Integer storeId) {
+        log.info("StoreRecommendController.getMenuCountByStoreId?id={}", storeId);
+        return R.data(storeMenuService.getMenuCountByStoreId(storeId));
+    }
 }

+ 62 - 0
alien-store/src/main/java/shop/alien/store/controller/StoreOfficialAlbumController.java

@@ -0,0 +1,62 @@
+package shop.alien.store.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiOperationSupport;
+import io.swagger.annotations.ApiSort;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import shop.alien.entity.result.R;
+import shop.alien.entity.store.StoreOfficialAlbum;
+import shop.alien.entity.store.vo.StoreOfficialAlbumVo;
+import shop.alien.store.service.StoreOfficialAlbumService;
+
+import java.util.List;
+
+/**
+ * 标签前端控制器
+ *
+ * @author zhangchen
+ * @since 2025-07-16
+ */
+@Slf4j
+@Api(tags = {"二期-官方相册"})
+@ApiSort(1)
+@CrossOrigin
+@RestController
+@RequestMapping("/store/official")
+@RequiredArgsConstructor
+public class StoreOfficialAlbumController {
+    private final StoreOfficialAlbumService storeOfficialAlbumService;
+
+    @ApiOperation("创建/更新官方相册")
+    @ApiOperationSupport(order = 1)
+    @PostMapping("/createOrUpdateOfficialAlbum")
+    public R<StoreOfficialAlbum> createOrUpdateOfficialAlbum(@RequestBody StoreOfficialAlbum storeOfficialAlbum) {
+        log.info("StoreOfficialAlbumController.createOfficialAlbum?storeOfficialAlbum={}", storeOfficialAlbum);
+        StoreOfficialAlbum storeOfficial = storeOfficialAlbumService.createOrUpdateOfficialAlbum(storeOfficialAlbum);
+        return R.data(storeOfficial);
+    }
+
+    @ApiOperation("获取官方相册列表")
+    @ApiOperationSupport(order = 2)
+    @GetMapping("/getOfficialAlbumList")
+    public R<List<StoreOfficialAlbumVo>> getOfficialAlbumList(String storeId) {
+        log.info("StoreOfficialAlbumController.getOfficialAlbumList");
+        List<StoreOfficialAlbumVo> storeOfficialAlbumList = storeOfficialAlbumService.getOfficialAlbumList(storeId);
+        return R.data(storeOfficialAlbumList);
+    }
+
+    @ApiOperation("删除官方相册")
+    @ApiOperationSupport(order = 3)
+    @PostMapping("/deleteOfficialAlbum")
+    public  R<Boolean> deleteOfficialAlbum(@RequestBody List<StoreOfficialAlbum> storeOfficialAlbumList) {
+        log.info("StoreOfficialAlbumController.deleteOfficialAlbum");
+        int result = storeOfficialAlbumService.deleteOfficialAlbum(storeOfficialAlbumList);
+        if (result > 0) {
+            return R.data(true);
+        }
+        return R.fail("失败");
+    }
+}

+ 143 - 0
alien-store/src/main/java/shop/alien/store/controller/TagCategoryController.java

@@ -0,0 +1,143 @@
+package shop.alien.store.controller;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import io.swagger.annotations.*;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.web.bind.annotation.*;
+import shop.alien.entity.result.R;
+import shop.alien.entity.store.*;
+import shop.alien.entity.store.vo.TagCategoryVo;
+import shop.alien.store.service.StoreTagBusinessRelationService;
+import shop.alien.store.service.StoreTagService;
+import shop.alien.store.service.TagStoreRelationService;
+
+import java.util.List;
+
+/**
+ * 标签前端控制器
+ *
+ * @author zhangchen
+ * @since 2025-07-16
+ */
+@Slf4j
+@Api(tags = {"二期-标签信息"})
+@ApiSort(1)
+@CrossOrigin
+@RestController
+@RequestMapping("/store/tag")
+@RequiredArgsConstructor
+public class TagCategoryController {
+    private final StoreTagService tagCategoryService;
+    private final StoreTagBusinessRelationService storeTagBusinessRelationService;
+    private final TagStoreRelationService tagStoreRelationService;
+
+    @ApiOperation("创建标签")
+    @ApiOperationSupport(order = 1)
+    @PostMapping("/createTag")
+    public R<TagCategory> createTag(@RequestBody TagCategory tagCategory) {
+        log.info("TagCategoryController.createTag?tagCategoryVO={}", tagCategory);
+        TagCategory tag = tagCategoryService.createTag(tagCategory);
+        return R.data(tag);
+    }
+
+    @ApiOperation("获取标签列表")
+    @ApiOperationSupport(order = 2)
+    @GetMapping("/getTagList")
+    public R<IPage<TagCategory>> getTagList(@RequestParam(defaultValue = "1") int pageNum,
+                                            @RequestParam(defaultValue = "10") int pageSize,
+                                            @RequestParam(required = false) String label,
+                                            @RequestParam(required = false) String labelType,
+                                            @RequestParam(required = false) String labelButtonType
+
+    ) {
+        log.info("TagCategoryController.getTagList");
+        IPage<TagCategory> storeCouponList = tagCategoryService.getTagList(pageNum, pageSize,label,labelType,labelButtonType);
+        return R.data(storeCouponList);
+    }
+
+    @ApiOperation("删除标签")
+    @ApiOperationSupport(order = 3)
+    @PostMapping("/deleteTagCategory")
+    public  R<Boolean> deleteTagCategory(@RequestBody TagCategory tagCategory) {
+        log.info("TagCategoryController.deleteTagCategory");
+        int result = tagCategoryService.deleteTag(tagCategory);
+        if (result > 0) {
+            return R.data(true);
+        }
+        return R.fail("失败");
+    }
+
+    @ApiOperation("修改标签")
+    @ApiOperationSupport(order = 4)
+    @PostMapping("/updateTagCategory")
+    public R<Boolean> updateTagCategory(@RequestBody TagCategory tagCategory) {
+        log.info("TagCategoryController.updateTagCategory?tagCategory={}", tagCategory);
+        int num = tagCategoryService.updateTagCategory(tagCategory);
+        if (num > 0) {
+            return R.data(true);
+        }
+        return R.fail("失败");
+    }
+
+    @ApiOperation("创建标签经营类型关系")
+    @ApiOperationSupport(order = 5)
+    @PostMapping("/createTagBusinessRelation")
+    public R<TagBusinessRelation> createTagBusinessRelation(@RequestBody TagBusinessRelation tagBusinessRelation) {
+        log.info("TagCategoryController.createTagBusinessRelation?tagBusinessRelation={}", tagBusinessRelation);
+        TagBusinessRelation tag = storeTagBusinessRelationService.createTagBusinessRelation(tagBusinessRelation);
+        return R.data(tag);
+    }
+
+    @ApiOperation("获取经营类型标签信息")
+    @ApiOperationSupport(order = 2)
+    @GetMapping("/getBusinessRelationTagList")
+    public R<List<TagCategoryVo>> getBusinessRelationTagList(@RequestParam(required = false) Integer businessSection) {
+        log.info("TagCategoryController.getBusinessRelationTagList");
+        List<TagCategoryVo> tagCategoryVoList = tagCategoryService.getBusinessRelationTagList(businessSection);
+        return R.data(tagCategoryVoList);
+    }
+
+
+    @ApiOperation("获取标签经营类型关系")
+    @ApiOperationSupport(order = 6)
+    @GetMapping("/getTagBusinessRelationList")
+    public R<IPage<TagBusinessRelation>> getTagBusinessRelationList(@RequestParam(defaultValue = "1") int page,
+                                            @RequestParam(defaultValue = "10") int size, @RequestParam(required = false) int businessSection,
+                                            @RequestParam(required = false) String businessSectionName
+    ) {
+        log.info("TagCategoryController.getTagBusinessRelationList");
+        IPage<TagBusinessRelation> tagBusinessRelationList = storeTagBusinessRelationService.getTagBusinessRelationList(page, size, businessSection, businessSectionName);
+        return R.data(tagBusinessRelationList);
+    }
+
+    @ApiOperation("删除标签经营类型关系")
+    @ApiOperationSupport(order = 7)
+    @PostMapping("/deleteTagBusinessRelation")
+    public  R<Boolean> deleteTagBusinessRelation(@RequestBody TagBusinessRelation tagBusinessRelation) {
+        log.info("TagCategoryController.deleteTagBusinessRelation");
+        int result = storeTagBusinessRelationService.deleteTagBusinessRelation(tagBusinessRelation);
+        if (result > 0) {
+            return R.data(true);
+        }
+        return R.fail("失败");
+    }
+
+    @ApiOperation("创建/更新店铺标签关系")
+    @ApiOperationSupport(order = 8)
+    @PostMapping("/createOrUpdateTagStoreRelation")
+    public R<TagStoreRelation> createOrUpdateTagStoreRelation(@RequestBody TagStoreRelation tagStoreRelation) {
+        log.info("TagCategoryController.createOrUpdateTagStoreRelation?tagStoreRelation={}", tagStoreRelation);
+        TagStoreRelation tag = tagStoreRelationService.createOrUpdateTagStoreRelation(tagStoreRelation);
+        return R.data(tag);
+    }
+
+    @ApiOperation("获取标签经营类型关系")
+    @ApiOperationSupport(order = 9)
+    @GetMapping("/getTagStoreRelationByStoreId")
+    public R<TagStoreRelation> getTagStoreRelationByStoreId( @RequestParam(required = true) Integer storeId) {
+        log.info("TagCategoryController.getTagStoreRelationByStoreId={}", storeId);
+        TagStoreRelation tagStoreRelation = tagStoreRelationService.getTagStoreRelationByStoreId(storeId);
+        return R.data(tagStoreRelation);
+    }
+}

+ 25 - 0
alien-store/src/main/java/shop/alien/store/service/LifeGroupBuyService.java

@@ -0,0 +1,25 @@
+package shop.alien.store.service;
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import org.springframework.transaction.annotation.Transactional;
+import shop.alien.entity.store.LifeGroupBuyMain;
+import shop.alien.entity.store.dto.LifeGroupBuyDto;
+import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
+
+/**
+ * 团购
+ */
+public interface LifeGroupBuyService extends IService<LifeGroupBuyMain> {
+
+    @Transactional(rollbackFor = Exception.class)
+    boolean saveThali(LifeGroupBuyDto lifeGroupBuyDto);
+
+    IPage<LifeGroupBuyThaliVo> getThaliList(int page, int size, String storeId, String status, String groupName, String groupType);
+
+    LifeGroupBuyThaliVo getThaliById(String id);
+
+    boolean updateStatus(String id,String status);
+
+    boolean delThaliById(String id,String groupType);
+}

+ 2 - 0
alien-store/src/main/java/shop/alien/store/service/LifeUserDynamicsService.java

@@ -358,6 +358,7 @@ public class LifeUserDynamicsService extends ServiceImpl<LifeUserDynamicsMapper,
         LifeBlacklist lifeBlacklist = lifeBlacklistMapper.selectOne(lifeBlacklistWrapper);
         //是否拉黑 已拉黑1 未拉黑0
         int isBlocked = lifeBlacklist != null ? 1 : 0;
+        int blockId = lifeBlacklist != null ? lifeBlacklist.getId() : 0;
 
         // 好友动态
         LambdaQueryWrapper<LifeUserDynamics> wrapper = new LambdaQueryWrapper<>();
@@ -408,6 +409,7 @@ public class LifeUserDynamicsService extends ServiceImpl<LifeUserDynamicsMapper,
         resultMap.put("likeListSum", dianzanCount);
 
         resultMap.put("isBlocked", isBlocked);
+        resultMap.put("blockId", blockId);
         resultMap.put("lifeUserDynamics", lifeUserDynamicsVoList);
         if (lifeUser.getUserName() != null) {
             resultMap.put("name", lifeUser.getUserName());

+ 4 - 0
alien-store/src/main/java/shop/alien/store/service/StoreDictService.java

@@ -2,8 +2,10 @@ package shop.alien.store.service;
 
 import com.baomidou.mybatisplus.extension.service.IService;
 import shop.alien.entity.store.StoreDictionary;
+import shop.alien.entity.store.vo.StoreDictionaryVo;
 
 import java.util.List;
+import java.util.Map;
 
 /**
  * 字典Service
@@ -38,4 +40,6 @@ public interface StoreDictService extends IService<StoreDictionary> {
      */
     boolean deleteDict(Integer id);
 
+    Map<String, List<StoreDictionary>> getDictList();
+
 }

+ 8 - 0
alien-store/src/main/java/shop/alien/store/service/StoreImgService.java

@@ -62,4 +62,12 @@ public interface StoreImgService extends IService<StoreImg> {
      * @return list
      */
     List<StoreImg> getByBusinessId(Integer storeId, Integer imgType, Integer businessId);
+
+    /**
+     * 删除图片
+     *
+     * @param storeId 门店id
+     * @param imgType 图片类型, 0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉, 10:商家头像, 11:店铺轮播图
+     */
+    int saveOrUpdateImg(Integer storeId, Integer imgType);
 }

+ 8 - 0
alien-store/src/main/java/shop/alien/store/service/StoreInfoService.java

@@ -253,4 +253,12 @@ public interface StoreInfoService extends IService<StoreInfo> {
      *
      */
     Map<String,Object> getStoreContractStatus(int id);
+    int updateStoreImgModeInfo(StoreImgInfoVo storeImgInfoVo);
+
+
+    /**
+     * 审核通过续签合同转为正常合同删除之前合同
+     *
+     */
+    int conversionContract(int id);
 }

+ 16 - 0
alien-store/src/main/java/shop/alien/store/service/StoreMenuService.java

@@ -41,6 +41,12 @@ public interface StoreMenuService extends IService<StoreMenu> {
     R<String> saveOrUpdateMenu(StoreMenu storeMenu);
 
     /**
+     * 新增或修改门店菜单
+     *
+     */
+    R<String> saveOrUpdateMenus(StoreMenuVo storeMenuVo);
+
+    /**
      *
      * 菜品排序
      */
@@ -48,8 +54,18 @@ public interface StoreMenuService extends IService<StoreMenu> {
 
     /**
      *
+     * 保存菜品排序
+     */
+    Boolean saveMenuSort(List<StoreMenu> storeMenuList);
+
+    /**
+     *
      * 删除门店菜单
      */
     Boolean deleteMenu(List<Integer> ids, int dishType);
+
+
+
+    StoreMenuVo getMenuCountByStoreId(int storeId);
 }
 

+ 16 - 0
alien-store/src/main/java/shop/alien/store/service/StoreOfficialAlbumService.java

@@ -0,0 +1,16 @@
+package shop.alien.store.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import shop.alien.entity.store.StoreOfficialAlbum;
+import shop.alien.entity.store.vo.StoreOfficialAlbumVo;
+
+import java.util.List;
+
+/**
+ * 官方相册服务
+ */
+public interface StoreOfficialAlbumService extends IService<StoreOfficialAlbum> {
+    StoreOfficialAlbum createOrUpdateOfficialAlbum(StoreOfficialAlbum storeOfficialAlbum);
+    List<StoreOfficialAlbumVo> getOfficialAlbumList(String storeId);
+    int deleteOfficialAlbum(List<StoreOfficialAlbum> storeOfficialAlbumList);
+}

+ 16 - 0
alien-store/src/main/java/shop/alien/store/service/StoreTagBusinessRelationService.java

@@ -0,0 +1,16 @@
+package shop.alien.store.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import shop.alien.entity.store.TagBusinessRelation;
+
+/**
+ * 标签服务
+ */
+
+public interface StoreTagBusinessRelationService extends IService<TagBusinessRelation> {
+    TagBusinessRelation createTagBusinessRelation(TagBusinessRelation tagBusinessRelation);
+    IPage<TagBusinessRelation> getTagBusinessRelationList(int page, int size, int businessSection, String businessSectionName);
+    int deleteTagBusinessRelation(TagBusinessRelation tagBusinessRelation);
+}

+ 22 - 0
alien-store/src/main/java/shop/alien/store/service/StoreTagService.java

@@ -0,0 +1,22 @@
+package shop.alien.store.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.service.IService;
+import shop.alien.entity.store.TagCategory;
+import shop.alien.entity.store.vo.TagCategoryVo;
+
+import java.util.List;
+
+/**
+ * 标签服务
+ */
+
+public interface StoreTagService extends IService<TagCategory> {
+
+    TagCategory createTag(TagCategory tagCategory);
+    IPage<TagCategory> getTagList(int page, int size,String label,String labelType, String labelButtonType);
+    int deleteTag(TagCategory tagCategory);
+    int updateTagCategory(TagCategory tagCategory);
+    List<TagCategoryVo> getBusinessRelationTagList(Integer businessSection);
+}

+ 16 - 0
alien-store/src/main/java/shop/alien/store/service/TagStoreRelationService.java

@@ -0,0 +1,16 @@
+package shop.alien.store.service;
+
+
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import shop.alien.entity.store.TagBusinessRelation;
+import shop.alien.entity.store.TagStoreRelation;
+
+/**
+ * 店铺标签服务接口
+ */
+
+public interface TagStoreRelationService {
+
+    TagStoreRelation createOrUpdateTagStoreRelation(TagStoreRelation tagStoreRelation);
+    TagStoreRelation getTagStoreRelationByStoreId(int storeId);
+}

+ 158 - 0
alien-store/src/main/java/shop/alien/store/service/impl/LifeGroupBuyServiceImpl.java

@@ -0,0 +1,158 @@
+package shop.alien.store.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.*;
+import shop.alien.entity.store.dto.LifeGroupBuyDto;
+import shop.alien.entity.store.vo.LifeGroupBuyThaliVo;
+import shop.alien.entity.store.vo.StoreMenuVo;
+import shop.alien.mapper.*;
+import shop.alien.store.service.LifeGroupBuyService;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * 团购
+ */
+@Service
+@RequiredArgsConstructor
+public class LifeGroupBuyServiceImpl extends ServiceImpl<LifeGroupBuyMainMapper, LifeGroupBuyMain> implements LifeGroupBuyService {
+
+    private final LifeGroupBuyMainMapper lifeGroupBuyMainMapper;
+
+    private final LifeGroupBuyThaliMapper lifeGroupBuyThaliMapper;
+
+    private final StoreImgMapper storeImgMapper;
+
+    private final EssentialHolidayComparisonMapper essentialHolidayComparisonMapper;
+
+    private final StoreMenuMapper storeMenuMapper;
+
+    @Override
+    public boolean saveThali(LifeGroupBuyDto lifeGroupBuyDto) {
+        LifeGroupBuyMain lifeGroupBuyMain = lifeGroupBuyDto.getLifeGroupBuyMain();
+        List<LifeGroupBuyThali> lifeGroupBuyThalis = lifeGroupBuyDto.getLifeGroupBuyThalis();
+        if (ObjectUtils.isEmpty(lifeGroupBuyMain.getId())) {
+            lifeGroupBuyMainMapper.insert(lifeGroupBuyMain);
+            if (ObjectUtils.isNotEmpty(lifeGroupBuyThalis)) {
+                for (LifeGroupBuyThali lifeGroupBuyThali : lifeGroupBuyThalis) {
+                    lifeGroupBuyThali.setParentId(lifeGroupBuyMain.getId().toString());
+                    lifeGroupBuyThaliMapper.insert(lifeGroupBuyThali);
+                }
+            }
+            return true;
+        } else {
+            lifeGroupBuyMainMapper.updateById(lifeGroupBuyMain);
+            lifeGroupBuyThaliMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyThali>().eq(LifeGroupBuyThali::getParentId, lifeGroupBuyMain.getId()).set(LifeGroupBuyThali::getDeleteFlag, 1));
+            if (ObjectUtils.isNotEmpty(lifeGroupBuyThalis)) {
+                for (LifeGroupBuyThali lifeGroupBuyThali : lifeGroupBuyThalis) {
+                    lifeGroupBuyThali.setParentId(lifeGroupBuyMain.getId().toString());
+                    lifeGroupBuyThaliMapper.insert(lifeGroupBuyThali);
+                }
+            }
+            return true;
+        }
+    }
+
+    @Override
+    public IPage<LifeGroupBuyThaliVo> getThaliList(int page, int size, String storeId, String status, String groupName, String groupType) {
+        QueryWrapper<LifeGroupBuyThaliVo> queryWrapper = new QueryWrapper<>();
+        queryWrapper.eq(StringUtils.isNotEmpty(storeId), "store_id", storeId)
+                .eq(StringUtils.isNotEmpty(status), "status", status)
+                .eq(StringUtils.isNotEmpty(groupType), "group_type", groupType)
+                .like(StringUtils.isNotEmpty(groupName), "group_name", groupName)
+                .eq("delete_flag", 0)
+                .orderByDesc("created_time");
+        IPage<LifeGroupBuyThaliVo> lifeGroupBuyThaliVoIPage = new Page<>(page, size);
+        IPage<LifeGroupBuyThaliVo> lifeGroupBuyMainIPage = lifeGroupBuyMainMapper.selectPageByThaliVo(lifeGroupBuyThaliVoIPage, queryWrapper);
+        List<LifeGroupBuyThaliVo> records = lifeGroupBuyMainIPage.getRecords();
+        if (ObjectUtils.isNotEmpty(records)) {
+            List<Integer> collect = records.stream().map(LifeGroupBuyThaliVo::getId).collect(Collectors.toList());
+            List<LifeGroupBuyThali> lifeGroupBuyThalis = lifeGroupBuyThaliMapper.selectList(new LambdaQueryWrapper<LifeGroupBuyThali>().in(LifeGroupBuyThali::getParentId, collect).eq(LifeGroupBuyThali::getDeleteFlag, 0));
+            records.forEach(i -> i.setDetails(lifeGroupBuyThalis.stream().filter(d -> i.getId().toString().equals(d.getParentId())).collect(Collectors.toList())));
+            for (LifeGroupBuyThaliVo record : records) {
+                record.setDetails(lifeGroupBuyThalis.stream().filter(d -> record.getId().toString().equals(d.getParentId())).collect(Collectors.toList()));
+
+                getMainImgAndDisableDate(record);
+            }
+        }
+        return lifeGroupBuyMainIPage;
+    }
+
+    @Override
+    public LifeGroupBuyThaliVo getThaliById(String id) {
+        LifeGroupBuyMain lifeGroupBuyMain = lifeGroupBuyMainMapper.selectById(id);
+        LifeGroupBuyThaliVo lifeGroupBuyThaliVo = new LifeGroupBuyThaliVo();
+        BeanUtils.copyProperties(lifeGroupBuyMain, lifeGroupBuyThaliVo);
+        List<LifeGroupBuyThali> lifeGroupBuyThalis = lifeGroupBuyThaliMapper.selectList(new LambdaQueryWrapper<LifeGroupBuyThali>().eq(LifeGroupBuyThali::getParentId, id).eq(LifeGroupBuyThali::getDeleteFlag, 0));
+
+        //美食
+        if (lifeGroupBuyMain.getGroupType() == 1) {
+            for (LifeGroupBuyThali lifeGroupBuyThali : lifeGroupBuyThalis) {
+                if (StringUtils.isNotEmpty(lifeGroupBuyThali.getDetailId())) {
+                    StoreMenuVo menuInfo = storeMenuMapper.getMenuInfo(Integer.parseInt(lifeGroupBuyThali.getDetailId()));
+                    if (ObjectUtils.isNotEmpty(menuInfo)) {
+                        lifeGroupBuyThali.setDetailName(menuInfo.getDishName());
+                        lifeGroupBuyThali.setDetailImg(menuInfo.getImgUrl());
+                        lifeGroupBuyThali.setDetailPrice(menuInfo.getDishPrice().toString());
+                        lifeGroupBuyThali.setDetailUnit(menuInfo.getDishesUnit());
+                    }
+                }
+            }
+        }
+
+        lifeGroupBuyThaliVo.setDetails(lifeGroupBuyThalis);
+        getMainImgAndDisableDate(lifeGroupBuyThaliVo);
+        return lifeGroupBuyThaliVo;
+    }
+
+    @Override
+    public boolean updateStatus(String id, String status) {
+        lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getId, id).set(LifeGroupBuyMain::getStatus, status));
+        return true;
+    }
+
+    @Override
+    public boolean delThaliById(String id, String groupType) {
+        if ("1".equals(groupType)) {
+            lifeGroupBuyThaliMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyThali>().eq(LifeGroupBuyThali::getParentId, id).set(LifeGroupBuyThali::getDeleteFlag, 1));
+        }
+        lifeGroupBuyMainMapper.update(null, new LambdaUpdateWrapper<LifeGroupBuyMain>().eq(LifeGroupBuyMain::getId, id).set(LifeGroupBuyMain::getDeleteFlag, 1));
+        return true;
+    }
+
+    private void getMainImgAndDisableDate(LifeGroupBuyThaliVo record) {
+        //图片
+        if (StringUtils.isNotEmpty(record.getImageId())) {
+            List<String> imgIds = Arrays.asList(record.getImageId().split(","));
+            List<StoreImg> storeImgs = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>().in(StoreImg::getId, imgIds));
+            if (ObjectUtils.isNotEmpty(storeImgs)) {
+                String imgs = storeImgs.stream()
+                        .map(StoreImg::getImgUrl)
+                        .collect(Collectors.joining(","));
+                record.setImageValueStr(imgs);
+            }
+        }
+        //不可用日期
+        if (ObjectUtils.isNotEmpty(record.getDisableDateType())) {
+            if (record.getDisableDateType() == 1) {
+                List<String> valueList = Arrays.asList(record.getDisableDateValue().split(";"));
+                List<String> list = Arrays.asList(valueList.get(1).split(","));
+                List<EssentialHolidayComparison> essentialHolidayComparisons = essentialHolidayComparisonMapper.selectList(new LambdaQueryWrapper<EssentialHolidayComparison>().in(EssentialHolidayComparison::getId, list));
+                String holiday = essentialHolidayComparisons.stream().map(EssentialHolidayComparison::getFestivalName).collect(Collectors.joining(","));
+                record.setDisableDateValueStr(valueList.get(0) + ";" + holiday);
+            }
+        }
+    }
+}

+ 71 - 2
alien-store/src/main/java/shop/alien/store/service/impl/StoreDictServiceImpl.java

@@ -1,15 +1,21 @@
 package shop.alien.store.service.impl;
 
+import com.alibaba.excel.util.CollectionUtils;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.BeanUtils;
 import org.springframework.stereotype.Service;
 import shop.alien.entity.store.StoreDictionary;
+import shop.alien.entity.store.StoreMenu;
+import shop.alien.entity.store.vo.StoreDictionaryVo;
 import shop.alien.mapper.StoreDictionaryMapper;
 import shop.alien.store.service.StoreDictService;
+import shop.alien.store.util.CommonConstant;
 
-import java.util.Date;
-import java.util.List;
+import java.util.*;
+import java.util.stream.Collectors;
 
 /**
  * 字典ServiceImpl
@@ -62,4 +68,67 @@ public class StoreDictServiceImpl extends ServiceImpl<StoreDictionaryMapper, Sto
     public boolean deleteDict(Integer id) {
         return this.removeById(id);
     }
+
+    /**
+     * 根据typeName查询字典
+     *
+     * @return Map
+     */
+    @Override
+    public Map<String, List<StoreDictionary>> getDictList() {
+
+        // typeNameList为空,则使用默认的typeName列表
+        String typeName = CommonConstant.STORE_DICT_TYPENAME;
+        List<String> typeNameList = Arrays.stream(typeName.split(","))
+                    .map(String::trim)
+                    .filter(s -> !s.isEmpty())
+                    .collect(Collectors.toList());
+
+        // 查询字典列表
+        List<StoreDictionary> storeDictionaryList =  storeDictionaryMapper.selectList(
+                new LambdaQueryWrapper<StoreDictionary>().in(StoreDictionary::getTypeName, typeNameList).eq(StoreDictionary::getDeleteFlag,0));
+
+        // 对字典列表构造父子结构
+        List<StoreDictionary> storeDictionaries = buildTreeOptimized(storeDictionaryList);
+
+        // 根据typeName进行分组
+        return storeDictionaries.stream()
+                .collect(Collectors.groupingBy(StoreDictionary::getTypeName));
+    }
+
+    public List<StoreDictionary> buildTreeOptimized(List<StoreDictionary> flatList) {
+        // 创建三个存储结构
+        Map<Integer, StoreDictionary> nodeMap = new HashMap<>();  // ID到节点的映射
+        Map<Integer, List<StoreDictionary>> parentChildMap = new HashMap<>();  // 父ID到子节点列表的映射
+        List<StoreDictionary> result = new ArrayList<>();  // 结果列表
+
+        // 填充nodeMap和parentChildMap
+        for (StoreDictionary entity : flatList) {
+            Integer id = entity.getId();
+            Integer parentId = entity.getParentId();
+
+            // 存入节点映射
+            nodeMap.put(id, entity);
+
+            // 初始化子节点列表
+            entity.setStoreDictionaryList(new ArrayList<>());
+
+            // 如果是根节点,直接添加到结果
+            if (parentId == null || parentId==0 || !nodeMap.containsKey(parentId)) {
+                result.add(entity);
+            } else {
+                // 否则,记录父子关系
+                parentChildMap.computeIfAbsent(parentId, k -> new ArrayList<>()).add(entity);
+            }
+        }
+
+        // 建立父子关系
+        for (StoreDictionary entity : flatList) {
+            Integer id = entity.getId();
+            if (parentChildMap.containsKey(id)) {
+                entity.getStoreDictionaryList().addAll(parentChildMap.get(id));
+            }
+        }
+        return result;
+    }
 }

+ 21 - 2
alien-store/src/main/java/shop/alien/store/service/impl/StoreImgServiceImpl.java

@@ -2,17 +2,21 @@ package shop.alien.store.service.impl;
 
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 import shop.alien.entity.result.R;
+import shop.alien.entity.store.LifeClassManage;
 import shop.alien.entity.store.LifeUser;
 import shop.alien.entity.store.StoreImg;
+import shop.alien.entity.store.StoreOfficialAlbum;
 import shop.alien.entity.store.vo.StoreImgTypeVo;
 import shop.alien.mapper.LifeUserMapper;
 import shop.alien.mapper.StoreImgMapper;
+import shop.alien.mapper.StoreOfficialAlbumMapper;
 import shop.alien.store.service.StoreImgService;
 
 import java.util.Comparator;
@@ -32,6 +36,7 @@ import java.util.stream.Collectors;
 public class StoreImgServiceImpl extends ServiceImpl<StoreImgMapper, StoreImg> implements StoreImgService {
 
     private final StoreImgMapper storeImgMapper;
+    private final StoreOfficialAlbumMapper storeOfficialAlbumMapper;
     private final LifeUserMapper lifeUserMapper;
 
     /**
@@ -44,7 +49,7 @@ public class StoreImgServiceImpl extends ServiceImpl<StoreImgMapper, StoreImg> i
     @Override
     public List<StoreImg> getStoreImg(Integer storeId, Integer imgType) {
         LambdaQueryWrapper<StoreImg> lambdaQueryWrapper = new LambdaQueryWrapper<>();
-        lambdaQueryWrapper.eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, imgType);
+        lambdaQueryWrapper.eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, imgType).orderByAsc(StoreImg::getImgSort);
         return this.list(lambdaQueryWrapper);
     }
 
@@ -152,7 +157,21 @@ public class StoreImgServiceImpl extends ServiceImpl<StoreImgMapper, StoreImg> i
         LambdaQueryWrapper<StoreImg> lambdaQueryWrapper = new LambdaQueryWrapper<>();
         lambdaQueryWrapper.eq(StoreImg::getStoreId, storeId)
                 .eq(StoreImg::getImgType, imgType)
-                .eq(StoreImg::getBusinessId, businessId);
+                .eq(StoreImg::getBusinessId, businessId).orderByAsc(StoreImg::getImgSort);
+        List<StoreImg> storeImgList = this.list(lambdaQueryWrapper);
+        int imgCount = storeImgList.size();
+        LambdaUpdateWrapper<StoreOfficialAlbum> updateWrapper = new LambdaUpdateWrapper<>();
+        updateWrapper.eq(StoreOfficialAlbum::getId, businessId).set(StoreOfficialAlbum::getImgCount, imgCount);
+        storeOfficialAlbumMapper.update(null, updateWrapper);
         return this.list(lambdaQueryWrapper);
     }
+
+    @Override
+    public int saveOrUpdateImg(Integer storeId, Integer imgType) {
+        int result = 0;
+        if(storeId !=null && storeId > 0 && imgType != null){
+            result = storeImgMapper.delete(new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getStoreId, storeId).eq(StoreImg::getImgType, imgType));
+        }
+        return result;
+    }
 }

+ 48 - 14
alien-store/src/main/java/shop/alien/store/service/impl/StoreInfoServiceImpl.java

@@ -36,6 +36,7 @@ import shop.alien.store.config.GaoDeMapUtil;
 import shop.alien.store.service.NearMeService;
 import shop.alien.store.service.StoreInfoService;
 import shop.alien.store.util.FileUploadUtil;
+import shop.alien.store.util.GroupConstant;
 import shop.alien.util.common.DistanceUtil;
 
 import java.io.IOException;
@@ -206,8 +207,10 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         //存入门店地址
         storeMainInfoVo.setStoreAddress(storeInfo.getStoreAddress());
         //经营种类
-        String[] strings = storeInfo.getBusinessTypes().split(",");
-        storeMainInfoVo.setBusinessTypesList(Arrays.stream(strings).collect(Collectors.toList()));
+        if(storeInfo.getBusinessTypes()!=null){
+            String[] strings = storeInfo.getBusinessTypes().split(",");
+            storeMainInfoVo.setBusinessTypesList(Arrays.stream(strings).collect(Collectors.toList()));
+        }
         //门店标签
         storeMainInfoVo.setStoreLabel(storeLabelMapper.selectOne(new LambdaQueryWrapper<StoreLabel>().eq(StoreLabel::getStoreId, id)));
         //营业时间
@@ -1517,8 +1520,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             if (storeInfodto.getId() != null) {
                 //效验当前店铺存在未完成的订单及正在销售的商品
                 verificationStoreInfoStatus(storeInfodto);
-                if (storeInfodto.getBusinessStatus() == 0) {
-
                     StoreInfo storeInfoOne = storeInfoMapper.selectOne(new LambdaQueryWrapper<StoreInfo>().eq(StoreInfo::getId, storeInfodto.getId()));
                     if (storeInfoOne.getBusinessStatus() == 99) {
                         throw new RuntimeException("该店铺已经永久关闭不能更改状态为正常营业");
@@ -1574,7 +1575,6 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
                     } else {
                         throw new RuntimeException("修改失败");
                     }
-                }
 
             } else {
                 StoreInfo storeInfoOne = new StoreInfo();
@@ -1646,19 +1646,19 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             StoreImg storeImg = new StoreImg();
             storeImg.setStoreId(renewContract.getStoreId());
             storeImg.setImgType(22);
-            storeImg.setImgSort(0);
+            storeImg.setImgSort(renewContract.getImgSort());
             storeImg.setImgDescription("续签合同图片");
             storeImg.setImgUrl(renewContract.getImgUrl());
             storeImg.setCreatedUserId(renewContract.getCreatedUserId());
             num = storeImgMapper.insert(storeImg);
-            if(num>0){
-                Optional<Integer> storeId = storeImgList.stream().map(StoreImg::getStoreId).findFirst();
-                int value = storeId.orElse(0);
-                StoreInfo storeInfo = new StoreInfo();
-                storeInfo.setRenewContractStatus(2);
-                storeInfo.setId(value);
-                storeInfoMapper.updateById(storeInfo);
-            }
+        }
+        if(num>0){
+            Optional<Integer> storeId = storeImgList.stream().map(StoreImg::getStoreId).findFirst();
+            int value = storeId.orElse(0);
+            StoreInfo storeInfo = new StoreInfo();
+            storeInfo.setRenewContractStatus(2);
+            storeInfo.setId(value);
+            storeInfoMapper.updateById(storeInfo);
         }
             return num;
     }
@@ -1688,6 +1688,22 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
         return map;
     }
 
+    @Override
+    public int conversionContract(int id) {
+        //删除原合同照片
+        LambdaQueryWrapper<StoreImg> lambdaQueryWrapper = new LambdaQueryWrapper<>();
+        lambdaQueryWrapper.eq(StoreImg::getStoreId,id);
+        lambdaQueryWrapper.eq(StoreImg::getImgType,15);
+        storeImgMapper.delete(lambdaQueryWrapper);
+        //修改续签合同类型为合同类型
+        List<StoreImg> storeImgList = storeImgMapper.selectList(new LambdaQueryWrapper<StoreImg>().eq(StoreImg::getStoreId,id).eq(StoreImg::getImgType,22));
+        List<Integer> imgList = storeImgList.stream().map(StoreImg::getId).collect(Collectors.toList());
+        LambdaUpdateWrapper<StoreImg> lambdaUpdateWrapper = new LambdaUpdateWrapper();
+        lambdaUpdateWrapper.in(StoreImg::getId,imgList).set(StoreImg::getImgType,15);
+        int num = storeImgMapper.update(null,lambdaUpdateWrapper);
+        return num;
+    }
+
     void verificationStoreInfoStatus(StoreInfoDto storeInfo) {
         //营业状态 0:正常营业, 1:暂停营业, 2:筹建中, 99:永久关门
          if (storeInfo.getBusinessStatus() == 2 || storeInfo.getBusinessStatus() == 99) {
@@ -1704,4 +1720,22 @@ public class StoreInfoServiceImpl extends ServiceImpl<StoreInfoMapper, StoreInfo
             }
         }
     }
+
+    public int updateStoreImgModeInfo(StoreImgInfoVo storeImgInfoVo) {
+        int result = 0;
+        if (storeImgInfoVo !=null) {
+            // 校验必要参数是否为null
+            if (storeImgInfoVo.getStoreId() == null || storeImgInfoVo.getImgMode() == null) {
+                return result;
+            }
+            int imgType = storeImgInfoVo.getImgType();
+            if (imgType == GroupConstant.IMG_TYPE_SINGLE_MODE || imgType == GroupConstant.IMG_TYPE_MULTI_MODE) {
+                LambdaUpdateWrapper<StoreInfo> wrapper = new LambdaUpdateWrapper<>();
+                wrapper.eq(StoreInfo::getId, storeImgInfoVo.getStoreId());
+                wrapper.set(StoreInfo::getImgMode, storeImgInfoVo.getImgMode());
+                result =  storeInfoMapper.update(null, wrapper);
+            }
+        }
+        return result;
+    }
 }

+ 102 - 3
alien-store/src/main/java/shop/alien/store/service/impl/StoreMenuServiceImpl.java

@@ -1,22 +1,28 @@
 package shop.alien.store.service.impl;
 
 import cn.hutool.core.collection.CollectionUtil;
+import com.alibaba.nacos.common.utils.CollectionUtils;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.baomidou.mybatisplus.core.toolkit.StringUtils;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import lombok.RequiredArgsConstructor;
+import org.springframework.beans.BeanUtils;
+import org.springframework.cache.annotation.CacheEvict;
 import org.springframework.stereotype.Service;
 import shop.alien.entity.result.R;
+import shop.alien.entity.store.LifeClassManage;
 import shop.alien.entity.store.LifeLikeRecord;
+import shop.alien.entity.store.StoreImg;
 import shop.alien.entity.store.StoreMenu;
 import shop.alien.entity.store.vo.StoreMenuVo;
 import shop.alien.mapper.LifeLikeRecordMapper;
 import shop.alien.mapper.StoreMenuMapper;
+import shop.alien.store.service.StoreImgService;
 import shop.alien.store.service.StoreMenuService;
 
-import java.util.Comparator;
-import java.util.List;
+import java.util.*;
 import java.util.stream.Collectors;
 
 /**
@@ -33,6 +39,9 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
 
     private final LifeLikeRecordMapper lifeLikeRecordMapper;
 
+    private final StoreImgService storeImgService;
+
+
     /**
      * 获取门店菜单
      *
@@ -43,6 +52,7 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
      */
     @Override
     public List<StoreMenuVo> getStoreMenu(Integer storeId, Integer dishType, String phoneId) {
+
         if(dishType == 0){
             List<StoreMenuVo> collect = storeMenuMapper.getStoreMenuList(storeId, null);
             return collect.stream().sorted(Comparator.comparing(StoreMenuVo::getSort)).collect(Collectors.toList());
@@ -60,7 +70,7 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
                     }
                 }
             });
-            return collect.stream().sorted(Comparator.comparing(StoreMenuVo::getImgSort)).collect(Collectors.toList());
+            return collect.stream().sorted(Comparator.comparing(StoreMenuVo::getSort)).collect(Collectors.toList());
         }
     }
 
@@ -114,6 +124,66 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
     }
 
     /**
+     * 新增或修改门店菜品new
+     * @param storeMenuVo
+     * @return
+     */
+    @Override
+    public R<String> saveOrUpdateMenus(StoreMenuVo storeMenuVo) {
+        boolean flag = false;
+        LambdaQueryWrapper<StoreMenu> storeMenuLambdaQueryWrapper = new LambdaQueryWrapper<>();
+        int imgId = 0;
+        if (storeMenuVo.getImgId() == null ||storeMenuVo.getImgId() == 0) {
+            StoreImg storeImg = new StoreImg();
+            storeImg.setStoreId(storeMenuVo.getStoreId());
+            storeImg.setImgType(7);
+            storeImg.setImgUrl(storeMenuVo.getImgUrl());
+            storeImg.setImgDescription(storeMenuVo.getDishName());
+            storeImgService.saveOrUpdate(storeImg);
+            imgId = storeImg.getId();
+        } else {
+            imgId = storeMenuVo.getImgId();
+        }
+
+        // 封装storeMenu参数
+        StoreMenu storeMenu = new StoreMenu();
+        BeanUtils.copyProperties(storeMenuVo,storeMenu);
+        storeMenu.setImgId(imgId);
+
+        //修改菜品
+        if(storeMenu.getId()!=null){
+            flag = this.updateById(storeMenu);
+            if(!flag){
+                log.error("菜单修改失败");
+                return R.fail("菜单修改失败");
+            }
+            return R.success("菜单修改成功");
+        } else {
+            //新增菜品
+            // 校验菜品参数
+            if(StringUtils.isEmpty(storeMenu.getDishName())){
+                return R.fail("请输入菜品名称");
+            }
+
+            storeMenuLambdaQueryWrapper.eq(StoreMenu::getStoreId,storeMenu.getStoreId());
+            List<StoreMenu> menuList = this.list(storeMenuLambdaQueryWrapper);
+            if(CollectionUtil.isNotEmpty(menuList)){
+                int maxSort = menuList.stream().map(StoreMenu::getSort).reduce(Integer::max).get();
+                storeMenu.setSort(maxSort+1);
+            }else{
+                storeMenu.setSort(1);
+            }
+            //保存菜品
+            flag = this.save(storeMenu);
+            if(!flag){
+                return R.fail("菜品新增失败");
+            }
+        }
+        return R.success("新增菜品成功");
+    }
+
+
+    /**
      * 菜品排序信息
      * @param storeMenuVo
      * @return
@@ -133,6 +203,11 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
         return flag;
     }
 
+    @Override
+    public Boolean saveMenuSort(List<StoreMenu> storeMenuList) {
+        return this.updateBatchById(storeMenuList);
+    }
+
     /**
      * 删除菜品或推荐菜 根据类型区分
      * @param ids
@@ -156,4 +231,28 @@ public class StoreMenuServiceImpl extends ServiceImpl<StoreMenuMapper, StoreMenu
         }
         return flag;
     }
+
+    @Override
+    public StoreMenuVo getMenuCountByStoreId(int storeId) {
+        StoreMenuVo storeMenuVo = new StoreMenuVo();
+        LambdaUpdateWrapper<StoreMenu> updateWrapper = new LambdaUpdateWrapper<>();
+        updateWrapper.eq(StoreMenu::getStoreId, storeId);
+        updateWrapper.eq(StoreMenu::getDeleteFlag, 0);
+        List<StoreMenu> storeMenuList = storeMenuMapper.selectList(updateWrapper);
+        if(CollectionUtils.isNotEmpty(storeMenuList)) {
+            storeMenuVo.setMenuCount(storeMenuList.size());
+            Map<Integer, List<StoreMenu>> groupByDishType = storeMenuList.stream()
+                    .collect(Collectors.groupingBy(StoreMenu::getDishType));
+            List<StoreMenu> suggestList = groupByDishType.get(1);
+            if(CollectionUtils.isNotEmpty(suggestList)) {
+                storeMenuVo.setSuggestCount(suggestList.size());
+            } else {
+                storeMenuVo.setSuggestCount(0);
+            }
+        } else {
+            storeMenuVo.setMenuCount(0);
+            storeMenuVo.setSuggestCount(0);
+        }
+        return storeMenuVo;
+    }
 }

+ 100 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreOfficialAlbumServiceImpl.java

@@ -0,0 +1,100 @@
+package shop.alien.store.service.impl;
+
+import com.alibaba.excel.util.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import shop.alien.entity.store.StoreImg;
+import shop.alien.entity.store.StoreOfficialAlbum;
+import shop.alien.entity.store.vo.StoreOfficialAlbumVo;
+import shop.alien.mapper.StoreImgMapper;
+import shop.alien.mapper.StoreOfficialAlbumMapper;
+import shop.alien.store.service.StoreOfficialAlbumService;
+import shop.alien.store.util.CommonConstant;
+import java.util.Collections;
+import java.util.List;
+import java.util.stream.Collectors;
+
+@Transactional
+@Service
+@RequiredArgsConstructor
+public class StoreOfficialAlbumServiceImpl extends ServiceImpl<StoreOfficialAlbumMapper, StoreOfficialAlbum> implements StoreOfficialAlbumService {
+
+    private final StoreOfficialAlbumMapper storeOfficialAlbumMapper;
+    private final StoreImgMapper storeImgMapper;
+
+    /**
+     * 创建官方相册
+     *
+     * @param storeOfficialAlbum 官方相册信息
+     * @return storeOfficialAlbum 官方相册信息
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public StoreOfficialAlbum createOrUpdateOfficialAlbum(StoreOfficialAlbum storeOfficialAlbum) {
+        Integer id= storeOfficialAlbum.getId();
+        if (id!=null && id > 0) {
+            boolean updateSuccess = storeOfficialAlbumMapper.updateById(storeOfficialAlbum) > 0;
+            if (!updateSuccess) {
+                throw new RuntimeException("更新官方相册失败");
+            }
+        } else {
+            boolean insertSuccess = storeOfficialAlbumMapper.insert(storeOfficialAlbum) > 0;
+            if (!insertSuccess) {
+                throw new RuntimeException("插入官方相册失败");
+            }
+        }
+        return storeOfficialAlbum;
+    }
+
+    /**
+     * 根据storeId查询官方相册列表
+     *
+     * @param storeId 店铺ID
+     * @return List<StoreOfficialAlbumVo> 官方相册列表
+     */
+    @Override
+    public List<StoreOfficialAlbumVo> getOfficialAlbumList(String storeId) {
+        if(StringUtils.isNotBlank(storeId)) {
+            //查询出店铺官方相册img数量并更新
+            List<StoreOfficialAlbum> storeOfficialAlbumList = storeOfficialAlbumMapper.getStoreOfficialAlbumImgCount(Integer.parseInt(storeId));
+            this.updateBatchById(storeOfficialAlbumList);
+
+            // 查询官方相册列表
+            return storeOfficialAlbumMapper.getStoreOfficialAlbumList(Integer.parseInt(storeId));
+        }
+        return Collections.emptyList();
+    }
+
+    /**
+     * 根据storeId查询官方相册列表
+     *
+     * @param storeOfficialAlbumList 根据官方相册信息删除官方相册及图片
+     * @return result 删除结果
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    public int deleteOfficialAlbum(List<StoreOfficialAlbum> storeOfficialAlbumList) {
+
+        // 校验官方相册列表
+        if (storeOfficialAlbumList == null || storeOfficialAlbumList.isEmpty()) {
+            return CommonConstant.ERROR_CODE_INVALID_PARAMS;
+        }
+        List<Integer> albumIds =storeOfficialAlbumList.stream().map(StoreOfficialAlbum::getId).collect(Collectors.toList());
+        if (CollectionUtils.isEmpty(albumIds)) {
+            return CommonConstant.ERROR_CODE_INVALID_PARAMS;
+        }
+
+        // 删除相册
+        storeOfficialAlbumMapper.deleteBatchIds(albumIds);
+        // 删除图片(批量删除)
+        LambdaUpdateWrapper<StoreImg> wrapper = new LambdaUpdateWrapper<StoreImg>()
+                .in(StoreImg::getBusinessId, albumIds)
+                .eq(StoreImg::getImgType, CommonConstant.STORE_IMG_ALBUM);
+        storeImgMapper.delete(wrapper);
+        return CommonConstant.ERROR_CODE_VALID_PARAMS;
+    }
+}

+ 69 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreTagBusinessRelationServiceImpl.java

@@ -0,0 +1,69 @@
+package shop.alien.store.service.impl;
+
+import com.alibaba.nacos.common.utils.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.TagBusinessRelation;
+import shop.alien.entity.store.TagCategory;
+import shop.alien.mapper.TagBusinessRelationMapper;
+import shop.alien.mapper.TagCategoryMapper;
+import shop.alien.store.config.BaseRedisService;
+import shop.alien.store.service.StoreTagBusinessRelationService;
+import shop.alien.store.service.StoreTagService;
+import shop.alien.store.util.CommonConstant;
+
+import java.util.List;
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class StoreTagBusinessRelationServiceImpl extends ServiceImpl<TagBusinessRelationMapper, TagBusinessRelation> implements StoreTagBusinessRelationService {
+    public final TagBusinessRelationMapper tagBusinessRelationMapper;
+
+    @Override
+    public TagBusinessRelation createTagBusinessRelation(TagBusinessRelation tagBusinessRelation) {
+
+        // 校验同一层级是否存在相同的标签
+        List<TagBusinessRelation> tagCategoryList = tagBusinessRelationMapper.selectList(new LambdaQueryWrapper<TagBusinessRelation>().eq(TagBusinessRelation::getTagId, tagBusinessRelation.getTagId()).eq(TagBusinessRelation::getBusinessSection, tagBusinessRelation.getBusinessSection()));
+        if(CollectionUtils.isNotEmpty(tagCategoryList)){
+            throw new IllegalArgumentException("标签已经存在");
+        }
+
+        // 将数据存储到数据库中
+        log.info("标签创建, 请求参数: {}", tagBusinessRelation);
+        int result = tagBusinessRelationMapper.insert(tagBusinessRelation);
+        log.info("标签创建, 结果: {}", result);
+        // 清除相关缓存
+//        baseRedisService.delete(TAG_TREE_CACHE_KEY);
+        return tagBusinessRelation;
+    }
+
+    @Override
+    public IPage<TagBusinessRelation> getTagBusinessRelationList(int page, int size, int businessSection, String businessSectionName) {
+        IPage<TagBusinessRelation> iPage = new Page<>(page, size);
+        LambdaQueryWrapper<TagBusinessRelation> tagCategoryLambdaQueryWrapper = new LambdaQueryWrapper<TagBusinessRelation>();
+        tagCategoryLambdaQueryWrapper.eq(TagBusinessRelation::getDeleteFlag, CommonConstant.DELETE_FLAG_UNDELETE);
+        if(businessSection > 0) {
+            tagCategoryLambdaQueryWrapper.eq(TagBusinessRelation::getTagId, businessSection);
+        }
+        if(StringUtils.isNotBlank(businessSectionName)) {
+            tagCategoryLambdaQueryWrapper.like(TagBusinessRelation::getBusinessSectionName,businessSectionName);
+        }
+        tagCategoryLambdaQueryWrapper.orderByDesc(TagBusinessRelation::getCreatedTime);
+        return tagBusinessRelationMapper.selectPage(iPage,tagCategoryLambdaQueryWrapper);
+    }
+    @Override
+    public int deleteTagBusinessRelation(TagBusinessRelation tagBusinessRelation) {
+        if(tagBusinessRelation == null ||tagBusinessRelation.getId() == null){
+            return 0;
+        }
+        return tagBusinessRelationMapper.deleteById(tagBusinessRelation.getId());
+    }
+}

+ 211 - 0
alien-store/src/main/java/shop/alien/store/service/impl/StoreTagServiceImpl.java

@@ -0,0 +1,211 @@
+package shop.alien.store.service.impl;
+
+import com.alibaba.nacos.common.utils.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fasterxml.jackson.core.JsonProcessingException;
+import com.fasterxml.jackson.core.type.TypeReference;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import shop.alien.entity.store.LifeDiscountCoupon;
+import shop.alien.entity.store.StoreClockIn;
+import shop.alien.entity.store.TagCategory;
+import shop.alien.entity.store.vo.LabelButtonOptionVo;
+import shop.alien.entity.store.vo.LifeDiscountCouponStoreFriendVo;
+import shop.alien.entity.store.vo.LifeDiscountCouponVo;
+import shop.alien.entity.store.vo.TagCategoryVo;
+import shop.alien.mapper.StoreClockInMapper;
+import shop.alien.mapper.TagCategoryMapper;
+import shop.alien.store.config.BaseRedisService;
+import shop.alien.store.service.StoreTagService;
+import shop.alien.store.util.CommonConstant;
+
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+@Transactional
+public class StoreTagServiceImpl extends ServiceImpl<TagCategoryMapper, TagCategory> implements StoreTagService {
+
+    public final TagCategoryMapper tagCategoryMapper;
+    private final BaseRedisService baseRedisService;
+    private static final String TAG_TREE_CACHE_KEY = "tag:tree";
+
+    @Override
+    public TagCategory createTag(TagCategory tagCategory) {
+
+        // 校验同一层级是否存在相同的标签
+//        List<TagCategory> tagCategoryList = tagCategoryMapper.selectList(new LambdaQueryWrapper<TagCategory>().eq(TagCategory::getLabelType, tagCategory.getLabelType()).eq(TagCategory::getTagName, tagCategory.getTagName()));
+//        if(CollectionUtils.isNotEmpty(tagCategoryList)){
+//            throw new IllegalArgumentException("标签已经存在");
+//        }
+
+        // 将数据存储到数据库中
+        log.info("标签创建, 请求参数: {}", tagCategory);
+        int result = tagCategoryMapper.insert(tagCategory);
+        log.info("标签创建, 结果: {}", result);
+        // 清除相关缓存
+//        baseRedisService.delete(TAG_TREE_CACHE_KEY);
+        return tagCategory;
+    }
+
+    @Override
+    public IPage<TagCategory> getTagList(int page, int size,String label,String labelType, String labelButtonType) {
+        IPage<TagCategory> iPage = new Page<>(page, size);
+        LambdaQueryWrapper<TagCategory> tagCategoryLambdaQueryWrapper = new LambdaQueryWrapper<TagCategory>();
+        tagCategoryLambdaQueryWrapper.eq(TagCategory::getDeleteFlag, CommonConstant.DELETE_FLAG_UNDELETE);
+        if(StringUtils.isNotBlank(label)){
+            tagCategoryLambdaQueryWrapper.like(TagCategory::getTagName,label);
+        }
+        if(StringUtils.isNotBlank(labelType)){
+            tagCategoryLambdaQueryWrapper.eq(TagCategory::getLabelType, labelType);
+        }
+        if(StringUtils.isNotBlank(labelButtonType)){
+            tagCategoryLambdaQueryWrapper.eq(TagCategory::getLabelButtonType, labelButtonType);
+        }
+        tagCategoryLambdaQueryWrapper.orderByDesc(TagCategory::getCreatedTime);
+        return tagCategoryMapper.selectPage(iPage,tagCategoryLambdaQueryWrapper);
+    }
+
+//    @Override
+//    public List<TagCategory> getTagTree() {
+//        // 缓存获取
+//
+//        List<TagCategory> tagCategoryTree = new ArrayList<>();
+//        try {
+//            tagCategoryTree = baseRedisService.getList(TAG_TREE_CACHE_KEY, TagCategory.class);
+//        } catch (JsonProcessingException e) {
+//            log.error("StoreTagServiceImpl-getTagTree获取缓存异常: ", e);
+//            throw new RuntimeException(e);
+//        }
+//        if (CollectionUtils.isNotEmpty(tagCategoryTree)) {
+//            return tagCategoryTree;
+//        }
+//
+//        // 从数据库获取未删除的所有标签
+//        LambdaQueryWrapper<TagCategory> queryWrapper = new LambdaQueryWrapper<>();
+//        queryWrapper.like(TagCategory::getDeleteFlag, CommonConstant.DELETE_FLAG_UNDELETE);
+//        List<TagCategory> allTags = tagCategoryMapper.selectList(queryWrapper);
+//
+//        // 构建树形结构
+//        tagCategoryTree = buildTagTree(allTags);
+//
+//        // 缓存结果
+//        if (CollectionUtils.isNotEmpty(tagCategoryTree)) {
+//            try {
+//                baseRedisService.storeList(TAG_TREE_CACHE_KEY, tagCategoryTree);
+//            } catch (JsonProcessingException e) {
+//                log.error("StoreTagServiceImpl-getTagTree存储缓存异常: ", e);
+//                throw new RuntimeException(e);
+//            }
+//        }
+//
+//        return tagCategoryTree;
+//    }
+
+    @Override
+    public int deleteTag(TagCategory tagCategory) {
+        if(tagCategory == null ||tagCategory.getId() == null){
+            return 0;
+        }
+
+        int deleteTagResult = tagCategoryMapper.deleteById(tagCategory.getId());
+        if (deleteTagResult > 0) {
+            baseRedisService.delete(TAG_TREE_CACHE_KEY);
+        }
+        return deleteTagResult;
+    }
+
+    @Override
+    public int updateTagCategory(TagCategory tagCategory) {
+        if(tagCategory == null){
+            return 0;
+        }
+        int updateResult = tagCategoryMapper.updateById(tagCategory);
+        if (updateResult > 0){
+            baseRedisService.delete(TAG_TREE_CACHE_KEY);
+        }
+        return updateResult;
+    }
+
+    @Override
+    public List<TagCategoryVo> getBusinessRelationTagList(Integer businessSection) {
+        if(businessSection!=null){
+            List<TagCategoryVo> tagCategoryVoList = tagCategoryMapper.getBusinessRelationTagList(businessSection);
+            return getCategories(tagCategoryVoList);
+        }
+        return Collections.emptyList();
+    }
+
+
+    private static List<TagCategoryVo> getCategories(List<TagCategoryVo> tagCategoryVoList) {
+        tagCategoryVoList.forEach(tagCategoryVo -> {
+            String labelButtonOptionOne = tagCategoryVo.getLabelButtonOptionOne();
+            String labelButtonOptionTwo = tagCategoryVo.getLabelButtonOptionTwo();
+            if(StringUtils.isNotBlank(labelButtonOptionOne)){
+                try {
+                    ObjectMapper objectMapper = new ObjectMapper();
+                    List<LabelButtonOptionVo> tagValueVoList1 = objectMapper.readValue(labelButtonOptionOne,
+                            new TypeReference<List<LabelButtonOptionVo>>() {});
+                    tagCategoryVo.setLabelButtonOption1(tagValueVoList1);
+                } catch (JsonProcessingException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+            if(StringUtils.isNotBlank(labelButtonOptionTwo)){
+                try {
+                    ObjectMapper objectMapper = new ObjectMapper();
+                    List<LabelButtonOptionVo> tagValueVoList2 = objectMapper.readValue(labelButtonOptionTwo,
+                            new TypeReference<List<LabelButtonOptionVo>>() {});
+                    tagCategoryVo.setLabelButtonOption2(tagValueVoList2);
+                } catch (JsonProcessingException e) {
+                    throw new RuntimeException(e);
+                }
+            }
+        });
+        return tagCategoryVoList;
+    }
+
+
+
+
+    /**
+     * 构造树形结构方法
+     *
+     * @param allTags 所有标签列表
+     * @return 构造完成后的标签列表
+     */
+//    private List<TagCategory> buildTagTree(List<TagCategory> allTags) {
+//        Map<Integer, List<TagCategory>> tagMap = allTags.stream()
+//                .collect(Collectors.groupingBy(TagCategory::getParentTagId));
+//        List<TagCategory> rootTags = tagMap.getOrDefault(0, Collections.emptyList());
+//        rootTags.forEach(tag -> buildChildren(tag, tagMap));
+//        return rootTags;
+//    }
+
+    /**
+     * 构造树形结构方法
+     *
+     * @param parentTagCategory 父标签
+     * @param tagMap 父标签ID分组MAP
+     */
+//    private void buildChildren(TagCategory parentTagCategory, Map<Integer, List<TagCategory>> tagMap) {
+//        List<TagCategory> children = tagMap.getOrDefault(parentTagCategory.getId(), Collections.emptyList());
+//        parentTagCategory.setChildrenTag(children);
+//        children.forEach(child -> buildChildren(child, tagMap));
+//    }
+
+
+}

+ 54 - 0
alien-store/src/main/java/shop/alien/store/service/impl/TagStoreRelationServiceImpl.java

@@ -0,0 +1,54 @@
+package shop.alien.store.service.impl;
+
+import com.alibaba.nacos.common.utils.CollectionUtils;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.stereotype.Service;
+import shop.alien.entity.store.TagStoreRelation;
+import shop.alien.mapper.TagStoreRelationMapper;
+import shop.alien.store.config.BaseRedisService;
+import shop.alien.store.service.TagStoreRelationService;
+import java.util.List;
+
+@Slf4j
+@Service
+@RequiredArgsConstructor
+public class TagStoreRelationServiceImpl implements TagStoreRelationService {
+    public final TagStoreRelationMapper tagStoreRelationMapper;
+    private final BaseRedisService baseRedisService;
+    private static final String TAG_STORE_CACHE_KEY = "tag_store";
+    @Override
+    public TagStoreRelation createOrUpdateTagStoreRelation(TagStoreRelation tagStoreRelation) {
+        // 校验同一层级是否存在相同的店铺标签信息
+        List<TagStoreRelation> tagStoreRelationList = tagStoreRelationMapper.selectList(new LambdaQueryWrapper<TagStoreRelation>().eq(TagStoreRelation::getStoreId, tagStoreRelation.getStoreId()));
+        if(CollectionUtils.isNotEmpty(tagStoreRelationList)){
+            // 店铺标签信息已经存在,进行更新操作
+            tagStoreRelationMapper.updateById(tagStoreRelation);
+        } else {
+            // 将数据存储到数据库中
+            tagStoreRelationMapper.insert(tagStoreRelation);
+        }
+        return tagStoreRelation;
+    }
+
+    @Override
+    public TagStoreRelation getTagStoreRelationByStoreId(int storeId) {
+        TagStoreRelation tagStoreRelation = new TagStoreRelation();
+        LambdaQueryWrapper<TagStoreRelation> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(TagStoreRelation::getStoreId, storeId);
+        wrapper.eq(TagStoreRelation::getDeleteFlag,0);
+        List<TagStoreRelation> tagStoreRelationList = tagStoreRelationMapper.selectList(wrapper);
+        if (CollectionUtils.isNotEmpty(tagStoreRelationList)) {
+            tagStoreRelation = tagStoreRelationList.get(0);
+        }
+        return tagStoreRelation;
+    }
+
+    /**
+     * 构建 Redis 缓存 Key
+     */
+    private String buildTagStoreCacheKey(int storeId) {
+        return TAG_STORE_CACHE_KEY + ":" + storeId;
+    }
+}

+ 51 - 0
alien-store/src/main/java/shop/alien/store/util/CommonConstant.java

@@ -0,0 +1,51 @@
+package shop.alien.store.util;
+
+/**
+ * 通用常量配置
+ * @author zhangchen
+ * @since 2025/7/1
+ */
+public class CommonConstant {
+
+    /**
+     * 是否删除,0:未删除,2:已删除
+     */
+    public static final Integer DELETE_FLAG_UNDELETE = 0;
+    public static final Integer DELETE_FLAG_DELETED = 1;
+
+    /**
+     * 优惠券类型,1-代金券  2-团购(套餐)
+     */
+    public static final Integer LIFE_COUPON_TYPE = 1;
+    public static final Integer LIFE_GROUP_TYPE = 2;
+
+    /**
+     * 优惠券状态,-1:待审核,-2:审核不通过,0:未使用,1:使用中,2:暂停,3:已结束
+     */
+    public static final Integer LIFE_COUPON_STATUS_PENDING_APPROVAL = -1;
+    public static final Integer LIFE_COUPON_STATUS_REJECTED = -2;
+    public static final Integer LIFE_COUPON_STATUS_UNUSED = 0;
+    public static final Integer LIFE_COUPON_STATUS_USING = 1;
+    public static final Integer LIFE_COUPON_STATUS_PAUSE = 2;
+    public static final Integer LIFE_COUPON_STATUS_END = 3;
+
+    /**
+     * 新建/更新返回值,0:失败,1:成功
+     */
+    public static final Integer ERROR_CODE_VALID_PARAMS = 1;
+    public static final Integer ERROR_CODE_INVALID_PARAMS = 0;
+
+    /**
+     * 标签类型 1:套餐, 2:门店
+     */
+    public static final String LABEL_TYPE_MENU = "1";
+    public static final String LABEL_TYPE_SHOP = "2";
+
+    /**
+     * 图片类型,0:其他, 1:入口图, 2:相册, 3:菜品, 4:环境, 5:价目表, 6:推荐菜, 7:菜单, 8:用户评论, 9:商家申诉,10:商家头像,11:店铺轮播图,12:联名卡图片,13:动态折扣,14:营业执照,15:合同照片,17:打卡广场小人图片 18: 二手商品发布图片, 19:二手商品与用户举报图片
+     */
+    public static final Integer STORE_IMG_OTHER = 1;
+    public static final Integer STORE_IMG_ALBUM = 2;
+
+    public static final String STORE_DICT_TYPENAME = "storeArea,businessStatus,week,specialDate,business_section,fine_food";
+}

+ 3 - 0
alien-store/src/main/java/shop/alien/store/util/GroupConstant.java

@@ -35,4 +35,7 @@ public class GroupConstant {
     public static final String LABEL_TYPE_MENU = "1";
     public static final String LABEL_TYPE_SHOP = "2";
 
+
+    public static final Integer IMG_TYPE_SINGLE_MODE = 20;
+    public static final Integer IMG_TYPE_MULTI_MODE = 21;
 }