diff --git a/logs/infra-server.log.2025-07-25.0.gz b/logs/infra-server.log.2025-07-25.0.gz new file mode 100644 index 0000000..16fd04f Binary files /dev/null and b/logs/infra-server.log.2025-07-25.0.gz differ diff --git a/logs/infra-server.log.2025-07-28.0.gz b/logs/infra-server.log.2025-07-28.0.gz new file mode 100644 index 0000000..1aa7573 Binary files /dev/null and b/logs/infra-server.log.2025-07-28.0.gz differ diff --git a/logs/system-server.log.2025-07-28.0.gz b/logs/system-server.log.2025-07-28.0.gz new file mode 100644 index 0000000..1f4fd79 Binary files /dev/null and b/logs/system-server.log.2025-07-28.0.gz differ diff --git a/tashow-feign/pom.xml b/tashow-feign/pom.xml index feb8d49..762c0de 100644 --- a/tashow-feign/pom.xml +++ b/tashow-feign/pom.xml @@ -13,6 +13,7 @@ tashow-infra-api tashow-system-api + tashow-product-api diff --git a/tashow-feign/tashow-product-api/pom.xml b/tashow-feign/tashow-product-api/pom.xml new file mode 100644 index 0000000..67eb172 --- /dev/null +++ b/tashow-feign/tashow-product-api/pom.xml @@ -0,0 +1,90 @@ + + + 4.0.0 + + com.tashow.cloud + tashow-feign + ${revision} + + tashow-product-api + jar + + ${project.artifactId} + + infra 模块 API,暴露给其它模块调用 + + + + + com.tashow.cloud + tashow-common + + + + + org.springframework.boot + spring-boot-starter-validation + true + + + + jakarta.validation + jakarta.validation-api + + + + + org.springframework.cloud + spring-cloud-starter-openfeign + true + + + org.mybatis + mybatis + 3.5.13 + + + + io.swagger + swagger-models + 1.6.2 + + + + io.swagger.core.v3 + swagger-core + 2.2.20 + + + + + io.swagger.core.v3 + swagger-models + 2.2.20 + + + + com.alibaba + easyexcel + 4.0.3 + + + org.mybatis + mybatis + 3.5.9 + + + com.baomidou + mybatis-plus-annotation + 3.5.9 + compile + + + com.tashow.cloud + tashow-data-mybatis + + + + diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/package-info.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/package-info.java new file mode 100644 index 0000000..608b3bb --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/package-info.java @@ -0,0 +1,4 @@ +/** + * infra API 包,定义暴露给其它模块的 API + */ +package com.tashow.cloud.productapi.api; diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/CategoryApi.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/CategoryApi.java new file mode 100644 index 0000000..5a8f109 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/CategoryApi.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.productapi.api.product; + +import com.tashow.cloud.productapi.api.product.dto.CategoryDO; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import com.tashow.cloud.productapi.enums.ApiConstants; +import org.springframework.cloud.openfeign.FeignClient; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestParam; + +import java.util.List; + +@FeignClient(name = ApiConstants.NAME) // TODO 芋艿:fallbackFactory = +/** RPC 服务 - 参数配置 */ +public interface CategoryApi { + + String PREFIX = ApiConstants.PREFIX + "/category"; + + /** 根据参数键查询参数值 */ + @GetMapping(PREFIX + "/categoryList") + List categoryList(@RequestParam(value = "grade", required = false) Integer grade, + @RequestParam(value = "categoryId", required = false) Long categoryId, + @RequestParam(value = "categoryName", required = false) String categoryName, + @RequestParam(value = "status", required = false) Integer status); +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/CategoryDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/CategoryDO.java new file mode 100644 index 0000000..346dbe9 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/CategoryDO.java @@ -0,0 +1,83 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.util.List; + +/** + * 产品类目 DO + * + * @author 芋道源码 + */ +@TableName("tz_category") +@KeySequence("tz_category_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class CategoryDO extends BaseDO { + + /** + * 类目ID + */ + @TableId + private Long categoryId; + /** + * 店铺ID + */ + private Long shopId; + /** + * 父节点 + */ + private Long parentId; + + /** + * 父节名称 + */ + private String parentName; + + /** + * 产品类目名称 + */ + private String categoryName; + /** + * 类目图标 + */ + private String icon; + /** + * 类目的显示图片 + */ + private String pic; + /** + * 类目描述 + */ + private String description; + /** + * 标签 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List tag; + /** + * 排序 + */ + private Integer sort; + /** + * 默认是1,表示正常状态,0为下线状态 + */ + private Integer status; + /** + * 分类层级 1、2、3级 + */ + private Integer grade; + + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/CategoryDto.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/CategoryDto.java new file mode 100644 index 0000000..baac0ce --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/CategoryDto.java @@ -0,0 +1,72 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; + +import java.util.List; + +/** + * 产品类目 DO + * + * @author 芋道源码 + */ +@Data + +public class CategoryDto { + + /** + * 类目ID + */ + private Long categoryId; + /** + * 店铺ID + */ + private Long shopId; + /** + * 父节点 + */ + private Long parentId; + + /** + * 父节名称 + */ + private String parentName; + + /** + * 产品类目名称 + */ + private String categoryName; + /** + * 类目图标 + */ + private String icon; + /** + * 类目的显示图片 + */ + private String pic; + /** + * 类目描述 + */ + private String description; + /** + * 标签 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List tag; + /** + * 排序 + */ + private Integer sort; + /** + * 默认是1,表示正常状态,0为下线状态 + */ + private Integer status; + /** + * 分类层级 1、2、3级 + */ + private Integer grade; + + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdAdditionalFeeDatesDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdAdditionalFeeDatesDO.java new file mode 100644 index 0000000..a66391c --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdAdditionalFeeDatesDO.java @@ -0,0 +1,77 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import java.math.BigDecimal; +import java.util.List; + +/** + * 特殊日期附加费用规则 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_additional_fee_dates") +@KeySequence("tz_prod_additional_fee_dates_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdAdditionalFeeDatesDO extends BaseDO { + + /** + * 特殊日期规则的唯一标识符 + */ + @TableId + private Long id; + /** + * 商品id + */ + private Long prodId; + /** + * 名称 + */ + private String name; + /** + * 日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日' + */ + private Integer dateType; + + /** + * 类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期 + */ + private Integer type; + + /** + * 日期 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List customTimeSlots; +/* *//** + * 指定日期 + *//* + @TableField(typeHandler = StringListTypeHandler.class) + private List specificDates;*/ + /** + * 收费方式0:''固定金额'':1:''基准价上浮 + */ + private Integer chargeMode; + /** + * 价格或上浮百分比 + */ + private BigDecimal price; + /** + * 是否启用该规则是否启用该规则0关1开 + */ + private Integer isEnabled; + public boolean isEmpty() { + return id == null ; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdAdditionalFeePeriodsDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdAdditionalFeePeriodsDO.java new file mode 100644 index 0000000..0c31709 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdAdditionalFeePeriodsDO.java @@ -0,0 +1,62 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; + +import java.math.BigDecimal; +import java.util.List; + +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 特殊时段附加费用规则 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_additional_fee_periods") +@KeySequence("tz_prod_additional_fee_periods_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdAdditionalFeePeriodsDO extends BaseDO { + + /** + * 特殊时段规则的唯一标识符 + */ + @TableId + private Long id; + /** + * 商品ID + */ + private Long prodId; + /** + * 名称 + */ + private String name; + /** + * 特殊时段设置 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List specialTimeSlots; + /** + * 收费方式0:'固定金额',1:'基准价上浮' + */ + private Integer chargeMode; + /** + * 价格或上浮百分比 + */ + private BigDecimal price; + /** + * 浮动百分比 + */ + private BigDecimal floatingPercentage; + public boolean isEmpty() { + return id == null ; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdDO.java new file mode 100644 index 0000000..3cfe1e0 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdDO.java @@ -0,0 +1,178 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; + +import java.util.Date; +import java.util.List; + +/** + * 商品 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod") +@KeySequence("tz_prod_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdDO extends BaseDO { + + /** + * 产品ID + */ + @TableId + private Long prodId; + /** + * 商品名称 + */ + private String prodName; + /** + * 商品简称 + */ + private String abbreviation; + /** + * seo标题 + */ + private String seoShortName; + /** + * seo搜索 + */ + private String seoSearch; + /** + * 关键词 + */ + private String keyword; + /** + * 店铺id + */ + private Long shopId; + /** + * 简要描述,卖点等 + */ + private String brief; + /** + * 品牌 + */ + private String brand; + + + /** + * 是否置灰0否1是 + */ + private Integer isProhibit; + + /** + * 审核备注 + */ + private String processNotes; + /** + * 详细描述 + */ + private String content; + /** + * 商品编号 + */ + private String prodNumber; + /** + * 商品主图 + */ + private String pic; + /** + * 商品轮播图片,以,分割 + */ + private String imgs; + + /** + * 视频 + */ + private String video; + + /** + * 商品轮播图片,以,分割 + */ + private String whiteImg; + + /** + * 标签 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List tag; + + /** + * 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核 + */ + private Integer status; + /** + * 商品分类id + */ + private Long categoryId; + + /** + * 商品分类名称 + */ + private String categoryName; + + /** + * 销量 + */ + private Integer soldNum; + /** + * 分享图 + */ + private String shareImage; + /** + * 分享话术 + */ + private String shareContent; + /** + * 是否开启区域0关1开 + */ + private Integer regionSwitch; + /** + * 是否特殊时段0关1开 + */ + private Integer additionalSwitch; + /** + * 是否特殊日期(节假日周末什么的)0关1开 + */ + private Integer additionalFeeSwitch; + /** + * 是否紧急响应服务0关1开 + */ + private Integer emergencySwitch; + /** + * 是否预约0关1开 + */ + private Integer reservationSwitch; + /** + * 是否接单上线0关1开 + */ + private Integer orderLimitSwitch; + /** + * 是否开启体重配置0关1开 + */ + private Integer weightSwitch; + /** + * 版本 乐观锁 + */ + private Integer version; + /** + * 展示的权重 + */ + private Integer top; + + /** + * 删除时间 + */ + private Date deleteTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdEmergencyResponseDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdEmergencyResponseDO.java new file mode 100644 index 0000000..36916f4 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdEmergencyResponseDO.java @@ -0,0 +1,43 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.util.List; + +/** + * 商品紧急响应服务设置 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_emergency_response") +@KeySequence("tz_prod_emergency_response_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdEmergencyResponseDO extends BaseDO { + + /** + * 紧急响应服务配置的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 可响应时间段 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List responseTimeSlots; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdEmergencyResponseIntervalsDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdEmergencyResponseIntervalsDO.java new file mode 100644 index 0000000..6e3d970 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdEmergencyResponseIntervalsDO.java @@ -0,0 +1,65 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 紧急响应时间区间设置 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_emergency_response_intervals") +@KeySequence("tz_prod_emergency_response_intervals_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdEmergencyResponseIntervalsDO extends BaseDO { + + /** + * 响应时间区间的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的紧急响应服务配置ID + */ + private Long configId; + /** + * 商品ID + */ + private Long prodId; + + /** + * 响应模式名称modeName + */ + private String name; + /** + * 响应时间(小时) + */ + private BigDecimal responseHours; + /** + * 收费模式0:固定收费 1:浮动收费 + */ + private Integer chargeMode; + /** + * 浮动百分比 + */ + private BigDecimal floatingPercentage; + /** + * 价格或上浮百分比 + */ + private BigDecimal price; + + + public boolean isEmpty() { + return id == null; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdExtendDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdExtendDO.java new file mode 100644 index 0000000..df8fca3 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdExtendDO.java @@ -0,0 +1,49 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 属性规则 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_extend") +@KeySequence("tz_prod_extend_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdExtendDO { + + /** + * 属性值ID + */ + @TableId + private Long id; + /** + * 商品id + */ + private Long prodId; + /** + * 是否显示失效规格值 0否1是 + */ + private Integer isExpire; + + /** + * 是否显示禁用规格值 0否1是 + */ + private Integer isDisable; + + /** + * 体重是否收费0否1是 + */ + private Integer isWeightCharge; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdPropDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdPropDO.java new file mode 100644 index 0000000..660a13a --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdPropDO.java @@ -0,0 +1,78 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableName; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import lombok.*; + +import java.util.List; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 商品属性 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_prop") +@KeySequence("tz_prod_prop_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdPropDO{ + + + /** + * 属性id + */ + @TableId + private Long id; + + private Long propId; + /** + * 属性名称 + */ + private String propName; + /** + * ProdPropRule 1:销售属性(规格); 2:参数属性; + */ + private Integer rule; + /** + * 店铺id + */ + private Long shopId; + /** + * 商品id + */ + private Long prodId; + + /** + * 排序 + */ + private Integer sort; + + /** + * 是否删除0否1是 + */ + private Integer deleted; + /** + * isExist 是否新增 0否1是 + */ + @TableField(exist=false) + private Integer isExist; + + + /** + * 状态0禁用1启用 + */ + private Integer state; + + /** + * 属性值 + */ + @TableField(exist=false) + private List prodPropValues; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdPropValueDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdPropValueDO.java new file mode 100644 index 0000000..c8cccd5 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdPropValueDO.java @@ -0,0 +1,69 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.util.Date; + +/** + * 属性规则 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_prop_value") +@KeySequence("tz_prod_prop_value_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdPropValueDO { + + /** + * id + */ + @TableId + private Long id; + + private Long valueId; + /** + * 属性值名称 + */ + private String propValue; + /** + * 属性ID + */ + private Long propId; + /** + * 是否删除0否1是 + */ + private Integer deleted; + + /** + * 状态0禁用1启用 + */ + private Integer state; + + /** + * 是否失效0否1是 + */ + private Integer isExpire; + + /** + * 排序 + */ + private Integer sort; + /** + * isExist 是否新增 0否1是 + */ + @TableField(exist=false) + private Integer isExist; + + /** + * 删除时间 + */ + private Date deleteTime; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdReservationConfigDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdReservationConfigDO.java new file mode 100644 index 0000000..84c82eb --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdReservationConfigDO.java @@ -0,0 +1,87 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.TimeBookVO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; + +import java.util.List; + +/** + * 商品预约配置 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_reservation_config") +@KeySequence("tz_prod_reservation_config_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdReservationConfigDO extends BaseDO { + + /** + * 预约配置的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 预约时段设置 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List reservationTimeSlots; + /** + * 需提前多少小时预约 + */ + private Integer advanceHours; + /** + * 预约日期范围 7天 10天 15天 30天 + */ + private Integer reservationDateRange; + /** + * 是否允许更改预约时间 1可以 0不可以 + */ + private Integer allowChange; + + /** + * 时间段 + */ + private Integer timeSlot; + + /** + * 更改预约时间的时间规则(如服务开始前1小时可更改) + */ + private Integer changeTimeRule; + /** + * 允许更改预约时间的最大次数 + */ + private Integer maxChangeTimes; + /** + * 预约时间区间设置 + */ + @TableField(exist=false) + private TimeBookVO timeBook; + + public TimeBookVO getTimeBook() { + if (this.timeBook == null) { + this.timeBook = new TimeBookVO(); + this.timeBook.setTimeSlot(this.timeSlot); + this.timeBook.setReservationTimeSlots(this.reservationTimeSlots); + } + return this.timeBook; + } + + public void setTimeBook(TimeBookVO timeBook) { + this.timeBook = timeBook; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceAreaRelevanceDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceAreaRelevanceDO.java new file mode 100644 index 0000000..c9594bd --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceAreaRelevanceDO.java @@ -0,0 +1,31 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 商品与服务区域关联 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_service_area_relevance") +@KeySequence("tz_prod_service_area_relevance_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdServiceAreaRelevanceDO{ + + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 关联的服务区域ID + */ + private Long areaId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceAreasDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceAreasDO.java new file mode 100644 index 0000000..2427959 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceAreasDO.java @@ -0,0 +1,34 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 服务区域 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_service_areas") +@KeySequence("tz_prod_service_areas_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdServiceAreasDO extends BaseDO { + + /** + * 服务区域的唯一标识符 + */ + @TableId + private Long id; + /** + * 服务区域名称(如台江区、鼓楼区) + */ + private String areaName; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceOverAreaRulesDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceOverAreaRulesDO.java new file mode 100644 index 0000000..774a691 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdServiceOverAreaRulesDO.java @@ -0,0 +1,44 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 超区规则 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_service_over_area_rules") +@KeySequence("tz_prod_service_over_area_rules_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdServiceOverAreaRulesDO extends BaseDO { + + /** + * 超区规则的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费) + */ + private Integer ruleType; + /** + * 超区费用(仅在rule_type为accept_with_fee时有效) + */ + private BigDecimal fee; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdTagsDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdTagsDO.java new file mode 100644 index 0000000..c29c5b8 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdTagsDO.java @@ -0,0 +1,33 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 商品和标签管理 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_tags") +@KeySequence("tz_prod_tags_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdTagsDO extends BaseDO { + + /** + * 商品id + */ + private Long productId; + /** + * 标签id + */ + private Long tagId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdWeightRangePricesDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdWeightRangePricesDO.java new file mode 100644 index 0000000..87c40a9 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProdWeightRangePricesDO.java @@ -0,0 +1,48 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 体重区间价格 DO + * + * @author 芋道源码 + */ +@TableName("tz_prod_weight_range_prices") +@KeySequence("tz_prod_weight_range_prices_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProdWeightRangePricesDO extends BaseDO { + + /** + * 体重区间价格的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的体重配置ID + */ + private Long prodId; + /** + * 体重区间 + */ + private String weightRange; + /** + * 价格 + */ + private BigDecimal price; + /** + * 是否收费0否1是 + */ + private Integer isEnabled; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProductOrderLimitDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProductOrderLimitDO.java new file mode 100644 index 0000000..1fb7010 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ProductOrderLimitDO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 商品接单上限设置 DO + * + * @author 芋道源码 + */ +@TableName("tz_product_order_limit") +@KeySequence("tz_product_order_limit_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ProductOrderLimitDO extends BaseDO { + + /** + * 接单上限配置的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 限制单位'0:按自然天',1:'按自然周',2:'按自然月' + */ + private Integer limitUnit; + /** + * 上限阈值 + */ + private Integer maxOrders; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ShopDetailDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ShopDetailDO.java new file mode 100644 index 0000000..595af98 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/ShopDetailDO.java @@ -0,0 +1,128 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 店铺信息 DO + * + * @author 芋道源码 + */ +@TableName("tz_shop_detail") +@KeySequence("tz_shop_detail_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ShopDetailDO extends BaseDO { + + /** + * 店铺id + */ + @TableId + private Long shopId; + /** + * 店铺名称(数字、中文,英文(可混合,不可有特殊字符),可修改)、不唯一 + */ + private String shopName; + /** + * 店长用户id + */ + private String userId; + /** + * 店铺类型 + */ + private Integer shopType; + /** + * 店铺简介(可修改) + */ + private String intro; + /** + * 店铺公告(可修改) + */ + private String shopNotice; + /** + * 店铺行业(餐饮、生鲜果蔬、鲜花等) + */ + private Integer shopIndustry; + /** + * 店长 + */ + private String shopOwner; + /** + * 店铺绑定的手机(登录账号:唯一) + */ + private String mobile; + /** + * 店铺联系电话 + */ + private String tel; + /** + * 店铺所在纬度(可修改) + */ + private String shopLat; + /** + * 店铺所在经度(可修改) + */ + private String shopLng; + /** + * 店铺详细地址 + */ + private String shopAddress; + /** + * 店铺所在省份(描述) + */ + private String province; + /** + * 店铺所在城市(描述) + */ + private String city; + /** + * 店铺所在区域(描述) + */ + private String area; + /** + * 店铺省市区代码,用于回显 + */ + private String pcaCode; + /** + * 店铺logo(可修改) + */ + private String shopLogo; + /** + * 店铺相册 + */ + private String shopPhotos; + /** + * 每天营业时间段(可修改) + */ + private String openTime; + /** + * 店铺状态(-1:未开通 0: 停业中 1:营业中),可修改 + */ + private Integer shopStatus; + /** + * 0:商家承担运费; 1:买家承担运费 + */ + private Integer transportType; + /** + * 固定运费 + */ + private BigDecimal fixedFreight; + /** + * 满X包邮 + */ + private BigDecimal fullFreeShipping; + /** + * 分销开关(0:开启 1:关闭) + */ + private Integer isDistribution; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuDO.java new file mode 100644 index 0000000..cb11aaa --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuDO.java @@ -0,0 +1,179 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import java.util.Date; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 单品SKU DO + * + * @author 芋道源码 + */ +@TableName("tz_sku") +@KeySequence("tz_sku_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkuDO extends BaseDO { + + /** + * 单品ID + */ + @TableId + private Long skuId; + /** + * 商品ID + */ + private Long prodId; + /** + * 销售属性组合字符串 格式是p1:v1;p2:v2 + */ + private String properties; + /** + * 别名 + */ + private String alias; + /** + * 当前价格 + */ + private BigDecimal price; + /** + * 基准价 + */ + private BigDecimal basePrice; + /** + * 最低价格 + */ + private BigDecimal minPrice; + /** + * 最高价格 + */ + private BigDecimal maxPrice; + /** + * 成本价 + */ + private BigDecimal originalPrice; + /** + * 市场价 + */ + private BigDecimal marketPrice; + + /** + * 服务内容 + */ + private String serviceContent; + /** + * 规格id 多个用逗号分隔(1,2,3) + */ + private String propIds; + /** + * 单位 + */ + private String unit; + /** + * 0:主服务1:待定 + */ + private Integer type; + /** + * 概述 + */ + private String overview; + /** + * 库存 + */ + private Integer stocks; + + + /** + * 总库存是0 无线库存是1 + */ + private Integer stocksFlg; + + /** + * 锁定库存数 + */ + @TableField(exist=false) + private Integer stocksLockNum; + /** + * 预警库存 + */ + private Integer warnStocks; + /** + * 库存扣款时机0:付款扣1:下单扣 + */ + private Integer stocksType; + /** + * sku编码 + */ + private String skuCode; + /** + * 商品条形码 + */ + private String modelId; + /** + * sku图片 + */ + private String pic; + /** + * sku名称 + */ + private String skuName; + /** + * 商品名称 + */ + private String prodName; + /** + * 版本号 + */ + private Integer version; + /** + * 商品重量 + */ + private Double weight; + /** + * 商品体积 + */ + private Double volume; + /** + * 0 禁用 1 启用 + */ + private Integer status; + /** + * 最小购买数量 + */ + private Integer moq; + /** + * 是否上下架0下架1上架 + */ + private Integer isShelf; + + /** + * 是否默认规则0否1是 + */ + private Integer isSpecs; + + /** + * 扩展服务表单id + */ + private Long formId; + + + /** + * isExist 是否新增 0否1是 + */ + @TableField(exist=false) + private Integer isExist; + + /** + * 删除时间 + */ + private Date deleteTime; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceDeliverDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceDeliverDO.java new file mode 100644 index 0000000..57ad3bc --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceDeliverDO.java @@ -0,0 +1,67 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 服务交付方式 DO + * + * @author 芋道源码 + */ +@TableName("tz_sku_service_deliver") +@KeySequence("tz_sku_service_deliver_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkuServiceDeliverDO extends BaseDO { + + /** + * 服务遗体运输唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的扩展服务ID + */ + private Long serviceId; + /** + * 交互方式0:快递物流 1:到店自提 2:商家自送 + */ + private Integer type; + /** + * 价格 + */ + private BigDecimal price; + /** + * 是否收费0:免费1收费 + */ + private Integer isCharge; + /** + * 详细地址 + */ + private String address; + /** + * 省 + */ + private String province; + /** + * 市 + */ + private String city; + /** + * 区 + */ + private String area; + /** + * 电话号码 + */ + private String tel; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceDetailsDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceDetailsDO.java new file mode 100644 index 0000000..d08f625 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceDetailsDO.java @@ -0,0 +1,86 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; + +import java.math.BigDecimal; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 服务详情 DO + * + * @author 芋道源码 + */ +@TableName("tz_sku_service_details") +@KeySequence("tz_sku_service_details_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkuServiceDetailsDO extends BaseDO { + + /** + * 服务详情的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的扩展服务ID + */ + private Long serviceId; + /** + * 图片 + */ + private String pic; + /** + * 名称 + */ + private String name; + /** + * 价格 + */ + private BigDecimal price; + /** + * 是否收费0:免费1收费 + */ + private Integer isCharge; + /** + * 是否默认值0否1是 + */ + private Integer isDefault; + /** + * 类型:0:配置信息1:交付方式 + */ + private Integer type; + + /** + * 地点 + */ + private String adress; + + /** + * 触发节点名称 + */ + private String triggerName; + + /** + * 触发节点id(或关联节点) + */ + private Long triggerId; + + + /** + * 是否并行0串行1并行 + */ + private Integer isParallel; + + /** + * 描述 + */ + private String describeContent; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceMaterialDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceMaterialDO.java new file mode 100644 index 0000000..70de6cc --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceMaterialDO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 服务物料详情 DO + * + * @author 芋道源码 + */ +@TableName("tz_sku_service_material") +@KeySequence("tz_sku_service_material_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkuServiceMaterialDO extends BaseDO { + + /** + * 服务物料的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的扩展服务ID + */ + private Long serviceId; + /** + * 名称 + */ + private String name; + /** + * 描述 + */ + private String describeContent; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceTransportDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceTransportDO.java new file mode 100644 index 0000000..584219b --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServiceTransportDO.java @@ -0,0 +1,58 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 服务遗体运输 DO + * + * @author 芋道源码 + */ +@TableName("tz_sku_service_transport") +@KeySequence("tz_sku_service_transport_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkuServiceTransportDO extends BaseDO { + + /** + * 服务遗体运输唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的扩展服务ID + */ + private Long serviceId; + /** + * 联系人 + */ + private String contacts; + /** + * 详细地址 + */ + private String address; + /** + * 省 + */ + private String province; + /** + * 市 + */ + private String city; + /** + * 区 + */ + private String area; + /** + * 电话号码 + */ + private String tel; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServicesFormDO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServicesFormDO.java new file mode 100644 index 0000000..35cb66f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/dto/SkuServicesFormDO.java @@ -0,0 +1,53 @@ +package com.tashow.cloud.productapi.api.product.dto; + +import com.tashow.cloud.mybatis.mybatis.core.dataobject.BaseDO; +import lombok.*; +import com.baomidou.mybatisplus.annotation.KeySequence; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +/** + * 商品SKU扩展服务表单 DO + * + * @author 芋道源码 + */ +@TableName("tz_sku_services_form") +@KeySequence("tz_sku_services_form_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class SkuServicesFormDO extends BaseDO { + + /** + * 扩展服务的唯一标识符 + */ + @TableId + private Long id; + /** + * 表单名称 + */ + private String name; + + /** + * 表单ID + */ + private Integer formId; + + /** + * 服务名称 + */ + private String serviceName; + /** + * 是否启用该服务 + */ + private Integer isEnabled; + + /** + * 类型 + */ + private Integer type; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategoryPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategoryPageReqVO.java new file mode 100644 index 0000000..551f9b8 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategoryPageReqVO.java @@ -0,0 +1,55 @@ +package com.tashow.cloud.productapi.api.product.vo; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 产品类目分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class CategoryPageReqVO extends PageParam { + + @Schema(description = "店铺ID", example = "22369") + private Long shopId; + + @Schema(description = "父节点", example = "16509") + private Long parentId; + + @Schema(description = "产品类目名称", example = "王五") + private String categoryName; + + @Schema(description = "类目图标") + private String icon; + + @Schema(description = "类目的显示图片") + private String pic; + + @Schema(description = "类目描述") + private String description; + + @Schema(description = "标签") + private List tag; + + @Schema(description = "排序") + private Integer sort; + + @Schema(description = "默认是1,表示正常状态,0为下线状态", example = "1") + private Integer status; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "分类层级") + private Integer grade; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategoryRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategoryRespVO.java new file mode 100644 index 0000000..83b2dae --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategoryRespVO.java @@ -0,0 +1,64 @@ +package com.tashow.cloud.productapi.api.product.vo; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 产品类目 Response VO") +@Data +@ExcelIgnoreUnannotated +public class CategoryRespVO { + + @Schema(description = "类目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15856") + @ExcelProperty("类目ID") + private Long categoryId; + + @Schema(description = "店铺ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22369") + @ExcelProperty("店铺ID") + private Long shopId; + + @Schema(description = "父节点", requiredMode = Schema.RequiredMode.REQUIRED, example = "16509") + @ExcelProperty("父节点") + private Long parentId; + + @Schema(description = "产品类目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("产品类目名称") + private String categoryName; + + @Schema(description = "类目图标") + @ExcelProperty("类目图标") + private String icon; + + @Schema(description = "类目的显示图片") + @ExcelProperty("类目的显示图片") + private String pic; + + @Schema(description = "类目描述") + @ExcelProperty("类目描述") + private String description; + + @Schema(description = "标签") + @ExcelProperty("标签") + private List tag; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("排序") + private Integer sort; + + @Schema(description = "默认是1,表示正常状态,0为下线状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("默认是1,表示正常状态,0为下线状态") + private Integer status; + + @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "分类层级", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("分类层级") + private Integer grade; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategorySaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategorySaveReqVO.java new file mode 100644 index 0000000..35dc158 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/CategorySaveReqVO.java @@ -0,0 +1,53 @@ +package com.tashow.cloud.productapi.api.product.vo; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "管理后台 - 产品类目新增/修改 Request VO") +@Data +public class CategorySaveReqVO { + + @Schema(description = "类目ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "15856") + private Long categoryId; + + @Schema(description = "店铺ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "22369") + private Long shopId; + + @Schema(description = "父节点", requiredMode = Schema.RequiredMode.REQUIRED, example = "16509") + //@NotNull(message = "父节点不能为空") + private Long parentId; + + /** + * 父节名称 + */ + private String parentName; + + @Schema(description = "产品类目名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + //@NotEmpty(message = "产品类目名称不能为空") + private String categoryName; + + @Schema(description = "类目图标") + private String icon; + + @Schema(description = "类目的显示图片") + private String pic; + + @Schema(description = "类目描述") + private String description; + + @Schema(description = "标签") + private List tag; + + @Schema(description = "排序", requiredMode = Schema.RequiredMode.REQUIRED) + private Integer sort; + + @Schema(description = "默认是1,表示正常状态,0为下线状态", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + private Integer status; + + @Schema(description = "分类层级 1级 2级 3级", requiredMode = Schema.RequiredMode.REQUIRED) + //@NotNull(message = "分类层级不能为空") + private Integer grade; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdListVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdListVO.java new file mode 100644 index 0000000..d4ae332 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdListVO.java @@ -0,0 +1,95 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasInfoVO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Schema(description = "商品服务配置 VO") +@Data +public class ProdListVO { + + /** + * 产品ID + */ + @TableId + private Long prodId; + /** + * 商品名称 + */ + private String prodName; + /** + * 分类名称 + */ + private String categoryName; + + /** + * 店铺id + */ + private Long shopId; + + /** + * 店铺id + */ + private String shopName; + + /** + * 默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核 + */ + private Integer status; + + /** + * 是否置灰0否1是 + */ + private Integer isProhibit; + /** + * 服务区域地址名称集合 + */ + private List areaNameList; + + /** + * 紧急服务最快响应时间(小时) + */ + private BigDecimal responseHours; + /** + * 服务时段 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List reservationTimeSlots; + + /** + * 还剩多少天 + */ + private Long remainingDays; + + /** + * 审核备注 + */ + private String processNotes; + /** + * 删除时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date deleteTime; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + /** + * 更新时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdPageReqVO.java new file mode 100644 index 0000000..33e3e6f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdPageReqVO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; +import java.util.List; + +import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 商品分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdPageReqVO extends PageParam { + + @Schema(description = "商品名称", example = "赵六") + private String prodName; + + @Schema(description = "店铺id", example = "10843") + private Long shopId; + + @Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2") + private Integer status; + + @Schema(description = "商品分类", example = "14895") + private Long categoryId; + + /** + * 商品分类名称 + */ + private String categoryName; + + @Schema(description = "创建时间") + //@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] createTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRecycleBinVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRecycleBinVO.java new file mode 100644 index 0000000..4fcbc6b --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRecycleBinVO.java @@ -0,0 +1,22 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "商品回收站分页查询") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdRecycleBinVO extends PageParam { + + @Schema(description = "商品名称", example = "18784") + private String prodName; + + @Schema(description = "删除时间") + //@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] deleteTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRespVO.java new file mode 100644 index 0000000..dd4be2d --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRespVO.java @@ -0,0 +1,162 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 商品 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdRespVO { + + @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943") + @ExcelProperty("产品ID") + private Long prodId; + + @Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("商品名称") + private String prodName; + + @Schema(description = "商品简称") + @ExcelProperty("商品简称") + private String abbreviation; + + @Schema(description = "seo标题", example = "李四") + @ExcelProperty("seo标题") + private String seoShortName; + + + @Schema(description = "seo搜索") + @ExcelProperty("seo搜索") + private String seoSearch; + + @Schema(description = "关键词") + @ExcelProperty("关键词") + private String keyword; + + @Schema(description = "店铺id", example = "10843") + @ExcelProperty("店铺id") + private Long shopId; + + @Schema(description = "简要描述,卖点等") + @ExcelProperty("简要描述,卖点等") + private String brief; + + @Schema(description = "品牌") + @ExcelProperty("品牌") + private String brand; + + @Schema(description = "详细描述") + @ExcelProperty("详细描述") + private String content; + + @Schema(description = "商品编号") + @ExcelProperty("商品编号") + private String prodNumber; + + @Schema(description = "商品主图") + @ExcelProperty("商品主图") + private String pic; + + @Schema(description = "商品轮播图片,以,分割") + @ExcelProperty("商品轮播图片,以,分割") + private String imgs; + + /** + * 视频 + */ + private String video; + + /** + * 商品轮播图片,以,分割 + */ + private String whiteImg; + + @Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2") + @ExcelProperty("默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核") + private Integer status; + + @Schema(description = "商品分类", example = "14895") + @ExcelProperty("商品分类") + private Long categoryId; + + /** + * 商品分类名称 + */ + private String categoryName; + + @Schema(description = "销量") + @ExcelProperty("销量") + private Integer soldNum; + + @Schema(description = "分享图") + @ExcelProperty("分享图") + private String shareImage; + + @Schema(description = "'是否置灰0否1是'") + private Integer isProhibit; + + @Schema(description = "审核备注") + private String processNotes; + /** + * 标签 + */ + public List tag; + + @Schema(description = "分享话术") + @ExcelProperty("分享话术") + private String shareContent; + + @Schema(description = "是否开启区域0关1开") + @ExcelProperty("是否开启区域0关1开") + private Integer regionSwitch; + + @Schema(description = "是否特殊时段0关1开") + @ExcelProperty("是否特殊时段0关1开") + private Integer additionalSwitch; + + @Schema(description = "是否特殊日期(节假日周末什么的)0关1开") + @ExcelProperty("是否特殊日期(节假日周末什么的)0关1开") + private Integer additionalFeeSwitch; + + @Schema(description = "是否紧急响应服务0关1开") + @ExcelProperty("是否紧急响应服务0关1开") + private Integer emergencySwitch; + + @Schema(description = "是否预约0关1开") + @ExcelProperty("是否预约0关1开") + private Integer reservationSwitch; + + @Schema(description = "是否接单上线0关1开") + @ExcelProperty("是否接单上线0关1开") + private Integer orderLimitSwitch; + + @Schema(description = "是否开启体重配置0关1开") + @ExcelProperty("是否开启体重配置0关1开") + private Integer weightSwitch; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "创建人") + @ExcelProperty("创建人") + private String createBy; + + @Schema(description = "修改人") + @ExcelProperty("修改人") + private String updateBy; + + @Schema(description = "版本 乐观锁") + @ExcelProperty("版本 乐观锁") + private Integer version; + + @Schema(description = "展示的权重") + @ExcelProperty("展示的权重") + private Integer top; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRestoreListVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRestoreListVO.java new file mode 100644 index 0000000..59b556f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdRestoreListVO.java @@ -0,0 +1,74 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +@Schema(description = "商品服务配置 VO") +@Data +public class ProdRestoreListVO { + + /** + * 产品ID + */ + @TableId + private Long prodId; + /** + * 商品名称 + */ + private String prodName; + /** + * 分类名称 + */ + private String categoryName; + + /** + * 店铺id + */ + private Long shopId; + + /** + * 店铺id + */ + private String shopName; + + /** + * 服务区域地址名称集合 + */ + private List areaNameList; + + /** + * 紧急服务最快响应时间(小时) + */ + private BigDecimal responseHours; + /** + * 服务时段 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List reservationTimeSlots; + + /** + * 还剩多少天 + */ + private Long remainingDays; + + /** + * 删除时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date deleteTime; + /** + * 创建时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdSaveReqVO.java new file mode 100644 index 0000000..c620f86 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdSaveReqVO.java @@ -0,0 +1,134 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.tashow.cloud.productapi.api.product.dto.SkuDO; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropSaveReqVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "管理后台 - 商品新增/修改 Request VO") +@Data +public class ProdSaveReqVO { + + @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943") + private Long prodId; + + //@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + //@NotEmpty(message = "商品名称不能为空") + private String prodName; + + @Schema(description = "商品简称") + private String abbreviation; + + @Schema(description = "seo标题", example = "李四") + private String seoShortName; + + @Schema(description = "seo搜索") + private String seoSearch; + + @Schema(description = "关键词") + private String keyword; + + /** + * 商品分类名称 + */ + private String categoryName; + + @Schema(description = "店铺id", example = "10843") + private Long shopId; + + @Schema(description = "简要描述,卖点等") + private String brief; + + @Schema(description = "品牌") + private String brand; + + @Schema(description = "详细描述") + private String content; + /** + * 视频 + */ + private String video; + + /** + * 白底图 + */ + private String whiteImg; + + @Schema(description = "商品编号") + private String prodNumber; + + @Schema(description = "商品主图") + private String pic; + + @Schema(description = "商品轮播图片,以,分割") + private String imgs; + + @Schema(description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", example = "2") + private Integer status; + + @Schema(description = "'是否置灰0否1是'") + private Integer isProhibit; + + @Schema(description = "审核备注") + private String processNotes; + + + @Schema(description = "商品分类", example = "14895") + private Long categoryId; + + @Schema(description = "销量") + private Integer soldNum; + + @Schema(description = "分享图") + private String shareImage; + + /** + * 标签 + */ + public List tag; + + @Schema(description = "分享话术") + private String shareContent; + + @Schema(description = "是否开启区域0关1开") + private Integer regionSwitch; + + @Schema(description = "是否特殊时段0关1开") + private Integer additionalSwitch; + + @Schema(description = "是否特殊日期(节假日周末什么的)0关1开") + private Integer additionalFeeSwitch; + + @Schema(description = "是否紧急响应服务0关1开") + private Integer emergencySwitch; + + @Schema(description = "是否预约0关1开") + private Integer reservationSwitch; + + @Schema(description = "是否接单上线0关1开") + private Integer orderLimitSwitch; + + @Schema(description = "是否开启体重配置0关1开") + private Integer weightSwitch; + + @Schema(description = "创建人") + private String createBy; + + @Schema(description = "修改人") + private String updateBy; + + @Schema(description = "版本 乐观锁") + private Integer version; + + @Schema(description = "展示的权重") + private Integer top; + + @Schema(description = "sku列表") + private List skuList; + + @Schema(description = "规格") + private List prodPropSaveReqVO; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdServiceInfoVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdServiceInfoVO.java new file mode 100644 index 0000000..7639abc --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdServiceInfoVO.java @@ -0,0 +1,84 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO; +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO; +import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO; +import com.tashow.cloud.productapi.api.product.dto.ProductOrderLimitDO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.Date; +import java.util.List; +import java.util.stream.Collectors; + +@Schema(description = "商品服务配置 VO") +@Data +public class ProdServiceInfoVO { + + @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943") + private Long prodId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + @Schema(description = "新建人") + private String creator; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "分类名称") + private String categoryName; + + @Schema(description = "是否开启服务区域配置0关1开") + private Integer regionSwitch; + @Schema(description = "服务区域配置") + public ProdServiceAreasInfoVO prodServiceAreasInfo; + + + @Schema(description = "是否预约0关1开") + private Integer reservationSwitch; + @Schema(description = "预约配置") + public ProdReservationInfoReqVO prodReservationConfig; + + @Schema(description = "是否紧急响应服务0关1开") + private Integer emergencySwitch; + @Schema(description = "急响应服务配置") + public ProdEmergencyInfoReqVO prodEmergencyInfoVO; + + @Schema(description = "是否接单上线0关1开") + private Integer orderLimitSwitch; + @Schema(description = "接单上线配置") + public ProductOrderLimitDO productOrderLimitVO; + + + @Schema(description = "是否特殊日期(节假日周末什么的)0关1开 ") + private Integer additionalSwitch; + @Schema(description = "特殊日期规则配置") + public List prodAdditionalFeeDatesList; + + @Schema(description = "是否特殊时段0关1开") + private Integer additionalFeeSwitch; + @Schema(description = "特殊时段规则配置 ") + public List prodAdditionalFeePeriodsList; + + + @Schema(description = "是否开启体重配置0关1开") + private Integer weightSwitch; + @Schema(description = "体重配置") + public ProdWeightRangePricesSaveInfoVO prodWeightConfig; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdServiceVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdServiceVO.java new file mode 100644 index 0000000..03cab05 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prod/ProdServiceVO.java @@ -0,0 +1,119 @@ +package com.tashow.cloud.productapi.api.product.vo.prod; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasInfoVO; +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveInfoVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Schema(description = "商品服务配置 VO") +@Data +public class ProdServiceVO { + + @Schema(description = "产品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6943") + private Long prodId; + + @Schema(description = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + + @Schema(description = "修改时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; + + @Schema(description = "新建人") + private String creator; + + @Schema(description = "修改人") + private String updater; + + @Schema(description = "分类名称") + private String categoryName; + + @Schema(description = "是否开启服务区域配置0关1开") + private Integer regionSwitch; + @Schema(description = "服务区域配置") + public ProdServiceAreasInfoVO prodServiceAreasInfo; + + + @Schema(description = "是否预约0关1开") + private Integer reservationSwitch; + @Schema(description = "预约配置") + public ProdReservationInfoVO prodReservationConfig; + + /* public List getProdReservationBlackList() { + if (prodReservationBlackList == null || prodReservationBlackList.isEmpty()) { + return prodReservationBlackList; + } + return prodReservationBlackList.stream() + .filter(Objects::nonNull) + .collect(Collectors.toList()); + } + + public void setProdReservationBlackList(List prodReservationBlackList) { + this.prodReservationBlackList = prodReservationBlackList; + }*/ + + + + + @Schema(description = "是否紧急响应服务0关1开") + private Integer emergencySwitch; + @Schema(description = "急响应服务配置") + public ProdEmergencyInfoVO prodEmergencyInfoVO; + + @Schema(description = "是否接单上线0关1开") + private Integer orderLimitSwitch; + @Schema(description = "接单上线配置") + public ProductOrderLimitDO productOrderLimitVO; + + + @Schema(description = "是否特殊日期(节假日周末什么的)0关1开") + private Integer additionalSwitch; + @Schema(description = "特殊日期规则配置") + public List prodAdditionalFeeDatesList; + + @Schema(description = "是否特殊时段0关1开 ") + private Integer additionalFeeSwitch; + @Schema(description = "特殊时段规则配置 ") + public List prodAdditionalFeePeriodsList; + + + @Schema(description = "是否开启体重配置0关1开") + private Integer weightSwitch; + @Schema(description = "体重配置") + public ProdWeightRangePricesSaveInfoVO prodWeightConfig; + + + public ProdReservationInfoVO getProdReservationConfig() { + + if (this.prodReservationConfig == null) { + return null; + } + // 判断是否“逻辑上为空” + if (isProdReservationInfoEmpty(this.prodReservationConfig)) { + return null; + } + return this.prodReservationConfig; + } + + public void setProdReservationConfig(ProdReservationInfoVO prodReservationConfig) { + this.prodReservationConfig = prodReservationConfig; + } + + private boolean isProdReservationInfoEmpty(ProdReservationInfoVO config) { + if (config == null) return true; + // 判断所有字段是否都为 null 或空 + return config.getId() == null; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeBlackVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeBlackVO.java new file mode 100644 index 0000000..e693bc9 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeBlackVO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.TableField; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Schema(description = "管理后台 - 特殊日期附加费用规则 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdAdditionalFeeBlackVO { + + @Schema(description = "特殊日期规则的唯一标识符") + @ExcelProperty("特殊日期规则的唯一标识符") + private Long id; + + @Schema(description = "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'") + @ExcelProperty("日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'") + private Integer dateType; + + @Schema(description = "黑名单日期设置") + @ExcelProperty("黑名单日期设置") + @TableField(typeHandler = StringListTypeHandler.class) + private List customTimeSlots; + + + @Schema(description = "类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期") + @ExcelProperty("类型:1:特殊日期 2:可预约时段黑名单日期 3:紧急相应服务黑名单日期") + private Integer type; + + @Schema(description = "是否启用该规则是否启用该规则0关1开", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用该规则是否启用该规则0关1开") + private Integer isEnabled; + public boolean isEmpty() { + return id == null ; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesPageReqVO.java new file mode 100644 index 0000000..d5f251c --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesPageReqVO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 特殊日期附加费用规则分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdAdditionalFeeDatesPageReqVO extends PageParam { + + @Schema(description = "商品id", example = "24324") + private Long prodId; + + @Schema(description = "名称", example = "赵六") + private String name; + + @Schema(description = "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'", example = "2") + private Integer dateType; + + @Schema(description = "自定义日期时间段(JSON格式存储)") + private String customTimeSlots; + + @Schema(description = "指定日期(JSON格式存储)") + private String specificDates; + + @Schema(description = "收费方式0:''固定金额'':1:''基准价上浮") + private Integer chargeMode; + + @Schema(description = "价格或上浮百分比", example = "17305") + private BigDecimal price; + + @Schema(description = "是否启用该规则是否启用该规则0关1开") + private Integer isEnabled; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesRespVO.java new file mode 100644 index 0000000..80da4d7 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesRespVO.java @@ -0,0 +1,51 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 特殊日期附加费用规则 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdAdditionalFeeDatesRespVO { + + @Schema(description = "特殊日期规则的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "1445") + @ExcelProperty("特殊日期规则的唯一标识符") + private Long id; + + @Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24324") + @ExcelProperty("商品id") + private Long prodId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("名称") + private String name; + + @Schema(description = "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @ExcelProperty("日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'") + private Integer dateType; + + @Schema(description = "自定义日期时间段(JSON格式存储)") + @ExcelProperty("自定义日期时间段(JSON格式存储)") + private String customTimeSlots; + + @Schema(description = "指定日期(JSON格式存储)") + @ExcelProperty("指定日期(JSON格式存储)") + private String specificDates; + + @Schema(description = "收费方式0:''固定金额'':1:''基准价上浮") + private Integer chargeMode; + + @Schema(description = "价格或上浮百分比", example = "17305") + @ExcelProperty("价格或上浮百分比") + private BigDecimal price; + + @Schema(description = "是否启用该规则是否启用该规则0关1开", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用该规则是否启用该规则0关1开") + private Integer isEnabled; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesSaveReqVO.java new file mode 100644 index 0000000..7503ace --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeedates/ProdAdditionalFeeDatesSaveReqVO.java @@ -0,0 +1,48 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 特殊日期附加费用规则新增/修改 Request VO") +@Data +public class ProdAdditionalFeeDatesSaveReqVO { + + @Schema(description = "特殊日期规则的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "1445") + private Long id; + + @Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24324") + @NotNull(message = "商品id不能为空") + private Long prodId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'", requiredMode = Schema.RequiredMode.REQUIRED, example = "2") + @NotNull(message = "日期类型0:'自定义日期范围':1:'指定日期':2:'法定节假日',3:'固定休息日'不能为空") + private Integer dateType; + + @Schema(description = "自定义日期时间段(JSON格式存储)") + private String customTimeSlots; + + @Schema(description = "指定日期(JSON格式存储)") + private String specificDates; + + @Schema(description = "收费方式0:''固定金额'':1:''基准价上浮", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "收费方式不能为空") + private Integer chargeMode; + + + @Schema(description = "价格或上浮百分比", example = "17305") + private BigDecimal price; + + @Schema(description = "是否启用该规则是否启用该规则0关1开", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用该规则不能为空") + private Integer isEnabled; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsPageReqVO.java new file mode 100644 index 0000000..f941465 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsPageReqVO.java @@ -0,0 +1,36 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 特殊时段附加费用规则分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdAdditionalFeePeriodsPageReqVO extends PageParam { + + @Schema(description = "商品ID", example = "11100") + private Long prodId; + + @Schema(description = "名称", example = "张三") + private String name; + + @Schema(description = "特殊时段设置(JSON格式存储)") + private String specialTimeSlots; + + @Schema(description = "收费方式0:'固定金额',1:'基准价上浮'") + private Integer chargeMode; + + @Schema(description = "价格或上浮百分比", example = "20834") + private BigDecimal price; + + @Schema(description = "浮动百分比") + private BigDecimal floatingPercentage; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsRespVO.java new file mode 100644 index 0000000..b479cce --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsRespVO.java @@ -0,0 +1,45 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Schema(description = "管理后台 - 特殊时段附加费用规则 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdAdditionalFeePeriodsRespVO { + + @Schema(description = "特殊时段规则的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "24746") + @ExcelProperty("特殊时段规则的唯一标识符") + private Long id; + + @Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11100") + @ExcelProperty("商品ID") + private Long prodId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("名称") + private String name; + + @Schema(description = "特殊时段设置(JSON格式存储)", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("特殊时段设置(JSON格式存储)") + private List specialTimeSlots; + + @Schema(description = "收费方式0:'固定金额',1:'基准价上浮'", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("收费方式0:'固定金额',1:'基准价上浮'") + private Integer chargeMode; + + @Schema(description = "价格或上浮百分比", example = "20834") + @ExcelProperty("价格或上浮百分比") + private BigDecimal price; + + @Schema(description = "浮动百分比") + @ExcelProperty("浮动百分比") + private BigDecimal floatingPercentage; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsSaveReqVO.java new file mode 100644 index 0000000..a304f90 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodadditionalfeeperiods/ProdAdditionalFeePeriodsSaveReqVO.java @@ -0,0 +1,40 @@ +package com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Schema(description = "管理后台 - 特殊时段附加费用规则新增/修改 Request VO") +@Data +public class ProdAdditionalFeePeriodsSaveReqVO { + + @Schema(description = "特殊时段规则的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "24746") + private Long id; + + @Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "11100") + @NotNull(message = "商品ID不能为空") + private Long prodId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "特殊时段设置(JSON格式存储)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "特殊时段设置(JSON格式存储)不能为空") + private List specialTimeSlots; + + @Schema(description = "收费方式0:'固定金额',1:'基准价上浮'", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "收费方式0:'固定金额',1:'基准价上浮'不能为空") + private Integer chargeMode; + + @Schema(description = "价格或上浮百分比", example = "20834") + private BigDecimal price; + + @Schema(description = "浮动百分比") + private BigDecimal floatingPercentage; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyInfoReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyInfoReqVO.java new file mode 100644 index 0000000..c6103fd --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyInfoReqVO.java @@ -0,0 +1,40 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.baomidou.mybatisplus.annotation.TableField; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; +import java.util.stream.Collectors; + +@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdEmergencyInfoReqVO { + + + /** + * 紧急响应服务配置的唯一标识符 + */ + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 可响应时间段 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List responseTimeSlots; + + @Schema(description = "紧急响应时间区间设置") + public List prodEmergencyResponseIntervalsList; + + @Schema(description = "紧急响应黑名单日期设置") + public List prodEmergencyResponseBlackList; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyInfoVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyInfoVO.java new file mode 100644 index 0000000..bdf4c6d --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyInfoVO.java @@ -0,0 +1,39 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.baomidou.mybatisplus.annotation.TableField; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; +import java.util.stream.Collectors; + +@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdEmergencyInfoVO { + + + /** + * 紧急响应服务配置的唯一标识符 + */ + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 可响应时间段 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List responseTimeSlots; + + @Schema(description = "紧急响应时间区间设置") + public List prodEmergencyResponseIntervalsList; + + @Schema(description = "紧急响应黑名单日期设置") + public List prodEmergencyResponseBlackList; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponsePageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponsePageReqVO.java new file mode 100644 index 0000000..fa65441 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponsePageReqVO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 商品紧急响应服务设置分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdEmergencyResponsePageReqVO extends PageParam { + + @Schema(description = "关联的商品ID", example = "29152") + private Long prodId; + + @Schema(description = "可响应时间段") + private List responseTimeSlots; + + @Schema(description = "黑名自定义日期") + private List blacklistedDates; + + @Schema(description = "黑名单指定日期") + private List blackAppointDates; + + @Schema(description = "法定节假日是否开启0:关闭1开启") + private Integer blackHappy; + + @Schema(description = "固定休息日周末是否开启0关闭1开启") + private Integer blackWeekend; + + @Schema(description = "创建时间") + private LocalDateTime createdAt; + + @Schema(description = "更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponseRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponseRespVO.java new file mode 100644 index 0000000..8bfbab4 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponseRespVO.java @@ -0,0 +1,51 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdEmergencyResponseRespVO { + + @Schema(description = "紧急响应服务配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "7448") + @ExcelProperty("紧急响应服务配置的唯一标识符") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29152") + @ExcelProperty("关联的商品ID") + private Long prodId; + + @Schema(description = "可响应时间段(JSON格式存储)") + @ExcelProperty("可响应时间段(JSON格式存储)") + private String responseTimeSlots; + + @Schema(description = "黑名自定义日期(JSON格式存储)") + @ExcelProperty("黑名自定义日期(JSON格式存储)") + private String blacklistedDates; + + @Schema(description = "黑名单指定日期(JSON格式存储)") + @ExcelProperty("黑名单指定日期(JSON格式存储)") + private String blackAppointDates; + + @Schema(description = "法定节假日是否开启0:关闭1开启") + @ExcelProperty("法定节假日是否开启0:关闭1开启") + private Integer blackHappy; + + @Schema(description = "固定休息日周末是否开启0关闭1开启") + @ExcelProperty("固定休息日周末是否开启0关闭1开启") + private Integer blackWeekend; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createdAt; + + @Schema(description = "更新时间") + @ExcelProperty("更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponseSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponseSaveReqVO.java new file mode 100644 index 0000000..8223536 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponse/ProdEmergencyResponseSaveReqVO.java @@ -0,0 +1,44 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 商品紧急响应服务设置新增/修改 Request VO") +@Data +public class ProdEmergencyResponseSaveReqVO { + + @Schema(description = "紧急响应服务配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "7448") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "29152") + @NotNull(message = "关联的商品ID不能为空") + private Long prodId; + + @Schema(description = "可响应时间段") + private List responseTimeSlots; + + @Schema(description = "黑名自定义日期") + private ListblacklistedDates; + + @Schema(description = "黑名单指定日期") + private List blackAppointDates; + + @Schema(description = "法定节假日是否开启0:关闭1开启") + private Integer blackHappy; + + @Schema(description = "固定休息日周末是否开启0关闭1开启") + private Integer blackWeekend; + + @Schema(description = "创建时间") + private LocalDateTime createdAt; + + @Schema(description = "更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsPageReqVO.java new file mode 100644 index 0000000..765754e --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsPageReqVO.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 紧急响应时间区间设置分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdEmergencyResponseIntervalsPageReqVO extends PageParam { + + @Schema(description = "关联的紧急响应服务配置ID", example = "5737") + private Long configId; + + @Schema(description = "响应模式名称", example = "王五") + private String name; + + @Schema(description = "响应时间(小时)") + private BigDecimal responseHours; + + @Schema(description = "收费模式0:固定收费 1:浮动收费") + private Integer chargeMode; + + @Schema(description = "浮动百分比") + private BigDecimal floatingPercentage; + + @Schema(description = "价格或上浮百分比", example = "17810") + private BigDecimal price; + + @Schema(description = "创建时间") + private LocalDateTime createdAt; + + @Schema(description = "最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsRespVO.java new file mode 100644 index 0000000..d2b89b9 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsRespVO.java @@ -0,0 +1,52 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 紧急响应时间区间设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdEmergencyResponseIntervalsRespVO { + + @Schema(description = "响应时间区间的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "29650") + @ExcelProperty("响应时间区间的唯一标识符") + private Long id; + + @Schema(description = "关联的紧急响应服务配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5737") + @ExcelProperty("关联的紧急响应服务配置ID") + private Long configId; + + @Schema(description = "响应模式名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("响应模式名称") + private String name; + + @Schema(description = "响应时间(小时)", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("响应时间(小时)") + private BigDecimal responseHours; + + @Schema(description = "收费模式0:固定收费 1:浮动收费", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("收费模式0:固定收费 1:浮动收费") + private Integer chargeMode; + + @Schema(description = "浮动百分比") + @ExcelProperty("浮动百分比") + private BigDecimal floatingPercentage; + + @Schema(description = "价格或上浮百分比", example = "17810") + @ExcelProperty("价格或上浮百分比") + private BigDecimal price; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createdAt; + + @Schema(description = "最后更新时间") + @ExcelProperty("最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsSaveReqVO.java new file mode 100644 index 0000000..28d9290 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodemergencyresponseintervals/ProdEmergencyResponseIntervalsSaveReqVO.java @@ -0,0 +1,46 @@ +package com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 紧急响应时间区间设置新增/修改 Request VO") +@Data +public class ProdEmergencyResponseIntervalsSaveReqVO { + + @Schema(description = "响应时间区间的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "29650") + private Long id; + + @Schema(description = "关联的紧急响应服务配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "5737") + @NotNull(message = "关联的紧急响应服务配置ID不能为空") + private Long configId; + + @Schema(description = "响应模式名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "响应模式名称不能为空") + private String name; + + @Schema(description = "响应时间(小时)", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "响应时间(小时)不能为空") + private BigDecimal responseHours; + + @Schema(description = "收费模式0:固定收费 1:浮动收费", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "收费模式0:固定收费 1:浮动收费不能为空") + private Integer chargeMode; + + @Schema(description = "浮动百分比") + private BigDecimal floatingPercentage; + + @Schema(description = "价格或上浮百分比", example = "17810") + private BigDecimal price; + + @Schema(description = "创建时间") + private LocalDateTime createdAt; + + @Schema(description = "最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropPageReqVO.java new file mode 100644 index 0000000..1bb805d --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropPageReqVO.java @@ -0,0 +1,30 @@ +package com.tashow.cloud.productapi.api.product.vo.prodprop; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 商品属性分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdPropPageReqVO extends PageParam { + + @Schema(description = "属性名称", example = "李四") + private String propName; + + @Schema(description = "ProdPropRule 1:销售属性(规格); 2:参数属性;") + private Integer rule; + + @Schema(description = "店铺id", example = "2806") + private Long shopId; + + @Schema(description = "商品id", example = "21671") + private Integer prodId; + + @Schema(description = "是否删除0否1是") + private Integer deleted; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropRespVO.java new file mode 100644 index 0000000..0917922 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropRespVO.java @@ -0,0 +1,37 @@ +package com.tashow.cloud.productapi.api.product.vo.prodprop; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 商品属性 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdPropRespVO { + + @Schema(description = "属性id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14271") + @ExcelProperty("属性id") + private Long propId; + + @Schema(description = "属性名称", example = "李四") + @ExcelProperty("属性名称") + private String propName; + + @Schema(description = "ProdPropRule 1:销售属性(规格); 2:参数属性;") + @ExcelProperty("ProdPropRule 1:销售属性(规格); 2:参数属性;") + private Integer rule; + + @Schema(description = "店铺id", example = "2806") + @ExcelProperty("店铺id") + private Long shopId; + + @Schema(description = "商品id", example = "21671") + @ExcelProperty("商品id") + private Integer prodId; + + @Schema(description = "是否删除0否1是") + @ExcelProperty("是否删除0否1是") + private Integer deleted; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropSaveReqVO.java new file mode 100644 index 0000000..43cc4e5 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodprop/ProdPropSaveReqVO.java @@ -0,0 +1,45 @@ +package com.tashow.cloud.productapi.api.product.vo.prodprop; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +import java.util.List; + +@Schema(description = "管理后台 - 商品属性新增/修改 Request VO") +@Data +public class ProdPropSaveReqVO { + private Long id; + + @Schema(description = "属性id", requiredMode = Schema.RequiredMode.REQUIRED, example = "14271") + private Long propId; + + @Schema(description = "属性名称", example = "李四") + private String propName; + + @Schema(description = "ProdPropRule 1:销售属性(规格); 2:参数属性;") + private Integer rule; + + @Schema(description = "店铺id", example = "2806") + private Long shopId; + + @Schema(description = "商品id(添加的时候不传)", example = "21671") + private Integer prodId; + + @Schema(description = "是否删除0否1是") + private Integer deleted; + + /** + * isExist 是否新增 0否1是 + */ + @TableField(exist=false) + private Integer isExist; + /** + * 属性值 + */ + @TableField(exist=false) + @NotEmpty(message="规格属性值不能为空") + private List prodPropValues; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProPageReqVO.java new file mode 100644 index 0000000..bdf0406 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProPageReqVO.java @@ -0,0 +1,25 @@ +package com.tashow.cloud.productapi.api.product.vo.prodpropvalue; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProPageReqVO extends PageParam { + + /** + * 属性规格名称 + */ + private String propValue; + + /** + * 商品id + */ + private Long prodId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProPropRecycleBinVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProPropRecycleBinVO.java new file mode 100644 index 0000000..8ed8587 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProPropRecycleBinVO.java @@ -0,0 +1,32 @@ +package com.tashow.cloud.productapi.api.product.vo.prodpropvalue; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.Date; + +@Data +public class ProPropRecycleBinVO { + @Schema(description = "规格值id") + private Long id; + + /** + * 属性规格名称 + */ + private String propValue; + /** + * 关联规格属性id + */ + private Long propId; + + /** + * 还剩多少天 + */ + private Long remainingDays; + /** + * 删除时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date deleteTime; +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValuePageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValuePageReqVO.java new file mode 100644 index 0000000..f0a69b3 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValuePageReqVO.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.productapi.api.product.vo.prodpropvalue; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 属性规则分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdPropValuePageReqVO extends PageParam { + + @Schema(description = "属性值名称") + private String propValue; + + @Schema(description = "属性ID", example = "28282") + private Long propId; + + @Schema(description = "是否删除0否1是") + private Integer deleted; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValueRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValueRespVO.java new file mode 100644 index 0000000..eba9eb2 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValueRespVO.java @@ -0,0 +1,29 @@ +package com.tashow.cloud.productapi.api.product.vo.prodpropvalue; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 属性规则 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdPropValueRespVO { + + @Schema(description = "属性值ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13799") + @ExcelProperty("属性值ID") + private Long valueId; + + @Schema(description = "属性值名称") + @ExcelProperty("属性值名称") + private String propValue; + + @Schema(description = "属性ID", example = "28282") + @ExcelProperty("属性ID") + private Long propId; + + @Schema(description = "是否删除0否1是") + @ExcelProperty("是否删除0否1是") + private Boolean deleted; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValueSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValueSaveReqVO.java new file mode 100644 index 0000000..6cefb94 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodpropvalue/ProdPropValueSaveReqVO.java @@ -0,0 +1,22 @@ +package com.tashow.cloud.productapi.api.product.vo.prodpropvalue; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 属性规则新增/修改 Request VO") +@Data +public class ProdPropValueSaveReqVO { + + @Schema(description = "属性值ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "13799") + private Long valueId; + + @Schema(description = "属性值名称") + private String propValue; + + @Schema(description = "属性ID", example = "28282") + private Long propId; + + @Schema(description = "是否删除0否1是") + private Boolean deleted; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigPageReqVO.java new file mode 100644 index 0000000..3344637 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigPageReqVO.java @@ -0,0 +1,67 @@ +package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 商品预约配置分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdReservationConfigPageReqVO extends PageParam { + + @Schema(description = "关联的商品ID", example = "19369") + private Long prodId; + + @Schema(description = "预约时段设置") + private List reservationTimeSlots; + + @Schema(description = "需提前多少小时预约") + private Integer advanceHours; + + @Schema(description = "预约日期范围 7天 10天 15天 30天") + private Integer reservationDateRange; + + @Schema(description = "是否允许更改预约时间 1可以 0不可以") + private Boolean allowChange; + + @Schema(description = "更改预约时间的时间规则(如服务开始前1小时可更改)") + private Integer changeTimeRule; + + @Schema(description = "允许更改预约时间的最大次数") + private Integer maxChangeTimes; + + @Schema(description = "黑名自定义日期") + private List blacklistedDates; + + /** + * '是否开启黑名单自定义0关1开' + */ + private Integer isBlacklisted; + + /** + * '是否开启黑名单指定日期0关1开' + */ + private Integer isBlackAppoint; + + @Schema(description = "黑名单指定日期") + private List blackAppointDates; + + @Schema(description = "法定节假日是否开启0:关闭1开启") + private Boolean blackHappy; + + @Schema(description = "固定休息日周末是否开启0关闭1开启") + private Boolean blackWeekend; + + @Schema(description = "配置创建时间") + private LocalDateTime createdAt; + + @Schema(description = "配置最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigRespVO.java new file mode 100644 index 0000000..affc982 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigRespVO.java @@ -0,0 +1,82 @@ +package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 商品预约配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdReservationConfigRespVO { + + @Schema(description = "预约配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "20606") + @ExcelProperty("预约配置的唯一标识符") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19369") + @ExcelProperty("关联的商品ID") + private Long prodId; + + @Schema(description = "预约时段设置", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("预约时段设置") + private List reservationTimeSlots; + + @Schema(description = "需提前多少小时预约", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("需提前多少小时预约") + private Integer advanceHours; + + @Schema(description = "预约日期范围 7天 10天 15天 30天", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("预约日期范围 7天 10天 15天 30天") + private Integer reservationDateRange; + + @Schema(description = "是否允许更改预约时间 1可以 0不可以", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否允许更改预约时间 1可以 0不可以") + private Boolean allowChange; + + @Schema(description = "更改预约时间的时间规则(如服务开始前1小时可更改)") + @ExcelProperty("更改预约时间的时间规则(如服务开始前1小时可更改)") + private Integer changeTimeRule; + + @Schema(description = "允许更改预约时间的最大次数") + @ExcelProperty("允许更改预约时间的最大次数") + private Integer maxChangeTimes; + + @Schema(description = "黑名自定义日期") + @ExcelProperty("黑名自定义日期") + private List blacklistedDates; + + /** + * '是否开启黑名单自定义0关1开' + */ + private Integer isBlacklisted; + + /** + * '是否开启黑名单指定日期0关1开' + */ + private Integer isBlackAppoint; + + @Schema(description = "黑名单指定日期") + @ExcelProperty("黑名单指定日期") + private List blackAppointDates; + + @Schema(description = "法定节假日是否开启0:关闭1开启") + @ExcelProperty("法定节假日是否开启0:关闭1开启") + private Boolean blackHappy; + + @Schema(description = "固定休息日周末是否开启0关闭1开启") + @ExcelProperty("固定休息日周末是否开启0关闭1开启") + private Boolean blackWeekend; + + @Schema(description = "配置创建时间") + @ExcelProperty("配置创建时间") + private LocalDateTime createdAt; + + @Schema(description = "配置最后更新时间") + @ExcelProperty("配置最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigSaveReqVO.java new file mode 100644 index 0000000..6b4af4a --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationConfigSaveReqVO.java @@ -0,0 +1,72 @@ +package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.time.LocalDateTime; +import java.util.List; + +@Schema(description = "管理后台 - 商品预约配置新增/修改 Request VO") +@Data +public class ProdReservationConfigSaveReqVO { + + @Schema(description = "预约配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "20606") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "19369") + @NotNull(message = "关联的商品ID不能为空") + private Long prodId; + + @Schema(description = "预约时段设置", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "预约时段设置不能为空") + private List reservationTimeSlots; + + @Schema(description = "需提前多少小时预约", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "需提前多少小时预约不能为空") + private Integer advanceHours; + + @Schema(description = "预约日期范围 7天 10天 15天 30天", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "预约日期范围 7天 10天 15天 30天不能为空") + private Integer reservationDateRange; + + @Schema(description = "是否允许更改预约时间 1可以 0不可以", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否允许更改预约时间 1可以 0不可以不能为空") + private Boolean allowChange; + + @Schema(description = "更改预约时间的时间规则(如服务开始前1小时可更改)") + private Integer changeTimeRule; + + @Schema(description = "允许更改预约时间的最大次数") + private Integer maxChangeTimes; + + @Schema(description = "黑名自定义日期") + private List blacklistedDates; + + /** + * '是否开启黑名单自定义0关1开' + */ + private Integer isBlacklisted; + + /** + * '是否开启黑名单指定日期0关1开' + */ + private Integer isBlackAppoint; + + @Schema(description = "黑名单指定日期") + private List blackAppointDates; + + @Schema(description = "法定节假日是否开启0:关闭1开启") + private Boolean blackHappy; + + @Schema(description = "固定休息日周末是否开启0关闭1开启") + private Boolean blackWeekend; + + @Schema(description = "配置创建时间") + private LocalDateTime createdAt; + + @Schema(description = "配置最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationInfoReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationInfoReqVO.java new file mode 100644 index 0000000..e8b1088 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationInfoReqVO.java @@ -0,0 +1,84 @@ +package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdReservationInfoReqVO { + + /** + * 预约配置的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 预约时段设置 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List reservationTimeSlots; + /** + * 需提前多少小时预约 + */ + private Integer advanceHours; + /** + * 预约日期范围 7天 10天 15天 30天 + */ + private Integer reservationDateRange; + /** + * 是否允许更改预约时间 1可以 0不可以 + */ + private Integer allowChange; + + /** + * 时间段 + */ + private Integer timeSlot; + + /** + * 更改预约时间的时间规则(如服务开始前1小时可更改) + */ + private Integer changeTimeRule; + /** + * 允许更改预约时间的最大次数 + */ + private Integer maxChangeTimes; + + /** + * 预约时间区间设置 + */ + @TableField(exist=false) + private TimeBookVO timeBook; + + public TimeBookVO getTimeBook() { + if (this.timeBook == null) { + this.timeBook = new TimeBookVO(); + this.timeBook.setTimeSlot(this.timeSlot); + this.timeBook.setReservationTimeSlots(this.reservationTimeSlots); + } + return this.timeBook; + } + + public void setTimeBook(TimeBookVO timeBook) { + this.timeBook = timeBook; + } + + @Schema(description = "预约黑名单日期设置") + public List prodReservationBlackList = new ArrayList<>(); + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationInfoVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationInfoVO.java new file mode 100644 index 0000000..de8fd53 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/ProdReservationInfoVO.java @@ -0,0 +1,103 @@ +package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO; +import com.tashow.cloud.productapi.general.StringListTypeHandler; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.ArrayList; +import java.util.List; +import java.util.Objects; +import java.util.stream.Collectors; + +@Schema(description = "管理后台 - 商品紧急响应服务设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdReservationInfoVO { + + /** + * 预约配置的唯一标识符 + */ + @TableId + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 预约时段设置 + */ + @TableField(typeHandler = StringListTypeHandler.class) + private List reservationTimeSlots; + /** + * 需提前多少小时预约 + */ + private Integer advanceHours; + /** + * 预约日期范围 7天 10天 15天 30天 + */ + private Integer reservationDateRange; + /** + * 是否允许更改预约时间 1可以 0不可以 + */ + private Integer allowChange; + + /** + * 时间段 + */ + private Integer timeSlot; + + /** + * 更改预约时间的时间规则(如服务开始前1小时可更改) + */ + private Integer changeTimeRule; + /** + * 允许更改预约时间的最大次数 + */ + private Integer maxChangeTimes; + + /** + * 预约时间区间设置 + */ + @TableField(exist=false) + private TimeBookVO timeBook; + + public TimeBookVO getTimeBook() { + if (this.timeBook == null) { + this.timeBook = new TimeBookVO(); + this.timeBook.setTimeSlot(this.timeSlot); + this.timeBook.setReservationTimeSlots(this.reservationTimeSlots); + } + return this.timeBook; + } + + public void setTimeBook(TimeBookVO timeBook) { + this.timeBook = timeBook; + } + + @Schema(description = "预约黑名单日期设置") + public List prodReservationBlackList; + + +/* public List getProdReservationBlackList() { + if (prodReservationBlackList == null || prodReservationBlackList.isEmpty()) { + return prodReservationBlackList; + } + return prodReservationBlackList.stream() + .filter(black -> black != null && !black.isEmpty()) + .collect(Collectors.toList()); + } + + public void setProdReservationBlackList(List prodReservationBlackList) { + this.prodReservationBlackList = prodReservationBlackList; + }*/ + + + + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/TimeBookVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/TimeBookVO.java new file mode 100644 index 0000000..a33c770 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodreservationconfig/TimeBookVO.java @@ -0,0 +1,23 @@ +package com.tashow.cloud.productapi.api.product.vo.prodreservationconfig; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "管理后台 - 商品预约配置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class TimeBookVO { + + /** + * 预约时段设置 + */ + private List reservationTimeSlots; + /** + * 时间段 + */ + private Integer timeSlot; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevancePageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevancePageReqVO.java new file mode 100644 index 0000000..7eb3f03 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevancePageReqVO.java @@ -0,0 +1,15 @@ +package com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 商品与服务区域关联分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdServiceAreaRelevancePageReqVO extends PageParam { + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevanceRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevanceRespVO.java new file mode 100644 index 0000000..001a867 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevanceRespVO.java @@ -0,0 +1,21 @@ +package com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 商品与服务区域关联 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdServiceAreaRelevanceRespVO { + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23588") + @ExcelProperty("关联的商品ID") + private Long prodId; + + @Schema(description = "关联的服务区域ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28293") + @ExcelProperty("关联的服务区域ID") + private Long areaId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevanceSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevanceSaveReqVO.java new file mode 100644 index 0000000..d3d8da6 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodservicearearelevance/ProdServiceAreaRelevanceSaveReqVO.java @@ -0,0 +1,16 @@ +package com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 商品与服务区域关联新增/修改 Request VO") +@Data +public class ProdServiceAreaRelevanceSaveReqVO { + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "23588") + private Long prodId; + + @Schema(description = "关联的服务区域ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "28293") + private Long areaId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasInfoVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasInfoVO.java new file mode 100644 index 0000000..b2089ae --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasInfoVO.java @@ -0,0 +1,36 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceareas; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Schema(description = "管理后台 - 服务区域 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdServiceAreasInfoVO { + + /** + * 超区规则的唯一标识符 + */ + private Long id; + /** + * 关联的商品ID + */ + private Long prodId; + /** + * 超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费) + */ + private Integer ruleType; + /** + * 超区费用(仅在rule_type为accept_with_fee时有效) + */ + private BigDecimal fee; + + + @Schema(description = "服务区域地址名称") + private List areaNameList; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasPageReqVO.java new file mode 100644 index 0000000..691a166 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasPageReqVO.java @@ -0,0 +1,27 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceareas; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 服务区域分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdServiceAreasPageReqVO extends PageParam { + + @Schema(description = "服务区域名称(如台江区、鼓楼区)", example = "芋艿") + private String areaName; + + @Schema(description = "区域创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasRespVO.java new file mode 100644 index 0000000..3cbbd92 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasRespVO.java @@ -0,0 +1,27 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceareas; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 服务区域 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdServiceAreasRespVO { + + @Schema(description = "服务区域的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "26474") + @ExcelProperty("服务区域的唯一标识符") + private Long id; + + @Schema(description = "服务区域名称(如台江区、鼓楼区)", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("服务区域名称(如台江区、鼓楼区)") + private String areaName; + + @Schema(description = "区域创建时间") + @ExcelProperty("区域创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasSaveReqVO.java new file mode 100644 index 0000000..a78387b --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceareas/ProdServiceAreasSaveReqVO.java @@ -0,0 +1,18 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceareas; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import lombok.Data; + +@Schema(description = "管理后台 - 服务区域新增/修改 Request VO") +@Data +public class ProdServiceAreasSaveReqVO { + + @Schema(description = "服务区域的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "26474") + private Long id; + + @Schema(description = "服务区域名称(如台江区、鼓楼区)", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "服务区域名称(如台江区、鼓楼区)不能为空") + private String areaName; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesPageReqVO.java new file mode 100644 index 0000000..df89b7d --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesPageReqVO.java @@ -0,0 +1,33 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 超区规则分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdServiceOverAreaRulesPageReqVO extends PageParam { + + @Schema(description = "关联的商品ID", example = "20133") + private Long prodId; + + @Schema(description = "超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)", example = "1") + private Boolean ruleType; + + @Schema(description = "超区费用(仅在rule_type为accept_with_fee时有效)") + private BigDecimal fee; + + @Schema(description = "规则创建时间") + private LocalDateTime createdAt; + + @Schema(description = "规则最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesRespVO.java new file mode 100644 index 0000000..051e8bc --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesRespVO.java @@ -0,0 +1,40 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 超区规则 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdServiceOverAreaRulesRespVO { + + @Schema(description = "超区规则的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "32421") + @ExcelProperty("超区规则的唯一标识符") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20133") + @ExcelProperty("关联的商品ID") + private Long prodId; + + @Schema(description = "超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @ExcelProperty("超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)") + private Boolean ruleType; + + @Schema(description = "超区费用(仅在rule_type为accept_with_fee时有效)") + @ExcelProperty("超区费用(仅在rule_type为accept_with_fee时有效)") + private BigDecimal fee; + + @Schema(description = "规则创建时间") + @ExcelProperty("规则创建时间") + private LocalDateTime createdAt; + + @Schema(description = "规则最后更新时间") + @ExcelProperty("规则最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesSaveReqVO.java new file mode 100644 index 0000000..2a27e6f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodserviceoverarearules/ProdServiceOverAreaRulesSaveReqVO.java @@ -0,0 +1,34 @@ +package com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 超区规则新增/修改 Request VO") +@Data +public class ProdServiceOverAreaRulesSaveReqVO { + + @Schema(description = "超区规则的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "32421") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "20133") + @NotNull(message = "关联的商品ID不能为空") + private Long prodId; + + @Schema(description = "超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") + @NotNull(message = "超区规则类型(0:拒单、2:接单并收取超区费、3:接单并免超区费)不能为空") + private Boolean ruleType; + + @Schema(description = "超区费用(仅在rule_type为accept_with_fee时有效)") + private BigDecimal fee; + + @Schema(description = "规则创建时间") + private LocalDateTime createdAt; + + @Schema(description = "规则最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsPageReqVO.java new file mode 100644 index 0000000..7481290 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsPageReqVO.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.productapi.api.product.vo.prodtags; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.time.LocalDateTime; + +import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 商品和标签管理分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdTagsPageReqVO extends PageParam { + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsRespVO.java new file mode 100644 index 0000000..4bf33d3 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsRespVO.java @@ -0,0 +1,27 @@ +package com.tashow.cloud.productapi.api.product.vo.prodtags; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 商品和标签管理 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdTagsRespVO { + + @Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8574") + @ExcelProperty("商品id") + private Long productId; + + @Schema(description = "标签id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24317") + @ExcelProperty("标签id") + private Long tagId; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsSaveReqVO.java new file mode 100644 index 0000000..235fcb5 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodtags/ProdTagsSaveReqVO.java @@ -0,0 +1,16 @@ +package com.tashow.cloud.productapi.api.product.vo.prodtags; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 商品和标签管理新增/修改 Request VO") +@Data +public class ProdTagsSaveReqVO { + + @Schema(description = "商品id", requiredMode = Schema.RequiredMode.REQUIRED, example = "8574") + private Long productId; + + @Schema(description = "标签id", requiredMode = Schema.RequiredMode.REQUIRED, example = "24317") + private Long tagId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitPageReqVO.java new file mode 100644 index 0000000..e9133f0 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitPageReqVO.java @@ -0,0 +1,32 @@ +package com.tashow.cloud.productapi.api.product.vo.productorderlimit; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 商品接单上限设置分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProductOrderLimitPageReqVO extends PageParam { + + @Schema(description = "关联的商品ID", example = "10171") + private Long prodId; + + @Schema(description = "限制单位'0:按自然天',1:'按自然周',2:'按自然月'") + private Boolean limitUnit; + + @Schema(description = "上限阈值") + private Integer maxOrders; + + @Schema(description = "配置创建时间") + private LocalDateTime createdAt; + + @Schema(description = "配置最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitRespVO.java new file mode 100644 index 0000000..4cada44 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitRespVO.java @@ -0,0 +1,39 @@ +package com.tashow.cloud.productapi.api.product.vo.productorderlimit; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 商品接单上限设置 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProductOrderLimitRespVO { + + @Schema(description = "接单上限配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "10334") + @ExcelProperty("接单上限配置的唯一标识符") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10171") + @ExcelProperty("关联的商品ID") + private Long prodId; + + @Schema(description = "限制单位'0:按自然天',1:'按自然周',2:'按自然月'", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("限制单位'0:按自然天',1:'按自然周',2:'按自然月'") + private Boolean limitUnit; + + @Schema(description = "上限阈值", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("上限阈值") + private Integer maxOrders; + + @Schema(description = "配置创建时间") + @ExcelProperty("配置创建时间") + private LocalDateTime createdAt; + + @Schema(description = "配置最后更新时间") + @ExcelProperty("配置最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitSaveReqVO.java new file mode 100644 index 0000000..1518f1b --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/productorderlimit/ProductOrderLimitSaveReqVO.java @@ -0,0 +1,34 @@ +package com.tashow.cloud.productapi.api.product.vo.productorderlimit; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 商品接单上限设置新增/修改 Request VO") +@Data +public class ProductOrderLimitSaveReqVO { + + @Schema(description = "接单上限配置的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "10334") + private Long id; + + @Schema(description = "关联的商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "10171") + @NotNull(message = "关联的商品ID不能为空") + private Long prodId; + + @Schema(description = "限制单位'0:按自然天',1:'按自然周',2:'按自然月'", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "限制单位'0:按自然天',1:'按自然周',2:'按自然月'不能为空") + private Boolean limitUnit; + + @Schema(description = "上限阈值", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "上限阈值不能为空") + private Integer maxOrders; + + @Schema(description = "配置创建时间") + private LocalDateTime createdAt; + + @Schema(description = "配置最后更新时间") + private LocalDateTime updatedAt; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesPageReqVO.java new file mode 100644 index 0000000..3fb0f4e --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesPageReqVO.java @@ -0,0 +1,29 @@ +package com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 体重区间价格分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ProdWeightRangePricesPageReqVO extends PageParam { + + @Schema(description = "关联的体重配置ID", example = "6754") + private Long prodId; + + @Schema(description = "体重区间") + private String weightRange; + + @Schema(description = "价格", example = "11575") + private BigDecimal price; + + @Schema(description = "是否启用该规则0否1是") + private Integer isEnabled; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesRespVO.java new file mode 100644 index 0000000..9661f5b --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesRespVO.java @@ -0,0 +1,36 @@ +package com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 体重区间价格 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ProdWeightRangePricesRespVO { + + @Schema(description = "体重区间价格的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "26157") + @ExcelProperty("体重区间价格的唯一标识符") + private Long id; + + @Schema(description = "关联的体重配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6754") + @ExcelProperty("关联的体重配置ID") + private Long prodId; + + @Schema(description = "体重区间", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("体重区间") + private String weightRange; + + @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "11575") + @ExcelProperty("价格") + private BigDecimal price; + + @Schema(description = "是否启用该规则0否1是", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用该规则0否1是") + private Integer isEnabled; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesSaveInfoVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesSaveInfoVO.java new file mode 100644 index 0000000..5c6766e --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesSaveInfoVO.java @@ -0,0 +1,23 @@ +package com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices; + +import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; +import java.util.List; + +@Schema(description = "管理后台 - 体重区间价格新增/修改 Request VO") +@Data +public class ProdWeightRangePricesSaveInfoVO { + + @Schema(description = "体重是否收费0否1是") + private Integer isWeightCharge; + + @Schema(description = "体重配置") + public List prodWeightConfigList; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesSaveReqVO.java new file mode 100644 index 0000000..52e8bd6 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/prodweightrangeprices/ProdWeightRangePricesSaveReqVO.java @@ -0,0 +1,34 @@ +package com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 体重区间价格新增/修改 Request VO") +@Data +public class ProdWeightRangePricesSaveReqVO { + + @Schema(description = "体重区间价格的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "26157") + private Long id; + + @Schema(description = "关联的体重配置ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "6754") + @NotNull(message = "关联的体重配置ID不能为空") + private Long prodId; + + @Schema(description = "体重区间", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "体重区间不能为空") + private String weightRange; + + @Schema(description = "价格", requiredMode = Schema.RequiredMode.REQUIRED, example = "11575") + @NotNull(message = "价格不能为空") + private BigDecimal price; + + @Schema(description = "是否启用该规则0否1是", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用该规则0否1是不能为空") + private Integer isEnabled; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailPageReqVO.java new file mode 100644 index 0000000..4f7d3ec --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailPageReqVO.java @@ -0,0 +1,98 @@ +package com.tashow.cloud.productapi.api.product.vo.shopdetail; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +import static com.tashow.cloud.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; + +@Schema(description = "管理后台 - 店铺信息分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class ShopDetailPageReqVO extends PageParam { + + @Schema(description = "店铺名称(数字、中文,英文(可混合,不可有特殊字符),可修改)、不唯一", example = "芋艿") + private String shopName; + + @Schema(description = "店长用户id", example = "15607") + private String userId; + + @Schema(description = "店铺类型", example = "2") + private Integer shopType; + + @Schema(description = "店铺简介(可修改)") + private String intro; + + @Schema(description = "店铺公告(可修改)") + private String shopNotice; + + @Schema(description = "店铺行业(餐饮、生鲜果蔬、鲜花等)") + private Integer shopIndustry; + + @Schema(description = "店长") + private String shopOwner; + + @Schema(description = "店铺绑定的手机(登录账号:唯一)") + private String mobile; + + @Schema(description = "店铺联系电话") + private String tel; + + @Schema(description = "店铺所在纬度(可修改)") + private String shopLat; + + @Schema(description = "店铺所在经度(可修改)") + private String shopLng; + + @Schema(description = "店铺详细地址") + private String shopAddress; + + @Schema(description = "店铺所在省份(描述)") + private String province; + + @Schema(description = "店铺所在城市(描述)") + private String city; + + @Schema(description = "店铺所在区域(描述)") + private String area; + + @Schema(description = "店铺省市区代码,用于回显") + private String pcaCode; + + @Schema(description = "店铺logo(可修改)") + private String shopLogo; + + @Schema(description = "店铺相册") + private String shopPhotos; + + @Schema(description = "每天营业时间段(可修改)") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private String[] openTime; + + @Schema(description = "店铺状态(-1:未开通 0: 停业中 1:营业中),可修改", example = "2") + private Integer shopStatus; + + @Schema(description = "0:商家承担运费; 1:买家承担运费", example = "2") + private Integer transportType; + + @Schema(description = "固定运费") + private BigDecimal fixedFreight; + + @Schema(description = "满X包邮") + private BigDecimal fullFreeShipping; + + @Schema(description = "创建时间") + @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) + private LocalDateTime[] createTime; + + @Schema(description = "分销开关(0:开启 1:关闭)") + private Integer isDistribution; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailRespVO.java new file mode 100644 index 0000000..e2f0804 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailRespVO.java @@ -0,0 +1,120 @@ +package com.tashow.cloud.productapi.api.product.vo.shopdetail; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 店铺信息 Response VO") +@Data +@ExcelIgnoreUnannotated +public class ShopDetailRespVO { + + @Schema(description = "店铺id", requiredMode = Schema.RequiredMode.REQUIRED, example = "5101") + @ExcelProperty("店铺id") + private Long shopId; + + @Schema(description = "店铺名称(数字、中文,英文(可混合,不可有特殊字符),可修改)、不唯一", example = "芋艿") + @ExcelProperty("店铺名称(数字、中文,英文(可混合,不可有特殊字符),可修改)、不唯一") + private String shopName; + + @Schema(description = "店长用户id", example = "15607") + @ExcelProperty("店长用户id") + private String userId; + + @Schema(description = "店铺类型", example = "2") + @ExcelProperty("店铺类型") + private Integer shopType; + + @Schema(description = "店铺简介(可修改)") + @ExcelProperty("店铺简介(可修改)") + private String intro; + + @Schema(description = "店铺公告(可修改)") + @ExcelProperty("店铺公告(可修改)") + private String shopNotice; + + @Schema(description = "店铺行业(餐饮、生鲜果蔬、鲜花等)") + @ExcelProperty("店铺行业(餐饮、生鲜果蔬、鲜花等)") + private Integer shopIndustry; + + @Schema(description = "店长") + @ExcelProperty("店长") + private String shopOwner; + + @Schema(description = "店铺绑定的手机(登录账号:唯一)") + @ExcelProperty("店铺绑定的手机(登录账号:唯一)") + private String mobile; + + @Schema(description = "店铺联系电话") + @ExcelProperty("店铺联系电话") + private String tel; + + @Schema(description = "店铺所在纬度(可修改)") + @ExcelProperty("店铺所在纬度(可修改)") + private String shopLat; + + @Schema(description = "店铺所在经度(可修改)") + @ExcelProperty("店铺所在经度(可修改)") + private String shopLng; + + @Schema(description = "店铺详细地址") + @ExcelProperty("店铺详细地址") + private String shopAddress; + + @Schema(description = "店铺所在省份(描述)") + @ExcelProperty("店铺所在省份(描述)") + private String province; + + @Schema(description = "店铺所在城市(描述)") + @ExcelProperty("店铺所在城市(描述)") + private String city; + + @Schema(description = "店铺所在区域(描述)") + @ExcelProperty("店铺所在区域(描述)") + private String area; + + @Schema(description = "店铺省市区代码,用于回显") + @ExcelProperty("店铺省市区代码,用于回显") + private String pcaCode; + + @Schema(description = "店铺logo(可修改)") + @ExcelProperty("店铺logo(可修改)") + private String shopLogo; + + @Schema(description = "店铺相册") + @ExcelProperty("店铺相册") + private String shopPhotos; + + @Schema(description = "每天营业时间段(可修改)") + @ExcelProperty("每天营业时间段(可修改)") + private String openTime; + + @Schema(description = "店铺状态(-1:未开通 0: 停业中 1:营业中),可修改", example = "2") + @ExcelProperty("店铺状态(-1:未开通 0: 停业中 1:营业中),可修改") + private Integer shopStatus; + + @Schema(description = "0:商家承担运费; 1:买家承担运费", example = "2") + @ExcelProperty("0:商家承担运费; 1:买家承担运费") + private Integer transportType; + + @Schema(description = "固定运费") + @ExcelProperty("固定运费") + private BigDecimal fixedFreight; + + @Schema(description = "满X包邮") + @ExcelProperty("满X包邮") + private BigDecimal fullFreeShipping; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + + @Schema(description = "分销开关(0:开启 1:关闭)") + @ExcelProperty("分销开关(0:开启 1:关闭)") + private Integer isDistribution; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailSaveReqVO.java new file mode 100644 index 0000000..d353971 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/shopdetail/ShopDetailSaveReqVO.java @@ -0,0 +1,87 @@ +package com.tashow.cloud.productapi.api.product.vo.shopdetail; + +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 店铺信息新增/修改 Request VO") +@Data +public class ShopDetailSaveReqVO { + + @Schema(description = "店铺id", requiredMode = Schema.RequiredMode.REQUIRED, example = "5101") + private Long shopId; + + @Schema(description = "店铺名称(数字、中文,英文(可混合,不可有特殊字符),可修改)、不唯一", example = "芋艿") + private String shopName; + + @Schema(description = "店长用户id", example = "15607") + private String userId; + + @Schema(description = "店铺类型", example = "2") + private Integer shopType; + + @Schema(description = "店铺简介(可修改)") + private String intro; + + @Schema(description = "店铺公告(可修改)") + private String shopNotice; + + @Schema(description = "店铺行业(餐饮、生鲜果蔬、鲜花等)") + private Integer shopIndustry; + + @Schema(description = "店长") + private String shopOwner; + + @Schema(description = "店铺绑定的手机(登录账号:唯一)") + private String mobile; + + @Schema(description = "店铺联系电话") + private String tel; + + @Schema(description = "店铺所在纬度(可修改)") + private String shopLat; + + @Schema(description = "店铺所在经度(可修改)") + private String shopLng; + + @Schema(description = "店铺详细地址") + private String shopAddress; + + @Schema(description = "店铺所在省份(描述)") + private String province; + + @Schema(description = "店铺所在城市(描述)") + private String city; + + @Schema(description = "店铺所在区域(描述)") + private String area; + + @Schema(description = "店铺省市区代码,用于回显") + private String pcaCode; + + @Schema(description = "店铺logo(可修改)") + private String shopLogo; + + @Schema(description = "店铺相册") + private String shopPhotos; + + @Schema(description = "每天营业时间段(可修改)") + private String openTime; + + @Schema(description = "店铺状态(-1:未开通 0: 停业中 1:营业中),可修改", example = "2") + private Integer shopStatus; + + @Schema(description = "0:商家承担运费; 1:买家承担运费", example = "2") + private Integer transportType; + + @Schema(description = "固定运费") + private BigDecimal fixedFreight; + + @Schema(description = "满X包邮") + private BigDecimal fullFreeShipping; + + @Schema(description = "分销开关(0:开启 1:关闭)") + private Integer isDistribution; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuExtendVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuExtendVO.java new file mode 100644 index 0000000..cea9a38 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuExtendVO.java @@ -0,0 +1,74 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDeliverDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDetailsDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceMaterialDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceTransportDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "sku扩展服务配置 VO") +@Data +public class SkuExtendVO { + + @Schema(description = "表单名称") + private String skuFormName; + + @Schema(description = "遗体接运车辆配置0关1开") + private Integer transportCarSwitch; + @Schema(description = "遗体接运扩展服务配置") + public List transportCarList; + @Schema(description = "遗体接运服务物料") + public List transportCarMaterialList; + + @Schema(description = "遗体运输目的地配置0关1开") + private Integer trafficSwitch; + @Schema(description = "遗体运输目的地配置") + public List trafficList; + @Schema(description = "遗体运输目的地物料") + public List trafficMaterialList; + + @Schema(description = "遗体清洁配置0关1开") + private Integer cleanSwitch; + @Schema(description = "遗体清洁配置") + public List cleanList; + @Schema(description = "遗体清洁物料") + public List cleanMaterialList; + + @Schema(description = "追思告别配置0关1开") + private Integer reflectionSwitch; + @Schema(description = "追思告别配置") + public List reflectionList; + @Schema(description = "追思告别物料") + public List reflectionMaterialList; + + @Schema(description = "遗体火化配置0关1开") + private Integer cremationSwitch; + @Schema(description = "遗体火化配置") + public List cremationList; + @Schema(description = "遗体火化物料") + public List cremationMaterialList; + + @Schema(description = "骨灰处理配置0关1开") + private Integer ashProcessingSwitch; + @Schema(description = "骨灰处理配置") + public List ashProcessingList; + @Schema(description = "骨灰处理配送方式配置") + public List ashProcessingDeliverList; + @Schema(description = "骨灰处理物料") + public List ashProcessingMaterialList; + + @Schema(description = "骨灰装殓配置0关1开") + private Integer boneashSwitch; + @Schema(description = "骨灰装殓配置") + public List boneashList; + + @Schema(description = "纪念品配置0关1开") + private Integer souvenirSwitch; + @Schema(description = "纪念品配置") + public List souvenirList; + @Schema(description = "纪念品配送方式配置") + public List souvenirDeliverList; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPageReqVO.java new file mode 100644 index 0000000..662c667 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPageReqVO.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 单品SKU分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SkuPageReqVO extends PageParam { + + @Schema(description = "商品ID", example = "18784") + private Long prodId; + + @Schema(description = "销售属性组合字符串") + private String properties; + + @Schema(description = "skuID", example = "18784") + private Long skuId; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPropInfoVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPropInfoVO.java new file mode 100644 index 0000000..2b03b8f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPropInfoVO.java @@ -0,0 +1,26 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +public class SkuPropInfoVO { + @Schema(description = "产品id") + private Long prodId; + + /** + * 是否显示失效规格值 0否1是 + */ + private Integer isExpire; + + /** + * 是否显示禁用规格值 0否1是 + */ + private Integer isDisable; + + @Schema(description = "规格") + public List prodPropSaveReqVO; +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPropVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPropVO.java new file mode 100644 index 0000000..c91cd39 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuPropVO.java @@ -0,0 +1,31 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.tashow.cloud.productapi.api.product.dto.SkuDO; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropSaveReqVO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Data +public class SkuPropVO { + @Schema(description = "产品id") + private Long prodId; + + /** + * 是否显示失效规格值 0否1是 + */ + private Integer isExpire = 1; + + /** + * 是否显示禁用规格值 0否1是 + */ + private Integer isDisable =1; + + + @Schema(description = "sku列表") + public List skuList; + + @Schema(description = "规格") + public List prodPropSaveReqVO; +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuRecycleBinVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuRecycleBinVO.java new file mode 100644 index 0000000..32ba1bc --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuRecycleBinVO.java @@ -0,0 +1,171 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.alibaba.excel.annotation.ExcelProperty; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; +import java.util.Date; + +@Data +public class SkuRecycleBinVO { + @Schema(description = "单品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32230") + private Long skuId; + + /** + * 属性规格名称 + */ + private String properties; + /** + * 是否显示失效规格值 0否1是 + */ + private String skuName; + + /** + * 还剩多少天 + */ + private Long remainingDays; + /** + * 删除时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date deleteTime; + + + + + @Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18784") + @ExcelProperty("商品ID") + private Long prodId; + + @Schema(description = "别名") + @ExcelProperty("别名") + private String alias; + + @Schema(description = "当前价格", example = "32405") + @ExcelProperty("价格") + private BigDecimal price; + + /** + * 基准价 + */ + private BigDecimal basePrice; + + @Schema(description = "最低价格", example = "5040") + @ExcelProperty("最低价格") + private BigDecimal minPrice; + + @Schema(description = "最高价格", example = "11547") + @ExcelProperty("最高价格") + private BigDecimal maxPrice; + + @Schema(description = "成本价", example = "28062") + @ExcelProperty("成本价") + private BigDecimal originalPrice; + + @Schema(description = "市场价", example = "11547") + @ExcelProperty("市场价") + private BigDecimal marketPrice; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String unit; + + @Schema(description = "0:主服务1:待定", example = "1") + @ExcelProperty("0:主服务1:待定") + private Integer type; + + @Schema(description = "概述") + @ExcelProperty("概述") + private String overview; + + @Schema(description = "库存") + @ExcelProperty("库存") + private Integer stocks; + + + @Schema(description = "总库存是0 无线库存是1") + @ExcelProperty("总库存是0 无线库存是1") + private Integer stocksFlg; + + /** + * 锁定库存数 + */ + @Schema(description = "锁定库存数") + @ExcelProperty("锁定库存数") + private Integer stocksLockNum; + + @Schema(description = "预警库存") + @ExcelProperty("预警库存") + private Integer warnStocks; + + @Schema(description = "库存扣款时机0:付款扣1:下单扣", example = "1") + @ExcelProperty("库存扣款时机0:付款扣1:下单扣") + private Boolean stocksType; + + @Schema(description = "sku编码") + @ExcelProperty("sku编码") + private String skuCode; + + @Schema(description = "商品条形码", example = "14390") + @ExcelProperty("商品条形码") + private String modelId; + + @Schema(description = "sku图片") + @ExcelProperty("sku图片") + private String pic; + + + @Schema(description = "商品名称", example = "芋艿") + @ExcelProperty("商品名称") + private String prodName; + + @Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本号") + private Integer version; + + @Schema(description = "商品重量") + @ExcelProperty("商品重量") + private Double weight; + + @Schema(description = "商品体积") + @ExcelProperty("商品体积") + private Double volume; + + @Schema(description = "0 禁用 1 启用", example = "1") + @ExcelProperty("0 禁用 1 启用") + private Integer status; + + @Schema(description = "0 正常 1 已被删除") + @ExcelProperty("0 正常 1 已被删除") + private Integer isDelete; + + @Schema(description = "最小购买数量") + @ExcelProperty("最小购买数量") + private Integer moq; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + /** + * 是否上下架0下架1上架 + */ + private Integer isShelf; + + /** + * 是否默认规则0否1是 + */ + private Integer isSpecs; + + /** + * 服务内容 + */ + private String serviceContent; + /** + * 规格id 多个用逗号分隔(1,2,3) + */ + private String propIds; + +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuRespVO.java new file mode 100644 index 0000000..762ed29 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuRespVO.java @@ -0,0 +1,159 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; +import java.time.LocalDateTime; + +@Schema(description = "管理后台 - 单品SKU Response VO") +@Data +@ExcelIgnoreUnannotated +public class SkuRespVO { + + @Schema(description = "单品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32230") + @ExcelProperty("单品ID") + private Long skuId; + + @Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18784") + @ExcelProperty("商品ID") + private Long prodId; + + @Schema(description = "销售属性组合字符串 格式是p1:v1;p2:v2") + @ExcelProperty("销售属性组合字符串 格式是p1:v1;p2:v2") + private String properties; + + @Schema(description = "别名") + @ExcelProperty("别名") + private String alias; + + @Schema(description = "当前价格", example = "32405") + @ExcelProperty("价格") + private BigDecimal price; + + /** + * 基准价 + */ + private BigDecimal basePrice; + + @Schema(description = "最低价格", example = "5040") + @ExcelProperty("最低价格") + private BigDecimal minPrice; + + @Schema(description = "最高价格", example = "11547") + @ExcelProperty("最高价格") + private BigDecimal maxPrice; + + @Schema(description = "成本价", example = "28062") + @ExcelProperty("成本价") + private BigDecimal originalPrice; + + @Schema(description = "市场价", example = "11547") + @ExcelProperty("市场价") + private BigDecimal marketPrice; + + @Schema(description = "单位") + @ExcelProperty("单位") + private String unit; + + @Schema(description = "0:主服务1:待定", example = "1") + @ExcelProperty("0:主服务1:待定") + private Integer type; + + @Schema(description = "概述") + @ExcelProperty("概述") + private String overview; + + @Schema(description = "库存") + @ExcelProperty("库存") + private Integer stocks; + + + @Schema(description = "总库存是0 无线库存是1") + @ExcelProperty("总库存是0 无线库存是1") + private Integer stocksFlg; + + /** + * 锁定库存数 + */ + @Schema(description = "锁定库存数") + @ExcelProperty("锁定库存数") + private Integer stocksLockNum; + + @Schema(description = "预警库存") + @ExcelProperty("预警库存") + private Integer warnStocks; + + @Schema(description = "库存扣款时机0:付款扣1:下单扣", example = "1") + @ExcelProperty("库存扣款时机0:付款扣1:下单扣") + private Boolean stocksType; + + @Schema(description = "sku编码") + @ExcelProperty("sku编码") + private String skuCode; + + @Schema(description = "商品条形码", example = "14390") + @ExcelProperty("商品条形码") + private String modelId; + + @Schema(description = "sku图片") + @ExcelProperty("sku图片") + private String pic; + + @Schema(description = "sku名称", example = "张三") + @ExcelProperty("sku名称") + private String skuName; + + @Schema(description = "商品名称", example = "芋艿") + @ExcelProperty("商品名称") + private String prodName; + + @Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("版本号") + private Integer version; + + @Schema(description = "商品重量") + @ExcelProperty("商品重量") + private Double weight; + + @Schema(description = "商品体积") + @ExcelProperty("商品体积") + private Double volume; + + @Schema(description = "0 禁用 1 启用", example = "1") + @ExcelProperty("0 禁用 1 启用") + private Integer status; + + @Schema(description = "0 正常 1 已被删除") + @ExcelProperty("0 正常 1 已被删除") + private Integer isDelete; + + @Schema(description = "最小购买数量") + @ExcelProperty("最小购买数量") + private Integer moq; + + @Schema(description = "创建时间") + @ExcelProperty("创建时间") + private LocalDateTime createTime; + /** + * 是否上下架0下架1上架 + */ + private Integer isShelf; + + /** + * 是否默认规则0否1是 + */ + private Integer isSpecs; + + /** + * 服务内容 + */ + private String serviceContent; + /** + * 规格id 多个用逗号分隔(1,2,3) + */ + private String propIds; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuSaveReqVO.java new file mode 100644 index 0000000..9c33d7c --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuSaveReqVO.java @@ -0,0 +1,122 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 单品SKU新增/修改 Request VO") +@Data +public class SkuSaveReqVO { + + @Schema(description = "单品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "32230") + private Long skuId; + + @Schema(description = "商品ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "18784") + private Long prodId; + + @Schema(description = "销售属性组合字符串 格式是p1:v1;p2:v2") + private String properties; + + @Schema(description = "别名") + private String alias; + + @Schema(description = "当前价格", example = "32405") + private BigDecimal price; + + /** + * 基准价 + */ + private BigDecimal basePrice; + + @Schema(description = "最低价格", example = "5040") + private BigDecimal minPrice; + + @Schema(description = "最高价格", example = "11547") + private BigDecimal maxPrice; + + @Schema(description = "成本价", example = "28062") + private BigDecimal originalPrice; + + @Schema(description = "市场价", example = "11547") + private BigDecimal marketPrice; + + @Schema(description = "单位") + private String unit; + + @Schema(description = "0:主服务1:待定", example = "1") + private Integer type; + + @Schema(description = "概述") + private String overview; + + @Schema(description = "库存") + private Integer stocks; + + @Schema(description = "总库存是0 无线库存是1") + private Integer stocksFlg; + /** + * 锁定库存数 + */ + @Schema(description = "锁定库存数") + private Integer stocksLockNum; + + @Schema(description = "预警库存") + private Integer warnStocks; + + @Schema(description = "库存扣款时机0:付款扣1:下单扣", example = "1") + private Boolean stocksType; + + @Schema(description = "sku编码") + private String skuCode; + + @Schema(description = "商品条形码", example = "14390") + private String modelId; + + @Schema(description = "sku图片") + private String pic; + + @Schema(description = "sku名称", example = "张三") + private String skuName; + + @Schema(description = "商品名称", example = "芋艿") + private String prodName; + + @Schema(description = "版本号", requiredMode = Schema.RequiredMode.REQUIRED) + private Integer version; + + @Schema(description = "商品重量") + private Double weight; + + @Schema(description = "商品体积") + private Double volume; + + @Schema(description = "0 禁用 1 启用", example = "1") + private Integer status; + + @Schema(description = "0 正常 1 已被删除") + private Integer isDelete; + + @Schema(description = "最小购买数量") + private Integer moq; + /** + * 是否默认规则0否1是 + */ + private Integer isSpecs; + + /** + * 扩展服务表单id + */ + private Long formId; + + /** + * 服务内容 + */ + private String serviceContent; + /** + * 规格id 多个用逗号分隔(1,2,3) + */ + private String propIds; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuServiceExtendVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuServiceExtendVO.java new file mode 100644 index 0000000..c273839 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/sku/SkuServiceExtendVO.java @@ -0,0 +1,41 @@ +package com.tashow.cloud.productapi.api.product.vo.sku; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDeliverDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDetailsDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceMaterialDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceTransportDO; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.List; + +@Schema(description = "sku扩展服务表单 VO") +@Data +public class SkuServiceExtendVO { + + @Schema(description = "id") + private Long id; + + @Schema(description = "表单名称") + private String name; + + @Schema(description = "服务名称") + private String serviceName; + + @Schema(description = "类型0:遗体运输1:遗体运输物料") + private String type; + + @Schema(description = "服务名称") + private Integer isEnabled; + + @Schema(description = "服务详情") + public List skuServiceDetailsDOList; + @Schema(description = "服务物料") + public List skuServiceMaterialDOList; + + @Schema(description = "服务遗体运输") + public List skuServiceTransportDOList; + + @Schema(description = "服务交付方式") + public List skuServiceDeliverDOList; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverPageReqVO.java new file mode 100644 index 0000000..435b059 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverPageReqVO.java @@ -0,0 +1,44 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicedeliver; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 服务交付方式分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SkuServiceDeliverPageReqVO extends PageParam { + + @Schema(description = "关联的扩展服务ID", example = "27072") + private Long serviceId; + + @Schema(description = "交互方式0:快递物流 1:到店自提 2:商家自送", example = "2") + private Boolean type; + + @Schema(description = "价格", example = "23915") + private BigDecimal price; + + @Schema(description = "是否收费0:免费1收费") + private Boolean isCharge; + + @Schema(description = "详细地址") + private String address; + + @Schema(description = "省") + private String province; + + @Schema(description = "市") + private String city; + + @Schema(description = "区") + private String area; + + @Schema(description = "电话号码") + private String tel; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverRespVO.java new file mode 100644 index 0000000..09d3353 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverRespVO.java @@ -0,0 +1,55 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicedeliver; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 服务交付方式 Response VO") +@Data +@ExcelIgnoreUnannotated +public class SkuServiceDeliverRespVO { + + @Schema(description = "服务遗体运输唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "12984") + @ExcelProperty("服务遗体运输唯一标识符") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27072") + @ExcelProperty("关联的扩展服务ID") + private Long serviceId; + + @Schema(description = "交互方式0:快递物流 1:到店自提 2:商家自送", example = "2") + @ExcelProperty("交互方式0:快递物流 1:到店自提 2:商家自送") + private Boolean type; + + @Schema(description = "价格", example = "23915") + @ExcelProperty("价格") + private BigDecimal price; + + @Schema(description = "是否收费0:免费1收费") + @ExcelProperty("是否收费0:免费1收费") + private Boolean isCharge; + + @Schema(description = "详细地址", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("详细地址") + private String address; + + @Schema(description = "省") + @ExcelProperty("省") + private String province; + + @Schema(description = "市") + @ExcelProperty("市") + private String city; + + @Schema(description = "区") + @ExcelProperty("区") + private String area; + + @Schema(description = "电话号码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("电话号码") + private String tel; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverSaveReqVO.java new file mode 100644 index 0000000..e431f23 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedeliver/SkuServiceDeliverSaveReqVO.java @@ -0,0 +1,47 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicedeliver; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 服务交付方式新增/修改 Request VO") +@Data +public class SkuServiceDeliverSaveReqVO { + + @Schema(description = "服务遗体运输唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "12984") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "27072") + @NotNull(message = "关联的扩展服务ID不能为空") + private Long serviceId; + + @Schema(description = "交互方式0:快递物流 1:到店自提 2:商家自送", example = "2") + private Boolean type; + + @Schema(description = "价格", example = "23915") + private BigDecimal price; + + @Schema(description = "是否收费0:免费1收费") + private Boolean isCharge; + + @Schema(description = "详细地址", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "详细地址不能为空") + private String address; + + @Schema(description = "省") + private String province; + + @Schema(description = "市") + private String city; + + @Schema(description = "区") + private String area; + + @Schema(description = "电话号码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "电话号码不能为空") + private String tel; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsPageReqVO.java new file mode 100644 index 0000000..b0fc298 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsPageReqVO.java @@ -0,0 +1,62 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicedetails; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 服务详情分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SkuServiceDetailsPageReqVO extends PageParam { + + @Schema(description = "关联的扩展服务ID", example = "21602") + private Long serviceId; + + @Schema(description = "图片") + private String pic; + + @Schema(description = "名称", example = "张三") + private String name; + + @Schema(description = "价格", example = "16929") + private BigDecimal price; + + @Schema(description = "是否收费0:免费1收费") + private Boolean isCharge; + + @Schema(description = "是否默认值0否1是") + private Boolean isDefault; + + @Schema(description = "类型:0:配置信息1:交付方式", example = "2") + private Boolean type; + + @Schema(description = "描述") + private String describeContent; + + /** + * 地点 + */ + private String adress; + + /** + * 触发节点名称 + */ + private String triggerName; + + + /** + * 触发节点id(或关联节点) + */ + private Long triggerId; + + + /** + * 是否并行0串行1并行 + */ + private Integer isParallel; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsRespVO.java new file mode 100644 index 0000000..e7209f7 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsRespVO.java @@ -0,0 +1,72 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicedetails; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 服务详情 Response VO") +@Data +@ExcelIgnoreUnannotated +public class SkuServiceDetailsRespVO { + + @Schema(description = "服务详情的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "17139") + @ExcelProperty("服务详情的唯一标识符") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21602") + @ExcelProperty("关联的扩展服务ID") + private Long serviceId; + + @Schema(description = "图片") + @ExcelProperty("图片") + private String pic; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @ExcelProperty("名称") + private String name; + + @Schema(description = "价格", example = "16929") + @ExcelProperty("价格") + private BigDecimal price; + + @Schema(description = "是否收费0:免费1收费") + @ExcelProperty("是否收费0:免费1收费") + private Boolean isCharge; + + @Schema(description = "是否默认值0否1是") + @ExcelProperty("是否默认值0否1是") + private Boolean isDefault; + + @Schema(description = "类型:0:配置信息1:交付方式", example = "2") + @ExcelProperty("类型:0:配置信息1:交付方式") + private Boolean type; + + @Schema(description = "描述") + @ExcelProperty("描述") + private String describeContent; + + /** + * 地点 + */ + private String adress; + + /** + * 触发节点名称 + */ + private String triggerName; + + + /** + * 触发节点id(或关联节点) + */ + private Long triggerId; + + + /** + * 是否并行0串行1并行 + */ + private Integer isParallel; +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsSaveReqVO.java new file mode 100644 index 0000000..72e359c --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicedetails/SkuServiceDetailsSaveReqVO.java @@ -0,0 +1,64 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicedetails; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +import java.math.BigDecimal; + +@Schema(description = "管理后台 - 服务详情新增/修改 Request VO") +@Data +public class SkuServiceDetailsSaveReqVO { + + @Schema(description = "服务详情的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "17139") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21602") + @NotNull(message = "关联的扩展服务ID不能为空") + private Long serviceId; + + @Schema(description = "图片") + private String pic; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "张三") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "价格", example = "16929") + private BigDecimal price; + + @Schema(description = "是否收费0:免费1收费") + private Boolean isCharge; + + @Schema(description = "是否默认值0否1是") + private Boolean isDefault; + + @Schema(description = "类型:0:配置信息1:交付方式", example = "2") + private Boolean type; + + @Schema(description = "描述") + private String describeContent; + /** + * 地点 + */ + private String adress; + + /** + * 触发节点名称 + */ + private String triggerName; + + + /** + * 触发节点id(或关联节点) + */ + private Long triggerId; + + + /** + * 是否并行0串行1并行 + */ + private Integer isParallel; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialPageReqVO.java new file mode 100644 index 0000000..fb32419 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialPageReqVO.java @@ -0,0 +1,25 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicematerial; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 服务物料详情分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SkuServiceMaterialPageReqVO extends PageParam { + + @Schema(description = "关联的扩展服务ID", example = "21102") + private Long serviceId; + + @Schema(description = "名称", example = "王五") + private String name; + + @Schema(description = "描述") + private String describeContent; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialRespVO.java new file mode 100644 index 0000000..8535534 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialRespVO.java @@ -0,0 +1,30 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicematerial; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 服务物料详情 Response VO") +@Data +@ExcelIgnoreUnannotated +public class SkuServiceMaterialRespVO { + + @Schema(description = "服务物料的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "21371") + @ExcelProperty("服务物料的唯一标识符") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21102") + @ExcelProperty("关联的扩展服务ID") + private Long serviceId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @ExcelProperty("名称") + private String name; + + @Schema(description = "描述") + @ExcelProperty("描述") + private String describeContent; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialSaveReqVO.java new file mode 100644 index 0000000..142a28f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicematerial/SkuServiceMaterialSaveReqVO.java @@ -0,0 +1,26 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicematerial; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 服务物料详情新增/修改 Request VO") +@Data +public class SkuServiceMaterialSaveReqVO { + + @Schema(description = "服务物料的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "21371") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "21102") + @NotNull(message = "关联的扩展服务ID不能为空") + private Long serviceId; + + @Schema(description = "名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "王五") + @NotEmpty(message = "名称不能为空") + private String name; + + @Schema(description = "描述") + private String describeContent; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormPageReqVO.java new file mode 100644 index 0000000..fe86b67 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormPageReqVO.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicesform; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 商品SKU扩展服务表单分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SkuServicesFormPageReqVO extends PageParam { + + @Schema(description = "表单名称", example = "赵六") + private String name; + + @Schema(description = "服务名称", example = "芋艿") + private String serviceName; + + @Schema(description = "是否启用该服务") + private Boolean isEnabled; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormRespVO.java new file mode 100644 index 0000000..6bcd051 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormRespVO.java @@ -0,0 +1,30 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicesform; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 商品SKU扩展服务表单 Response VO") +@Data +@ExcelIgnoreUnannotated +public class SkuServicesFormRespVO { + + @Schema(description = "扩展服务的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "24347") + @ExcelProperty("扩展服务的唯一标识符") + private Long id; + + @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @ExcelProperty("表单名称") + private String name; + + @Schema(description = "服务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @ExcelProperty("服务名称") + private String serviceName; + + @Schema(description = "是否启用该服务", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("是否启用该服务") + private Boolean isEnabled; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormSaveReqVO.java new file mode 100644 index 0000000..766e334 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicesform/SkuServicesFormSaveReqVO.java @@ -0,0 +1,28 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicesform; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 商品SKU扩展服务表单新增/修改 Request VO") +@Data +public class SkuServicesFormSaveReqVO { + + @Schema(description = "扩展服务的唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "24347") + private Long id; + + @Schema(description = "表单名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "赵六") + @NotEmpty(message = "表单名称不能为空") + private String name; + + + @Schema(description = "服务名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋艿") + @NotEmpty(message = "服务名称不能为空") + private String serviceName; + + @Schema(description = "是否启用该服务", requiredMode = Schema.RequiredMode.REQUIRED) + @NotNull(message = "是否启用该服务不能为空") + private Boolean isEnabled; + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportPageReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportPageReqVO.java new file mode 100644 index 0000000..f9870f2 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportPageReqVO.java @@ -0,0 +1,37 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicetransport; + +import com.tashow.cloud.common.pojo.PageParam; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; + +@Schema(description = "管理后台 - 服务遗体运输分页 Request VO") +@Data +@EqualsAndHashCode(callSuper = true) +@ToString(callSuper = true) +public class SkuServiceTransportPageReqVO extends PageParam { + + @Schema(description = "关联的扩展服务ID", example = "1035") + private Long serviceId; + + @Schema(description = "联系人") + private String contacts; + + @Schema(description = "详细地址") + private String address; + + @Schema(description = "省") + private String province; + + @Schema(description = "市") + private String city; + + @Schema(description = "区") + private String area; + + @Schema(description = "电话号码") + private String tel; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportRespVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportRespVO.java new file mode 100644 index 0000000..3098371 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportRespVO.java @@ -0,0 +1,46 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicetransport; + +import com.alibaba.excel.annotation.ExcelIgnoreUnannotated; +import com.alibaba.excel.annotation.ExcelProperty; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +@Schema(description = "管理后台 - 服务遗体运输 Response VO") +@Data +@ExcelIgnoreUnannotated +public class SkuServiceTransportRespVO { + + @Schema(description = "服务遗体运输唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "5277") + @ExcelProperty("服务遗体运输唯一标识符") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1035") + @ExcelProperty("关联的扩展服务ID") + private Long serviceId; + + @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("联系人") + private String contacts; + + @Schema(description = "详细地址", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("详细地址") + private String address; + + @Schema(description = "省") + @ExcelProperty("省") + private String province; + + @Schema(description = "市") + @ExcelProperty("市") + private String city; + + @Schema(description = "区") + @ExcelProperty("区") + private String area; + + @Schema(description = "电话号码", requiredMode = Schema.RequiredMode.REQUIRED) + @ExcelProperty("电话号码") + private String tel; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportSaveReqVO.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportSaveReqVO.java new file mode 100644 index 0000000..18e9dba --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/api/product/vo/skuservicetransport/SkuServiceTransportSaveReqVO.java @@ -0,0 +1,41 @@ +package com.tashow.cloud.productapi.api.product.vo.skuservicetransport; + +import io.swagger.v3.oas.annotations.media.Schema; +import jakarta.validation.constraints.NotEmpty; +import jakarta.validation.constraints.NotNull; +import lombok.Data; + +@Schema(description = "管理后台 - 服务遗体运输新增/修改 Request VO") +@Data +public class SkuServiceTransportSaveReqVO { + + @Schema(description = "服务遗体运输唯一标识符", requiredMode = Schema.RequiredMode.REQUIRED, example = "5277") + private Long id; + + @Schema(description = "关联的扩展服务ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1035") + @NotNull(message = "关联的扩展服务ID不能为空") + private Long serviceId; + + @Schema(description = "联系人", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "联系人不能为空") + private String contacts; + + @Schema(description = "详细地址", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "详细地址不能为空") + private String address; + + @Schema(description = "省") + private String province; + + @Schema(description = "市") + private String city; + + @Schema(description = "区") + private String area; + + @Schema(description = "电话号码", requiredMode = Schema.RequiredMode.REQUIRED) + @NotEmpty(message = "电话号码不能为空") + private String tel; + + +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ApiConstants.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ApiConstants.java new file mode 100644 index 0000000..0fd09af --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ApiConstants.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.productapi.enums; + + +import com.tashow.cloud.common.enums.RpcConstants; + +/** + * API 相关的枚举 + * + * @author 芋道源码 + */ +public class ApiConstants { + + /** + * 服务名 + * + * 注意,需要保证和 spring.application.name 保持一致 + */ + public static final String NAME = "product-server"; + + public static final String PREFIX = RpcConstants.RPC_API_PREFIX + "/infra"; + + public static final String VERSION = "1.0.0"; + +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/BaseEnum.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/BaseEnum.java new file mode 100644 index 0000000..fb8a208 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/BaseEnum.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.productapi.enums; + +import lombok.Getter; + +/** + * @Author LGF + * @create 2020/10/26 16:36 + */ +public enum BaseEnum { + /** + * 基础 枚举 + */ + + YES_ONE(1, "是"), + NO_ZERO(0, "否"), + + ENABLE_ZERO(0, "启用"), + FORBIDDEN_ONE(1, "禁用"), + + YES_BINDING(1, "已绑定"), + NO_BINDING(0, "未绑定"), + + NO(1, "删除"), + YES(0, "正常"), + + HIDE(3, "隐藏"), + + NO_TWO(2, "否"), + ; + + @Getter + Integer key; + @Getter + String value; + ; + + BaseEnum(Integer key, String value) { + this.key = key; + this.value = value; + } + +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/DictTypeConstants.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/DictTypeConstants.java new file mode 100644 index 0000000..2a68d4f --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/DictTypeConstants.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.productapi.enums; + +/** + * Infra 字典类型的枚举类 + * + * @author 芋道源码 + */ +public interface DictTypeConstants { + + String JOB_STATUS = "product_job_status"; // 定时任务状态的枚举 + String JOB_LOG_STATUS = "product_job_log_status"; // 定时任务日志状态的枚举 + + String API_ERROR_LOG_PROCESS_STATUS = "product_api_error_log_process_status"; // API 错误日志的处理状态的枚举 + + String CONFIG_TYPE = "product_config_type"; // 参数配置类型 + String BOOLEAN_STRING = "product_boolean_string"; // Boolean 是否类型 + + String OPERATE_TYPE = "product_operate_type"; // 操作类型 + +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ErrorCodeConstants.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ErrorCodeConstants.java new file mode 100644 index 0000000..7f26c2e --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ErrorCodeConstants.java @@ -0,0 +1,35 @@ +package com.tashow.cloud.productapi.enums; + + +import com.tashow.cloud.common.exception.ErrorCode; + +/** + * Infra 错误码枚举类 + * + * infra 系统,使用 1-001-000-000 段 + */ +public interface ErrorCodeConstants { + + ErrorCode CATEGORY_NOT_EXISTS = new ErrorCode(10001, "产品类目不存在"); + ErrorCode PROD_NOT_EXISTS = new ErrorCode(10002, "商品不存在"); + ErrorCode PROD_ADDITIONAL_FEE_DATES_NOT_EXISTS = new ErrorCode(10003, "特殊日期附加费用规则不存在"); + ErrorCode PROD_ADDITIONAL_FEE_PERIODS_NOT_EXISTS = new ErrorCode(10004, "特殊时段附加费用规则不存在"); + ErrorCode PROD_EMERGENCY_RESPONSE_NOT_EXISTS = new ErrorCode(10005, "商品紧急响应服务设置不存在"); + ErrorCode PROD_EMERGENCY_RESPONSE_INTERVALS_NOT_EXISTS = new ErrorCode(10006, "紧急响应时间区间设置不存在"); + ErrorCode PROD_PROP_NOT_EXISTS = new ErrorCode(10007, "商品属性不存在"); + ErrorCode PROD_PROP_VALUE_NOT_EXISTS = new ErrorCode(10008, "属性规则不存在"); + ErrorCode PROD_RESERVATION_CONFIG_NOT_EXISTS = new ErrorCode(10009, "商品预约配置不存在"); + ErrorCode PROD_SERVICE_AREA_RELEVANCE_NOT_EXISTS = new ErrorCode(10010, "商品与服务区域关联不存在"); + ErrorCode PROD_SERVICE_AREAS_NOT_EXISTS = new ErrorCode(10011, "服务区域不存在"); + ErrorCode PROD_SERVICE_OVER_AREA_RULES_NOT_EXISTS = new ErrorCode(10012, "超区规则不存在"); + ErrorCode PROD_TAGS_NOT_EXISTS = new ErrorCode(10013, "商品和标签管理不存在"); + ErrorCode PRODUCT_ORDER_LIMIT_NOT_EXISTS = new ErrorCode(10014, "商品接单上限设置不存在"); + ErrorCode PROD_WEIGHT_RANGE_PRICES_NOT_EXISTS = new ErrorCode(10015, "体重区间价格不存在"); + ErrorCode SHOP_DETAIL_NOT_EXISTS = new ErrorCode(10016, "店铺信息不存在"); + ErrorCode SKU_NOT_EXISTS = new ErrorCode(10017, "单品SKU不存在"); + ErrorCode SKU_SERVICE_DELIVER_NOT_EXISTS = new ErrorCode(10018, "服务交付方式不存在"); + ErrorCode SKU_SERVICE_MATERIAL_NOT_EXISTS = new ErrorCode(10019, "服务物料详情不存在"); + ErrorCode SKU_SERVICES_FORM_NOT_EXISTS = new ErrorCode(10021, "商品SKU扩展服务表单不存在"); + ErrorCode SKU_SERVICE_TRANSPORT_NOT_EXISTS = new ErrorCode(10022, "服务遗体运输不存在"); + ErrorCode SKU_SERVICE_DETAILS_NOT_EXISTS = new ErrorCode(10023, "服务详情不存在"); +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ProdPropRule.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ProdPropRule.java new file mode 100644 index 0000000..b5b1e42 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ProdPropRule.java @@ -0,0 +1,44 @@ +/* + * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved. + * + * https://www.mall4j.com/ + * + * 未经允许,不可做商业用途! + * + * 版权所有,侵权必究! + */ + +package com.tashow.cloud.productapi.enums; + +/** + * 商品规格参数、属性类型 + * @author lgh + */ +public enum ProdPropRule { + + // 规格属性 (用于商品商品发布时,关联sku) + SPEC(1), + + // 规格参数(用于商品搜索时,与分类关联搜索) + ATTRIBUTE(2); + + private Integer num; + + public Integer value() { + return num; + } + + ProdPropRule(Integer num){ + this.num = num; + } + + public static ProdPropRule instance(Integer value) { + ProdPropRule[] enums = values(); + for (ProdPropRule statusEnum : enums) { + if (statusEnum.value().equals(value)) { + return statusEnum; + } + } + return null; + } +} diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ServiceTypeEnum.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ServiceTypeEnum.java new file mode 100644 index 0000000..bb33549 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/enums/ServiceTypeEnum.java @@ -0,0 +1,45 @@ +package com.tashow.cloud.productapi.enums; + +public enum ServiceTypeEnum { + TRANSPORT_CAR_CONFIG(1, "接运车辆配置"), + TRANSPORT_CAR_MATERIAL(2, "接运车辆服务物料"), + BODY_TRANSPORT_CONFIG(3, "遗体运输目的地配置"), + BODY_TRANSPORT_MATERIAL(4, "遗体运输目的地物料"), + BODY_CLEAN_CONFIG(5, "遗体清洁配置"), + BODY_CLEAN_MATERIAL(6, "遗体清洁物料"), + MEMORIAL_CONFIG(7, "追思告别配置"), + MEMORIAL_MATERIAL(8, "追思告别物料"), + CREMATION_CONFIG(9, "遗体火化配置"), + CREMATION_MATERIAL(10, "遗体火化物料"), + ASH_PROCESSING_CONFIG(11, "骨灰处理配置"), + ASH_PROCESSING_DELIVERY(12, "骨灰处理配送方式"), + ASH_PROCESSING_MATERIAL(13, "骨灰处理物料"), + BONE_ASH_CONFIG(14, "骨灰装殓配置"), + SOUVENIR_CONFIG(15, "纪念品配置"), + SOUVENIR_DELIVERY(16, "纪念品配送方式"); + + private final int code; + private final String description; + + ServiceTypeEnum(int code, String description) { + this.code = code; + this.description = description; + } + + public int getCode() { + return code; + } + + public String getDescription() { + return description; + } + + public static ServiceTypeEnum getByCode(int code) { + for (ServiceTypeEnum type : ServiceTypeEnum.values()) { + if (type.getCode() == code) { + return type; + } + } + return null; + } +} \ No newline at end of file diff --git a/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/general/StringListTypeHandler.java b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/general/StringListTypeHandler.java new file mode 100644 index 0000000..8a5a612 --- /dev/null +++ b/tashow-feign/tashow-product-api/src/main/java/com/tashow/cloud/productapi/general/StringListTypeHandler.java @@ -0,0 +1,58 @@ +package com.tashow.cloud.productapi.general; + +import org.apache.ibatis.type.BaseTypeHandler; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.MappedJdbcTypes; +import org.apache.ibatis.type.MappedTypes; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +/** + * 处理 List 与数据库逗号分隔字符串之间的转换 + */ +@MappedTypes(List.class) +@MappedJdbcTypes(JdbcType.VARCHAR) +public class StringListTypeHandler extends BaseTypeHandler> { + + @Override + public void setNonNullParameter(PreparedStatement ps, int i, List parameter, JdbcType jdbcType) throws SQLException { + // 将 List 转为逗号分隔的字符串 + StringBuilder sb = new StringBuilder(); + for (int j = 0; j < parameter.size(); j++) { + if (j > 0) sb.append(","); + sb.append(parameter.get(j)); + } + ps.setString(i, sb.toString()); + } + + @Override + public List getNullableResult(ResultSet rs, String columnName) throws SQLException { + String str = rs.getString(columnName); + return parseStringToList(str); + } + + @Override + public List getNullableResult(ResultSet rs, int columnIndex) throws SQLException { + String str = rs.getString(columnIndex); + return parseStringToList(str); + } + + @Override + public List getNullableResult(CallableStatement cs, int columnIndex) throws SQLException { + String str = cs.getString(columnIndex); + return parseStringToList(str); + } + + private List parseStringToList(String str) { + if (str == null || str.trim().length() == 0) { + return Collections.emptyList(); + } + return Arrays.asList(str.split(",")); + } +} diff --git a/tashow-framework/tashow-common/pom.xml b/tashow-framework/tashow-common/pom.xml index cf54682..4e246cb 100644 --- a/tashow-framework/tashow-common/pom.xml +++ b/tashow-framework/tashow-common/pom.xml @@ -108,6 +108,25 @@ jackson-datatype-jsr310 provided + + + + + org.apache.commons + commons-lang3 + + + org.slf4j diff --git a/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/pojo/PageParam.java b/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/pojo/PageParam.java index 0476b67..99ffe39 100644 --- a/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/pojo/PageParam.java +++ b/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/pojo/PageParam.java @@ -14,8 +14,7 @@ import java.io.Serializable; @Data public class PageParam implements Serializable { - private static final Integer PAGE_NO = 1; - private static final Integer PAGE_SIZE = 10; + /** * 每页条数 - 不分页 @@ -29,7 +28,7 @@ public class PageParam implements Serializable { */ @NotNull(message = "页码不能为空") @Min(value = 1, message = "页码最小值为 1") - private Integer pageNo = PAGE_NO; + private Integer pageNo = 1; /** * 每页条数,最大值为 100" @@ -37,6 +36,6 @@ public class PageParam implements Serializable { @NotNull(message = "每页条数不能为空") @Min(value = 1, message = "每页条数最小值为 1") @Max(value = 100, message = "每页条数最大值为 100") - private Integer pageSize = PAGE_SIZE; + private Integer pageSize = 10; } diff --git a/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/date/DateUtils.java b/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/date/DateUtils.java index ffe5af9..154dad4 100644 --- a/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/date/DateUtils.java +++ b/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/date/DateUtils.java @@ -3,6 +3,7 @@ package com.tashow.cloud.common.util.date; import cn.hutool.core.date.LocalDateTimeUtil; import java.time.*; +import java.time.temporal.ChronoUnit; import java.util.Calendar; import java.util.Date; @@ -27,6 +28,9 @@ public class DateUtils { public static final String FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND = "yyyy-MM-dd HH:mm:ss"; + + // 默认数据保留天数 + private static final long RETENTION_DAYS = 90; /** * 将 LocalDateTime 转换成 Date * @@ -146,4 +150,36 @@ public class DateUtils { return LocalDateTimeUtil.isSameDay(date, LocalDateTime.now().minusDays(1)); } + + /** + * 根据删除时间,计算还剩多少天被彻底删除(默认保留 90 天) + * + * @param deleteTime 删除时间 + * @return 剩余天数(>=0),0 表示已过期 + */ + public static long getRemainingDays(Date deleteTime) { + if (deleteTime == null) { + throw new IllegalArgumentException("删除时间不能为 null"); + } + + // 将 Date 转换为 LocalDateTime + LocalDateTime deleteDateTime = deleteTime.toInstant() + .atZone(ZoneId.systemDefault()) + .toLocalDateTime(); + + // 当前时间 + LocalDateTime now = LocalDateTime.now(); + + // 到期时间 = 删除时间 + 保留天数 + LocalDateTime expireTime = deleteDateTime.plusDays(RETENTION_DAYS); + + // 如果当前时间已经超过到期时间,剩余天数为 0 + if (now.isAfter(expireTime)) { + return 0; + } + + // 计算剩余天数(向下取整,不进位) + return ChronoUnit.DAYS.between(now, expireTime); + } + } diff --git a/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/serializer/ImgJsonSerializer.java b/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/serializer/ImgJsonSerializer.java new file mode 100644 index 0000000..9af3bca --- /dev/null +++ b/tashow-framework/tashow-common/src/main/java/com/tashow/cloud/common/util/serializer/ImgJsonSerializer.java @@ -0,0 +1,64 @@ +/* + * Copyright (c) 2018-2999 广州市蓝海创新科技有限公司 All rights reserved. + * + * https://www.mall4j.com/ + * + * 未经允许,不可做商业用途! + * + * 版权所有,侵权必究! + */ + +package com.tashow.cloud.common.util.serializer; + +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.io.IOException; +import java.util.Objects; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author lanhai + */ +@Component +public class ImgJsonSerializer extends JsonSerializer { + + /* @Autowired + private Qiniu qiniu; + @Autowired + private ImgUploadUtil imgUploadUtil;*/ + + @Override + public void serialize(String value, JsonGenerator gen, SerializerProvider serializers) throws IOException { + /*if (StrUtil.isBlank(value)) { + gen.writeString(StrUtil.EMPTY); + return; + } + String[] imgs = value.split(StrUtil.COMMA); + StringBuilder sb = new StringBuilder(); + String resourceUrl = ""; + String rule="^((http[s]{0,1})://)"; + Pattern pattern= Pattern.compile(rule); + if (Objects.equals(imgUploadUtil.getUploadType(), 2)) { + resourceUrl = qiniu.getResourcesUrl(); + } else if (Objects.equals(imgUploadUtil.getUploadType(), 1)) { + resourceUrl = imgUploadUtil.getResourceUrl(); + } + for (String img : imgs) { + Matcher matcher = pattern.matcher(img); + //若图片以http或https开头,直接返回 + if (matcher.find()){ + sb.append(img).append(StrUtil.COMMA); + }else { + sb.append(resourceUrl).append(img).append(StrUtil.COMMA); + } + } + sb.deleteCharAt(sb.length()-1); + gen.writeString(sb.toString());*/ + } +} diff --git a/tashow-framework/tashow-data-mybatis/pom.xml b/tashow-framework/tashow-data-mybatis/pom.xml index cff3557..f45fe8a 100644 --- a/tashow-framework/tashow-data-mybatis/pom.xml +++ b/tashow-framework/tashow-data-mybatis/pom.xml @@ -37,6 +37,11 @@ ojdbc8 true + org.postgresql postgresql diff --git a/tashow-framework/tashow-data-mybatis/src/main/java/com/tashow/cloud/mybatis/mybatis/core/dataobject/BaseDO.java b/tashow-framework/tashow-data-mybatis/src/main/java/com/tashow/cloud/mybatis/mybatis/core/dataobject/BaseDO.java index 5f1ec6d..92fa0e9 100644 --- a/tashow-framework/tashow-data-mybatis/src/main/java/com/tashow/cloud/mybatis/mybatis/core/dataobject/BaseDO.java +++ b/tashow-framework/tashow-data-mybatis/src/main/java/com/tashow/cloud/mybatis/mybatis/core/dataobject/BaseDO.java @@ -51,6 +51,6 @@ public abstract class BaseDO implements Serializable, TransPojo { * 是否删除 */ @TableLogic - private Boolean deleted; + private Integer deleted; } diff --git a/tashow-gateway/src/main/java/com/tashow/cloud/gateway/GatewayServerApplication.java b/tashow-gateway/src/main/java/com/tashow/cloud/gateway/GatewayServerApplication.java index 252c5fa..2e1e588 100644 --- a/tashow-gateway/src/main/java/com/tashow/cloud/gateway/GatewayServerApplication.java +++ b/tashow-gateway/src/main/java/com/tashow/cloud/gateway/GatewayServerApplication.java @@ -8,6 +8,7 @@ public class GatewayServerApplication { public static void main(String[] args) { // 启动 Spring Boot 应用 SpringApplication.run(GatewayServerApplication.class, args); + System.out.println("网关启动成功"); } } diff --git a/tashow-gateway/src/main/resources/application-local.yaml b/tashow-gateway/src/main/resources/application-local.yaml index afff069..8756703 100644 --- a/tashow-gateway/src/main/resources/application-local.yaml +++ b/tashow-gateway/src/main/resources/application-local.yaml @@ -7,10 +7,10 @@ spring: username: nacos # Nacos 账号 password: nacos # Nacos 密码 discovery: # 【配置中心】配置项 - namespace: liwq # 命名空间。这里使用 dev 开发环境 + namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境 group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP config: # 【注册中心】配置项 - namespace: liwq # 命名空间。这里使用 dev 开发环境 + namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境 group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP # 日志文件配置 diff --git a/tashow-module/pom.xml b/tashow-module/pom.xml index 37c811b..ffdb6c5 100644 --- a/tashow-module/pom.xml +++ b/tashow-module/pom.xml @@ -14,6 +14,7 @@ tashow-module-system tashow-module-infra tashow-module-app + tashow-module-product diff --git a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/controller.vm b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/controller.vm index e47b61e..5aa3bae 100644 --- a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/controller.vm +++ b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/controller.vm @@ -5,6 +5,10 @@ import ${jakartaPackage}.annotation.Resource; import org.springframework.validation.annotation.Validated; #if ($sceneEnum.scene == 1)import org.springframework.security.access.prepost.PreAuthorize;#end +import io.swagger.v3.oas.annotations.tags.Tag; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.Operation; + import ${jakartaPackage}.validation.constraints.*; import ${jakartaPackage}.validation.*; import ${jakartaPackage}.servlet.http.*; @@ -30,9 +34,7 @@ import ${basePackage}.module.${subTable.moduleName}.dal.dataobject.${subTable.bu #end import ${basePackage}.module.${table.moduleName}.service.${table.businessName}.${table.className}Service; -/** - * ${sceneEnum.name} - ${table.classComment} - */ +@Tag(name = "${sceneEnum.name} - ${table.classComment}") @RestController ##二级的 businessName 暂时不算在 HTTP 路径上,可以根据需要写 @RequestMapping("/${table.moduleName}/${simpleClassName_strikeCase}") @@ -42,10 +44,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { @Resource private ${table.className}Service ${classNameVar}Service; - /** - * 创建${table.classComment} - */ @PostMapping("/create") + @Operation(summary = "创建${table.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:create')") #end @@ -53,10 +53,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { return success(${classNameVar}Service.create${simpleClassName}(createReqVO)); } - /** - * 更新${table.classComment} - */ @PutMapping("/update") + @Operation(summary = "更新${table.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:update')") #end @@ -65,10 +63,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { return success(true); } - /** - * 删除${table.classComment} - */ @DeleteMapping("/delete") + @Operation(summary = "删除${table.classComment}") + @Parameter(name = "id", description = "编号", required = true) #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')") #end @@ -77,10 +74,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { return success(true); } - /** - * 获得${table.classComment} - */ @GetMapping("/get") + @Operation(summary = "获得${table.classComment}") + @Parameter(name = "id", description = "编号", required = true, example = "1024") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end @@ -90,11 +86,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } #if ( $table.templateType != 2 ) - - /** - * 获得${table.classComment}分页 - */ @GetMapping("/page") + @Operation(summary = "获得${table.classComment}分页") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end @@ -105,10 +98,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { ## 特殊:树表专属逻辑(树不需要分页接口) #else - /** - * 获得${table.classComment}列表 - */ @GetMapping("/list") + @Operation(summary = "获得${table.classComment}列表") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end @@ -118,10 +109,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } #end - /** - * 导出${table.classComment} Excel - */ @GetMapping("/export-excel") + @Operation(summary = "导出${table.classComment} Excel") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:export')") #end @@ -160,10 +149,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { ## 情况一:MASTER_ERP 时,需要分查询页子表 #if ( $table.templateType == 11 ) - /** - * 获得${subTable.classComment}分页 - */ @GetMapping("/${subSimpleClassName_strikeCase}/page") + @Operation(summary = "获得${subTable.classComment}分页") + @Parameter(name = "${subJoinColumn.javaField}", description = "${subJoinColumn.columnComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end @@ -175,10 +163,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { ## 情况二:非 MASTER_ERP 时,需要列表查询子表 #else #if ( $subTable.subJoinMany ) - /** - * 获得${subTable.classComment}列表 - */ @GetMapping("/${subSimpleClassName_strikeCase}/list-by-${subJoinColumn_strikeCase}") + @Operation(summary = "获得${subTable.classComment}列表") + @Parameter(name = "${subJoinColumn.javaField}", description = "${subJoinColumn.columnComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end @@ -187,10 +174,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { } #else - /** - * 获得${subTable.classComment} - */ @GetMapping("/${subSimpleClassName_strikeCase}/get-by-${subJoinColumn_strikeCase}") + @Operation(summary = "获得${subTable.classComment}") + @Parameter(name = "${subJoinColumn.javaField}", description = "${subJoinColumn.columnComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end @@ -202,10 +188,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { #end ## 特殊:MASTER_ERP 时,支持单个的新增、修改、删除操作 #if ( $table.templateType == 11 ) - /** - * 创建${subTable.classComment} - */ @PostMapping("/${subSimpleClassName_strikeCase}/create") + @Operation(summary = "创建${subTable.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:create')") #end @@ -213,10 +197,8 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { return success(${classNameVar}Service.create${subSimpleClassName}(${subClassNameVar})); } - /** - * 更新${subTable.classComment} - */ @PutMapping("/${subSimpleClassName_strikeCase}/update") + @Operation(summary = "更新${subTable.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:update')") #end @@ -225,10 +207,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { return success(true); } - /** - * 删除${subTable.classComment} - */ @DeleteMapping("/${subSimpleClassName_strikeCase}/delete") + @Parameter(name = "id", description = "编号", required = true) + @Operation(summary = "删除${subTable.classComment}") #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:delete')") #end @@ -237,10 +218,9 @@ public class ${sceneEnum.prefixClass}${table.className}Controller { return success(true); } - /** - * 获得${subTable.classComment} - */ @GetMapping("/${subSimpleClassName_strikeCase}/get") + @Operation(summary = "获得${subTable.classComment}") + @Parameter(name = "id", description = "编号", required = true) #if ($sceneEnum.scene == 1) @PreAuthorize("@ss.hasPermission('${permissionPrefix}:query')") #end diff --git a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/listReqVO.vm b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/listReqVO.vm index 4797c0b..46b6a25 100644 --- a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/listReqVO.vm +++ b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/listReqVO.vm @@ -2,7 +2,7 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePac import lombok.*; import java.util.*; - +import io.swagger.v3.oas.annotations.media.Schema; import ${PageParamClassName}; #foreach ($column in $columns) #if (${column.javaType} == "BigDecimal") @@ -22,24 +22,18 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end ## 字段模板 #macro(columnTpl $prefix $prefixStr) - /** - * ${prefixStr}${column.columnComment}"#if ("$!column.example" != " - */, example = "${column.example}"#end) + @Schema(description = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; #end -/** - * ${sceneEnum.name} - ${table.classComment}列表 Request VO - */ +@Schema(description = "${sceneEnum.name} - ${table.classComment}列表 Request VO") @Data public class ${sceneEnum.prefixClass}${table.className}ListReqVO { #foreach ($column in $columns) #if (${column.listOperation})##查询操作 #if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 - /** - * ${column.columnComment}"#if ("$!column.example" != " - */, example = "${column.example}"#end) + @Schema(description = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private ${column.javaType}[] ${column.javaField}; #else##情况二,非 Between 的时间 diff --git a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/pageReqVO.vm b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/pageReqVO.vm index f7841c0..003bac9 100644 --- a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/pageReqVO.vm +++ b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/pageReqVO.vm @@ -2,7 +2,7 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePac import lombok.*; import java.util.*; - +import io.swagger.v3.oas.annotations.media.Schema; import ${PageParamClassName}; #foreach ($column in $columns) #if (${column.javaType} == "BigDecimal") @@ -22,15 +22,11 @@ import static ${DateUtilsClassName}.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND; #end ## 字段模板 #macro(columnTpl $prefix $prefixStr) - /** - * ${prefixStr}${column.columnComment}"#if ("$!column.example" != " - */, example = "${column.example}"#end) + @Schema(description = "${prefixStr}${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) private ${column.javaType}#if ("$!prefix" != "") ${prefix}${JavaField}#else ${column.javaField}#end; #end -/** - * ${sceneEnum.name} - ${table.classComment}分页 Request VO - */ +@Schema(description = "${sceneEnum.name} - ${table.classComment}分页 Request VO") @Data @EqualsAndHashCode(callSuper = true) @ToString(callSuper = true) @@ -39,9 +35,7 @@ public class ${sceneEnum.prefixClass}${table.className}PageReqVO extends PagePar #foreach ($column in $columns) #if (${column.listOperation})##查询操作 #if (${column.listOperationCondition} == "BETWEEN")## 情况一,Between 的时候 - /** - * ${column.columnComment}"#if ("$!column.example" != " - */, example = "${column.example}"#end) + @Schema(description = "${column.columnComment}"#if ("$!column.example" != ""), example = "${column.example}"#end) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) private ${column.javaType}[] ${column.javaField}; #else##情况二,非 Between 的时间 diff --git a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/respVO.vm b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/respVO.vm index e4fcf6f..24c3519 100644 --- a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/respVO.vm +++ b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/respVO.vm @@ -1,6 +1,6 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; ## 处理 BigDecimal 字段的引入 @@ -28,9 +28,7 @@ import ${DictConvertClassName}; #end #end -/** - * ${sceneEnum.name} - ${table.classComment} Response VO - */ +@Schema(description = "${sceneEnum.name} - ${table.classComment} Response VO") @Data @ExcelIgnoreUnannotated public class ${sceneEnum.prefixClass}${table.className}RespVO { @@ -39,9 +37,7 @@ public class ${sceneEnum.prefixClass}${table.className}RespVO { #foreach ($column in $columns) #if (${column.listOperationResult}) ## 1. 处理 Swagger 注解 - /** - * ${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != " - */, example = "${column.example}"#end) + @Schema(description = "${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != ""), example = "${column.example}"#end) ## 2. 处理 Excel 导出 #if ("$!column.dictType" != "")##处理枚举值 @ExcelProperty(value = "${column.columnComment}", converter = DictConvert.class) diff --git a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/saveReqVO.vm b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/saveReqVO.vm index ba32472..b432c75 100644 --- a/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/saveReqVO.vm +++ b/tashow-module/tashow-module-infra/src/main/resources/codegen/java/controller/vo/saveReqVO.vm @@ -1,6 +1,6 @@ package ${basePackage}.module.${table.moduleName}.controller.${sceneEnum.basePackage}.${table.businessName}.vo; - +import io.swagger.v3.oas.annotations.media.Schema; import lombok.*; import java.util.*; import ${jakartaPackage}.validation.constraints.*; @@ -24,9 +24,7 @@ import java.time.LocalDateTime; import ${basePackage}.module.${subTable.moduleName}.dal.dataobject.${subTable.businessName}.${subTable.className}DO; #end -/** - * ${sceneEnum.name} - ${table.classComment}新增/修改 Request VO - */ +@Schema(description = "${sceneEnum.name} - ${table.classComment}新增/修改 Request VO") @Data public class ${sceneEnum.prefixClass}${table.className}SaveReqVO { @@ -34,9 +32,7 @@ public class ${sceneEnum.prefixClass}${table.className}SaveReqVO { #foreach ($column in $columns) #if (${column.createOperation} || ${column.updateOperation}) ## 1. 处理 Swagger 注解 - /** - * ${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != " - */, example = "${column.example}"#end) + @Schema(description = "${column.columnComment}"#if (!${column.nullable}), requiredMode = Schema.RequiredMode.REQUIRED#end#if ("$!column.example" != ""), example = "${column.example}"#end) ## 2. 处理 Validator 参数校验 #if (!${column.nullable} && !${column.primaryKey}) #if (${column.javaType} == 'String') @@ -55,15 +51,11 @@ public class ${sceneEnum.prefixClass}${table.className}SaveReqVO { #foreach ($subTable in $subTables) #set ($index = $foreach.count - 1) #if ( $subTable.subJoinMany) - /** - * ${subTable.classComment}列表 - */ + @Schema(description = "${subTable.classComment}列表") private List<${subTable.className}DO> ${subClassNameVars.get($index)}s; #else - /** - * ${subTable.classComment} - */ + @Schema(description = "${subTable.classComment}") private ${subTable.className}DO ${subClassNameVars.get($index)}; #end diff --git a/tashow-module/tashow-module-product/pom.xml b/tashow-module/tashow-module-product/pom.xml new file mode 100644 index 0000000..0639aa0 --- /dev/null +++ b/tashow-module/tashow-module-product/pom.xml @@ -0,0 +1,121 @@ + + 4.0.0 + + com.tashow.cloud + tashow-module + ${revision} + + + tashow-module-product + jar + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-discovery + + + + + com.alibaba.cloud + spring-cloud-starter-alibaba-nacos-config + + + + io.swagger + swagger-models + 1.6.2 + + + + io.swagger.core.v3 + swagger-core + 2.2.20 + + + + + io.swagger.core.v3 + swagger-models + 2.2.20 + + + com.tashow.cloud + tashow-framework-monitor + + + + + com.alibaba + easyexcel + 4.0.3 + + + + com.tashow.cloud + tashow-product-api + ${revision} + + + com.tashow.cloud + tashow-data-excel + ${revision} + + + + com.tashow.cloud + tashow-framework-rpc + + + com.tashow.cloud + tashow-data-mybatis + + + com.tashow.cloud + tashow-framework-web + + + com.tashow.cloud + tashow-framework-env + + + com.tashow.cloud + tashow-framework-websocket + + + com.tashow.cloud + tashow-data-redis + + + com.tashow.cloud + tashow-framework-security + + + org.springframework.boot + spring-boot-starter-actuator + + + + + ${project.artifactId} + + + org.springframework.boot + spring-boot-maven-plugin + ${spring.boot.version} + + com.tashow.cloud.product.ProductServerApplication + + + + + repackage + + + + + + + diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/ProductServerApplication.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/ProductServerApplication.java new file mode 100644 index 0000000..2bdf20a --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/ProductServerApplication.java @@ -0,0 +1,19 @@ +package com.tashow.cloud.product; + +import org.mybatis.spring.annotation.MapperScan; +import org.springframework.boot.SpringApplication; +import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.context.annotation.ComponentScan; +import org.springframework.scheduling.annotation.EnableScheduling; + +/** + * 应用服务启动类 + */ +@SpringBootApplication +public class ProductServerApplication { + + public static void main(String[] args) { + SpringApplication.run(ProductServerApplication.class, args); + System.out.println("产品启动成功"); + } +} diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/api/CategoryApiImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/api/CategoryApiImpl.java new file mode 100644 index 0000000..399ae38 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/api/CategoryApiImpl.java @@ -0,0 +1,23 @@ +package com.tashow.cloud.product.api; + +import com.tashow.cloud.productapi.api.product.dto.CategoryDO; +import com.tashow.cloud.product.service.CategoryService; +import com.tashow.cloud.productapi.api.product.CategoryApi; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.RestController; +import java.util.List; + +@RestController // 提供 RESTful API 接口,给 Feign 调用 +@Validated +public class CategoryApiImpl implements CategoryApi { + + @Resource + private CategoryService categoryService; + + @Override + public List categoryList(Integer grade, Long categoryId,String categoryName, Integer status) { + return categoryService.categoryList(grade, categoryId,categoryName, status); + } +} diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/CategoryController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/CategoryController.java new file mode 100644 index 0000000..b06eee1 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/CategoryController.java @@ -0,0 +1,96 @@ +package com.tashow.cloud.product.controller.admin; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.productapi.api.product.dto.CategoryDO; +import com.tashow.cloud.product.service.CategoryService; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import com.tashow.cloud.productapi.api.product.vo.CategorySaveReqVO; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; +import jakarta.validation.Valid; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 产品类目") +@RestController +@RequestMapping("/product/category") +@Validated +public class CategoryController { + + @Resource + private CategoryService categoryService; + + /** + * 获取菜单页面的表 + * @return + */ + @PermitAll + @GetMapping("/categoryList") + public CommonResult> categoryList(@RequestParam(value = "grade", required = false) Integer grade, + @RequestParam(value = "categoryId", required = false) Long categoryId, + @RequestParam(value = "categoryName", required = false) String categoryName, + @RequestParam(value = "status", required = false) Integer status) { + return success(categoryService.categoryList(grade, categoryId,categoryName, status)); + } + @PostMapping("/create") + @Operation(summary = "创建产品类目") + @PermitAll + public CommonResult createCategory(@Valid @RequestBody CategorySaveReqVO createReqVO) { + return success(categoryService.createCategory(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新产品类目") + @PermitAll + public CommonResult updateCategory(@RequestBody CategorySaveReqVO updateReqVO) { + categoryService.updateCategory(updateReqVO); + return success(true); + } +/* + @DeleteMapping("/delete") + @Operation(summary = "删除产品类目") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:category:delete')") + public CommonResult deleteCategory(@RequestParam("id") Long id) { + categoryService.deleteCategory(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得产品类目") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:category:query')") + public CommonResult getCategory(@RequestParam("id") Long id) { + CategoryDO category = categoryService.getCategory(id); + return success(BeanUtils.toBean(category, CategoryRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得产品类目分页") + @PreAuthorize("@ss.hasPermission('tz:category:query')") + public CommonResult> getCategoryPage(@Valid CategoryPageReqVO pageReqVO) { + PageResult pageResult = categoryService.getCategoryPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, CategoryRespVO.class)); + }*/ + +/* @GetMapping("/export-excel") + @Operation(summary = "导出产品类目 Excel") + @PreAuthorize("@ss.hasPermission('tz:category:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportCategoryExcel(@Valid CategoryPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = categoryService.getCategoryPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "产品类目.xls", "数据", CategoryRespVO.class, + BeanUtils.toBean(list, CategoryRespVO.class)); + }*/ + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdAdditionalFeeDatesController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdAdditionalFeeDatesController.java new file mode 100644 index 0000000..cac5ac5 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdAdditionalFeeDatesController.java @@ -0,0 +1,94 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO; +import com.tashow.cloud.product.service.ProdAdditionalFeeDatesService; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + + +@Tag(name = "管理后台 - 特殊日期附加费用规则") +@RestController +@RequestMapping("/tz/prod-additional-fee-dates") +@Validated +public class ProdAdditionalFeeDatesController { + + @Resource + private ProdAdditionalFeeDatesService prodAdditionalFeeDatesService; + + @PostMapping("/create") + @Operation(summary = "创建特殊日期附加费用规则") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-dates:create')") + public CommonResult createProdAdditionalFeeDates(@Valid @RequestBody ProdAdditionalFeeDatesSaveReqVO createReqVO) { + return success(prodAdditionalFeeDatesService.createProdAdditionalFeeDates(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新特殊日期附加费用规则") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-dates:update')") + public CommonResult updateProdAdditionalFeeDates(@Valid @RequestBody ProdAdditionalFeeDatesSaveReqVO updateReqVO) { + prodAdditionalFeeDatesService.updateProdAdditionalFeeDates(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除特殊日期附加费用规则") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-dates:delete')") + public CommonResult deleteProdAdditionalFeeDates(@RequestParam("id") Long id) { + prodAdditionalFeeDatesService.deleteProdAdditionalFeeDates(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得特殊日期附加费用规则") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-dates:query')") + public CommonResult getProdAdditionalFeeDates(@RequestParam("id") Long id) { + ProdAdditionalFeeDatesDO prodAdditionalFeeDates = prodAdditionalFeeDatesService.getProdAdditionalFeeDates(id); + return success(BeanUtils.toBean(prodAdditionalFeeDates, ProdAdditionalFeeDatesRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得特殊日期附加费用规则分页") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-dates:query')") + public CommonResult> getProdAdditionalFeeDatesPage(@Valid ProdAdditionalFeeDatesPageReqVO pageReqVO) { + PageResult pageResult = prodAdditionalFeeDatesService.getProdAdditionalFeeDatesPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdAdditionalFeeDatesRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出特殊日期附加费用规则 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-dates:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdAdditionalFeeDatesExcel(@Valid ProdAdditionalFeeDatesPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodAdditionalFeeDatesService.getProdAdditionalFeeDatesPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "特殊日期附加费用规则.xls", "数据", ProdAdditionalFeeDatesRespVO.class, + BeanUtils.toBean(list, ProdAdditionalFeeDatesRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdAdditionalFeePeriodsController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdAdditionalFeePeriodsController.java new file mode 100644 index 0000000..ad729e6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdAdditionalFeePeriodsController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO; +import com.tashow.cloud.product.service.ProdAdditionalFeePeriodsService; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 特殊时段附加费用规则") +@RestController +@RequestMapping("/tz/prod-additional-fee-periods") +@Validated +public class ProdAdditionalFeePeriodsController { + + @Resource + private ProdAdditionalFeePeriodsService prodAdditionalFeePeriodsService; + + @PostMapping("/create") + @Operation(summary = "创建特殊时段附加费用规则") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-periods:create')") + public CommonResult createProdAdditionalFeePeriods(@Valid @RequestBody ProdAdditionalFeePeriodsSaveReqVO createReqVO) { + return success(prodAdditionalFeePeriodsService.createProdAdditionalFeePeriods(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新特殊时段附加费用规则") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-periods:update')") + public CommonResult updateProdAdditionalFeePeriods(@Valid @RequestBody ProdAdditionalFeePeriodsSaveReqVO updateReqVO) { + prodAdditionalFeePeriodsService.updateProdAdditionalFeePeriods(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除特殊时段附加费用规则") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-periods:delete')") + public CommonResult deleteProdAdditionalFeePeriods(@RequestParam("id") Long id) { + prodAdditionalFeePeriodsService.deleteProdAdditionalFeePeriods(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得特殊时段附加费用规则") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-periods:query')") + public CommonResult getProdAdditionalFeePeriods(@RequestParam("id") Long id) { + ProdAdditionalFeePeriodsDO prodAdditionalFeePeriods = prodAdditionalFeePeriodsService.getProdAdditionalFeePeriods(id); + return success(BeanUtils.toBean(prodAdditionalFeePeriods, ProdAdditionalFeePeriodsRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得特殊时段附加费用规则分页") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-periods:query')") + public CommonResult> getProdAdditionalFeePeriodsPage(@Valid ProdAdditionalFeePeriodsPageReqVO pageReqVO) { + PageResult pageResult = prodAdditionalFeePeriodsService.getProdAdditionalFeePeriodsPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdAdditionalFeePeriodsRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出特殊时段附加费用规则 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-additional-fee-periods:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdAdditionalFeePeriodsExcel(@Valid ProdAdditionalFeePeriodsPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodAdditionalFeePeriodsService.getProdAdditionalFeePeriodsPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "特殊时段附加费用规则.xls", "数据", ProdAdditionalFeePeriodsRespVO.class, + BeanUtils.toBean(list, ProdAdditionalFeePeriodsRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdController.java new file mode 100644 index 0000000..93a7716 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdController.java @@ -0,0 +1,161 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.product.mapper.ProdMapper; +import com.tashow.cloud.productapi.api.product.dto.ProdDO; +import com.tashow.cloud.product.service.ProdService; +import com.tashow.cloud.productapi.api.product.dto.SkuDO; +import com.tashow.cloud.productapi.api.product.vo.prod.*; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO; +import com.tashow.cloud.productapi.enums.BaseEnum; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; +import jakarta.validation.Valid; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.Date; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 商品") +@RestController +@RequestMapping("/product/prod") +@Validated +public class ProdController { + + @Resource + private ProdService prodService; + @Resource + private ProdMapper prodMapper; + @PostMapping("/create") + @Operation(summary = "创建商品") + @PermitAll + public CommonResult createProd(@Valid @RequestBody ProdSaveReqVO createReqVO) { + return success(prodService.createProd(createReqVO)); + } + + + + @PostMapping("/createProdService") + @Operation(summary = "创建商品服务配置") + @PermitAll + public CommonResult createProdService(@Valid @RequestBody ProdServiceVO prodServiceVO) { + prodService.createProdService(prodServiceVO); + return success(true); + } + + @PostMapping("/uptateProdService") + @Operation(summary = "修改商品服务配置") + @PermitAll + public CommonResult uptateProdService(@Valid @RequestBody ProdServiceInfoVO prodServiceInfoVO) { + prodService.uptateProdService(prodServiceInfoVO); + return success(true); + } + + @GetMapping("/getProdService") + @Operation(summary = "获得商品服务信息") + @Parameter(name = "prodId", description = "商品id", required = true, example = "1024") + @PermitAll + public CommonResult getProd(@RequestParam("prodId") Long prodId) { + ProdServiceVO prodServiceVO = prodService.getProdService(prodId); + return success(prodServiceVO); + } + + + @PutMapping("/update") + @Operation(summary = "更新商品") + @PermitAll + public CommonResult updateProd(@RequestBody ProdSaveReqVO updateReqVO) { + prodService.updateProd(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品") + @PermitAll + @Parameter(name = "id", description = "编号", required = true) + public CommonResult deleteProd(@RequestParam("id") Long id) { + prodService.deleteProd(id); + return success(true); + } + + + + + @DeleteMapping("/deleteSkuList") + @Operation(summary = "批量删除商品") + @Parameter(name = "ids", description = "商品id", required = true) + @PermitAll + public CommonResult deleteSkuList(@RequestParam("ids") List ids) { + for(Long id:ids){ + ProdDO prod = new ProdDO(); + prod.setProdId(id); + prod.setDeleted(BaseEnum.YES_ONE.getKey()); + prod.setDeleteTime(new Date()); + // 删除 + prodMapper.deleteById(prod); + } + return success(true); + } + + @DeleteMapping("/updateSkuShelfList") + @Operation(summary = "批量上下架") + @Parameter(name = "status", description = "默认是1,正常状态(出售中), 0:下架(仓库中) 2:待审核", required = true) + @PermitAll + public CommonResult updateSkuShelfList(@RequestParam("ids") List ids,@RequestParam("status") Integer status) { + for(Long id:ids){ + ProdDO prod = new ProdDO(); + prod.setProdId(id); + prod.setStatus(status); + prodMapper.updateById(prod); + } + return success(true); + } + + + +/* + @GetMapping("/get") + @Operation(summary = "获得商品") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tashow-module-product:prod:query')") + public CommonResult getProd(@RequestParam("id") Long id) { + ProdDO prod = prodService.getProd(id); + return success(BeanUtils.toBean(prod, ProdRespVO.class)); + }*/ + + @PermitAll + @GetMapping("/page") + @Operation(summary = "获得商品分页") + public CommonResult> getProdPage(ProdPageReqVO pageReqVO) { + PageResult pageResult = prodService.getProdPage(pageReqVO); + return success(pageResult); + } + + @PermitAll + @GetMapping("/getProdRecycleBinPageList") + @Operation(summary = "获得商品回收站分页列表") + public CommonResult> getProdRecycleBinPageList(ProdRecycleBinVO prodRecycleBinVO) { + PageResult pageResult = prodService.getProdRecycleBinPageList(prodRecycleBinVO); + return success(pageResult); + } + + + @PostMapping("/restoreProdList") + @Operation(summary = "恢复商品") + @Parameter(name = "ids", description = "商品id集合", required = true) + @PermitAll + public CommonResult restoreProdList(@RequestParam("ids") List ids) { + prodService.restoreProdList(ids); + return success(true); + } + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdEmergencyResponseController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdEmergencyResponseController.java new file mode 100644 index 0000000..c84de7f --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdEmergencyResponseController.java @@ -0,0 +1,94 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseDO; +import com.tashow.cloud.product.service.ProdEmergencyResponseService; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponsePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponseRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponseSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + + +@Tag(name = "管理后台 - 商品紧急响应服务设置") +@RestController +@RequestMapping("/tz/prod-emergency-response") +@Validated +public class ProdEmergencyResponseController { + + @Resource + private ProdEmergencyResponseService prodEmergencyResponseService; + + @PostMapping("/create") + @Operation(summary = "创建商品紧急响应服务设置") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response:create')") + public CommonResult createProdEmergencyResponse(@Valid @RequestBody ProdEmergencyResponseSaveReqVO createReqVO) { + return success(prodEmergencyResponseService.createProdEmergencyResponse(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新商品紧急响应服务设置") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response:update')") + public CommonResult updateProdEmergencyResponse(@Valid @RequestBody ProdEmergencyResponseSaveReqVO updateReqVO) { + prodEmergencyResponseService.updateProdEmergencyResponse(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品紧急响应服务设置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response:delete')") + public CommonResult deleteProdEmergencyResponse(@RequestParam("id") Long id) { + prodEmergencyResponseService.deleteProdEmergencyResponse(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品紧急响应服务设置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response:query')") + public CommonResult getProdEmergencyResponse(@RequestParam("id") Long id) { + ProdEmergencyResponseDO prodEmergencyResponse = prodEmergencyResponseService.getProdEmergencyResponse(id); + return success(BeanUtils.toBean(prodEmergencyResponse, ProdEmergencyResponseRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品紧急响应服务设置分页") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response:query')") + public CommonResult> getProdEmergencyResponsePage(@Valid ProdEmergencyResponsePageReqVO pageReqVO) { + PageResult pageResult = prodEmergencyResponseService.getProdEmergencyResponsePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdEmergencyResponseRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品紧急响应服务设置 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdEmergencyResponseExcel(@Valid ProdEmergencyResponsePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodEmergencyResponseService.getProdEmergencyResponsePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品紧急响应服务设置.xls", "数据", ProdEmergencyResponseRespVO.class, + BeanUtils.toBean(list, ProdEmergencyResponseRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdEmergencyResponseIntervalsController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdEmergencyResponseIntervalsController.java new file mode 100644 index 0000000..da364ac --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdEmergencyResponseIntervalsController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import com.tashow.cloud.product.service.ProdEmergencyResponseIntervalsService; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 紧急响应时间区间设置") +@RestController +@RequestMapping("/tz/prod-emergency-response-intervals") +@Validated +public class ProdEmergencyResponseIntervalsController { + + @Resource + private ProdEmergencyResponseIntervalsService prodEmergencyResponseIntervalsService; + + @PostMapping("/create") + @Operation(summary = "创建紧急响应时间区间设置") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response-intervals:create')") + public CommonResult createProdEmergencyResponseIntervals(@Valid @RequestBody ProdEmergencyResponseIntervalsSaveReqVO createReqVO) { + return success(prodEmergencyResponseIntervalsService.createProdEmergencyResponseIntervals(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新紧急响应时间区间设置") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response-intervals:update')") + public CommonResult updateProdEmergencyResponseIntervals(@Valid @RequestBody ProdEmergencyResponseIntervalsSaveReqVO updateReqVO) { + prodEmergencyResponseIntervalsService.updateProdEmergencyResponseIntervals(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除紧急响应时间区间设置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response-intervals:delete')") + public CommonResult deleteProdEmergencyResponseIntervals(@RequestParam("id") Long id) { + prodEmergencyResponseIntervalsService.deleteProdEmergencyResponseIntervals(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得紧急响应时间区间设置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response-intervals:query')") + public CommonResult getProdEmergencyResponseIntervals(@RequestParam("id") Long id) { + ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals = prodEmergencyResponseIntervalsService.getProdEmergencyResponseIntervals(id); + return success(BeanUtils.toBean(prodEmergencyResponseIntervals, ProdEmergencyResponseIntervalsRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得紧急响应时间区间设置分页") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response-intervals:query')") + public CommonResult> getProdEmergencyResponseIntervalsPage(@Valid ProdEmergencyResponseIntervalsPageReqVO pageReqVO) { + PageResult pageResult = prodEmergencyResponseIntervalsService.getProdEmergencyResponseIntervalsPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdEmergencyResponseIntervalsRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出紧急响应时间区间设置 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-emergency-response-intervals:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdEmergencyResponseIntervalsExcel(@Valid ProdEmergencyResponseIntervalsPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodEmergencyResponseIntervalsService.getProdEmergencyResponseIntervalsPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "紧急响应时间区间设置.xls", "数据", ProdEmergencyResponseIntervalsRespVO.class, + BeanUtils.toBean(list, ProdEmergencyResponseIntervalsRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdPropController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdPropController.java new file mode 100644 index 0000000..f9a4924 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdPropController.java @@ -0,0 +1,121 @@ +package com.tashow.cloud.product.controller.admin; + +import cn.hutool.core.util.StrUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.product.service.ProdPropService; +import com.tashow.cloud.product.service.ProdPropValueService; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropRespVO; +import com.tashow.cloud.productapi.enums.ProdPropRule; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.validation.Valid; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 商品属性") +@RestController +@RequestMapping("/tz/prod-prop") +@Validated +public class ProdPropController { + + @Resource + private ProdPropService prodPropService; + @Resource + private ProdPropValueService prodPropValueService; + + /* @PostMapping("/create") + @Operation(summary = "创建商品属性") + @PreAuthorize("@ss.hasPermission('tz:prod-prop:create')") + public CommonResult createProdProp(@Valid @RequestBody ProdPropSaveReqVO createReqVO) { + prodPropService.saveProdPropAndValues(createReqVO); + return success(true); + }*/ + + + @GetMapping("/getProdPropList") + @Operation(summary = "获得商品属性列表") + public CommonResult> getProdPropList(@Valid ProdPropRespVO pageReqVO) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + // 处理规格名称模糊查询 + if (StrUtil.isNotBlank(pageReqVO.getPropName())) { + wrapper.like(ProdPropDO::getPropName, pageReqVO.getPropName()); + } + wrapper.eq(ProdPropDO::getRule, ProdPropRule.SPEC.value()); + //TODO 获取当前登录用户 + wrapper.eq(ProdPropDO::getShopId, 1L); + /*// 获取当前登录用户 + Long userId = SecurityUtils.getUserId(); + SysUser sysUser = sysUserService.selectUserById(userId); + + if (sysUser.getShopId() != 100) { + wrapper.eq(ProdProp::getShopId, sysUser.getShopId()); + }*/ + List list = prodPropService.list(wrapper); + list.forEach(prop -> { + List values = prodPropValueService.list( + new LambdaQueryWrapper() + .eq(ProdPropValueDO::getPropId, prop.getPropId()) + ); + prop.setProdPropValues(values); + }); + return success(list); + } + +/* @PutMapping("/update") + @Operation(summary = "更新商品属性") + @PreAuthorize("@ss.hasPermission('tz:prod-prop:update')") + public CommonResult updateProdProp(@Valid @RequestBody ProdPropSaveReqVO updateReqVO) { + prodPropService.updateProdProp(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品属性") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-prop:delete')") + public CommonResult deleteProdProp(@RequestParam("id") Long id) { + prodPropService.deleteProdProp(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品属性") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-prop:query')") + public CommonResult getProdProp(@RequestParam("id") Long id) { + ProdPropDO prodProp = prodPropService.getProdProp(id); + return success(BeanUtils.toBean(prodProp, ProdPropRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品属性分页") + @PreAuthorize("@ss.hasPermission('tz:prod-prop:query')") + public CommonResult> getProdPropPage(@Valid ProdPropPageReqVO pageReqVO) { + PageResult pageResult = prodPropService.getProdPropPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdPropRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品属性 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-prop:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdPropExcel(@Valid ProdPropPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodPropService.getProdPropPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品属性.xls", "数据", ProdPropRespVO.class, + BeanUtils.toBean(list, ProdPropRespVO.class)); + }*/ + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdPropValueController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdPropValueController.java new file mode 100644 index 0000000..cd2e549 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdPropValueController.java @@ -0,0 +1,94 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.product.service.ProdPropValueService; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValuePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValueRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValueSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + + +@Tag(name = "管理后台 - 属性规则") +@RestController +@RequestMapping("/tz/prod-prop-value") +@Validated +public class ProdPropValueController { + + @Resource + private ProdPropValueService prodPropValueService; + + @PostMapping("/create") + @Operation(summary = "创建属性规则") + @PreAuthorize("@ss.hasPermission('tz:prod-prop-value:create')") + public CommonResult createProdPropValue(@Valid @RequestBody ProdPropValueSaveReqVO createReqVO) { + return success(prodPropValueService.createProdPropValue(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新属性规则") + @PreAuthorize("@ss.hasPermission('tz:prod-prop-value:update')") + public CommonResult updateProdPropValue(@Valid @RequestBody ProdPropValueSaveReqVO updateReqVO) { + prodPropValueService.updateProdPropValue(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除属性规则") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-prop-value:delete')") + public CommonResult deleteProdPropValue(@RequestParam("id") Long id) { + prodPropValueService.deleteProdPropValue(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得属性规则") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-prop-value:query')") + public CommonResult getProdPropValue(@RequestParam("id") Long id) { + ProdPropValueDO prodPropValue = prodPropValueService.getProdPropValue(id); + return success(BeanUtils.toBean(prodPropValue, ProdPropValueRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得属性规则分页") + @PreAuthorize("@ss.hasPermission('tz:prod-prop-value:query')") + public CommonResult> getProdPropValuePage(@Valid ProdPropValuePageReqVO pageReqVO) { + PageResult pageResult = prodPropValueService.getProdPropValuePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdPropValueRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出属性规则 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-prop-value:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdPropValueExcel(@Valid ProdPropValuePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodPropValueService.getProdPropValuePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "属性规则.xls", "数据", ProdPropValueRespVO.class, + BeanUtils.toBean(list, ProdPropValueRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdReservationConfigController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdReservationConfigController.java new file mode 100644 index 0000000..99091c6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdReservationConfigController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO; +import com.tashow.cloud.product.service.ProdReservationConfigService; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 商品预约配置") +@RestController +@RequestMapping("/tz/prod-reservation-config") +@Validated +public class ProdReservationConfigController { + + @Resource + private ProdReservationConfigService prodReservationConfigService; + + @PostMapping("/create") + @Operation(summary = "创建商品预约配置") + @PreAuthorize("@ss.hasPermission('tz:prod-reservation-config:create')") + public CommonResult createProdReservationConfig(@Valid @RequestBody ProdReservationConfigSaveReqVO createReqVO) { + return success(prodReservationConfigService.createProdReservationConfig(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新商品预约配置") + @PreAuthorize("@ss.hasPermission('tz:prod-reservation-config:update')") + public CommonResult updateProdReservationConfig(@Valid @RequestBody ProdReservationConfigSaveReqVO updateReqVO) { + prodReservationConfigService.updateProdReservationConfig(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品预约配置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-reservation-config:delete')") + public CommonResult deleteProdReservationConfig(@RequestParam("id") Long id) { + prodReservationConfigService.deleteProdReservationConfig(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品预约配置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-reservation-config:query')") + public CommonResult getProdReservationConfig(@RequestParam("id") Long id) { + ProdReservationConfigDO prodReservationConfig = prodReservationConfigService.getProdReservationConfig(id); + return success(BeanUtils.toBean(prodReservationConfig, ProdReservationConfigRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品预约配置分页") + @PreAuthorize("@ss.hasPermission('tz:prod-reservation-config:query')") + public CommonResult> getProdReservationConfigPage(@Valid ProdReservationConfigPageReqVO pageReqVO) { + PageResult pageResult = prodReservationConfigService.getProdReservationConfigPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdReservationConfigRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品预约配置 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-reservation-config:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdReservationConfigExcel(@Valid ProdReservationConfigPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodReservationConfigService.getProdReservationConfigPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品预约配置.xls", "数据", ProdReservationConfigRespVO.class, + BeanUtils.toBean(list, ProdReservationConfigRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceAreaRelevanceController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceAreaRelevanceController.java new file mode 100644 index 0000000..880eb54 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceAreaRelevanceController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreaRelevanceDO; +import com.tashow.cloud.product.service.ProdServiceAreaRelevanceService; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevancePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevanceRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevanceSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 商品与服务区域关联") +@RestController +@RequestMapping("/tz/prod-service-area-relevance") +@Validated +public class ProdServiceAreaRelevanceController { + + @Resource + private ProdServiceAreaRelevanceService prodServiceAreaRelevanceService; + + @PostMapping("/create") + @Operation(summary = "创建商品与服务区域关联") + @PreAuthorize("@ss.hasPermission('tz:prod-service-area-relevance:create')") + public CommonResult createProdServiceAreaRelevance(@Valid @RequestBody ProdServiceAreaRelevanceSaveReqVO createReqVO) { + return success(prodServiceAreaRelevanceService.createProdServiceAreaRelevance(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新商品与服务区域关联") + @PreAuthorize("@ss.hasPermission('tz:prod-service-area-relevance:update')") + public CommonResult updateProdServiceAreaRelevance(@Valid @RequestBody ProdServiceAreaRelevanceSaveReqVO updateReqVO) { + prodServiceAreaRelevanceService.updateProdServiceAreaRelevance(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品与服务区域关联") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-service-area-relevance:delete')") + public CommonResult deleteProdServiceAreaRelevance(@RequestParam("id") Long id) { + prodServiceAreaRelevanceService.deleteProdServiceAreaRelevance(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品与服务区域关联") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-service-area-relevance:query')") + public CommonResult getProdServiceAreaRelevance(@RequestParam("id") Long id) { + ProdServiceAreaRelevanceDO prodServiceAreaRelevance = prodServiceAreaRelevanceService.getProdServiceAreaRelevance(id); + return success(BeanUtils.toBean(prodServiceAreaRelevance, ProdServiceAreaRelevanceRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品与服务区域关联分页") + @PreAuthorize("@ss.hasPermission('tz:prod-service-area-relevance:query')") + public CommonResult> getProdServiceAreaRelevancePage(@Valid ProdServiceAreaRelevancePageReqVO pageReqVO) { + PageResult pageResult = prodServiceAreaRelevanceService.getProdServiceAreaRelevancePage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdServiceAreaRelevanceRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品与服务区域关联 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-service-area-relevance:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdServiceAreaRelevanceExcel(@Valid ProdServiceAreaRelevancePageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodServiceAreaRelevanceService.getProdServiceAreaRelevancePage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品与服务区域关联.xls", "数据", ProdServiceAreaRelevanceRespVO.class, + BeanUtils.toBean(list, ProdServiceAreaRelevanceRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceAreasController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceAreasController.java new file mode 100644 index 0000000..ba61dd9 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceAreasController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreasDO; +import com.tashow.cloud.product.service.ProdServiceAreasService; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 服务区域") +@RestController +@RequestMapping("/tz/prod-service-areas") +@Validated +public class ProdServiceAreasController { + + @Resource + private ProdServiceAreasService prodServiceAreasService; + + @PostMapping("/create") + @Operation(summary = "创建服务区域") + @PreAuthorize("@ss.hasPermission('tz:prod-service-areas:create')") + public CommonResult createProdServiceAreas(@Valid @RequestBody ProdServiceAreasSaveReqVO createReqVO) { + return success(prodServiceAreasService.createProdServiceAreas(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新服务区域") + @PreAuthorize("@ss.hasPermission('tz:prod-service-areas:update')") + public CommonResult updateProdServiceAreas(@Valid @RequestBody ProdServiceAreasSaveReqVO updateReqVO) { + prodServiceAreasService.updateProdServiceAreas(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除服务区域") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-service-areas:delete')") + public CommonResult deleteProdServiceAreas(@RequestParam("id") Long id) { + prodServiceAreasService.deleteProdServiceAreas(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得服务区域") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-service-areas:query')") + public CommonResult getProdServiceAreas(@RequestParam("id") Long id) { + ProdServiceAreasDO prodServiceAreas = prodServiceAreasService.getProdServiceAreas(id); + return success(BeanUtils.toBean(prodServiceAreas, ProdServiceAreasRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得服务区域分页") + @PreAuthorize("@ss.hasPermission('tz:prod-service-areas:query')") + public CommonResult> getProdServiceAreasPage(@Valid ProdServiceAreasPageReqVO pageReqVO) { + PageResult pageResult = prodServiceAreasService.getProdServiceAreasPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdServiceAreasRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出服务区域 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-service-areas:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdServiceAreasExcel(@Valid ProdServiceAreasPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodServiceAreasService.getProdServiceAreasPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "服务区域.xls", "数据", ProdServiceAreasRespVO.class, + BeanUtils.toBean(list, ProdServiceAreasRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceOverAreaRulesController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceOverAreaRulesController.java new file mode 100644 index 0000000..11ff7de --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdServiceOverAreaRulesController.java @@ -0,0 +1,94 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceOverAreaRulesDO; +import com.tashow.cloud.product.service.ProdServiceOverAreaRulesService; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + + +@Tag(name = "管理后台 - 超区规则") +@RestController +@RequestMapping("/tz/prod-service-over-area-rules") +@Validated +public class ProdServiceOverAreaRulesController { + + @Resource + private ProdServiceOverAreaRulesService prodServiceOverAreaRulesService; + + @PostMapping("/create") + @Operation(summary = "创建超区规则") + @PreAuthorize("@ss.hasPermission('tz:prod-service-over-area-rules:create')") + public CommonResult createProdServiceOverAreaRules(@Valid @RequestBody ProdServiceOverAreaRulesSaveReqVO createReqVO) { + return success(prodServiceOverAreaRulesService.createProdServiceOverAreaRules(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新超区规则") + @PreAuthorize("@ss.hasPermission('tz:prod-service-over-area-rules:update')") + public CommonResult updateProdServiceOverAreaRules(@Valid @RequestBody ProdServiceOverAreaRulesSaveReqVO updateReqVO) { + prodServiceOverAreaRulesService.updateProdServiceOverAreaRules(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除超区规则") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-service-over-area-rules:delete')") + public CommonResult deleteProdServiceOverAreaRules(@RequestParam("id") Long id) { + prodServiceOverAreaRulesService.deleteProdServiceOverAreaRules(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得超区规则") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-service-over-area-rules:query')") + public CommonResult getProdServiceOverAreaRules(@RequestParam("id") Long id) { + ProdServiceOverAreaRulesDO prodServiceOverAreaRules = prodServiceOverAreaRulesService.getProdServiceOverAreaRules(id); + return success(BeanUtils.toBean(prodServiceOverAreaRules, ProdServiceOverAreaRulesRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得超区规则分页") + @PreAuthorize("@ss.hasPermission('tz:prod-service-over-area-rules:query')") + public CommonResult> getProdServiceOverAreaRulesPage(@Valid ProdServiceOverAreaRulesPageReqVO pageReqVO) { + PageResult pageResult = prodServiceOverAreaRulesService.getProdServiceOverAreaRulesPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdServiceOverAreaRulesRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出超区规则 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-service-over-area-rules:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdServiceOverAreaRulesExcel(@Valid ProdServiceOverAreaRulesPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodServiceOverAreaRulesService.getProdServiceOverAreaRulesPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "超区规则.xls", "数据", ProdServiceOverAreaRulesRespVO.class, + BeanUtils.toBean(list, ProdServiceOverAreaRulesRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdTagsController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdTagsController.java new file mode 100644 index 0000000..e0e1d06 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdTagsController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdTagsDO; +import com.tashow.cloud.product.service.ProdTagsService; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 商品和标签管理") +@RestController +@RequestMapping("/tz/prod-tags") +@Validated +public class ProdTagsController { + + @Resource + private ProdTagsService prodTagsService; + + @PostMapping("/create") + @Operation(summary = "创建商品和标签管理") + @PreAuthorize("@ss.hasPermission('tz:prod-tags:create')") + public CommonResult createProdTags(@Valid @RequestBody ProdTagsSaveReqVO createReqVO) { + return success(prodTagsService.createProdTags(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新商品和标签管理") + @PreAuthorize("@ss.hasPermission('tz:prod-tags:update')") + public CommonResult updateProdTags(@Valid @RequestBody ProdTagsSaveReqVO updateReqVO) { + prodTagsService.updateProdTags(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品和标签管理") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-tags:delete')") + public CommonResult deleteProdTags(@RequestParam("id") Long id) { + prodTagsService.deleteProdTags(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品和标签管理") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-tags:query')") + public CommonResult getProdTags(@RequestParam("id") Long id) { + ProdTagsDO prodTags = prodTagsService.getProdTags(id); + return success(BeanUtils.toBean(prodTags, ProdTagsRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品和标签管理分页") + @PreAuthorize("@ss.hasPermission('tz:prod-tags:query')") + public CommonResult> getProdTagsPage(@Valid ProdTagsPageReqVO pageReqVO) { + PageResult pageResult = prodTagsService.getProdTagsPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdTagsRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品和标签管理 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-tags:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdTagsExcel(@Valid ProdTagsPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodTagsService.getProdTagsPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品和标签管理.xls", "数据", ProdTagsRespVO.class, + BeanUtils.toBean(list, ProdTagsRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdWeightRangePricesController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdWeightRangePricesController.java new file mode 100644 index 0000000..a3e91f5 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProdWeightRangePricesController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO; +import com.tashow.cloud.product.service.ProdWeightRangePricesService; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesRespVO; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 体重区间价格") +@RestController +@RequestMapping("/tz/prod-weight-range-prices") +@Validated +public class ProdWeightRangePricesController { + + @Resource + private ProdWeightRangePricesService prodWeightRangePricesService; + + @PostMapping("/create") + @Operation(summary = "创建体重区间价格") + @PreAuthorize("@ss.hasPermission('tz:prod-weight-range-prices:create')") + public CommonResult createProdWeightRangePrices(@Valid @RequestBody ProdWeightRangePricesSaveReqVO createReqVO) { + return success(prodWeightRangePricesService.createProdWeightRangePrices(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新体重区间价格") + @PreAuthorize("@ss.hasPermission('tz:prod-weight-range-prices:update')") + public CommonResult updateProdWeightRangePrices(@Valid @RequestBody ProdWeightRangePricesSaveReqVO updateReqVO) { + prodWeightRangePricesService.updateProdWeightRangePrices(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除体重区间价格") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:prod-weight-range-prices:delete')") + public CommonResult deleteProdWeightRangePrices(@RequestParam("id") Long id) { + prodWeightRangePricesService.deleteProdWeightRangePrices(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得体重区间价格") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:prod-weight-range-prices:query')") + public CommonResult getProdWeightRangePrices(@RequestParam("id") Long id) { + ProdWeightRangePricesDO prodWeightRangePrices = prodWeightRangePricesService.getProdWeightRangePrices(id); + return success(BeanUtils.toBean(prodWeightRangePrices, ProdWeightRangePricesRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得体重区间价格分页") + @PreAuthorize("@ss.hasPermission('tz:prod-weight-range-prices:query')") + public CommonResult> getProdWeightRangePricesPage(@Valid ProdWeightRangePricesPageReqVO pageReqVO) { + PageResult pageResult = prodWeightRangePricesService.getProdWeightRangePricesPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProdWeightRangePricesRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出体重区间价格 Excel") + @PreAuthorize("@ss.hasPermission('tz:prod-weight-range-prices:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProdWeightRangePricesExcel(@Valid ProdWeightRangePricesPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = prodWeightRangePricesService.getProdWeightRangePricesPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "体重区间价格.xls", "数据", ProdWeightRangePricesRespVO.class, + BeanUtils.toBean(list, ProdWeightRangePricesRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProductOrderLimitController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProductOrderLimitController.java new file mode 100644 index 0000000..00d8b9e --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ProductOrderLimitController.java @@ -0,0 +1,94 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ProductOrderLimitDO; +import com.tashow.cloud.product.service.ProductOrderLimitService; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitRespVO; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + + +@Tag(name = "管理后台 - 商品接单上限设置") +@RestController +@RequestMapping("/tz/product-order-limit") +@Validated +public class ProductOrderLimitController { + + @Resource + private ProductOrderLimitService productOrderLimitService; + + @PostMapping("/create") + @Operation(summary = "创建商品接单上限设置") + @PreAuthorize("@ss.hasPermission('tz:product-order-limit:create')") + public CommonResult createProductOrderLimit(@Valid @RequestBody ProductOrderLimitSaveReqVO createReqVO) { + return success(productOrderLimitService.createProductOrderLimit(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新商品接单上限设置") + @PreAuthorize("@ss.hasPermission('tz:product-order-limit:update')") + public CommonResult updateProductOrderLimit(@Valid @RequestBody ProductOrderLimitSaveReqVO updateReqVO) { + productOrderLimitService.updateProductOrderLimit(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品接单上限设置") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:product-order-limit:delete')") + public CommonResult deleteProductOrderLimit(@RequestParam("id") Long id) { + productOrderLimitService.deleteProductOrderLimit(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品接单上限设置") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:product-order-limit:query')") + public CommonResult getProductOrderLimit(@RequestParam("id") Long id) { + ProductOrderLimitDO productOrderLimit = productOrderLimitService.getProductOrderLimit(id); + return success(BeanUtils.toBean(productOrderLimit, ProductOrderLimitRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品接单上限设置分页") + @PreAuthorize("@ss.hasPermission('tz:product-order-limit:query')") + public CommonResult> getProductOrderLimitPage(@Valid ProductOrderLimitPageReqVO pageReqVO) { + PageResult pageResult = productOrderLimitService.getProductOrderLimitPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ProductOrderLimitRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品接单上限设置 Excel") + @PreAuthorize("@ss.hasPermission('tz:product-order-limit:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportProductOrderLimitExcel(@Valid ProductOrderLimitPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = productOrderLimitService.getProductOrderLimitPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品接单上限设置.xls", "数据", ProductOrderLimitRespVO.class, + BeanUtils.toBean(list, ProductOrderLimitRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ShopDetailController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ShopDetailController.java new file mode 100644 index 0000000..4f9c6ad --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/ShopDetailController.java @@ -0,0 +1,96 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.ShopDetailDO; +import com.tashow.cloud.product.service.ShopDetailService; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailRespVO; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 店铺信息") +@RestController +@RequestMapping("/tz/shop-detail") +@Validated +public class ShopDetailController { + + @Resource + private ShopDetailService shopDetailService; + + @PostMapping("/create") + @Operation(summary = "创建店铺信息") + @PreAuthorize("@ss.hasPermission('tz:shop-detail:create')") + public CommonResult createShopDetail(@Valid @RequestBody ShopDetailSaveReqVO createReqVO) { + return success(shopDetailService.createShopDetail(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新店铺信息") + @PreAuthorize("@ss.hasPermission('tz:shop-detail:update')") + public CommonResult updateShopDetail(@Valid @RequestBody ShopDetailSaveReqVO updateReqVO) { + shopDetailService.updateShopDetail(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除店铺信息") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:shop-detail:delete')") + public CommonResult deleteShopDetail(@RequestParam("id") Long id) { + shopDetailService.deleteShopDetail(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得店铺信息") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:shop-detail:query')") + public CommonResult getShopDetail(@RequestParam("id") Long id) { + ShopDetailDO shopDetail = shopDetailService.getShopDetail(id); + return success(BeanUtils.toBean(shopDetail, ShopDetailRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得店铺信息分页") + @PreAuthorize("@ss.hasPermission('tz:shop-detail:query')") + public CommonResult> getShopDetailPage(@Valid ShopDetailPageReqVO pageReqVO) { + PageResult pageResult = shopDetailService.getShopDetailPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, ShopDetailRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出店铺信息 Excel") + @PreAuthorize("@ss.hasPermission('tz:shop-detail:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportShopDetailExcel(@Valid ShopDetailPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = shopDetailService.getShopDetailPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "店铺信息.xls", "数据", ShopDetailRespVO.class, + BeanUtils.toBean(list, ShopDetailRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuController.java new file mode 100644 index 0000000..9f8194f --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuController.java @@ -0,0 +1,314 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.product.mapper.ProdPropMapper; +import com.tashow.cloud.product.mapper.ProdPropValueMapper; +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.product.mapper.SkuMapper; +import com.tashow.cloud.product.service.ProdExtendService; +import com.tashow.cloud.product.service.ProdPropService; +import com.tashow.cloud.product.service.ProdPropValueService; +import com.tashow.cloud.product.service.SkuService; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO; +import com.tashow.cloud.productapi.api.product.vo.sku.*; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; +import jakarta.validation.Valid; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.Date; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; + +@Tag(name = "管理后台 - 单品SKU") +@RestController +@RequestMapping("/product/sku") +@Validated +public class SkuController { + + @Resource + private SkuService skuService; + + @Resource + private ProdPropService prodPropService; + @Resource + private ProdPropValueService prodPropValueService; + + @Resource + private ProdExtendService prodExtendService; + + + @Resource + private ProdPropValueMapper prodPropValueMapper; + @Resource + private ProdPropMapper prodPropMapper; + + @Resource + private SkuMapper skuMapper; + +/* @PostMapping("/create") + @Operation(summary = "创建单品SKU") + @PreAuthorize("@ss.hasPermission('tz:sku:create')") + public CommonResult createSku(@Valid @RequestBody SkuSaveReqVO createReqVO) { + return success(skuService.createSku(createReqVO)); + }*/ + + @PutMapping("/update") + @Operation(summary = "更新单品SKU") + @PermitAll + public CommonResult updateSku(@RequestBody SkuSaveReqVO updateReqVO) { + skuService.updateSku(updateReqVO); + return success(true); + } + + + @PutMapping("/updateProp") + @Operation(summary = "新增统一保存sku规格") + @PermitAll + public CommonResult updateProp(@Valid @RequestBody SkuPropVO skuPropVO) { + skuService.updateProp(skuPropVO); + return success(true); + } + + @PutMapping("/updatePropValue") + @Operation(summary = "修改属性下面规格值") + @PermitAll + public CommonResult updatePropValue(@RequestParam("id") Long id,@RequestParam("propValue") String propValue) { + skuService.updatePropVal(id,propValue); + return success(true); + } + + @PutMapping("/updateProdProp") + @Operation(summary = "修改属性规格值") + @PermitAll + public CommonResult updateProdProp(@RequestParam("id") Long id,@RequestParam("propName") String propName) { + ProdPropDO prodPropDO = new ProdPropDO(); + prodPropDO.setId( id); + prodPropDO.setPropName(propName); + prodPropMapper.updateById(prodPropDO); + return success(true); + } + + + @GetMapping("/getSKuPropList") + @Operation(summary = "获取sku规格") + @PermitAll + @Parameter(name = "prodId", description = "商品id", required = true) + public CommonResult getSKuPropList(@RequestParam("prodId") Long prodId) { + return success(skuService.getSKuPropList(prodId)); + } + + + @PermitAll + @GetMapping("/getPropRecycleBinList") + @Operation(summary = "获取规格回收站") + public CommonResult> getSKuPropRecycleBinList(ProPageReqVO proPageReqVO) { + PageResult pageResult = skuService.getSKuPropRecycleBinList(proPageReqVO); + return success(pageResult); + } + + @PostMapping("/restorePropList") + @Operation(summary = "恢复规格") + @Parameter(name = "ids", description = "规格id集合", required = true) + @PermitAll + public CommonResult restorePropList(@RequestParam("ids") List ids) { + skuService.restorePropList(ids); + return success(true); + } + + + @PutMapping("/deleteProp") + @Operation(summary = "删除规格值") + @PermitAll + public CommonResult deleteProp(@RequestParam("id") Long id) { + skuService.deleteProp(id); + return success(true); + } + + + @PutMapping("/disableProp") + @Operation(summary = "禁用或者启用规格值") + @Parameter(name = "id", description = "规格id") + @Parameter(name = "state", description = "状态0禁用1启用") + @PermitAll + public CommonResult disableProp(@RequestParam("id") Long id,@RequestParam("state") Integer state) { + skuService.disableProp(id,state); + return success(true); + } + + + @DeleteMapping("/delete") + @Operation(summary = "删除单品SKU") + @Parameter(name = "id", description = "编号", required = true) + @PermitAll + public CommonResult deleteSku(@RequestParam("id") Long id) { + skuService.deleteSku(id); + return success(true); + } + + @DeleteMapping("/deleteSkuList") + @Operation(summary = "批量删除SKU") + @Parameter(name = "ids", description = "编号", required = true) + @PermitAll + public CommonResult deleteSkuList(@RequestParam("ids") List ids) { + skuService.deleteSkus(ids); + return success(true); + } + + + @PutMapping("/updateSkuShelf") + @Operation(summary = "修改单品上下架") + @Parameter(name = "id", description = "编号", required = true) + @Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true) + @PermitAll + public CommonResult updateSkuShelf(@RequestParam("id") Long id,@RequestParam("isShelf") Integer isShelf) { + skuService.updatSkuIsShelf(id,isShelf); + return success(true); + } + + @PutMapping("/updateSkuShelfList") + @Operation(summary = "批量上下架") + @Parameter(name = "ids", description = "编号", required = true) + @Parameter(name = "isShelf", description = "是否上下架(0下架 1上架)", required = true) + @PermitAll + public CommonResult updateSkuShelfList(@RequestParam("ids") List ids,@RequestParam("isShelf") Integer isShelf) { + for(Long id:ids){ + SkuDO sku = new SkuDO(); + sku.setSkuId(id); + sku.setIsShelf(isShelf); + skuMapper.updateById(sku); + } + skuService.updatSkuIsShelfs(ids,isShelf); + return success(true); + } + + + @GetMapping("/get") + @Operation(summary = "获得单品SKU") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PermitAll + public CommonResult getSku(@RequestParam("id") Long id) { + SkuDO sku = skuService.getSku(id); + return success(BeanUtils.toBean(sku, SkuRespVO.class)); + } + + @PermitAll + @GetMapping("/getSkuRecycleBinPageList") + @Operation(summary = "获得SKU回收站分页列表") + public CommonResult> getSkuRecycleBinPageList(@Valid SkuPageReqVO pageReqVO) { + PageResult pageResult = skuService.getSkuRecycleBinPageList(pageReqVO); + return success(pageResult); + } + + + @PostMapping("/restoreSkuList") + @Operation(summary = "恢复SKU") + @Parameter(name = "ids", description = "skuids", required = true) + @PermitAll + public CommonResult restoreSkuList(@RequestParam("ids") List ids) { + skuService.restoreSkuList(ids); + return success(true); + } + + + + @PermitAll + @GetMapping("/getSkuPageList") + @Operation(summary = "获得SKU分页列表") + public CommonResult> getSkuPageList(@Valid SkuPageReqVO pageReqVO) { + PageResult pageResult = skuService.getSkuPageList(pageReqVO); + return success(pageResult); + } + + + +/* @PermitAll + @GetMapping("/getSkuRecycleBinPageList") + @Operation(summary = "获得SKU回收站分页列表") + public CommonResult> getSkuRecycleBinPageList(@Valid SkuPageReqVO pageReqVO) { + PageResult pageResult = skuService.getSkuRecycleBinPageList(pageReqVO); + return success(pageResult); + }*/ + + + @PostMapping("/createSkuExtend") + @Operation(summary = "创建sku扩展服务配置") + @PermitAll + public CommonResult createSkuExtend(@Valid @RequestBody SkuExtendVO skuExtendVO) { + skuService.createSkuExtend(skuExtendVO); + return success(true); + } + + + @PostMapping("/getSkuExtend") + @Operation(summary = "获取sku扩展服务配置信息") + @Parameter(name = "formId", description = "表单id", required = true, example = "1") + @PermitAll + public CommonResult getSkuExtend(@RequestParam("formId") Integer formId) { + SkuExtendVO skuExtendVO =skuService.getSkuExtend(formId); + return success(skuExtendVO); + } + + + @PostMapping("/updateServiceDetails") + @Operation(summary = "修改扩展服务信息配置(遗体接运扩展服务,遗体清洁配置,追思告别配置,骨灰处理配置......)") + @PermitAll + public CommonResult updateServiceDetails(@RequestBody List skuServiceDetailsList) { + skuService.updateServiceDetails(skuServiceDetailsList); + return success(true); + } + + @PostMapping("/updateMaterial") + @Operation(summary = "修物料配置") + @PermitAll + public CommonResult updateMaterial(@RequestBody List skuServiceMaterialList) { + skuService.updateMaterial(skuServiceMaterialList); + return success(true); + } + + @PostMapping("/updateTransportAdress") + @Operation(summary = "修改接运地址配置") + @PermitAll + public CommonResult updateTransportAdress(@RequestBody List skuServiceTransportDOList) { + skuService.updateTransportAdress(skuServiceTransportDOList); + return success(true); + } + + @PostMapping("/updateDeliver") + @Operation(summary = "修改配送方式") + @PermitAll + public CommonResult updateDeliver(@RequestBody List skuServiceDeliverList) { + skuService.updateDeliver(skuServiceDeliverList); + return success(true); + } + + + /* @GetMapping("/page") + @Operation(summary = "获得单品SKU分页") + public CommonResult> getSkuPage(@Valid SkuPageReqVO pageReqVO) { + PageResult pageResult = skuService.getSkuPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SkuRespVO.class)); + }*/ +/* + @GetMapping("/export-excel") + @Operation(summary = "导出单品SKU Excel") + @PreAuthorize("@ss.hasPermission('tz:sku:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSkuExcel(@Valid SkuPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = skuService.getSkuPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "单品SKU.xls", "数据", SkuRespVO.class, + BeanUtils.toBean(list, SkuRespVO.class)); + }*/ + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceDeliverController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceDeliverController.java new file mode 100644 index 0000000..43480a7 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceDeliverController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDeliverDO; +import com.tashow.cloud.product.service.SkuServiceDeliverService; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverRespVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 服务交付方式") +@RestController +@RequestMapping("/tz/sku-service-deliver") +@Validated +public class SkuServiceDeliverController { + + @Resource + private SkuServiceDeliverService skuServiceDeliverService; + + @PostMapping("/create") + @Operation(summary = "创建服务交付方式") + @PreAuthorize("@ss.hasPermission('tz:sku-service-deliver:create')") + public CommonResult createSkuServiceDeliver(@Valid @RequestBody SkuServiceDeliverSaveReqVO createReqVO) { + return success(skuServiceDeliverService.createSkuServiceDeliver(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新服务交付方式") + @PreAuthorize("@ss.hasPermission('tz:sku-service-deliver:update')") + public CommonResult updateSkuServiceDeliver(@Valid @RequestBody SkuServiceDeliverSaveReqVO updateReqVO) { + skuServiceDeliverService.updateSkuServiceDeliver(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除服务交付方式") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:sku-service-deliver:delete')") + public CommonResult deleteSkuServiceDeliver(@RequestParam("id") Long id) { + skuServiceDeliverService.deleteSkuServiceDeliver(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得服务交付方式") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:sku-service-deliver:query')") + public CommonResult getSkuServiceDeliver(@RequestParam("id") Long id) { + SkuServiceDeliverDO skuServiceDeliver = skuServiceDeliverService.getSkuServiceDeliver(id); + return success(BeanUtils.toBean(skuServiceDeliver, SkuServiceDeliverRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得服务交付方式分页") + @PreAuthorize("@ss.hasPermission('tz:sku-service-deliver:query')") + public CommonResult> getSkuServiceDeliverPage(@Valid SkuServiceDeliverPageReqVO pageReqVO) { + PageResult pageResult = skuServiceDeliverService.getSkuServiceDeliverPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SkuServiceDeliverRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出服务交付方式 Excel") + @PreAuthorize("@ss.hasPermission('tz:sku-service-deliver:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSkuServiceDeliverExcel(@Valid SkuServiceDeliverPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = skuServiceDeliverService.getSkuServiceDeliverPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "服务交付方式.xls", "数据", SkuServiceDeliverRespVO.class, + BeanUtils.toBean(list, SkuServiceDeliverRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceDetailsController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceDetailsController.java new file mode 100644 index 0000000..9de48e6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceDetailsController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDetailsDO; +import com.tashow.cloud.product.service.SkuServiceDetailsService; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsRespVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 服务详情") +@RestController +@RequestMapping("/tz/sku-service-details") +@Validated +public class SkuServiceDetailsController { + + @Resource + private SkuServiceDetailsService skuServiceDetailsService; + + @PostMapping("/create") + @Operation(summary = "创建服务详情") + @PreAuthorize("@ss.hasPermission('tz:sku-service-details:create')") + public CommonResult createSkuServiceDetails(@Valid @RequestBody SkuServiceDetailsSaveReqVO createReqVO) { + return success(skuServiceDetailsService.createSkuServiceDetails(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新服务详情") + @PreAuthorize("@ss.hasPermission('tz:sku-service-details:update')") + public CommonResult updateSkuServiceDetails(@Valid @RequestBody SkuServiceDetailsSaveReqVO updateReqVO) { + skuServiceDetailsService.updateSkuServiceDetails(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除服务详情") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:sku-service-details:delete')") + public CommonResult deleteSkuServiceDetails(@RequestParam("id") Long id) { + skuServiceDetailsService.deleteSkuServiceDetails(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得服务详情") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:sku-service-details:query')") + public CommonResult getSkuServiceDetails(@RequestParam("id") Long id) { + SkuServiceDetailsDO skuServiceDetails = skuServiceDetailsService.getSkuServiceDetails(id); + return success(BeanUtils.toBean(skuServiceDetails, SkuServiceDetailsRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得服务详情分页") + @PreAuthorize("@ss.hasPermission('tz:sku-service-details:query')") + public CommonResult> getSkuServiceDetailsPage(@Valid SkuServiceDetailsPageReqVO pageReqVO) { + PageResult pageResult = skuServiceDetailsService.getSkuServiceDetailsPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SkuServiceDetailsRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出服务详情 Excel") + @PreAuthorize("@ss.hasPermission('tz:sku-service-details:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSkuServiceDetailsExcel(@Valid SkuServiceDetailsPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = skuServiceDetailsService.getSkuServiceDetailsPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "服务详情.xls", "数据", SkuServiceDetailsRespVO.class, + BeanUtils.toBean(list, SkuServiceDetailsRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceMaterialController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceMaterialController.java new file mode 100644 index 0000000..055e2c8 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceMaterialController.java @@ -0,0 +1,94 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceMaterialDO; +import com.tashow.cloud.product.service.SkuServiceMaterialService; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialRespVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + + +@Tag(name = "管理后台 - 服务物料详情") +@RestController +@RequestMapping("/tz/sku-service-material") +@Validated +public class SkuServiceMaterialController { + + @Resource + private SkuServiceMaterialService skuServiceMaterialService; + + @PostMapping("/create") + @Operation(summary = "创建服务物料详情") + @PreAuthorize("@ss.hasPermission('tz:sku-service-material:create')") + public CommonResult createSkuServiceMaterial(@Valid @RequestBody SkuServiceMaterialSaveReqVO createReqVO) { + return success(skuServiceMaterialService.createSkuServiceMaterial(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新服务物料详情") + @PreAuthorize("@ss.hasPermission('tz:sku-service-material:update')") + public CommonResult updateSkuServiceMaterial(@Valid @RequestBody SkuServiceMaterialSaveReqVO updateReqVO) { + skuServiceMaterialService.updateSkuServiceMaterial(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除服务物料详情") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:sku-service-material:delete')") + public CommonResult deleteSkuServiceMaterial(@RequestParam("id") Long id) { + skuServiceMaterialService.deleteSkuServiceMaterial(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得服务物料详情") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:sku-service-material:query')") + public CommonResult getSkuServiceMaterial(@RequestParam("id") Long id) { + SkuServiceMaterialDO skuServiceMaterial = skuServiceMaterialService.getSkuServiceMaterial(id); + return success(BeanUtils.toBean(skuServiceMaterial, SkuServiceMaterialRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得服务物料详情分页") + @PreAuthorize("@ss.hasPermission('tz:sku-service-material:query')") + public CommonResult> getSkuServiceMaterialPage(@Valid SkuServiceMaterialPageReqVO pageReqVO) { + PageResult pageResult = skuServiceMaterialService.getSkuServiceMaterialPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SkuServiceMaterialRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出服务物料详情 Excel") + @PreAuthorize("@ss.hasPermission('tz:sku-service-material:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSkuServiceMaterialExcel(@Valid SkuServiceMaterialPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = skuServiceMaterialService.getSkuServiceMaterialPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "服务物料详情.xls", "数据", SkuServiceMaterialRespVO.class, + BeanUtils.toBean(list, SkuServiceMaterialRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceTransportController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceTransportController.java new file mode 100644 index 0000000..5c818b5 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServiceTransportController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceTransportDO; +import com.tashow.cloud.product.service.SkuServiceTransportService; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportRespVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 服务遗体运输") +@RestController +@RequestMapping("/tz/sku-service-transport") +@Validated +public class SkuServiceTransportController { + + @Resource + private SkuServiceTransportService skuServiceTransportService; + + @PostMapping("/create") + @Operation(summary = "创建服务遗体运输") + @PreAuthorize("@ss.hasPermission('tz:sku-service-transport:create')") + public CommonResult createSkuServiceTransport(@Valid @RequestBody SkuServiceTransportSaveReqVO createReqVO) { + return success(skuServiceTransportService.createSkuServiceTransport(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新服务遗体运输") + @PreAuthorize("@ss.hasPermission('tz:sku-service-transport:update')") + public CommonResult updateSkuServiceTransport(@Valid @RequestBody SkuServiceTransportSaveReqVO updateReqVO) { + skuServiceTransportService.updateSkuServiceTransport(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除服务遗体运输") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:sku-service-transport:delete')") + public CommonResult deleteSkuServiceTransport(@RequestParam("id") Long id) { + skuServiceTransportService.deleteSkuServiceTransport(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得服务遗体运输") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:sku-service-transport:query')") + public CommonResult getSkuServiceTransport(@RequestParam("id") Long id) { + SkuServiceTransportDO skuServiceTransport = skuServiceTransportService.getSkuServiceTransport(id); + return success(BeanUtils.toBean(skuServiceTransport, SkuServiceTransportRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得服务遗体运输分页") + @PreAuthorize("@ss.hasPermission('tz:sku-service-transport:query')") + public CommonResult> getSkuServiceTransportPage(@Valid SkuServiceTransportPageReqVO pageReqVO) { + PageResult pageResult = skuServiceTransportService.getSkuServiceTransportPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SkuServiceTransportRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出服务遗体运输 Excel") + @PreAuthorize("@ss.hasPermission('tz:sku-service-transport:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSkuServiceTransportExcel(@Valid SkuServiceTransportPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = skuServiceTransportService.getSkuServiceTransportPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "服务遗体运输.xls", "数据", SkuServiceTransportRespVO.class, + BeanUtils.toBean(list, SkuServiceTransportRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServicesFormController.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServicesFormController.java new file mode 100644 index 0000000..0459b16 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/controller/admin/SkuServicesFormController.java @@ -0,0 +1,93 @@ +package com.tashow.cloud.product.controller.admin; + +import com.tashow.cloud.common.pojo.CommonResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.util.object.BeanUtils; +import com.tashow.cloud.excel.excel.core.util.ExcelUtils; +import com.tashow.cloud.productapi.api.product.dto.SkuServicesFormDO; +import com.tashow.cloud.product.service.SkuServicesFormService; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormRespVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormSaveReqVO; +import com.tashow.cloud.web.apilog.core.annotation.ApiAccessLog; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.annotation.Resource; +import jakarta.servlet.http.HttpServletResponse; +import jakarta.validation.Valid; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.io.IOException; +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; +import static com.tashow.cloud.web.apilog.core.enums.OperateTypeEnum.EXPORT; + +@Tag(name = "管理后台 - 商品SKU扩展服务表单") +@RestController +@RequestMapping("/tz/sku-services-form") +@Validated +public class SkuServicesFormController { + + @Resource + private SkuServicesFormService skuServicesFormService; + + @PostMapping("/create") + @Operation(summary = "创建商品SKU扩展服务表单") + @PreAuthorize("@ss.hasPermission('tz:sku-services-form:create')") + public CommonResult createSkuServicesForm(@Valid @RequestBody SkuServicesFormSaveReqVO createReqVO) { + return success(skuServicesFormService.createSkuServicesForm(createReqVO)); + } + + @PutMapping("/update") + @Operation(summary = "更新商品SKU扩展服务表单") + @PreAuthorize("@ss.hasPermission('tz:sku-services-form:update')") + public CommonResult updateSkuServicesForm(@Valid @RequestBody SkuServicesFormSaveReqVO updateReqVO) { + skuServicesFormService.updateSkuServicesForm(updateReqVO); + return success(true); + } + + @DeleteMapping("/delete") + @Operation(summary = "删除商品SKU扩展服务表单") + @Parameter(name = "id", description = "编号", required = true) + @PreAuthorize("@ss.hasPermission('tz:sku-services-form:delete')") + public CommonResult deleteSkuServicesForm(@RequestParam("id") Long id) { + skuServicesFormService.deleteSkuServicesForm(id); + return success(true); + } + + @GetMapping("/get") + @Operation(summary = "获得商品SKU扩展服务表单") + @Parameter(name = "id", description = "编号", required = true, example = "1024") + @PreAuthorize("@ss.hasPermission('tz:sku-services-form:query')") + public CommonResult getSkuServicesForm(@RequestParam("id") Long id) { + SkuServicesFormDO skuServicesForm = skuServicesFormService.getSkuServicesForm(id); + return success(BeanUtils.toBean(skuServicesForm, SkuServicesFormRespVO.class)); + } + + @GetMapping("/page") + @Operation(summary = "获得商品SKU扩展服务表单分页") + @PreAuthorize("@ss.hasPermission('tz:sku-services-form:query')") + public CommonResult> getSkuServicesFormPage(@Valid SkuServicesFormPageReqVO pageReqVO) { + PageResult pageResult = skuServicesFormService.getSkuServicesFormPage(pageReqVO); + return success(BeanUtils.toBean(pageResult, SkuServicesFormRespVO.class)); + } + + @GetMapping("/export-excel") + @Operation(summary = "导出商品SKU扩展服务表单 Excel") + @PreAuthorize("@ss.hasPermission('tz:sku-services-form:export')") + @ApiAccessLog(operateType = EXPORT) + public void exportSkuServicesFormExcel(@Valid SkuServicesFormPageReqVO pageReqVO, + HttpServletResponse response) throws IOException { + pageReqVO.setPageSize(PageParam.PAGE_SIZE_NONE); + List list = skuServicesFormService.getSkuServicesFormPage(pageReqVO).getList(); + // 导出 Excel + ExcelUtils.write(response, "商品SKU扩展服务表单.xls", "数据", SkuServicesFormRespVO.class, + BeanUtils.toBean(list, SkuServicesFormRespVO.class)); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/CategoryMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/CategoryMapper.java new file mode 100644 index 0000000..ccaff7d --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/CategoryMapper.java @@ -0,0 +1,29 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.CategoryDO; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +/** + * 产品类目 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface CategoryMapper extends BaseMapperX { + + /** + * 根据条件查询类目列表 + */ + List selectCategoryList(@Param("grade") Integer grade, + @Param("categoryId") Long categoryId, + @Param("categoryName") String categoryName, + @Param("status") Integer status, + @Param("shopId") Long shopId); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdAdditionalFeeDatesMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdAdditionalFeeDatesMapper.java new file mode 100644 index 0000000..f039577 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdAdditionalFeeDatesMapper.java @@ -0,0 +1,25 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 特殊日期附加费用规则 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdAdditionalFeeDatesMapper extends BaseMapperX { + + /** + * 删除关联 + */ + public int deleteAdditionalFeeDates(@Param("prodId")Long prodId,@Param("type")Integer type); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdAdditionalFeePeriodsMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdAdditionalFeePeriodsMapper.java new file mode 100644 index 0000000..3a97ed5 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdAdditionalFeePeriodsMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 特殊时段附加费用规则 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdAdditionalFeePeriodsMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdEmergencyResponseIntervalsMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdEmergencyResponseIntervalsMapper.java new file mode 100644 index 0000000..a433d92 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdEmergencyResponseIntervalsMapper.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 紧急响应时间区间设置 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdEmergencyResponseIntervalsMapper extends BaseMapperX { + + /** + * 删除关联 + */ + public int deleteIntervals(@Param("configId")Long configId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdEmergencyResponseMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdEmergencyResponseMapper.java new file mode 100644 index 0000000..d4a1045 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdEmergencyResponseMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 商品紧急响应服务设置 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdEmergencyResponseMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdExtendMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdExtendMapper.java new file mode 100644 index 0000000..6c8d0df --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdExtendMapper.java @@ -0,0 +1,22 @@ +package com.tashow.cloud.product.mapper; + +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdExtendDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +/** + * 属性规则 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdExtendMapper extends BaseMapperX { + // 自定义更新方法(可选) + int updateByProdId(@Param("prodId") Long prodId, + @Param("isDisable") Integer isDisable, + @Param("isExpire") Integer isExpire); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdMapper.java new file mode 100644 index 0000000..1c68e82 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdMapper.java @@ -0,0 +1,42 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.productapi.api.product.vo.prod.ProdListVO; +import com.tashow.cloud.productapi.api.product.vo.prod.ProdPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prod.ProdRestoreListVO; +import com.tashow.cloud.productapi.api.product.vo.prod.ProdServiceVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 商品 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdMapper extends BaseMapperX { + + IPage getProdPageList(Page page,@Param("createTime") String[] createTime + , @Param("prodName") String prodName + , @Param("shopId") Long shopId + , @Param("status") Integer status + , @Param("categoryId") Long categoryId); + + ProdServiceVO selectProdService(@Param("prodId") Long prodId); + + ProdServiceVO selectProdServiceInfo(@Param("prodId") Long prodId); + + IPage getProdRecycleBinPageList(Page page, @Param("deleteTime") String[] deleteTime + , @Param("prodName") String prodName); + + + void batchRestoreProd(@Param("ids") List ids); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdPropMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdPropMapper.java new file mode 100644 index 0000000..262a721 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdPropMapper.java @@ -0,0 +1,28 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 商品属性 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdPropMapper extends BaseMapperX { + + /** + * 根据店铺id和属性名称获取商品属性 + * @param propName + * @param prodId + * @param rule + * @return + */ + ProdPropDO getProdPropByPropNameAndShopId(@Param("propName") String propName, @Param("prodId") Integer prodId, @Param("rule") Integer rule); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdPropValueMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdPropValueMapper.java new file mode 100644 index 0000000..1e22404 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdPropValueMapper.java @@ -0,0 +1,52 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.productapi.api.product.dto.SkuDO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 属性规则 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdPropValueMapper extends BaseMapperX { + + /** + * 插入商品属性数值 + * @param propId + * @param prodPropValues + */ + void insertPropValues(@Param("propId") Long propId, @Param("prodPropValues") List prodPropValues); + + List selectSalesValuesByProdId(@Param("prodId") Long prodId); + + List selectSalesValuesByState(@Param("prodId") Long prodId); + + void batchMarkDeleted(@Param("ids") List ids); + + int deleteProdPropValueById( @Param("id")Long id); + + List selectRestoreProp(@Param("prodId") Long prodId); + + IPage getSKuPropRecycleBinList(Page page, @Param("prodId") Long prodId,@Param("propValue")String propValue); + + List getskuListByPropValueIds(@Param("ids")List ids); + + void restorePropValue(@Param("ids") List ids); + + int getMaxPropValue(@Param("propId")Long propId); + + // 根据商品 ID 更新销售属性值的 state(仅 rule=1 的) + void updateStateByProdId(@Param("prodId") Long prodId, @Param("state") Integer state); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdReservationConfigMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdReservationConfigMapper.java new file mode 100644 index 0000000..a5647e1 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdReservationConfigMapper.java @@ -0,0 +1,25 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 商品预约配置 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdReservationConfigMapper extends BaseMapperX { + + + /** + * 删除关联 + */ + public int deleteReservationConfig(@Param("prodId")Long prodId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceAreaRelevanceMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceAreaRelevanceMapper.java new file mode 100644 index 0000000..c69fe33 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceAreaRelevanceMapper.java @@ -0,0 +1,24 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreaRelevanceDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 商品与服务区域关联 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdServiceAreaRelevanceMapper extends BaseMapperX { + + /** + * 删除关联 + */ + public int deleteRelevance(@Param("prodId")Long prodId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceAreasMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceAreasMapper.java new file mode 100644 index 0000000..d94d885 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceAreasMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreasDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务区域 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdServiceAreasMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceOverAreaRulesMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceOverAreaRulesMapper.java new file mode 100644 index 0000000..a930140 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdServiceOverAreaRulesMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceOverAreaRulesDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 超区规则 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdServiceOverAreaRulesMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdTagsMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdTagsMapper.java new file mode 100644 index 0000000..2368366 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdTagsMapper.java @@ -0,0 +1,19 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdTagsDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 商品和标签管理 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdTagsMapper extends BaseMapperX { + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdWeightRangePricesMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdWeightRangePricesMapper.java new file mode 100644 index 0000000..efec471 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProdWeightRangePricesMapper.java @@ -0,0 +1,25 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 体重区间价格 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProdWeightRangePricesMapper extends BaseMapperX { + + + /** + * 删除关联 + */ + public int deleteWeightRangePrices(@Param("prodId")Long prodId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProductOrderLimitMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProductOrderLimitMapper.java new file mode 100644 index 0000000..766d8e4 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ProductOrderLimitMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ProductOrderLimitDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 商品接单上限设置 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ProductOrderLimitMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ShopDetailMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ShopDetailMapper.java new file mode 100644 index 0000000..498f24b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/ShopDetailMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.ShopDetailDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 店铺信息 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface ShopDetailMapper extends BaseMapperX { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuMapper.java new file mode 100644 index 0000000..c5f8c97 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuMapper.java @@ -0,0 +1,47 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.SkuDO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +/** + * 单品SKU Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface SkuMapper extends BaseMapperX { + + IPage getSkuRecycleBinPageList(Page page, @Param("prodId") Long prodId, @Param("properties")String properties); + + IPage getSkuPageList(Page page, @Param("prodId") Long prodId,@Param("skuId") Long skuId, @Param("properties")String properties); + + + List getSkuListByName( @Param("prodId")Long prodId , @Param("propertiesName")String propertiesName); + + List selectPropertiesByProdIdAndNotDeleted( @Param("prodId")Long prodId); + + List selectPropertiesByProdIdShelf( @Param("prodId")Long prodId); + + int deleteBySkuId( @Param("skuId")Long skuId); + + void batchSkuDeleted(@Param("ids") List ids); + + void updateSkuDeleted(@Param("skuId") Long skuId); + + + List getskuListBySkuIds( @Param("ids")List ids); + + List getskuListByDeleted( @Param("prodId")Long prodId,@Param("ids")List ids); + + void batchSkuRecover(@Param("ids") List ids); + + // 查询商品下所有 SKU 的 is_shelf 状态(未删除) + List selectShelfStatusByProdId(@Param("prodId") Long prodId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceDeliverMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceDeliverMapper.java new file mode 100644 index 0000000..95a23b6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceDeliverMapper.java @@ -0,0 +1,20 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDeliverDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务交付方式 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface SkuServiceDeliverMapper extends BaseMapperX { + + void deleteDelivers(Long serviceId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceDetailsMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceDetailsMapper.java new file mode 100644 index 0000000..34ca4e3 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceDetailsMapper.java @@ -0,0 +1,21 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDetailsDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务详情 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface SkuServiceDetailsMapper extends BaseMapperX { + + void deleteDetails(Long serviceId); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceMaterialMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceMaterialMapper.java new file mode 100644 index 0000000..9d4052b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceMaterialMapper.java @@ -0,0 +1,21 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceMaterialDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务物料详情 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface SkuServiceMaterialMapper extends BaseMapperX { + + + void deleteMaterials(Long serviceId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceTransportMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceTransportMapper.java new file mode 100644 index 0000000..2c55645 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServiceTransportMapper.java @@ -0,0 +1,21 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.SkuServiceTransportDO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 服务遗体运输 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface SkuServiceTransportMapper extends BaseMapperX { + + + void deleteTransports(Long serviceId); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServicesFormMapper.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServicesFormMapper.java new file mode 100644 index 0000000..cf5e6a6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/mapper/SkuServicesFormMapper.java @@ -0,0 +1,23 @@ +package com.tashow.cloud.product.mapper; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.mybatis.mybatis.core.query.LambdaQueryWrapperX; +import com.tashow.cloud.mybatis.mybatis.core.mapper.BaseMapperX; +import com.tashow.cloud.productapi.api.product.dto.SkuDO; +import com.tashow.cloud.productapi.api.product.dto.SkuServicesFormDO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuServiceExtendVO; +import org.apache.ibatis.annotations.Mapper; + +/** + * 商品SKU扩展服务表单 Mapper + * + * @author 芋道源码 + */ +@Mapper +public interface SkuServicesFormMapper extends BaseMapperX { + + List selectSkuServiceExtendWithDetails(Integer formId); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/CategoryService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/CategoryService.java new file mode 100644 index 0000000..b9092f2 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/CategoryService.java @@ -0,0 +1,65 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.tashow.cloud.productapi.api.product.dto.CategoryDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import com.tashow.cloud.productapi.api.product.vo.CategoryPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.CategorySaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 产品类目 Service 接口 + * + * @author 芋道源码 + */ +public interface CategoryService extends IService { + + + List categoryList(Integer grade, Long categoryId,String categoryName, Integer status); + + + /** + * 创建产品类目 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createCategory(@Valid CategorySaveReqVO createReqVO); + + /** + * 更新产品类目 + * + * @param updateReqVO 更新信息 + */ + void updateCategory(@Valid CategorySaveReqVO updateReqVO); + + /** + * 删除产品类目 + * + * @param id 编号 + */ + void deleteCategory(Long id); + + /** + * 获得产品类目 + * + * @param id 编号 + * @return 产品类目 + */ + CategoryDO getCategory(Long id); + + /** + * 获得产品类目分页 + * + * @param pageReqVO 分页查询 + * @return 产品类目分页 + */ + PageResult getCategoryPage(CategoryPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdAdditionalFeeDatesService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdAdditionalFeeDatesService.java new file mode 100644 index 0000000..0c7749b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdAdditionalFeeDatesService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 特殊日期附加费用规则 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdAdditionalFeeDatesService { + + /** + * 创建特殊日期附加费用规则 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdAdditionalFeeDates(@Valid ProdAdditionalFeeDatesSaveReqVO createReqVO); + + /** + * 更新特殊日期附加费用规则 + * + * @param updateReqVO 更新信息 + */ + void updateProdAdditionalFeeDates(@Valid ProdAdditionalFeeDatesSaveReqVO updateReqVO); + + /** + * 删除特殊日期附加费用规则 + * + * @param id 编号 + */ + void deleteProdAdditionalFeeDates(Long id); + + /** + * 获得特殊日期附加费用规则 + * + * @param id 编号 + * @return 特殊日期附加费用规则 + */ + ProdAdditionalFeeDatesDO getProdAdditionalFeeDates(Long id); + + /** + * 获得特殊日期附加费用规则分页 + * + * @param pageReqVO 分页查询 + * @return 特殊日期附加费用规则分页 + */ + PageResult getProdAdditionalFeeDatesPage(ProdAdditionalFeeDatesPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdAdditionalFeePeriodsService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdAdditionalFeePeriodsService.java new file mode 100644 index 0000000..9ee9afe --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdAdditionalFeePeriodsService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 特殊时段附加费用规则 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdAdditionalFeePeriodsService { + + /** + * 创建特殊时段附加费用规则 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdAdditionalFeePeriods(@Valid ProdAdditionalFeePeriodsSaveReqVO createReqVO); + + /** + * 更新特殊时段附加费用规则 + * + * @param updateReqVO 更新信息 + */ + void updateProdAdditionalFeePeriods(@Valid ProdAdditionalFeePeriodsSaveReqVO updateReqVO); + + /** + * 删除特殊时段附加费用规则 + * + * @param id 编号 + */ + void deleteProdAdditionalFeePeriods(Long id); + + /** + * 获得特殊时段附加费用规则 + * + * @param id 编号 + * @return 特殊时段附加费用规则 + */ + ProdAdditionalFeePeriodsDO getProdAdditionalFeePeriods(Long id); + + /** + * 获得特殊时段附加费用规则分页 + * + * @param pageReqVO 分页查询 + * @return 特殊时段附加费用规则分页 + */ + PageResult getProdAdditionalFeePeriodsPage(ProdAdditionalFeePeriodsPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdEmergencyResponseIntervalsService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdEmergencyResponseIntervalsService.java new file mode 100644 index 0000000..840182c --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdEmergencyResponseIntervalsService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 紧急响应时间区间设置 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdEmergencyResponseIntervalsService { + + /** + * 创建紧急响应时间区间设置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdEmergencyResponseIntervals(@Valid ProdEmergencyResponseIntervalsSaveReqVO createReqVO); + + /** + * 更新紧急响应时间区间设置 + * + * @param updateReqVO 更新信息 + */ + void updateProdEmergencyResponseIntervals(@Valid ProdEmergencyResponseIntervalsSaveReqVO updateReqVO); + + /** + * 删除紧急响应时间区间设置 + * + * @param id 编号 + */ + void deleteProdEmergencyResponseIntervals(Long id); + + /** + * 获得紧急响应时间区间设置 + * + * @param id 编号 + * @return 紧急响应时间区间设置 + */ + ProdEmergencyResponseIntervalsDO getProdEmergencyResponseIntervals(Long id); + + /** + * 获得紧急响应时间区间设置分页 + * + * @param pageReqVO 分页查询 + * @return 紧急响应时间区间设置分页 + */ + PageResult getProdEmergencyResponseIntervalsPage(ProdEmergencyResponseIntervalsPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdEmergencyResponseService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdEmergencyResponseService.java new file mode 100644 index 0000000..3da93b2 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdEmergencyResponseService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseDO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponsePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponseSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品紧急响应服务设置 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdEmergencyResponseService { + + /** + * 创建商品紧急响应服务设置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdEmergencyResponse(@Valid ProdEmergencyResponseSaveReqVO createReqVO); + + /** + * 更新商品紧急响应服务设置 + * + * @param updateReqVO 更新信息 + */ + void updateProdEmergencyResponse(@Valid ProdEmergencyResponseSaveReqVO updateReqVO); + + /** + * 删除商品紧急响应服务设置 + * + * @param id 编号 + */ + void deleteProdEmergencyResponse(Long id); + + /** + * 获得商品紧急响应服务设置 + * + * @param id 编号 + * @return 商品紧急响应服务设置 + */ + ProdEmergencyResponseDO getProdEmergencyResponse(Long id); + + /** + * 获得商品紧急响应服务设置分页 + * + * @param pageReqVO 分页查询 + * @return 商品紧急响应服务设置分页 + */ + PageResult getProdEmergencyResponsePage(ProdEmergencyResponsePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdExtendService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdExtendService.java new file mode 100644 index 0000000..08e856a --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdExtendService.java @@ -0,0 +1,15 @@ +package com.tashow.cloud.product.service; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.tashow.cloud.productapi.api.product.dto.ProdExtendDO; + + +/** + * 商品属性 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdExtendService extends IService { + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdPropService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdPropService.java new file mode 100644 index 0000000..513a4a6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdPropService.java @@ -0,0 +1,65 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropSaveReqVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuPropVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品属性 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdPropService extends IService { + + /** + * 创建商品属性 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdProp(@Valid ProdPropSaveReqVO createReqVO); + + void saveProdPropAndValues(ProdSaveReqVO createReqVO); + + + + void updateProdPropAndValues(SkuPropVO skuPropVO); + /** + * 更新商品属性 + * + * @param updateReqVO 更新信息 + */ + void updateProdProp(@Valid ProdPropSaveReqVO updateReqVO); + + /** + * 删除商品属性 + * + * @param id 编号 + */ + void deleteProdProp(Long id); + + /** + * 获得商品属性 + * + * @param id 编号 + * @return 商品属性 + */ + ProdPropDO getProdProp(Long id); + + /** + * 获得商品属性分页 + * + * @param pageReqVO 分页查询 + * @return 商品属性分页 + */ + PageResult getProdPropPage(ProdPropPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdPropValueService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdPropValueService.java new file mode 100644 index 0000000..ba25b6b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdPropValueService.java @@ -0,0 +1,59 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValuePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValueSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 属性规则 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdPropValueService extends IService { + + /** + * 创建属性规则 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdPropValue(@Valid ProdPropValueSaveReqVO createReqVO); + + /** + * 更新属性规则 + * + * @param updateReqVO 更新信息 + */ + void updateProdPropValue(@Valid ProdPropValueSaveReqVO updateReqVO); + + /** + * 删除属性规则 + * + * @param id 编号 + */ + void deleteProdPropValue(Long id); + + /** + * 获得属性规则 + * + * @param id 编号 + * @return 属性规则 + */ + ProdPropValueDO getProdPropValue(Long id); + + /** + * 获得属性规则分页 + * + * @param pageReqVO 分页查询 + * @return 属性规则分页 + */ + PageResult getProdPropValuePage(ProdPropValuePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdReservationConfigService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdReservationConfigService.java new file mode 100644 index 0000000..a9cc2ab --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdReservationConfigService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品预约配置 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdReservationConfigService { + + /** + * 创建商品预约配置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdReservationConfig(@Valid ProdReservationConfigSaveReqVO createReqVO); + + /** + * 更新商品预约配置 + * + * @param updateReqVO 更新信息 + */ + void updateProdReservationConfig(@Valid ProdReservationConfigSaveReqVO updateReqVO); + + /** + * 删除商品预约配置 + * + * @param id 编号 + */ + void deleteProdReservationConfig(Long id); + + /** + * 获得商品预约配置 + * + * @param id 编号 + * @return 商品预约配置 + */ + ProdReservationConfigDO getProdReservationConfig(Long id); + + /** + * 获得商品预约配置分页 + * + * @param pageReqVO 分页查询 + * @return 商品预约配置分页 + */ + PageResult getProdReservationConfigPage(ProdReservationConfigPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdService.java new file mode 100644 index 0000000..c543068 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdService.java @@ -0,0 +1,92 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdDO; +import com.tashow.cloud.productapi.api.product.vo.prod.*; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdService { + + /** + * 创建商品 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProd(@Valid ProdSaveReqVO createReqVO); + + /** + * 创建商品服务配置 + * + * @param prodServiceVO 创建信息 + * @return 编号 + */ + void createProdService(@Valid ProdServiceVO prodServiceVO); + + + /** + * 修改商品服务配置 + * + * @param prodServiceInfoVO 创建信息 + * @return 编号 + */ + void uptateProdService(@Valid ProdServiceInfoVO prodServiceInfoVO); + + + + /** + * 获取商品服务配置 + * + * @param prodId 商品id + * @return 编号 + */ + ProdServiceVO getProdService(@Valid Long prodId); + + /** + * 更新商品 + * + * @param updateReqVO 更新信息 + */ + void updateProd(@Valid ProdSaveReqVO updateReqVO); + + /** + * 删除商品 + * + * @param id 编号 + */ + void deleteProd(Long id); + + /** + * 获得商品 + * + * @param id 编号 + * @return 商品 + */ + ProdDO getProd(Long id); + + /** + * 获得商品分页 + * + * @param pageReqVO 分页查询 + * @return 商品分页 + */ + PageResult getProdPage(ProdPageReqVO pageReqVO); + + PageResult getProdRecycleBinPageList(ProdRecycleBinVO prodRecycleBinVO); + + /** + * 恢复商品 + * + * @param ids + */ + void restoreProdList(List ids); +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceAreaRelevanceService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceAreaRelevanceService.java new file mode 100644 index 0000000..bb5412f --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceAreaRelevanceService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreaRelevanceDO; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevancePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevanceSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品与服务区域关联 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdServiceAreaRelevanceService { + + /** + * 创建商品与服务区域关联 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdServiceAreaRelevance(@Valid ProdServiceAreaRelevanceSaveReqVO createReqVO); + + /** + * 更新商品与服务区域关联 + * + * @param updateReqVO 更新信息 + */ + void updateProdServiceAreaRelevance(@Valid ProdServiceAreaRelevanceSaveReqVO updateReqVO); + + /** + * 删除商品与服务区域关联 + * + * @param id 编号 + */ + void deleteProdServiceAreaRelevance(Long id); + + /** + * 获得商品与服务区域关联 + * + * @param id 编号 + * @return 商品与服务区域关联 + */ + ProdServiceAreaRelevanceDO getProdServiceAreaRelevance(Long id); + + /** + * 获得商品与服务区域关联分页 + * + * @param pageReqVO 分页查询 + * @return 商品与服务区域关联分页 + */ + PageResult getProdServiceAreaRelevancePage(ProdServiceAreaRelevancePageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceAreasService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceAreasService.java new file mode 100644 index 0000000..d43455d --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceAreasService.java @@ -0,0 +1,59 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.baomidou.mybatisplus.extension.service.IService; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreasDO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 服务区域 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdServiceAreasService extends IService { + + /** + * 创建服务区域 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdServiceAreas(@Valid ProdServiceAreasSaveReqVO createReqVO); + + /** + * 更新服务区域 + * + * @param updateReqVO 更新信息 + */ + void updateProdServiceAreas(@Valid ProdServiceAreasSaveReqVO updateReqVO); + + /** + * 删除服务区域 + * + * @param id 编号 + */ + void deleteProdServiceAreas(Long id); + + /** + * 获得服务区域 + * + * @param id 编号 + * @return 服务区域 + */ + ProdServiceAreasDO getProdServiceAreas(Long id); + + /** + * 获得服务区域分页 + * + * @param pageReqVO 分页查询 + * @return 服务区域分页 + */ + PageResult getProdServiceAreasPage(ProdServiceAreasPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceOverAreaRulesService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceOverAreaRulesService.java new file mode 100644 index 0000000..1f8f2b1 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdServiceOverAreaRulesService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdServiceOverAreaRulesDO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 超区规则 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdServiceOverAreaRulesService { + + /** + * 创建超区规则 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdServiceOverAreaRules(@Valid ProdServiceOverAreaRulesSaveReqVO createReqVO); + + /** + * 更新超区规则 + * + * @param updateReqVO 更新信息 + */ + void updateProdServiceOverAreaRules(@Valid ProdServiceOverAreaRulesSaveReqVO updateReqVO); + + /** + * 删除超区规则 + * + * @param id 编号 + */ + void deleteProdServiceOverAreaRules(Long id); + + /** + * 获得超区规则 + * + * @param id 编号 + * @return 超区规则 + */ + ProdServiceOverAreaRulesDO getProdServiceOverAreaRules(Long id); + + /** + * 获得超区规则分页 + * + * @param pageReqVO 分页查询 + * @return 超区规则分页 + */ + PageResult getProdServiceOverAreaRulesPage(ProdServiceOverAreaRulesPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdTagsService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdTagsService.java new file mode 100644 index 0000000..ade48cb --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdTagsService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdTagsDO; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品和标签管理 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdTagsService { + + /** + * 创建商品和标签管理 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdTags(@Valid ProdTagsSaveReqVO createReqVO); + + /** + * 更新商品和标签管理 + * + * @param updateReqVO 更新信息 + */ + void updateProdTags(@Valid ProdTagsSaveReqVO updateReqVO); + + /** + * 删除商品和标签管理 + * + * @param id 编号 + */ + void deleteProdTags(Long id); + + /** + * 获得商品和标签管理 + * + * @param id 编号 + * @return 商品和标签管理 + */ + ProdTagsDO getProdTags(Long id); + + /** + * 获得商品和标签管理分页 + * + * @param pageReqVO 分页查询 + * @return 商品和标签管理分页 + */ + PageResult getProdTagsPage(ProdTagsPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdWeightRangePricesService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdWeightRangePricesService.java new file mode 100644 index 0000000..8188680 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProdWeightRangePricesService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 体重区间价格 Service 接口 + * + * @author 芋道源码 + */ +public interface ProdWeightRangePricesService { + + /** + * 创建体重区间价格 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProdWeightRangePrices(@Valid ProdWeightRangePricesSaveReqVO createReqVO); + + /** + * 更新体重区间价格 + * + * @param updateReqVO 更新信息 + */ + void updateProdWeightRangePrices(@Valid ProdWeightRangePricesSaveReqVO updateReqVO); + + /** + * 删除体重区间价格 + * + * @param id 编号 + */ + void deleteProdWeightRangePrices(Long id); + + /** + * 获得体重区间价格 + * + * @param id 编号 + * @return 体重区间价格 + */ + ProdWeightRangePricesDO getProdWeightRangePrices(Long id); + + /** + * 获得体重区间价格分页 + * + * @param pageReqVO 分页查询 + * @return 体重区间价格分页 + */ + PageResult getProdWeightRangePricesPage(ProdWeightRangePricesPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProductOrderLimitService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProductOrderLimitService.java new file mode 100644 index 0000000..719042b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ProductOrderLimitService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ProductOrderLimitDO; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品接单上限设置 Service 接口 + * + * @author 芋道源码 + */ +public interface ProductOrderLimitService { + + /** + * 创建商品接单上限设置 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createProductOrderLimit(@Valid ProductOrderLimitSaveReqVO createReqVO); + + /** + * 更新商品接单上限设置 + * + * @param updateReqVO 更新信息 + */ + void updateProductOrderLimit(@Valid ProductOrderLimitSaveReqVO updateReqVO); + + /** + * 删除商品接单上限设置 + * + * @param id 编号 + */ + void deleteProductOrderLimit(Long id); + + /** + * 获得商品接单上限设置 + * + * @param id 编号 + * @return 商品接单上限设置 + */ + ProductOrderLimitDO getProductOrderLimit(Long id); + + /** + * 获得商品接单上限设置分页 + * + * @param pageReqVO 分页查询 + * @return 商品接单上限设置分页 + */ + PageResult getProductOrderLimitPage(ProductOrderLimitPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ShopDetailService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ShopDetailService.java new file mode 100644 index 0000000..4c358aa --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/ShopDetailService.java @@ -0,0 +1,59 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.ShopDetailDO; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 店铺信息 Service 接口 + * + * @author 芋道源码 + */ +public interface ShopDetailService { + + /** + * 创建店铺信息 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createShopDetail(@Valid ShopDetailSaveReqVO createReqVO); + + /** + * 更新店铺信息 + * + * @param updateReqVO 更新信息 + */ + void updateShopDetail(@Valid ShopDetailSaveReqVO updateReqVO); + + /** + * 删除店铺信息 + * + * @param id 编号 + */ + void deleteShopDetail(Long id); + + /** + * 获得店铺信息 + * + * @param id 编号 + * @return 店铺信息 + */ + ShopDetailDO getShopDetail(Long id); + + /** + * 获得店铺信息分页 + * + * @param pageReqVO 分页查询 + * @return 店铺信息分页 + */ + PageResult getShopDetailPage(ShopDetailPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuService.java new file mode 100644 index 0000000..ce7375f --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuService.java @@ -0,0 +1,179 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO; +import com.tashow.cloud.productapi.api.product.vo.sku.*; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import org.springframework.web.bind.annotation.RequestParam; + +/** + * 单品SKU Service 接口 + * + * @author 芋道源码 + */ +public interface SkuService { + + /** + * 创建单品SKU + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSku(@Valid SkuSaveReqVO createReqVO); + + /** + * 创建sku扩展服务配置 + * + * @param skuExtendVO 更新信息 + */ + void createSkuExtend(@Valid SkuExtendVO skuExtendVO); + + + + + /** + * 创建sku扩展服务配置 + * + * @param formId 更新信息 + */ + SkuExtendVO getSkuExtend(Integer formId); + + + /** + * 更新单品SKU + * + * @param updateReqVO 更新信息 + */ + void updateSku(@Valid SkuSaveReqVO updateReqVO); + + /** + * 更新sku规格 + * + * @param skuPropVO 更新信息 + */ + void updateProp(SkuPropVO skuPropVO); + + + void updatePropVal(Long id, String propValue); + + /** + * 删除规格值 + * + * @param id 删除规格值 + */ + void deleteProp(Long id); + + /** + * 禁用规格值 + * + * @param id 删除规格值 + */ + void disableProp(Long id,Integer state); + + + + SkuPropInfoVO getSKuPropList(Long prodId); + + PageResult getSKuPropRecycleBinList(ProPageReqVO proPageReqVO); + /** + * 删除单品SKU + * + * @param id 编号 + */ + void deleteSku(Long id); + + /** + * 批量删除删SKU + * + * @param ids + */ + void deleteSkus(List ids); + + /** + * 恢复SKU + * + * @param ids + */ + void restoreSkuList(List ids); + /** + * 恢复规格 + * + * @param ids + */ + void restorePropList(List ids); + + + /** + * 删除单品SKU + * + * @param id 编号 + */ + void updatSkuIsShelf(Long id,Integer isShelf); + + /** + * 批量删除删SKU + * + * @param ids + */ + void updatSkuIsShelfs(List ids,Integer isShelf); + + + /** + * 获得单品SKU + * + * @param id 编号 + * @return 单品SKU + */ + SkuDO getSku(Long id); + + + + PageResult getSkuRecycleBinPageList(SkuPageReqVO pageReqVO); + + + PageResult getSkuPageList(SkuPageReqVO pageReqVO); + /** + * 获得单品SKU分页 + * + * @param pageReqVO 分页查询 + * @return 单品SKU分页 + */ + PageResult getSkuPage(SkuPageReqVO pageReqVO); + + + /** + * 创建sku扩展服务配置 + * + * @param skuServiceDetailsList 更新信息 + */ + void updateServiceDetails(List skuServiceDetailsList); + + + /** + * 修物料配置 + * + * @param skuServiceMaterialList 更新信息 + */ + void updateMaterial(List skuServiceMaterialList); + + + /** + * 修改接运地址配置 + * + * @param skuServiceTransportDOList 更新信息 + */ + void updateTransportAdress( List skuServiceTransportDOList); + + /** + * 修改配送方式 + * + * @param skuServiceDeliverList 更新信息 + */ + void updateDeliver(List skuServiceDeliverList); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceDeliverService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceDeliverService.java new file mode 100644 index 0000000..eda1e66 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceDeliverService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDeliverDO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 服务交付方式 Service 接口 + * + * @author 芋道源码 + */ +public interface SkuServiceDeliverService { + + /** + * 创建服务交付方式 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSkuServiceDeliver(@Valid SkuServiceDeliverSaveReqVO createReqVO); + + /** + * 更新服务交付方式 + * + * @param updateReqVO 更新信息 + */ + void updateSkuServiceDeliver(@Valid SkuServiceDeliverSaveReqVO updateReqVO); + + /** + * 删除服务交付方式 + * + * @param id 编号 + */ + void deleteSkuServiceDeliver(Long id); + + /** + * 获得服务交付方式 + * + * @param id 编号 + * @return 服务交付方式 + */ + SkuServiceDeliverDO getSkuServiceDeliver(Long id); + + /** + * 获得服务交付方式分页 + * + * @param pageReqVO 分页查询 + * @return 服务交付方式分页 + */ + PageResult getSkuServiceDeliverPage(SkuServiceDeliverPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceDetailsService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceDetailsService.java new file mode 100644 index 0000000..c6024ee --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceDetailsService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDetailsDO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 服务详情 Service 接口 + * + * @author 芋道源码 + */ +public interface SkuServiceDetailsService { + + /** + * 创建服务详情 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSkuServiceDetails(@Valid SkuServiceDetailsSaveReqVO createReqVO); + + /** + * 更新服务详情 + * + * @param updateReqVO 更新信息 + */ + void updateSkuServiceDetails(@Valid SkuServiceDetailsSaveReqVO updateReqVO); + + /** + * 删除服务详情 + * + * @param id 编号 + */ + void deleteSkuServiceDetails(Long id); + + /** + * 获得服务详情 + * + * @param id 编号 + * @return 服务详情 + */ + SkuServiceDetailsDO getSkuServiceDetails(Long id); + + /** + * 获得服务详情分页 + * + * @param pageReqVO 分页查询 + * @return 服务详情分页 + */ + PageResult getSkuServiceDetailsPage(SkuServiceDetailsPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceMaterialService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceMaterialService.java new file mode 100644 index 0000000..2fa6d13 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceMaterialService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceMaterialDO; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 服务物料详情 Service 接口 + * + * @author 芋道源码 + */ +public interface SkuServiceMaterialService { + + /** + * 创建服务物料详情 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSkuServiceMaterial(@Valid SkuServiceMaterialSaveReqVO createReqVO); + + /** + * 更新服务物料详情 + * + * @param updateReqVO 更新信息 + */ + void updateSkuServiceMaterial(@Valid SkuServiceMaterialSaveReqVO updateReqVO); + + /** + * 删除服务物料详情 + * + * @param id 编号 + */ + void deleteSkuServiceMaterial(Long id); + + /** + * 获得服务物料详情 + * + * @param id 编号 + * @return 服务物料详情 + */ + SkuServiceMaterialDO getSkuServiceMaterial(Long id); + + /** + * 获得服务物料详情分页 + * + * @param pageReqVO 分页查询 + * @return 服务物料详情分页 + */ + PageResult getSkuServiceMaterialPage(SkuServiceMaterialPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceTransportService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceTransportService.java new file mode 100644 index 0000000..1469304 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServiceTransportService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceTransportDO; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 服务遗体运输 Service 接口 + * + * @author 芋道源码 + */ +public interface SkuServiceTransportService { + + /** + * 创建服务遗体运输 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSkuServiceTransport(@Valid SkuServiceTransportSaveReqVO createReqVO); + + /** + * 更新服务遗体运输 + * + * @param updateReqVO 更新信息 + */ + void updateSkuServiceTransport(@Valid SkuServiceTransportSaveReqVO updateReqVO); + + /** + * 删除服务遗体运输 + * + * @param id 编号 + */ + void deleteSkuServiceTransport(Long id); + + /** + * 获得服务遗体运输 + * + * @param id 编号 + * @return 服务遗体运输 + */ + SkuServiceTransportDO getSkuServiceTransport(Long id); + + /** + * 获得服务遗体运输分页 + * + * @param pageReqVO 分页查询 + * @return 服务遗体运输分页 + */ + PageResult getSkuServiceTransportPage(SkuServiceTransportPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServicesFormService.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServicesFormService.java new file mode 100644 index 0000000..598a094 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/SkuServicesFormService.java @@ -0,0 +1,57 @@ +package com.tashow.cloud.product.service; + +import java.util.*; + +import com.tashow.cloud.productapi.api.product.dto.SkuServicesFormDO; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormSaveReqVO; +import jakarta.validation.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; + +/** + * 商品SKU扩展服务表单 Service 接口 + * + * @author 芋道源码 + */ +public interface SkuServicesFormService { + + /** + * 创建商品SKU扩展服务表单 + * + * @param createReqVO 创建信息 + * @return 编号 + */ + Long createSkuServicesForm(@Valid SkuServicesFormSaveReqVO createReqVO); + + /** + * 更新商品SKU扩展服务表单 + * + * @param updateReqVO 更新信息 + */ + void updateSkuServicesForm(@Valid SkuServicesFormSaveReqVO updateReqVO); + + /** + * 删除商品SKU扩展服务表单 + * + * @param id 编号 + */ + void deleteSkuServicesForm(Long id); + + /** + * 获得商品SKU扩展服务表单 + * + * @param id 编号 + * @return 商品SKU扩展服务表单 + */ + SkuServicesFormDO getSkuServicesForm(Long id); + + /** + * 获得商品SKU扩展服务表单分页 + * + * @param pageReqVO 分页查询 + * @return 商品SKU扩展服务表单分页 + */ + PageResult getSkuServicesFormPage(SkuServicesFormPageReqVO pageReqVO); + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/CategoryServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/CategoryServiceImpl.java new file mode 100644 index 0000000..beb94c8 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/CategoryServiceImpl.java @@ -0,0 +1,91 @@ +package com.tashow.cloud.product.service.impl; + +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.tashow.cloud.common.exception.ErrorCode; +import com.tashow.cloud.productapi.api.product.dto.CategoryDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.product.mapper.CategoryMapper; +import com.tashow.cloud.product.mapper.ProdPropValueMapper; +import com.tashow.cloud.product.service.CategoryService; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import com.tashow.cloud.productapi.api.product.vo.CategoryPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.CategorySaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 产品类目 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class CategoryServiceImpl extends ServiceImpl implements CategoryService { + + @Resource + private CategoryMapper categoryMapper; + + @Override + public List categoryList(Integer grade, Long categoryId,String categoryName, Integer status) { + List categoryMenuList =categoryMapper.selectCategoryList(grade, categoryId,categoryName, status,1L); + return categoryMenuList; + } + + @Override + public Long createCategory(CategorySaveReqVO createReqVO) { + // 插入 + CategoryDO category = BeanUtils.toBean(createReqVO, CategoryDO.class); + category.setShopId(1L); + categoryMapper.insert(category); + // 返回 + return category.getCategoryId(); + } + + @Override + public void updateCategory(CategorySaveReqVO updateReqVO) { + // 校验存在 + validateCategoryExists(updateReqVO.getCategoryId()); + // 更新 + CategoryDO updateObj = BeanUtils.toBean(updateReqVO, CategoryDO.class); + categoryMapper.updateById(updateObj); + } + + @Override + public void deleteCategory(Long id) { + // 校验存在 + validateCategoryExists(id); + // 删除 + categoryMapper.deleteById(id); + } + + private void validateCategoryExists(Long id) { + if (categoryMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.CATEGORY_NOT_EXISTS); + } + } + + @Override + public CategoryDO getCategory(Long id) { + return categoryMapper.selectById(id); + } + + @Override + public PageResult getCategoryPage(CategoryPageReqVO pageReqVO) { + return null; + } + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdAdditionalFeeDatesServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdAdditionalFeeDatesServiceImpl.java new file mode 100644 index 0000000..15856ed --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdAdditionalFeeDatesServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeeDatesDO; +import com.tashow.cloud.product.mapper.ProdAdditionalFeeDatesMapper; +import com.tashow.cloud.product.service.ProdAdditionalFeeDatesService; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeDatesSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 特殊日期附加费用规则 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdAdditionalFeeDatesServiceImpl implements ProdAdditionalFeeDatesService { + + @Resource + private ProdAdditionalFeeDatesMapper prodAdditionalFeeDatesMapper; + + @Override + public Long createProdAdditionalFeeDates(ProdAdditionalFeeDatesSaveReqVO createReqVO) { + // 插入 + ProdAdditionalFeeDatesDO prodAdditionalFeeDates = BeanUtils.toBean(createReqVO, ProdAdditionalFeeDatesDO.class); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDates); + // 返回 + return prodAdditionalFeeDates.getId(); + } + + @Override + public void updateProdAdditionalFeeDates(ProdAdditionalFeeDatesSaveReqVO updateReqVO) { + // 校验存在 + validateProdAdditionalFeeDatesExists(updateReqVO.getId()); + // 更新 + ProdAdditionalFeeDatesDO updateObj = BeanUtils.toBean(updateReqVO, ProdAdditionalFeeDatesDO.class); + prodAdditionalFeeDatesMapper.updateById(updateObj); + } + + @Override + public void deleteProdAdditionalFeeDates(Long id) { + // 校验存在 + validateProdAdditionalFeeDatesExists(id); + // 删除 + prodAdditionalFeeDatesMapper.deleteById(id); + } + + private void validateProdAdditionalFeeDatesExists(Long id) { + if (prodAdditionalFeeDatesMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_ADDITIONAL_FEE_DATES_NOT_EXISTS); + } + } + + @Override + public ProdAdditionalFeeDatesDO getProdAdditionalFeeDates(Long id) { + return prodAdditionalFeeDatesMapper.selectById(id); + } + + @Override + public PageResult getProdAdditionalFeeDatesPage(ProdAdditionalFeeDatesPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdAdditionalFeePeriodsServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdAdditionalFeePeriodsServiceImpl.java new file mode 100644 index 0000000..8bae84c --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdAdditionalFeePeriodsServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdAdditionalFeePeriodsDO; +import com.tashow.cloud.product.mapper.ProdAdditionalFeePeriodsMapper; +import com.tashow.cloud.product.service.ProdAdditionalFeePeriodsService; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeeperiods.ProdAdditionalFeePeriodsSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 特殊时段附加费用规则 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdAdditionalFeePeriodsServiceImpl implements ProdAdditionalFeePeriodsService { + + @Resource + private ProdAdditionalFeePeriodsMapper prodAdditionalFeePeriodsMapper; + + @Override + public Long createProdAdditionalFeePeriods(ProdAdditionalFeePeriodsSaveReqVO createReqVO) { + // 插入 + ProdAdditionalFeePeriodsDO prodAdditionalFeePeriods = BeanUtils.toBean(createReqVO, ProdAdditionalFeePeriodsDO.class); + prodAdditionalFeePeriodsMapper.insert(prodAdditionalFeePeriods); + // 返回 + return prodAdditionalFeePeriods.getId(); + } + + @Override + public void updateProdAdditionalFeePeriods(ProdAdditionalFeePeriodsSaveReqVO updateReqVO) { + // 校验存在 + validateProdAdditionalFeePeriodsExists(updateReqVO.getId()); + // 更新 + ProdAdditionalFeePeriodsDO updateObj = BeanUtils.toBean(updateReqVO, ProdAdditionalFeePeriodsDO.class); + prodAdditionalFeePeriodsMapper.updateById(updateObj); + } + + @Override + public void deleteProdAdditionalFeePeriods(Long id) { + // 校验存在 + validateProdAdditionalFeePeriodsExists(id); + // 删除 + prodAdditionalFeePeriodsMapper.deleteById(id); + } + + private void validateProdAdditionalFeePeriodsExists(Long id) { + if (prodAdditionalFeePeriodsMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_ADDITIONAL_FEE_PERIODS_NOT_EXISTS); + } + } + + @Override + public ProdAdditionalFeePeriodsDO getProdAdditionalFeePeriods(Long id) { + return prodAdditionalFeePeriodsMapper.selectById(id); + } + + @Override + public PageResult getProdAdditionalFeePeriodsPage(ProdAdditionalFeePeriodsPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdEmergencyResponseIntervalsServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdEmergencyResponseIntervalsServiceImpl.java new file mode 100644 index 0000000..00d580a --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdEmergencyResponseIntervalsServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseIntervalsDO; +import com.tashow.cloud.product.mapper.ProdEmergencyResponseIntervalsMapper; +import com.tashow.cloud.product.service.ProdEmergencyResponseIntervalsService; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponseintervals.ProdEmergencyResponseIntervalsSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 紧急响应时间区间设置 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdEmergencyResponseIntervalsServiceImpl implements ProdEmergencyResponseIntervalsService { + + @Resource + private ProdEmergencyResponseIntervalsMapper prodEmergencyResponseIntervalsMapper; + + @Override + public Long createProdEmergencyResponseIntervals(ProdEmergencyResponseIntervalsSaveReqVO createReqVO) { + // 插入 + ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals = BeanUtils.toBean(createReqVO, ProdEmergencyResponseIntervalsDO.class); + prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals); + // 返回 + return prodEmergencyResponseIntervals.getId(); + } + + @Override + public void updateProdEmergencyResponseIntervals(ProdEmergencyResponseIntervalsSaveReqVO updateReqVO) { + // 校验存在 + validateProdEmergencyResponseIntervalsExists(updateReqVO.getId()); + // 更新 + ProdEmergencyResponseIntervalsDO updateObj = BeanUtils.toBean(updateReqVO, ProdEmergencyResponseIntervalsDO.class); + prodEmergencyResponseIntervalsMapper.updateById(updateObj); + } + + @Override + public void deleteProdEmergencyResponseIntervals(Long id) { + // 校验存在 + validateProdEmergencyResponseIntervalsExists(id); + // 删除 + prodEmergencyResponseIntervalsMapper.deleteById(id); + } + + private void validateProdEmergencyResponseIntervalsExists(Long id) { + if (prodEmergencyResponseIntervalsMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_EMERGENCY_RESPONSE_INTERVALS_NOT_EXISTS); + } + } + + @Override + public ProdEmergencyResponseIntervalsDO getProdEmergencyResponseIntervals(Long id) { + return prodEmergencyResponseIntervalsMapper.selectById(id); + } + + @Override + public PageResult getProdEmergencyResponseIntervalsPage(ProdEmergencyResponseIntervalsPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdEmergencyResponseServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdEmergencyResponseServiceImpl.java new file mode 100644 index 0000000..c00baf5 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdEmergencyResponseServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdEmergencyResponseDO; +import com.tashow.cloud.product.mapper.ProdEmergencyResponseMapper; +import com.tashow.cloud.product.service.ProdEmergencyResponseService; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponsePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyResponseSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品紧急响应服务设置 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdEmergencyResponseServiceImpl implements ProdEmergencyResponseService { + + @Resource + private ProdEmergencyResponseMapper prodEmergencyResponseMapper; + + @Override + public Long createProdEmergencyResponse(ProdEmergencyResponseSaveReqVO createReqVO) { + // 插入 + ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(createReqVO, ProdEmergencyResponseDO.class); + prodEmergencyResponseMapper.insert(prodEmergencyResponse); + // 返回 + return prodEmergencyResponse.getId(); + } + + @Override + public void updateProdEmergencyResponse(ProdEmergencyResponseSaveReqVO updateReqVO) { + // 校验存在 + validateProdEmergencyResponseExists(updateReqVO.getId()); + // 更新 + ProdEmergencyResponseDO updateObj = BeanUtils.toBean(updateReqVO, ProdEmergencyResponseDO.class); + prodEmergencyResponseMapper.updateById(updateObj); + } + + @Override + public void deleteProdEmergencyResponse(Long id) { + // 校验存在 + validateProdEmergencyResponseExists(id); + // 删除 + prodEmergencyResponseMapper.deleteById(id); + } + + private void validateProdEmergencyResponseExists(Long id) { + if (prodEmergencyResponseMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_EMERGENCY_RESPONSE_NOT_EXISTS); + } + } + + @Override + public ProdEmergencyResponseDO getProdEmergencyResponse(Long id) { + return prodEmergencyResponseMapper.selectById(id); + } + + @Override + public PageResult getProdEmergencyResponsePage(ProdEmergencyResponsePageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdExtendServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdExtendServiceImpl.java new file mode 100644 index 0000000..171d92f --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdExtendServiceImpl.java @@ -0,0 +1,23 @@ +package com.tashow.cloud.product.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.tashow.cloud.productapi.api.product.dto.ProdExtendDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.product.mapper.ProdExtendMapper; +import com.tashow.cloud.product.mapper.ProdPropValueMapper; +import com.tashow.cloud.product.service.ProdExtendService; +import com.tashow.cloud.product.service.ProdPropValueService; +import org.springframework.stereotype.Service; +import org.springframework.validation.annotation.Validated; + + +/** + * 超区规则 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdExtendServiceImpl extends ServiceImpl implements ProdExtendService { + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdPropServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdPropServiceImpl.java new file mode 100644 index 0000000..0b5a7c2 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdPropServiceImpl.java @@ -0,0 +1,136 @@ +package com.tashow.cloud.product.service.impl; + +import cn.hutool.core.collection.CollUtil; +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.product.mapper.ProdPropMapper; +import com.tashow.cloud.product.mapper.ProdPropValueMapper; +import com.tashow.cloud.product.service.ProdPropService; +import com.tashow.cloud.productapi.api.product.vo.prod.ProdSaveReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodprop.ProdPropSaveReqVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuPropVO; +import com.tashow.cloud.productapi.enums.BaseEnum; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品属性 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdPropServiceImpl extends ServiceImpl implements ProdPropService { + + @Resource + private ProdPropMapper prodPropMapper; + @Resource + private ProdPropValueMapper prodPropValueMapper; + + @Override + public Long createProdProp(ProdPropSaveReqVO createReqVO) { + // 插入 + ProdPropDO prodProp = BeanUtils.toBean(createReqVO, ProdPropDO.class); + prodPropMapper.insert(prodProp); + // 返回 + return prodProp.getPropId(); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void saveProdPropAndValues(ProdSaveReqVO createReqVOInfo) { + + for (ProdPropSaveReqVO createReqVO : createReqVOInfo.getProdPropSaveReqVO()){ + ProdPropDO dbProdProp = prodPropMapper.getProdPropByPropNameAndShopId(createReqVO.getPropName(), createReqVO.getProdId(), createReqVO.getRule()); + if (dbProdProp != null) { + throw new RuntimeException("已有相同名称规格"); + } + ProdPropDO prodProp = BeanUtils.toBean(createReqVO, ProdPropDO.class); + prodProp.setProdId(createReqVOInfo.getProdId()); + prodPropMapper.insert(prodProp); + if (CollUtil.isEmpty(createReqVO.getProdPropValues())) { + return; + } + for (ProdPropValueDO prodPropValueDO : createReqVO.getProdPropValues()){ + prodPropValueDO.setPropId(prodProp.getId()); + prodPropValueMapper.insert(prodPropValueDO); + } + } + } + + @Override + @Transactional + public void updateProdPropAndValues(SkuPropVO skuPropVO) { + for (ProdPropSaveReqVO createReqVO : skuPropVO.getProdPropSaveReqVO()){ + ProdPropDO dbProdProp = prodPropMapper.getProdPropByPropNameAndShopId(createReqVO.getPropName(), createReqVO.getProdId(), createReqVO.getRule()); + if (dbProdProp != null) { + throw new RuntimeException("已有相同名称规格"); + } + ProdPropDO prodProp = BeanUtils.toBean(createReqVO, ProdPropDO.class); + if(Objects.equals(BaseEnum.YES_ONE.getKey(),createReqVO.getIsExist())){ + prodPropMapper.insert(prodProp); + }else { + prodPropMapper.updateById(prodProp); + } + if (CollUtil.isEmpty(createReqVO.getProdPropValues())) { + return; + } + for (ProdPropValueDO prodPropValueDO : createReqVO.getProdPropValues()){ + if(Objects.equals(BaseEnum.YES_ONE.getKey(),prodPropValueDO.getIsExist())){ + prodPropValueDO.setPropId(prodProp.getId()); + prodPropValueMapper.insert(prodPropValueDO); + }else { + prodPropValueMapper.updateById(prodPropValueDO); + } + } + } + } + + + @Override + public void updateProdProp(ProdPropSaveReqVO updateReqVO) { + // 校验存在 + validateProdPropExists(updateReqVO.getPropId()); + // 更新 + ProdPropDO updateObj = BeanUtils.toBean(updateReqVO, ProdPropDO.class); + prodPropMapper.updateById(updateObj); + } + + @Override + public void deleteProdProp(Long id) { + // 校验存在 + validateProdPropExists(id); + // 删除 + prodPropMapper.deleteById(id); + } + + private void validateProdPropExists(Long id) { + if (prodPropMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_PROP_NOT_EXISTS); + } + } + + @Override + public ProdPropDO getProdProp(Long id) { + return prodPropMapper.selectById(id); + } + + @Override + public PageResult getProdPropPage(ProdPropPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdPropValueServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdPropValueServiceImpl.java new file mode 100644 index 0000000..a724c9f --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdPropValueServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.dto.ProdPropValueDO; +import com.tashow.cloud.product.mapper.ProdPropMapper; +import com.tashow.cloud.product.mapper.ProdPropValueMapper; +import com.tashow.cloud.product.service.ProdPropValueService; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValuePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProdPropValueSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 属性规则 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdPropValueServiceImpl extends ServiceImpl implements ProdPropValueService { + + @Resource + private ProdPropValueMapper prodPropValueMapper; + + @Override + public Long createProdPropValue(ProdPropValueSaveReqVO createReqVO) { + // 插入 + ProdPropValueDO prodPropValue = BeanUtils.toBean(createReqVO, ProdPropValueDO.class); + prodPropValueMapper.insert(prodPropValue); + // 返回 + return prodPropValue.getPropId(); + } + + @Override + public void updateProdPropValue(ProdPropValueSaveReqVO updateReqVO) { + // 校验存在 + validateProdPropValueExists(updateReqVO.getPropId()); + // 更新 + ProdPropValueDO updateObj = BeanUtils.toBean(updateReqVO, ProdPropValueDO.class); + prodPropValueMapper.updateById(updateObj); + } + + @Override + public void deleteProdPropValue(Long id) { + // 校验存在 + validateProdPropValueExists(id); + // 删除 + prodPropValueMapper.deleteProdPropValueById(id); + } + + private void validateProdPropValueExists(Long id) { + if (prodPropValueMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_PROP_VALUE_NOT_EXISTS); + } + } + + @Override + public ProdPropValueDO getProdPropValue(Long id) { + return prodPropValueMapper.selectById(id); + } + + @Override + public PageResult getProdPropValuePage(ProdPropValuePageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdReservationConfigServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdReservationConfigServiceImpl.java new file mode 100644 index 0000000..dc977b3 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdReservationConfigServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdReservationConfigDO; +import com.tashow.cloud.product.mapper.ProdReservationConfigMapper; +import com.tashow.cloud.product.service.ProdReservationConfigService; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationConfigSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品预约配置 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdReservationConfigServiceImpl implements ProdReservationConfigService { + + @Resource + private ProdReservationConfigMapper prodReservationConfigMapper; + + @Override + public Long createProdReservationConfig(ProdReservationConfigSaveReqVO createReqVO) { + // 插入 + ProdReservationConfigDO prodReservationConfig = BeanUtils.toBean(createReqVO, ProdReservationConfigDO.class); + prodReservationConfigMapper.insert(prodReservationConfig); + // 返回 + return prodReservationConfig.getId(); + } + + @Override + public void updateProdReservationConfig(ProdReservationConfigSaveReqVO updateReqVO) { + // 校验存在 + validateProdReservationConfigExists(updateReqVO.getId()); + // 更新 + ProdReservationConfigDO updateObj = BeanUtils.toBean(updateReqVO, ProdReservationConfigDO.class); + prodReservationConfigMapper.updateById(updateObj); + } + + @Override + public void deleteProdReservationConfig(Long id) { + // 校验存在 + validateProdReservationConfigExists(id); + // 删除 + prodReservationConfigMapper.deleteById(id); + } + + private void validateProdReservationConfigExists(Long id) { + if (prodReservationConfigMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_RESERVATION_CONFIG_NOT_EXISTS); + } + } + + @Override + public ProdReservationConfigDO getProdReservationConfig(Long id) { + return prodReservationConfigMapper.selectById(id); + } + + @Override + public PageResult getProdReservationConfigPage(ProdReservationConfigPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceAreaRelevanceServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceAreaRelevanceServiceImpl.java new file mode 100644 index 0000000..516cf31 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceAreaRelevanceServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreaRelevanceDO; +import com.tashow.cloud.product.mapper.ProdServiceAreaRelevanceMapper; +import com.tashow.cloud.product.service.ProdServiceAreaRelevanceService; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevancePageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodservicearearelevance.ProdServiceAreaRelevanceSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品与服务区域关联 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdServiceAreaRelevanceServiceImpl implements ProdServiceAreaRelevanceService { + + @Resource + private ProdServiceAreaRelevanceMapper prodServiceAreaRelevanceMapper; + + @Override + public Long createProdServiceAreaRelevance(ProdServiceAreaRelevanceSaveReqVO createReqVO) { + // 插入 + ProdServiceAreaRelevanceDO prodServiceAreaRelevance = BeanUtils.toBean(createReqVO, ProdServiceAreaRelevanceDO.class); + prodServiceAreaRelevanceMapper.insert(prodServiceAreaRelevance); + // 返回 + return prodServiceAreaRelevance.getProdId(); + } + + @Override + public void updateProdServiceAreaRelevance(ProdServiceAreaRelevanceSaveReqVO updateReqVO) { + // 校验存在 + validateProdServiceAreaRelevanceExists(updateReqVO.getProdId()); + // 更新 + ProdServiceAreaRelevanceDO updateObj = BeanUtils.toBean(updateReqVO, ProdServiceAreaRelevanceDO.class); + prodServiceAreaRelevanceMapper.updateById(updateObj); + } + + @Override + public void deleteProdServiceAreaRelevance(Long id) { + // 校验存在 + validateProdServiceAreaRelevanceExists(id); + // 删除 + prodServiceAreaRelevanceMapper.deleteById(id); + } + + private void validateProdServiceAreaRelevanceExists(Long id) { + if (prodServiceAreaRelevanceMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_SERVICE_AREA_RELEVANCE_NOT_EXISTS); + } + } + + @Override + public ProdServiceAreaRelevanceDO getProdServiceAreaRelevance(Long id) { + return prodServiceAreaRelevanceMapper.selectById(id); + } + + @Override + public PageResult getProdServiceAreaRelevancePage(ProdServiceAreaRelevancePageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceAreasServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceAreasServiceImpl.java new file mode 100644 index 0000000..fe7ccfb --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceAreasServiceImpl.java @@ -0,0 +1,79 @@ +package com.tashow.cloud.product.service.impl; + +import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.tashow.cloud.productapi.api.product.dto.ProdPropDO; +import com.tashow.cloud.productapi.api.product.dto.ProdServiceAreasDO; +import com.tashow.cloud.product.mapper.ProdPropMapper; +import com.tashow.cloud.product.mapper.ProdServiceAreasMapper; +import com.tashow.cloud.product.service.ProdServiceAreasService; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceareas.ProdServiceAreasSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 服务区域 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdServiceAreasServiceImpl extends ServiceImpl implements ProdServiceAreasService { + + @Resource + private ProdServiceAreasMapper prodServiceAreasMapper; + + @Override + public Long createProdServiceAreas(ProdServiceAreasSaveReqVO createReqVO) { + // 插入 + ProdServiceAreasDO prodServiceAreas = BeanUtils.toBean(createReqVO, ProdServiceAreasDO.class); + prodServiceAreasMapper.insert(prodServiceAreas); + // 返回 + return prodServiceAreas.getId(); + } + + @Override + public void updateProdServiceAreas(ProdServiceAreasSaveReqVO updateReqVO) { + // 校验存在 + validateProdServiceAreasExists(updateReqVO.getId()); + // 更新 + ProdServiceAreasDO updateObj = BeanUtils.toBean(updateReqVO, ProdServiceAreasDO.class); + prodServiceAreasMapper.updateById(updateObj); + } + + @Override + public void deleteProdServiceAreas(Long id) { + // 校验存在 + validateProdServiceAreasExists(id); + // 删除 + prodServiceAreasMapper.deleteById(id); + } + + private void validateProdServiceAreasExists(Long id) { + if (prodServiceAreasMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_SERVICE_AREAS_NOT_EXISTS); + } + } + + @Override + public ProdServiceAreasDO getProdServiceAreas(Long id) { + return prodServiceAreasMapper.selectById(id); + } + + @Override + public PageResult getProdServiceAreasPage(ProdServiceAreasPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceImpl.java new file mode 100644 index 0000000..2fa6345 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceImpl.java @@ -0,0 +1,512 @@ +package com.tashow.cloud.product.service.impl; + +import cn.hutool.core.collection.CollectionUtil; +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.tashow.cloud.common.util.date.DateUtils; +import com.tashow.cloud.mybatis.mybatis.core.util.MyBatisUtils; +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.product.mapper.*; +import com.tashow.cloud.product.service.ProdPropService; +import com.tashow.cloud.product.service.ProdService; + +import com.tashow.cloud.productapi.api.product.vo.prod.*; +import com.tashow.cloud.productapi.api.product.vo.prodadditionalfeedates.ProdAdditionalFeeBlackVO; +import com.tashow.cloud.productapi.api.product.vo.prodemergencyresponse.ProdEmergencyInfoVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodreservationconfig.ProdReservationInfoVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.sku.SkuRecycleBinVO; +import com.tashow.cloud.productapi.enums.BaseEnum; +import lombok.val; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdServiceImpl implements ProdService { + + @Resource + private ProdMapper prodMapper; + @Resource + private SkuMapper skuMapper; + @Resource + private ProdPropService prodPropService; + @Resource + private ProdServiceAreasMapper prodServiceAreasMapper; + @Resource + private ProdServiceAreaRelevanceMapper prodServiceAreaRelevanceMapper; + @Resource + private ProdServiceOverAreaRulesMapper prodServiceOverAreaRulesMapper; + @Resource + private ProdReservationConfigMapper prodReservationConfigMapper; + @Resource + private ProdEmergencyResponseIntervalsMapper prodEmergencyResponseIntervalsMapper; + @Resource + private ProdEmergencyResponseMapper prodEmergencyResponseMapper; + @Resource + private ProductOrderLimitMapper productOrderLimitMapper; + @Resource + private ProdAdditionalFeeDatesMapper prodAdditionalFeeDatesMapper; + @Resource + private ProdAdditionalFeePeriodsMapper prodAdditionalFeePeriodsMapper; + @Resource + private ProdWeightRangePricesMapper prodWeightRangePricesMapper; + @Resource + private ProdExtendMapper prodExtendMapper; + + @Override + @Transactional + public Long createProd(ProdSaveReqVO createReqVO) { + // 插入 + ProdDO prod = BeanUtils.toBean(createReqVO, ProdDO.class); + prodMapper.insert(prod); + //保存sku + if (CollectionUtil.isNotEmpty(createReqVO.getSkuList())) { + List skuList = createReqVO.getSkuList(); + for (SkuDO sku : skuList) { + sku.setProdId(prod.getProdId()); + } + skuMapper.insertBatch(skuList); + } + createReqVO.setProdId(prod.getProdId()); + //保存规格 + prodPropService.saveProdPropAndValues(createReqVO); + ProdExtendDO prodExtendDO = new ProdExtendDO(); + prodExtendDO.setIsExpire(BaseEnum.YES_ONE.getKey()); + prodExtendDO.setIsExpire(BaseEnum.YES_ONE.getKey()); + prodExtendDO.setProdId(prod.getProdId()); + prodExtendMapper.insert(prodExtendDO); + // 返回 + return prod.getProdId(); + } + + @Override + @Transactional + public void createProdService(ProdServiceVO prodServiceVO) { + ProdDO prodDO = new ProdDO(); + prodDO.setProdId(prodServiceVO.getProdId()); + //服务区域设置 + if (Objects.equals(prodServiceVO.getRegionSwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setRegionSwitch(BaseEnum.YES_ONE.getKey()); + //保存区域设置信息 + ProdServiceOverAreaRulesDO prodServiceOverAreaRules = BeanUtils.toBean(prodServiceVO.getProdServiceAreasInfo(), ProdServiceOverAreaRulesDO.class); + prodServiceOverAreaRules.setProdId(prodDO.getProdId()); + prodServiceOverAreaRulesMapper.insert(prodServiceOverAreaRules); + //保存区域 + List areaNameList = prodServiceVO.getProdServiceAreasInfo().getAreaNameList(); + for (String areaName : areaNameList) { + //查询区域信息 + ProdServiceAreasDO prodServiceAreas = prodServiceAreasMapper.selectOne(new LambdaQueryWrapper() + .eq(ProdServiceAreasDO::getAreaName, areaName) + ); + if (prodServiceAreas != null) { + //插入关联表 + prodServiceAreaRelevanceMapper.insert(new ProdServiceAreaRelevanceDO() + .setProdId(prodDO.getProdId()) + .setAreaId(prodServiceAreas.getId()) + ); + } + } + } + //预约设置设置 + /*if (Objects.equals(prodServiceVO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setReservationSwitch(BaseEnum.YES_ONE.getKey()); + ProdReservationInfoVO prodReservationConfigDO = prodServiceVO.getProdReservationConfig(); + prodReservationConfigDO.setProdId(prodDO.getProdId()); + prodReservationConfigMapper.insert(prodReservationConfigDO); + }*/ + //紧急响应设置 + if (Objects.equals(prodServiceVO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setEmergencySwitch(BaseEnum.YES_ONE.getKey()); + // 插入 + ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(prodServiceVO.prodEmergencyInfoVO, ProdEmergencyResponseDO.class); + prodEmergencyResponse.setProdId(prodDO.getProdId()); + prodEmergencyResponseMapper.insert(prodEmergencyResponse); + for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.prodEmergencyInfoVO.getProdEmergencyResponseIntervalsList()) { + prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId()); + prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals); + } + } + //接单上线设置 + if (Objects.equals(prodServiceVO.getOrderLimitSwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setOrderLimitSwitch(BaseEnum.YES_ONE.getKey()); + ProductOrderLimitDO productOrderLimit = prodServiceVO.productOrderLimitVO; + productOrderLimit.setProdId(prodDO.getProdId()); + productOrderLimitMapper.insert(productOrderLimit); + } + //特殊时段设置 + if (Objects.equals(prodServiceVO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setAdditionalSwitch(BaseEnum.YES_ONE.getKey()); + for (ProdAdditionalFeeDatesDO prodAdditionalFeeDates : prodServiceVO.getProdAdditionalFeeDatesList()) { + prodAdditionalFeeDates.setProdId(prodServiceVO.getProdId()); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDates); + } + } + //特殊日期设置 + if (Objects.equals(prodServiceVO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setAdditionalFeeSwitch(BaseEnum.YES_ONE.getKey()); + for (ProdAdditionalFeePeriodsDO prodAdditionalFeePeriods : prodServiceVO.getProdAdditionalFeePeriodsList()) { + prodAdditionalFeePeriods.setProdId(prodServiceVO.getProdId()); + prodAdditionalFeePeriodsMapper.insert(prodAdditionalFeePeriods); + } + } + //体重设置 + /* if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) { + prodDO.setWeightSwitch(BaseEnum.YES_ONE.getKey()); + ProdWeightRangePricesDO prodWeightRangePrices = prodServiceVO.prodWeightConfig; + prodWeightRangePrices.setProdId(prodDO.getProdId()); + prodWeightRangePricesMapper.insert(prodWeightRangePrices); + }*/ + prodMapper.updateById(prodDO); + } + + @Override + @Transactional + public void uptateProdService(ProdServiceInfoVO prodServiceVO) { + + ProdDO prod = BeanUtils.toBean(prodServiceVO, ProdDO.class); + //服务区域设置 + if (Objects.equals(prodServiceVO.getRegionSwitch(), BaseEnum.YES_ONE.getKey())) { + ProdServiceOverAreaRulesDO overAreaRules = prodServiceOverAreaRulesMapper.selectOne(new LambdaQueryWrapper() + .eq(ProdServiceOverAreaRulesDO::getProdId, prodServiceVO.getProdId())); + if (overAreaRules == null) { + prod.setRegionSwitch(BaseEnum.YES_ONE.getKey()); + //保存区域设置信息 + ProdServiceOverAreaRulesDO prodServiceOverAreaRules = BeanUtils.toBean(prodServiceVO.getProdServiceAreasInfo(), ProdServiceOverAreaRulesDO.class); + prodServiceOverAreaRules.setProdId(prod.getProdId()); + prodServiceOverAreaRulesMapper.insert(prodServiceOverAreaRules); + //保存区域 + List areaNameList = prodServiceVO.getProdServiceAreasInfo().getAreaNameList(); + for (String areaName : areaNameList) { + //查询区域信息 + ProdServiceAreasDO prodServiceAreas = prodServiceAreasMapper.selectOne(new LambdaQueryWrapper() + .eq(ProdServiceAreasDO::getAreaName, areaName) + ); + if (prodServiceAreas != null) { + //插入关联表 + prodServiceAreaRelevanceMapper.insert(new ProdServiceAreaRelevanceDO() + .setProdId(prod.getProdId()) + .setAreaId(prodServiceAreas.getId()) + ); + } + } + } else { + //保存区域设置信息 + ProdServiceOverAreaRulesDO prodServiceOverAreaRules = BeanUtils.toBean(prodServiceVO.getProdServiceAreasInfo(), ProdServiceOverAreaRulesDO.class); + prodServiceOverAreaRules.setProdId(prodServiceVO.getProdId()); + prodServiceOverAreaRulesMapper.updateById(prodServiceOverAreaRules); + //先批量删除区域关联表 + prodServiceAreaRelevanceMapper.deleteRelevance(prodServiceVO.getProdId()); + //保存区域 + List areaNameList = prodServiceVO.getProdServiceAreasInfo().getAreaNameList(); + for (String areaName : areaNameList) { + //查询区域信息 + ProdServiceAreasDO prodServiceAreas = prodServiceAreasMapper.selectOne(new LambdaQueryWrapper() + .eq(ProdServiceAreasDO::getAreaName, areaName) + ); + if (prodServiceAreas != null) { + //插入关联表 + prodServiceAreaRelevanceMapper.insert(new ProdServiceAreaRelevanceDO() + .setProdId(prodServiceVO.getProdId()) + .setAreaId(prodServiceAreas.getId()) + ); + } + } + } + + } + //预约设置设置 + if (Objects.equals(prodServiceVO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())) { + ProdReservationConfigDO reservationConfig = prodReservationConfigMapper.selectOne(new LambdaQueryWrapper() + .eq(ProdReservationConfigDO::getProdId, prodServiceVO.getProdId())); + ProdReservationInfoReqVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig(); + if (reservationConfig == null) { + prod.setReservationSwitch(BaseEnum.YES_ONE.getKey()); + ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodReservationInfoVO, ProdReservationConfigDO.class); + prodReservationConfigDO.setProdId(prod.getProdId()); + prodReservationConfigDO.setTimeSlot(prodReservationInfoVO.getTimeBook().getTimeSlot()); + prodReservationConfigDO.setReservationTimeSlots(prodReservationInfoVO.getTimeBook().getReservationTimeSlots()); + prodReservationConfigMapper.insert(prodReservationConfigDO); + //先删除在新增 + prodAdditionalFeeDatesMapper.deleteAdditionalFeeDates(prod.getProdId(), 2); + if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) { + for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) { + ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class); + prodAdditionalFeeDatesDO.setProdId(prod.getProdId()); + prodAdditionalFeeDatesDO.setType(2); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO); + } + } + } else { + ProdReservationConfigDO prodReservationConfigDO = BeanUtils.toBean(prodServiceVO.getProdReservationConfig(), ProdReservationConfigDO.class); + prodReservationConfigDO.setTimeSlot(prodReservationInfoVO.getTimeBook().getTimeSlot()); + prodReservationConfigDO.setReservationTimeSlots(prodReservationInfoVO.getTimeBook().getReservationTimeSlots()); + prodReservationConfigMapper.updateById(prodReservationConfigDO); + //先删除在新增 + prodAdditionalFeeDatesMapper.deleteAdditionalFeeDates(prod.getProdId(), 2); + if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) { + for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) { + ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class); + prodAdditionalFeeDatesDO.setProdId(prod.getProdId()); + prodAdditionalFeeDatesDO.setType(2); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO); + } + } + } + } + //紧急响应设置 + if (Objects.equals(prodServiceVO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())) { + ProdEmergencyResponseDO rmergencyResponse = prodEmergencyResponseMapper.selectOne(new LambdaQueryWrapper() + .eq(ProdEmergencyResponseDO::getProdId, prodServiceVO.getProdId())); + if (rmergencyResponse == null) { + prod.setEmergencySwitch(BaseEnum.YES_ONE.getKey()); + // 插入 + ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(prodServiceVO.getProdEmergencyInfoVO(), ProdEmergencyResponseDO.class); + prodEmergencyResponse.setProdId(prod.getProdId()); + prodEmergencyResponseMapper.insert(prodEmergencyResponse); + if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList() != null) { + for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList()) { + prodEmergencyResponseIntervals.setId(null); + prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId()); + prodEmergencyResponseIntervals.setProdId(prod.getProdId()); + prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals); + } + } + if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList() != null) { + for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList()) { + ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class); + prodAdditionalFeeDatesDO.setId(null); + prodAdditionalFeeDatesDO.setProdId(prod.getProdId()); + prodAdditionalFeeDatesDO.setType(3); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO); + } + } + } else { + ProdEmergencyResponseDO prodEmergencyResponse = BeanUtils.toBean(prodServiceVO.getProdEmergencyInfoVO(), ProdEmergencyResponseDO.class); + if (prodEmergencyResponse != null) { + prodEmergencyResponseMapper.updateById(prodEmergencyResponse); + prodEmergencyResponseIntervalsMapper.deleteIntervals(prodEmergencyResponse.getId()); + if (prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList() != null) { + for (ProdEmergencyResponseIntervalsDO prodEmergencyResponseIntervals : prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList()) { + prodEmergencyResponseIntervals.setId(null); + prodEmergencyResponseIntervals.setConfigId(prodEmergencyResponse.getId()); + prodEmergencyResponseIntervals.setProdId(prod.getProdId()); + prodEmergencyResponseIntervalsMapper.insert(prodEmergencyResponseIntervals); + } + } + //先删除在新增 + prodAdditionalFeeDatesMapper.deleteAdditionalFeeDates(prod.getProdId(), 3); + if (prodServiceVO.getProdReservationConfig().getProdReservationBlackList() != null) { + for (ProdAdditionalFeeBlackVO prodAdditionalFeeBlackVO : prodServiceVO.getProdReservationConfig().getProdReservationBlackList()) { + ProdAdditionalFeeDatesDO prodAdditionalFeeDatesDO = BeanUtils.toBean(prodAdditionalFeeBlackVO, ProdAdditionalFeeDatesDO.class); + prodAdditionalFeeDatesDO.setId(null); + prodAdditionalFeeDatesDO.setProdId(prod.getProdId()); + prodAdditionalFeeDatesDO.setType(3); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDatesDO); + } + } + } + } + } + //接单上线设置 + if (Objects.equals(prodServiceVO.getOrderLimitSwitch(), BaseEnum.YES_ONE.getKey())) { + ProductOrderLimitDO orderLimit = productOrderLimitMapper.selectOne(new LambdaQueryWrapper() + .eq(ProductOrderLimitDO::getProdId, prodServiceVO.getProdId())); + if (orderLimit == null) { + prod.setOrderLimitSwitch(BaseEnum.YES_ONE.getKey()); + ProductOrderLimitDO productOrderLimit = prodServiceVO.getProductOrderLimitVO(); + productOrderLimit.setProdId(prod.getProdId()); + productOrderLimitMapper.insert(productOrderLimit); + } else { + productOrderLimitMapper.updateById(prodServiceVO.getProductOrderLimitVO()); + } + } + //特殊时段设置 + if (Objects.equals(prodServiceVO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())) { + if (prodServiceVO.getProdAdditionalFeeDatesList() != null) + for (ProdAdditionalFeeDatesDO prodAdditionalFeeDates : prodServiceVO.getProdAdditionalFeeDatesList()) { + if (prodAdditionalFeeDates.getId() == null) { + prodAdditionalFeeDates.setProdId(prodServiceVO.getProdId()); + prodAdditionalFeeDates.setType(1); + prodAdditionalFeeDatesMapper.insert(prodAdditionalFeeDates); + } else { + prodAdditionalFeeDatesMapper.updateById(prodAdditionalFeeDates); + } + } + } + //特殊日期设置 + if (Objects.equals(prodServiceVO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())) { + for (ProdAdditionalFeePeriodsDO prodAdditionalFeePeriods : prodServiceVO.getProdAdditionalFeePeriodsList()) { + if (prodAdditionalFeePeriods.getId() == null) { + prodAdditionalFeePeriods.setProdId(prodServiceVO.getProdId()); + prodAdditionalFeePeriodsMapper.insert(prodAdditionalFeePeriods); + } else { + prodAdditionalFeePeriodsMapper.updateById(prodAdditionalFeePeriods); + } + } + } + //体重设置 + if (Objects.equals(prodServiceVO.getWeightSwitch(), BaseEnum.YES_ONE.getKey())) { + prod.setWeightSwitch(prodServiceVO.getWeightSwitch()); + ProdExtendDO prodExtendDO = prodExtendMapper.selectOne(ProdExtendDO::getProdId, prod.getProdId()); + if (prodExtendDO != null) { + prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge()); + prodExtendMapper.updateById(prodExtendDO); + } else { + prodExtendDO = new ProdExtendDO(); + prodExtendDO.setProdId(prod.getProdId()); + prodExtendDO.setIsWeightCharge(prodServiceVO.getProdWeightConfig().getIsWeightCharge()); + prodExtendMapper.insert(prodExtendDO); + } + prodWeightRangePricesMapper.deleteWeightRangePrices(prod.getProdId()); + if (prodServiceVO.getProdWeightConfig().getProdWeightConfigList() != null) { + for (ProdWeightRangePricesDO prodWeightRangePricesDO : prodServiceVO.getProdWeightConfig().getProdWeightConfigList()) { + prodWeightRangePricesDO.setProdId(prod.getProdId()); + prodWeightRangePricesMapper.insert(prodWeightRangePricesDO); + } + } + } + prodMapper.updateById(prod); + } + + @Override + public ProdServiceVO getProdService(Long prodId) { + ProdDO prodDO = prodMapper.selectById(prodId); + ProdServiceVO prodServiceVO = prodMapper.selectProdService(prodDO.getProdId()); + + if (prodServiceVO.getProdEmergencyInfoVO().getId()== null) { + prodServiceVO.setProdEmergencyInfoVO(null); + }else { + if (prodServiceVO.getProdEmergencyInfoVO().getId()!= null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().size()== 0) { + ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO(); + prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>()); + } + if (prodServiceVO.getProdEmergencyInfoVO().getId()!= null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList().get(0).isEmpty()) { + ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO(); + prodEmergencyInfoVO.setProdEmergencyResponseBlackList(new ArrayList<>()); + } + } + if (prodServiceVO.getProdAdditionalFeeDatesList().get(0).getId()==null) { + prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>()); + } + if (prodServiceVO.getProdAdditionalFeePeriodsList().get(0).getId()==null) { + prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>()); + } + return prodServiceVO; + /* if (prodDO != null && prodDO.getRegionSwitch() == BaseEnum.YES_ONE.getKey()) { + ProdServiceVO prodServiceVO = prodMapper.selectProdService(prodDO.getProdId()); + if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) { + ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig(); + prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().get(0).isEmpty()) { + ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO(); + prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeeDatesList().get(0).isEmpty()) { + prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeePeriodsList().get(0).isEmpty()) { + prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>()); + } + return prodServiceVO; + } else { + ProdServiceVO prodServiceVO = prodMapper.selectProdServiceInfo(prodDO.getProdId()); + if (Objects.equals(prodDO.getReservationSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdReservationConfig()!=null&&prodServiceVO.getProdReservationConfig().getProdReservationBlackList().get(0).isEmpty()) { + ProdReservationInfoVO prodReservationInfoVO = prodServiceVO.getProdReservationConfig(); + prodReservationInfoVO.setProdReservationBlackList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO()!=null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseIntervalsList().get(0).isEmpty()) { + ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO(); + prodEmergencyInfoVO.setProdEmergencyResponseIntervalsList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getEmergencySwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdEmergencyInfoVO()!=null&&prodServiceVO.getProdEmergencyInfoVO().getProdEmergencyResponseBlackList().get(0).isEmpty()) { + ProdEmergencyInfoVO prodEmergencyInfoVO = prodServiceVO.getProdEmergencyInfoVO(); + prodEmergencyInfoVO.setProdEmergencyResponseBlackList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getAdditionalSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeeDatesList()!=null&&prodServiceVO.getProdAdditionalFeeDatesList().get(0).isEmpty()) { + prodServiceVO.setProdAdditionalFeeDatesList(new ArrayList<>()); + } + if (Objects.equals(prodDO.getAdditionalFeeSwitch(), BaseEnum.YES_ONE.getKey())&&prodServiceVO.getProdAdditionalFeePeriodsList()!=null&&prodServiceVO.getProdAdditionalFeePeriodsList().get(0).isEmpty()) { + prodServiceVO.setProdAdditionalFeePeriodsList(new ArrayList<>()); + } + return prodServiceVO; + }*/ + + + } + + @Override + public void updateProd(ProdSaveReqVO updateReqVO) { + // 校验存在 + validateProdExists(updateReqVO.getProdId()); + // 更新 + ProdDO updateObj = BeanUtils.toBean(updateReqVO, ProdDO.class); + prodMapper.updateById(updateObj); + } + + @Override + public void deleteProd(Long id) { + // 校验存在 + validateProdExists(id); + ProdDO prod = new ProdDO(); + prod.setProdId(id); + prod.setDeleted(BaseEnum.YES_ONE.getKey()); + prod.setDeleteTime(new Date()); + // 删除 + prodMapper.deleteById(prod); + } + + private void validateProdExists(Long id) { + if (prodMapper.selectById(id) == null) { + //throw exception(100, "商品不存在"); + } + } + + @Override + public ProdDO getProd(Long id) { + return prodMapper.selectById(id); + } + + @Override + public PageResult getProdPage(ProdPageReqVO pageReqVO) { + IPage prodPageList = prodMapper.getProdPageList(MyBatisUtils.buildPage(pageReqVO), + pageReqVO.getCreateTime(), pageReqVO.getProdName(), pageReqVO.getShopId(), pageReqVO.getStatus(), pageReqVO.getCategoryId()); + return new PageResult<>(prodPageList.getRecords(), prodPageList.getTotal()); + } + + @Override + public PageResult getProdRecycleBinPageList(ProdRecycleBinVO prodRecycleBinVO) { + IPage prodPageList = prodMapper.getProdRecycleBinPageList(MyBatisUtils.buildPage(prodRecycleBinVO), prodRecycleBinVO.getDeleteTime(), prodRecycleBinVO.getProdName()); + for (ProdRestoreListVO prodPage : prodPageList.getRecords()) { + if (prodPage.getDeleteTime() != null) { + prodPage.setRemainingDays(DateUtils.getRemainingDays(prodPage.getDeleteTime())); + } + } + return new PageResult<>(prodPageList.getRecords(), prodPageList.getTotal()); + } + + @Override + public void restoreProdList(List ids) { + prodMapper.batchRestoreProd(ids); + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceOverAreaRulesServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceOverAreaRulesServiceImpl.java new file mode 100644 index 0000000..6f5e253 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdServiceOverAreaRulesServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdServiceOverAreaRulesDO; +import com.tashow.cloud.product.mapper.ProdServiceOverAreaRulesMapper; +import com.tashow.cloud.product.service.ProdServiceOverAreaRulesService; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodserviceoverarearules.ProdServiceOverAreaRulesSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 超区规则 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdServiceOverAreaRulesServiceImpl implements ProdServiceOverAreaRulesService { + + @Resource + private ProdServiceOverAreaRulesMapper prodServiceOverAreaRulesMapper; + + @Override + public Long createProdServiceOverAreaRules(ProdServiceOverAreaRulesSaveReqVO createReqVO) { + // 插入 + ProdServiceOverAreaRulesDO prodServiceOverAreaRules = BeanUtils.toBean(createReqVO, ProdServiceOverAreaRulesDO.class); + prodServiceOverAreaRulesMapper.insert(prodServiceOverAreaRules); + // 返回 + return prodServiceOverAreaRules.getId(); + } + + @Override + public void updateProdServiceOverAreaRules(ProdServiceOverAreaRulesSaveReqVO updateReqVO) { + // 校验存在 + validateProdServiceOverAreaRulesExists(updateReqVO.getId()); + // 更新 + ProdServiceOverAreaRulesDO updateObj = BeanUtils.toBean(updateReqVO, ProdServiceOverAreaRulesDO.class); + prodServiceOverAreaRulesMapper.updateById(updateObj); + } + + @Override + public void deleteProdServiceOverAreaRules(Long id) { + // 校验存在 + validateProdServiceOverAreaRulesExists(id); + // 删除 + prodServiceOverAreaRulesMapper.deleteById(id); + } + + private void validateProdServiceOverAreaRulesExists(Long id) { + if (prodServiceOverAreaRulesMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_SERVICE_OVER_AREA_RULES_NOT_EXISTS); + } + } + + @Override + public ProdServiceOverAreaRulesDO getProdServiceOverAreaRules(Long id) { + return prodServiceOverAreaRulesMapper.selectById(id); + } + + @Override + public PageResult getProdServiceOverAreaRulesPage(ProdServiceOverAreaRulesPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdTagsServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdTagsServiceImpl.java new file mode 100644 index 0000000..ba4003b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdTagsServiceImpl.java @@ -0,0 +1,73 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdTagsDO; +import com.tashow.cloud.product.mapper.ProdTagsMapper; +import com.tashow.cloud.product.service.ProdTagsService; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodtags.ProdTagsSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品和标签管理 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdTagsServiceImpl implements ProdTagsService { + + @Resource + private ProdTagsMapper prodTagsMapper; + + @Override + public Long createProdTags(ProdTagsSaveReqVO createReqVO) { + // 插入 + ProdTagsDO prodTags = BeanUtils.toBean(createReqVO, ProdTagsDO.class); + prodTagsMapper.insert(prodTags); + // 返回 + return prodTags.getProductId(); + } + + @Override + public void updateProdTags(ProdTagsSaveReqVO updateReqVO) { + // 校验存在 + validateProdTagsExists(updateReqVO.getProductId()); + // 更新 + ProdTagsDO updateObj = BeanUtils.toBean(updateReqVO, ProdTagsDO.class); + prodTagsMapper.updateById(updateObj); + } + + @Override + public void deleteProdTags(Long id) { + // 校验存在 + validateProdTagsExists(id); + // 删除 + prodTagsMapper.deleteById(id); + } + + private void validateProdTagsExists(Long id) { + if (prodTagsMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_TAGS_NOT_EXISTS); + } + } + + @Override + public ProdTagsDO getProdTags(Long id) { + return prodTagsMapper.selectById(id); + } + + @Override + public PageResult getProdTagsPage(ProdTagsPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdWeightRangePricesServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdWeightRangePricesServiceImpl.java new file mode 100644 index 0000000..b28f9a0 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProdWeightRangePricesServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProdWeightRangePricesDO; +import com.tashow.cloud.product.mapper.ProdWeightRangePricesMapper; +import com.tashow.cloud.product.service.ProdWeightRangePricesService; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodweightrangeprices.ProdWeightRangePricesSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 体重区间价格 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProdWeightRangePricesServiceImpl implements ProdWeightRangePricesService { + + @Resource + private ProdWeightRangePricesMapper prodWeightRangePricesMapper; + + @Override + public Long createProdWeightRangePrices(ProdWeightRangePricesSaveReqVO createReqVO) { + // 插入 + ProdWeightRangePricesDO prodWeightRangePrices = BeanUtils.toBean(createReqVO, ProdWeightRangePricesDO.class); + prodWeightRangePricesMapper.insert(prodWeightRangePrices); + // 返回 + return prodWeightRangePrices.getId(); + } + + @Override + public void updateProdWeightRangePrices(ProdWeightRangePricesSaveReqVO updateReqVO) { + // 校验存在 + validateProdWeightRangePricesExists(updateReqVO.getId()); + // 更新 + ProdWeightRangePricesDO updateObj = BeanUtils.toBean(updateReqVO, ProdWeightRangePricesDO.class); + prodWeightRangePricesMapper.updateById(updateObj); + } + + @Override + public void deleteProdWeightRangePrices(Long id) { + // 校验存在 + validateProdWeightRangePricesExists(id); + // 删除 + prodWeightRangePricesMapper.deleteById(id); + } + + private void validateProdWeightRangePricesExists(Long id) { + if (prodWeightRangePricesMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PROD_WEIGHT_RANGE_PRICES_NOT_EXISTS); + } + } + + @Override + public ProdWeightRangePricesDO getProdWeightRangePrices(Long id) { + return prodWeightRangePricesMapper.selectById(id); + } + + @Override + public PageResult getProdWeightRangePricesPage(ProdWeightRangePricesPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProductOrderLimitServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProductOrderLimitServiceImpl.java new file mode 100644 index 0000000..abae5d3 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ProductOrderLimitServiceImpl.java @@ -0,0 +1,74 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ProductOrderLimitDO; +import com.tashow.cloud.product.mapper.ProductOrderLimitMapper; +import com.tashow.cloud.product.service.ProductOrderLimitService; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.productorderlimit.ProductOrderLimitSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品接单上限设置 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ProductOrderLimitServiceImpl implements ProductOrderLimitService { + + @Resource + private ProductOrderLimitMapper productOrderLimitMapper; + + @Override + public Long createProductOrderLimit(ProductOrderLimitSaveReqVO createReqVO) { + // 插入 + ProductOrderLimitDO productOrderLimit = BeanUtils.toBean(createReqVO, ProductOrderLimitDO.class); + productOrderLimitMapper.insert(productOrderLimit); + // 返回 + return productOrderLimit.getId(); + } + + @Override + public void updateProductOrderLimit(ProductOrderLimitSaveReqVO updateReqVO) { + // 校验存在 + validateProductOrderLimitExists(updateReqVO.getId()); + // 更新 + ProductOrderLimitDO updateObj = BeanUtils.toBean(updateReqVO, ProductOrderLimitDO.class); + productOrderLimitMapper.updateById(updateObj); + } + + @Override + public void deleteProductOrderLimit(Long id) { + // 校验存在 + validateProductOrderLimitExists(id); + // 删除 + productOrderLimitMapper.deleteById(id); + } + + private void validateProductOrderLimitExists(Long id) { + if (productOrderLimitMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.PRODUCT_ORDER_LIMIT_NOT_EXISTS); + } + } + + @Override + public ProductOrderLimitDO getProductOrderLimit(Long id) { + return productOrderLimitMapper.selectById(id); + } + + @Override + public PageResult getProductOrderLimitPage(ProductOrderLimitPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ShopDetailServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ShopDetailServiceImpl.java new file mode 100644 index 0000000..b7bdb09 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/ShopDetailServiceImpl.java @@ -0,0 +1,78 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.ShopDetailDO; +import com.tashow.cloud.product.mapper.ShopDetailMapper; +import com.tashow.cloud.product.service.ShopDetailService; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.shopdetail +.ShopDetailSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 店铺信息 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class ShopDetailServiceImpl implements ShopDetailService { + + @Resource + private ShopDetailMapper shopDetailMapper; + + @Override + public Long createShopDetail(ShopDetailSaveReqVO createReqVO) { + // 插入 + ShopDetailDO shopDetail = BeanUtils.toBean(createReqVO, ShopDetailDO.class); + shopDetailMapper.insert(shopDetail); + // 返回 + return shopDetail.getShopId(); + } + + @Override + public void updateShopDetail(ShopDetailSaveReqVO updateReqVO) { + // 校验存在 + validateShopDetailExists(updateReqVO.getShopId()); + // 更新 + ShopDetailDO updateObj = BeanUtils.toBean(updateReqVO, ShopDetailDO.class); + shopDetailMapper.updateById(updateObj); + } + + @Override + public void deleteShopDetail(Long id) { + // 校验存在 + validateShopDetailExists(id); + // 删除 + shopDetailMapper.deleteById(id); + } + + private void validateShopDetailExists(Long id) { + if (shopDetailMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SHOP_DETAIL_NOT_EXISTS); + } + } + + @Override + public ShopDetailDO getShopDetail(Long id) { + return shopDetailMapper.selectById(id); + } + + @Override + public PageResult getShopDetailPage(ShopDetailPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceDeliverServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceDeliverServiceImpl.java new file mode 100644 index 0000000..374965b --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceDeliverServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDeliverDO; +import com.tashow.cloud.product.mapper.SkuServiceDeliverMapper; +import com.tashow.cloud.product.service.SkuServiceDeliverService; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedeliver.SkuServiceDeliverSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 服务交付方式 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class SkuServiceDeliverServiceImpl implements SkuServiceDeliverService { + + @Resource + private SkuServiceDeliverMapper skuServiceDeliverMapper; + + @Override + public Long createSkuServiceDeliver(SkuServiceDeliverSaveReqVO createReqVO) { + // 插入 + SkuServiceDeliverDO skuServiceDeliver = BeanUtils.toBean(createReqVO, SkuServiceDeliverDO.class); + skuServiceDeliverMapper.insert(skuServiceDeliver); + // 返回 + return skuServiceDeliver.getId(); + } + + @Override + public void updateSkuServiceDeliver(SkuServiceDeliverSaveReqVO updateReqVO) { + // 校验存在 + validateSkuServiceDeliverExists(updateReqVO.getId()); + // 更新 + SkuServiceDeliverDO updateObj = BeanUtils.toBean(updateReqVO, SkuServiceDeliverDO.class); + skuServiceDeliverMapper.updateById(updateObj); + } + + @Override + public void deleteSkuServiceDeliver(Long id) { + // 校验存在 + validateSkuServiceDeliverExists(id); + // 删除 + skuServiceDeliverMapper.deleteById(id); + } + + private void validateSkuServiceDeliverExists(Long id) { + if (skuServiceDeliverMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SKU_SERVICE_DELIVER_NOT_EXISTS); + } + } + + @Override + public SkuServiceDeliverDO getSkuServiceDeliver(Long id) { + return skuServiceDeliverMapper.selectById(id); + } + + @Override + public PageResult getSkuServiceDeliverPage(SkuServiceDeliverPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceDetailsServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceDetailsServiceImpl.java new file mode 100644 index 0000000..bc7d53d --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceDetailsServiceImpl.java @@ -0,0 +1,74 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceDetailsDO; +import com.tashow.cloud.product.mapper.SkuServiceDetailsMapper; +import com.tashow.cloud.product.service.SkuServiceDetailsService; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicedetails.SkuServiceDetailsSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 服务详情 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class SkuServiceDetailsServiceImpl implements SkuServiceDetailsService { + + @Resource + private SkuServiceDetailsMapper skuServiceDetailsMapper; + + @Override + public Long createSkuServiceDetails(SkuServiceDetailsSaveReqVO createReqVO) { + // 插入 + SkuServiceDetailsDO skuServiceDetails = BeanUtils.toBean(createReqVO, SkuServiceDetailsDO.class); + skuServiceDetailsMapper.insert(skuServiceDetails); + // 返回 + return skuServiceDetails.getId(); + } + + @Override + public void updateSkuServiceDetails(SkuServiceDetailsSaveReqVO updateReqVO) { + // 校验存在 + validateSkuServiceDetailsExists(updateReqVO.getId()); + // 更新 + SkuServiceDetailsDO updateObj = BeanUtils.toBean(updateReqVO, SkuServiceDetailsDO.class); + skuServiceDetailsMapper.updateById(updateObj); + } + + @Override + public void deleteSkuServiceDetails(Long id) { + // 校验存在 + validateSkuServiceDetailsExists(id); + // 删除 + skuServiceDetailsMapper.deleteById(id); + } + + private void validateSkuServiceDetailsExists(Long id) { + if (skuServiceDetailsMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SKU_SERVICE_DETAILS_NOT_EXISTS); + } + } + + @Override + public SkuServiceDetailsDO getSkuServiceDetails(Long id) { + return skuServiceDetailsMapper.selectById(id); + } + + @Override + public PageResult getSkuServiceDetailsPage(SkuServiceDetailsPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceImpl.java new file mode 100644 index 0000000..29dc99d --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceImpl.java @@ -0,0 +1,972 @@ +package com.tashow.cloud.product.service.impl; + +import cn.hutool.core.collection.CollUtil; +import cn.hutool.core.collection.CollectionUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.tashow.cloud.common.util.date.DateUtils; +import com.tashow.cloud.mybatis.mybatis.core.util.MyBatisUtils; +import com.tashow.cloud.productapi.api.product.dto.*; +import com.tashow.cloud.product.mapper.*; +import com.tashow.cloud.product.service.ProdExtendService; +import com.tashow.cloud.product.service.ProdPropService; +import com.tashow.cloud.product.service.ProdPropValueService; +import com.tashow.cloud.product.service.SkuService; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.prodpropvalue.ProPropRecycleBinVO; +import com.tashow.cloud.productapi.api.product.vo.sku.*; +import com.tashow.cloud.productapi.enums.BaseEnum; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import com.tashow.cloud.productapi.enums.ServiceTypeEnum; +import org.apache.commons.lang3.ObjectUtils; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import java.util.stream.Collectors; + +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 单品SKU Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class SkuServiceImpl implements SkuService { + + @Resource + private SkuMapper skuMapper; + @Resource + private SkuServiceDetailsMapper skuServiceDetailsMapper; + @Resource + private SkuServicesFormMapper skuServicesFormMapper; + @Resource + private SkuServiceMaterialMapper skuServiceMaterialMapper; + @Resource + private SkuServiceTransportMapper skuServiceTransportMapper; + @Resource + private SkuServiceDeliverMapper skuServiceDeliverMapper; + @Resource + private ProdPropService prodPropService; + @Resource + private ProdExtendMapper prodExtendMapper; + @Resource + private ProdPropValueService prodPropValueService; + @Resource + private ProdExtendService prodExtendService; + @Resource + private ProdPropValueMapper prodPropValueMapper; + @Resource + private ProdPropMapper prodPropMapper; + + @Override + public Long createSku(SkuSaveReqVO createReqVO) { + // 插入 + SkuDO sku = BeanUtils.toBean(createReqVO, SkuDO.class); + skuMapper.insert(sku); + // 返回 + return sku.getSkuId(); + } + + @Override + @Transactional + public void createSkuExtend(SkuExtendVO skuExtendVO) { + //接运车辆配置 + if (Objects.equals(skuExtendVO.getTransportCarSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.TRANSPORT_CAR_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.TRANSPORT_CAR_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetailsDO : skuExtendVO.getTransportCarList()) { + skuServiceDetailsDO.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetailsDO); + } + SkuServicesFormDO skuServicesForm = new SkuServicesFormDO(); + skuServicesForm.setServiceName(ServiceTypeEnum.TRANSPORT_CAR_MATERIAL.getDescription()); + skuServicesForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesForm.setType(ServiceTypeEnum.TRANSPORT_CAR_MATERIAL.getCode()); + skuServicesForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesForm); + for (SkuServiceMaterialDO skuServiceMaterialDO : skuExtendVO.getTransportCarMaterialList()) { + skuServiceMaterialDO.setServiceId(skuServicesForm.getId()); + skuServiceMaterialMapper.insert(skuServiceMaterialDO); + } + } + //遗体运输目的地配置 + if (Objects.equals(skuExtendVO.getTrafficSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.BODY_TRANSPORT_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.BODY_TRANSPORT_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceTransportDO skuServiceTransportDO : skuExtendVO.getTrafficList()) { + skuServiceTransportDO.setServiceId(skuServicesFormDO.getId()); + skuServiceTransportMapper.insert(skuServiceTransportDO); + } + SkuServicesFormDO skuServicesForm = new SkuServicesFormDO(); + skuServicesForm.setServiceName(ServiceTypeEnum.BODY_TRANSPORT_MATERIAL.getDescription()); + skuServicesForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesForm.setType(ServiceTypeEnum.BODY_TRANSPORT_MATERIAL.getCode()); + skuServicesForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesForm); + for (SkuServiceMaterialDO skuServiceMaterialDO : skuExtendVO.getTrafficMaterialList()) { + skuServiceMaterialDO.setServiceId(skuServicesForm.getId()); + skuServiceMaterialMapper.insert(skuServiceMaterialDO); + } + } + //遗体清洁配置 + if (Objects.equals(skuExtendVO.getCleanSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.BODY_CLEAN_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.BODY_CLEAN_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetails : skuExtendVO.getCleanList()) { + skuServiceDetails.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetails); + } + SkuServicesFormDO skuServicesForm = new SkuServicesFormDO(); + skuServicesForm.setServiceName(ServiceTypeEnum.BODY_CLEAN_MATERIAL.getDescription()); + skuServicesForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesForm.setType(ServiceTypeEnum.BODY_CLEAN_MATERIAL.getCode()); + skuServicesForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesForm); + for (SkuServiceMaterialDO skuServiceMaterialDO : skuExtendVO.getCleanMaterialList()) { + skuServiceMaterialDO.setServiceId(skuServicesForm.getId()); + skuServiceMaterialMapper.insert(skuServiceMaterialDO); + } + } + //追思告别配置 + if (Objects.equals(skuExtendVO.getReflectionSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.MEMORIAL_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.MEMORIAL_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetails : skuExtendVO.getReflectionList()) { + skuServiceDetails.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetails); + } + SkuServicesFormDO skuServicesForm = new SkuServicesFormDO(); + skuServicesForm.setServiceName(ServiceTypeEnum.MEMORIAL_MATERIAL.getDescription()); + skuServicesForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesForm.setType(ServiceTypeEnum.MEMORIAL_MATERIAL.getCode()); + skuServicesForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesForm); + for (SkuServiceMaterialDO skuServiceMaterialDO : skuExtendVO.getReflectionMaterialList()) { + skuServiceMaterialDO.setServiceId(skuServicesForm.getId()); + skuServiceMaterialMapper.insert(skuServiceMaterialDO); + } + } + + //遗体火化配置 + if (Objects.equals(skuExtendVO.getCremationSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.CREMATION_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.CREMATION_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetails : skuExtendVO.getCremationList()) { + skuServiceDetails.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetails); + } + SkuServicesFormDO skuServicesForm = new SkuServicesFormDO(); + skuServicesForm.setServiceName(ServiceTypeEnum.CREMATION_MATERIAL.getDescription()); + skuServicesForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesForm.setType(ServiceTypeEnum.CREMATION_MATERIAL.getCode()); + skuServicesForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesForm); + for (SkuServiceMaterialDO skuServiceMaterialDO : skuExtendVO.getCremationMaterialList()) { + skuServiceMaterialDO.setServiceId(skuServicesForm.getId()); + skuServiceMaterialMapper.insert(skuServiceMaterialDO); + } + } + + //骨灰处理配置 + if (Objects.equals(skuExtendVO.getAshProcessingSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.ASH_PROCESSING_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.ASH_PROCESSING_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetails : skuExtendVO.getAshProcessingList()) { + skuServiceDetails.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetails); + } + SkuServicesFormDO skuForm = new SkuServicesFormDO(); + skuForm.setServiceName(ServiceTypeEnum.ASH_PROCESSING_DELIVERY.getDescription()); + skuForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuForm.setType(ServiceTypeEnum.ASH_PROCESSING_DELIVERY.getCode()); + skuForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuForm); + for (SkuServiceDeliverDO skuServiceDeliverDO : skuExtendVO.getAshProcessingDeliverList()) { + skuServiceDeliverDO.setServiceId(skuForm.getId()); + skuServiceDeliverMapper.insert(skuServiceDeliverDO); + } + SkuServicesFormDO skuServicesForm = new SkuServicesFormDO(); + skuServicesForm.setServiceName(ServiceTypeEnum.ASH_PROCESSING_MATERIAL.getDescription()); + skuServicesForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesForm.setType(ServiceTypeEnum.ASH_PROCESSING_MATERIAL.getCode()); + skuServicesForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesForm); + for (SkuServiceMaterialDO skuServiceMaterialDO : skuExtendVO.getAshProcessingMaterialList()) { + skuServiceMaterialDO.setServiceId(skuServicesForm.getId()); + skuServiceMaterialMapper.insert(skuServiceMaterialDO); + } + } + + //骨灰装殓配置 + if (Objects.equals(skuExtendVO.getBoneashSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.BONE_ASH_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.BONE_ASH_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetails : skuExtendVO.getBoneashList()) { + skuServiceDetails.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetails); + } + } + + //纪念品配置 + if (Objects.equals(skuExtendVO.getSouvenirSwitch(), BaseEnum.YES_ONE.getKey())) { + SkuServicesFormDO skuServicesFormDO = new SkuServicesFormDO(); + skuServicesFormDO.setServiceName(ServiceTypeEnum.SOUVENIR_CONFIG.getDescription()); + skuServicesFormDO.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuServicesFormDO.setType(ServiceTypeEnum.SOUVENIR_CONFIG.getCode()); + skuServicesFormDO.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuServicesFormDO); + for (SkuServiceDetailsDO skuServiceDetails : skuExtendVO.getSouvenirList()) { + skuServiceDetails.setServiceId(skuServicesFormDO.getId()); + skuServiceDetailsMapper.insert(skuServiceDetails); + } + SkuServicesFormDO skuForm = new SkuServicesFormDO(); + skuForm.setServiceName(ServiceTypeEnum.SOUVENIR_DELIVERY.getDescription()); + skuForm.setIsEnabled(BaseEnum.YES_ONE.getKey()); + skuForm.setType(ServiceTypeEnum.SOUVENIR_DELIVERY.getCode()); + skuForm.setName(skuExtendVO.getSkuFormName()); + skuServicesFormMapper.insert(skuForm); + for (SkuServiceDeliverDO skuServiceDeliverDO : skuExtendVO.getSouvenirDeliverList()) { + skuServiceDeliverDO.setServiceId(skuForm.getId()); + skuServiceDeliverMapper.insert(skuServiceDeliverDO); + } + } + } + + @Override + public SkuExtendVO getSkuExtend(Integer formId) { + // 1. 查询所有与 formId 相关的扩展服务配置(已包含详情、物料等关联数据) + List skuServiceExtendVOList = skuServicesFormMapper.selectSkuServiceExtendWithDetails(formId); + + // 2. 创建返回对象 + SkuExtendVO skuExtendVO = new SkuExtendVO(); + // 可以设置 skuFormName,如果 formId 能关联到表单名称的话 + // skuExtendVO.setSkuFormName(...); + + // 3. 遍历查询结果,按类型分类赋值 + for (SkuServiceExtendVO skuServiceExtendVO : skuServiceExtendVOList) { + // 注意:数据库中 type 是 tinyint,但 VO 中定义为 String,需要转换或比较字符串 + // 枚举中 code 是 int,所以最好将 VO 的 type 转为 Integer 进行比较 + Integer typeCode; + try { + typeCode = Integer.valueOf(skuServiceExtendVO.getType()); + } catch (NumberFormatException e) { + // 如果 type 无法转为数字,跳过这条记录或记录日志 + continue; + } + + // 使用 switch 或 if-else 根据 typeCode 赋值 + if (ServiceTypeEnum.TRANSPORT_CAR_CONFIG.getCode() == typeCode) { + // 接运车辆配置 + skuExtendVO.setTransportCarSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setTransportCarList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + + } else if (ServiceTypeEnum.TRANSPORT_CAR_MATERIAL.getCode() == typeCode) { + if (ObjectUtils.isEmpty(skuExtendVO.getTransportCarMaterialList())) { + skuExtendVO.setTransportCarMaterialList(skuServiceExtendVO.getSkuServiceMaterialDOList()); + } + } else if (ServiceTypeEnum.BODY_TRANSPORT_CONFIG.getCode() == typeCode) { + // 遗体运输目的地配置 + skuExtendVO.setTrafficSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setTrafficList(skuServiceExtendVO.getSkuServiceTransportDOList()); // 注意:这里用 TransportDO + + } else if (ServiceTypeEnum.BODY_TRANSPORT_MATERIAL.getCode() == typeCode) { + // 遗体运输目的地物料 + if (ObjectUtils.isEmpty(skuExtendVO.getTrafficMaterialList())) { + skuExtendVO.setTrafficMaterialList(skuServiceExtendVO.getSkuServiceMaterialDOList()); + } + + } else if (ServiceTypeEnum.BODY_CLEAN_CONFIG.getCode() == typeCode) { + // 遗体清洁配置 + skuExtendVO.setCleanSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setCleanList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + + } else if (ServiceTypeEnum.BODY_CLEAN_MATERIAL.getCode() == typeCode) { + // 遗体清洁物料 + if (ObjectUtils.isEmpty(skuExtendVO.getCleanMaterialList())) { + skuExtendVO.setCleanMaterialList(skuServiceExtendVO.getSkuServiceMaterialDOList()); + } + } else if (ServiceTypeEnum.MEMORIAL_CONFIG.getCode() == typeCode) { + // 追思告别配置 + skuExtendVO.setReflectionSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setReflectionList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + } else if (ServiceTypeEnum.MEMORIAL_MATERIAL.getCode() == typeCode) { + // 追思告别物料 + if (ObjectUtils.isEmpty(skuExtendVO.getReflectionMaterialList())) { + skuExtendVO.setReflectionMaterialList(skuServiceExtendVO.getSkuServiceMaterialDOList()); + } + } else if (ServiceTypeEnum.CREMATION_CONFIG.getCode() == typeCode) { + // 遗体火化配置 + skuExtendVO.setCremationSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setCremationList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + } else if (ServiceTypeEnum.CREMATION_MATERIAL.getCode() == typeCode) { + // 遗体火化物料 + if (ObjectUtils.isEmpty(skuExtendVO.getCremationMaterialList())) { + skuExtendVO.setCremationMaterialList(skuServiceExtendVO.getSkuServiceMaterialDOList()); + } + + } else if (ServiceTypeEnum.ASH_PROCESSING_CONFIG.getCode() == typeCode) { + // 骨灰处理配置 + skuExtendVO.setAshProcessingSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setAshProcessingList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + + } else if (ServiceTypeEnum.ASH_PROCESSING_DELIVERY.getCode() == typeCode) { + // 骨灰处理配送方式 (补充) + if (ObjectUtils.isEmpty(skuExtendVO.getAshProcessingDeliverList())) { + skuExtendVO.setAshProcessingDeliverList(skuServiceExtendVO.getSkuServiceDeliverDOList()); + } + } else if (ServiceTypeEnum.ASH_PROCESSING_MATERIAL.getCode() == typeCode) { + // 骨灰处理物料 + if (ObjectUtils.isEmpty(skuExtendVO.getAshProcessingMaterialList())) { + skuExtendVO.setAshProcessingMaterialList(skuServiceExtendVO.getSkuServiceMaterialDOList()); + } + } else if (ServiceTypeEnum.BONE_ASH_CONFIG.getCode() == typeCode) { + // 骨灰装殓配置 + skuExtendVO.setBoneashSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setBoneashList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + // 注意:骨灰装殓是否有物料?根据你的 DO 列表,没有 material 字段 + + } else if (ServiceTypeEnum.SOUVENIR_CONFIG.getCode() == typeCode) { + // 纪念品配置 + skuExtendVO.setSouvenirSwitch(skuServiceExtendVO.getIsEnabled()); + skuExtendVO.setSouvenirList(skuServiceExtendVO.getSkuServiceDetailsDOList()); + } else if (ServiceTypeEnum.SOUVENIR_DELIVERY.getCode() == typeCode) { + // 纪念品配送方式 (补充) + if (ObjectUtils.isEmpty(skuExtendVO.getSouvenirDeliverList())) { + skuExtendVO.setSouvenirDeliverList(skuServiceExtendVO.getSkuServiceDeliverDOList()); + } + } + // 可以添加 default 处理未知类型 + } + + // 4. 返回组装好的对象 + return skuExtendVO; + } + + @Override + public void updateSku(SkuSaveReqVO updateReqVO) { + // 校验存在 + validateSkuExists(updateReqVO.getSkuId()); + // 更新 + SkuDO updateObj = BeanUtils.toBean(updateReqVO, SkuDO.class); + skuMapper.updateById(updateObj); + } + + @Override + @Transactional + public void updateProp(SkuPropVO skuPropVO) { + //保存sku + if (CollectionUtil.isNotEmpty(skuPropVO.getSkuList())) { + List skuList = skuPropVO.getSkuList(); + List skuListNew = new ArrayList<>(); + for (SkuDO sku : skuList) { + if (Objects.equals(BaseEnum.YES_ONE.getKey(), sku.getIsExist())) { + sku.setProdId(skuPropVO.getProdId()); + skuListNew.add(sku); + } + } + if (CollUtil.isNotEmpty(skuListNew)) { + skuMapper.insertBatch(skuListNew); + } + } + prodExtendMapper.updateByProdId(skuPropVO.getProdId(), skuPropVO.getIsDisable(), skuPropVO.getIsExpire()); + //保存规格 + prodPropService.updateProdPropAndValues(skuPropVO); + } + + + @Override + public void updatePropVal(Long id, String propValue) { + ProdPropValueDO prodPropValueDO = prodPropValueMapper.selectById(id); + ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId()); + List skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue()); + for (SkuDO skuDO : skuDOList) { + if (skuDO.getProperties() != null) { + String[] split = skuDO.getProperties().split(","); + for (String s : split) { + if (s.equals(prodPropValueDO.getPropValue())) { + skuDO.setProperties(propValue); + skuDO.setSkuName(propValue); + skuMapper.updateById(skuDO); + } + } + } + } + prodPropValueDO.setPropValue(propValue); + prodPropValueMapper.updateById(prodPropValueDO); + } + + + @Override + public void deleteProp(Long id) { + ProdPropValueDO prodPropValueDO = prodPropValueService.getById(id); + ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId()); + prodPropValueService.deleteProdPropValue(id); + List skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue()); + List skuids = new ArrayList<>(); + for (SkuDO skuDO : skuDOList) { + if (skuDO.getProperties() != null) { + String[] split = skuDO.getProperties().split(","); + for (String s : split) { + if (s.equals(prodPropValueDO.getPropValue())) { + skuids.add(skuDO.getSkuId()); + } + } + } + } + if (CollUtil.isNotEmpty(skuids)) { + skuMapper.batchSkuDeleted(skuids); + } + } + + @Override + public void disableProp(Long id, Integer state) { + ProdPropValueDO prodPropValueDO = prodPropValueService.getById(id); + prodPropValueDO.setState(state); + prodPropValueService.updateById(prodPropValueDO); + ProdPropDO prodPropDO =prodPropMapper.selectById(prodPropValueDO.getPropId()); + if (Objects.equals(BaseEnum.NO_ZERO.getKey(), state)) { + List skuDOList = skuMapper.getSkuListByName(prodPropDO.getProdId(),prodPropValueDO.getPropValue()); + List skuDOList1 = new ArrayList<>(); + for (SkuDO skuDO : skuDOList) { + if (skuDO.getProperties() != null) { + String[] split = skuDO.getProperties().split(","); + for (String s : split) { + if (s.equals(prodPropValueDO.getPropValue())) { + skuDO.setIsShelf(BaseEnum.NO_ZERO.getKey()); + skuDOList1.add(skuDO); + } + } + } + } + if (CollUtil.isNotEmpty(skuDOList1)) { + skuMapper.updateBatch(skuDOList1); + } + } + } + + + @Override + public SkuPropInfoVO getSKuPropList(Long prodId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(ProdPropDO::getProdId, prodId); + wrapper.eq(ProdPropDO::getState, BaseEnum.YES_ONE.getKey()) + .orderByAsc(ProdPropDO::getSort); + List list = prodPropService.list(wrapper); + list.forEach(prop -> { + List values = prodPropValueService.list( + new LambdaQueryWrapper() + .eq(ProdPropValueDO::getPropId, prop.getId()) + .eq(ProdPropValueDO::getDeleted, BaseEnum.NO_ZERO.getKey()) + .orderByAsc(ProdPropValueDO::getSort) + ); + prop.setProdPropValues(values); + }); + SkuPropInfoVO skuPropInfoVO = new SkuPropInfoVO(); + skuPropInfoVO.setProdId(prodId); + skuPropInfoVO.setProdPropSaveReqVO(list); + ProdExtendDO prodExtendDO = prodExtendService.getOne(new LambdaQueryWrapper().eq(ProdExtendDO::getProdId, prodId)); + skuPropInfoVO.setIsDisable(prodExtendDO.getIsDisable()); + skuPropInfoVO.setIsExpire(prodExtendDO.getIsExpire()); + return skuPropInfoVO; + } + + @Override + public PageResult getSKuPropRecycleBinList(ProPageReqVO proPageReqVO) { + IPage prodPageList = prodPropValueMapper.getSKuPropRecycleBinList(MyBatisUtils.buildPage(proPageReqVO), proPageReqVO.getProdId(), proPageReqVO.getPropValue()); + for (ProPropRecycleBinVO prodPage : prodPageList.getRecords()) { + if (prodPage.getDeleteTime() != null) { + prodPage.setRemainingDays(DateUtils.getRemainingDays(prodPage.getDeleteTime())); + } + } + return new PageResult<>(prodPageList.getRecords(), prodPageList.getTotal()); + } + +/* @Override + public SkuPropInfoVO getSKuPropList(Long prodId, Integer isExpire, Integer state) { + if (prodId == null) { + throw new IllegalArgumentException("prodId 不能为空"); + } + + // 1. 查询商品扩展信息(用于默认值) + ProdExtendDO extendDO = prodExtendService.getOne( + new LambdaQueryWrapper().eq(ProdExtendDO::getProdId, prodId) + ); + if (extendDO == null) { + // 如果没有扩展信息,可返回空 VO 或抛异常,根据业务决定 + return buildEmptySkuPropInfoVO(prodId); + } + + // 2. 设置默认值:isExpire 和 state + Integer finalIsExpire = isExpire != null ? isExpire : extendDO.getIsExpire(); + Integer finalState = state != null ? state : extendDO.getIsDisable(); // 注意:这里你用的是 isDisable 当 state?需确认业务逻辑 + + // 3. 查询有效属性列表 + LambdaQueryWrapper propWrapper = new LambdaQueryWrapper<>(); + propWrapper.eq(ProdPropDO::getProdId, prodId) + .eq(ProdPropDO::getState, BaseEnum.YES_ONE.getKey()) // 只查启用的属性 + .orderByAsc(ProdPropDO::getSort); + + List propList = prodPropService.list(propWrapper); + if (propList.isEmpty()) { + return buildSkuPropInfoVO(prodId, propList, extendDO); + } + + // 4. 提取所有属性 ID,用于批量查询属性值 + List propIds = propList.stream() + .map(ProdPropDO::getId) + .collect(Collectors.toList()); + + // 5. 构建属性值查询条件(批量查询) + LambdaQueryWrapper valueWrapper = new LambdaQueryWrapper<>(); + valueWrapper.in(ProdPropValueDO::getPropId, propIds) + .eq(ProdPropValueDO::getState, BaseEnum.YES_ONE.getKey()); // 启用状态 + + // 根据 isExpire 过滤(注意字段是 getIsExpire) + if (BaseEnum.NO_ZERO.getKey().equals(finalIsExpire)) { + valueWrapper.eq(ProdPropValueDO::getIsExpire, BaseEnum.NO_ZERO.getKey()); + } else { + valueWrapper.eq(ProdPropValueDO::getIsExpire, BaseEnum.YES_ONE.getKey()); + } + + // 根据 state 过滤(注意:这里你用的是 getState 字段) + if (BaseEnum.NO_ZERO.getKey().equals(finalState)) { + valueWrapper.eq(ProdPropValueDO::getState, BaseEnum.NO_ZERO.getKey()); + } else { + valueWrapper.eq(ProdPropValueDO::getState, BaseEnum.YES_ONE.getKey()); + } + + valueWrapper.orderByDesc(ProdPropValueDO::getSort); + + List valueList = prodPropValueService.list(valueWrapper); + + // 6. 按 propId 分组,便于后续关联 + Map> valueMap = valueList.stream() + .collect(Collectors.groupingBy(ProdPropValueDO::getPropId)); + + // 7. 关联属性与属性值 + propList.forEach(prop -> + prop.setProdPropValues(valueMap.getOrDefault(prop.getId(), Collections.emptyList())) + ); + + // 8. 构建并返回 VO + return buildSkuPropInfoVO(prodId, propList, extendDO); + }*/ + + /* @Override + public SkuPropInfoVO getSKuPropList(Long prodId,Integer isExpire,Integer state) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(ProdPropDO::getProdId,prodId); + wrapper.eq(ProdPropDO::getState, BaseEnum.YES_ONE.getKey()) + .orderByAsc(ProdPropDO::getSort); + ProdExtendDO prodExtendDO = prodExtendService.getOne(new LambdaQueryWrapper().eq(ProdExtendDO::getProdId, prodId)); + if(isExpire==null){ + isExpire = prodExtendDO.getIsExpire(); + } + if(state==null){ + state = prodExtendDO.getIsDisable(); + } + List list = prodPropService.list(wrapper); + list.forEach(prop -> { + LambdaQueryWrapper wrapper1 = new LambdaQueryWrapper<>(); + wrapper1.eq(ProdPropValueDO::getPropId,prop.getId()); + wrapper1.eq(ProdPropValueDO::getState, BaseEnum.YES_ONE.getKey()); + if (isExpire!= null&& Objects.equals(BaseEnum.NO_ZERO.getKey(),isExpire) ) { + wrapper1.eq(ProdPropValueDO::getIsExpire, BaseEnum.NO_ZERO.getKey()); + }else { + wrapper1.eq(ProdPropValueDO::getIsExpire, BaseEnum.YES_ONE.getKey()); + } + if (state!= null&& Objects.equals(BaseEnum.NO_ZERO.getKey(),state) ) { + wrapper1.eq(ProdPropValueDO::getState, BaseEnum.NO_ZERO.getKey()); + }else { + wrapper1.eq(ProdPropValueDO::getState, BaseEnum.YES_ONE.getKey()); + } + wrapper1.orderByDesc(ProdPropValueDO::getSort); + List lists = prodPropValueService.list(wrapper1); + prop.setProdPropValues(lists); + }); + SkuPropInfoVO skuPropInfoVO = new SkuPropInfoVO(); + skuPropInfoVO.setProdId(prodId); + skuPropInfoVO.setProdPropSaveReqVO(list); + + skuPropInfoVO.setIsDisable(prodExtendDO.getIsDisable()); + skuPropInfoVO.setIsExpire(prodExtendDO.getIsExpire()); + return skuPropInfoVO; + }*/ + + + // 封装构建 VO 的逻辑,避免重复代码 + private SkuPropInfoVO buildSkuPropInfoVO(Long prodId, List propList, ProdExtendDO extendDO) { + SkuPropInfoVO vo = new SkuPropInfoVO(); + vo.setProdId(prodId); + vo.setProdPropSaveReqVO(propList); + vo.setIsDisable(extendDO.getIsDisable()); + vo.setIsExpire(extendDO.getIsExpire()); + return vo; + } + + // 空情况处理 + private SkuPropInfoVO buildEmptySkuPropInfoVO(Long prodId) { + SkuPropInfoVO vo = new SkuPropInfoVO(); + vo.setProdId(prodId); + vo.setProdPropSaveReqVO(Collections.emptyList()); + vo.setIsDisable(BaseEnum.NO_ZERO.getKey()); // 默认值 + vo.setIsExpire(BaseEnum.NO_ZERO.getKey()); + return vo; + } + + + @Override + @Transactional(rollbackFor = Exception.class) + public void deleteSku(Long id) { + // 校验存在 + validateSkuExists(id); + SkuDO prodSku = skuMapper.selectById(id); + // Step 1: 获取该商品下所有未删除的 SKU 的 properties + List activeProperties = skuMapper.selectPropertiesByProdIdAndNotDeleted(prodSku.getProdId()); + + // Step 2: 提取所有正在被使用的属性值(去重) + Set currentlyUsedValues = new HashSet<>(); + for (String props : activeProperties) { + if (props != null && !props.trim().isEmpty()) { + String[] values = props.split(","); + for (String v : values) { + currentlyUsedValues.add(v.trim()); + } + } + } + // 删除 + skuMapper.deleteBySkuId(id); + // Step 3: 查询该商品下所有 rule=1 的属性值(销售属性) + List allPropValues = prodPropValueMapper.selectSalesValuesByProdId(prodSku.getProdId()); + // Step 4: 遍历每个属性值,检查是否还在被使用 + for (ProdPropValueDO pv : allPropValues) { + String value = pv.getPropValue().trim(); + // 如果当前属性值不在“活跃使用”列表中,说明没有未删除的 SKU 使用它 + if (!currentlyUsedValues.contains(value)) { + // 可以安全删除该属性值 + // 可以安全禁用该属性值 + ProdPropValueDO prodPropValueDO = new ProdPropValueDO(); + prodPropValueDO.setId(pv.getId()); + prodPropValueDO.setIsExpire(BaseEnum.YES_ONE.getKey()); + prodPropValueDO.setDeleteTime(new Date()); + prodPropValueMapper.updateById(prodPropValueDO); + } + } + } + + + @Transactional(rollbackFor = Exception.class) + public void deleteSkus(List ids) { + if (ids == null || ids.isEmpty()) { + return; + } + // Step 1: 查询这些 SKU 的基本信息(主要是 prod_id) + List skuList = skuMapper.selectByIds(ids); + if (skuList.isEmpty()) { + return; + } + Long prodId = skuList.get(0).getProdId(); + // 校验是否属于同一个商品(可选) + boolean allSameProd = skuList.stream().allMatch(s -> s.getProdId().equals(prodId)); + if (!allSameProd) { + throw new IllegalArgumentException("批量删除的 SKU 必须属于同一个商品"); + } + // Step 3: 获取该商品下【当前仍然未删除】的 SKU 的 properties + List activeProperties = skuMapper.selectPropertiesByProdIdAndNotDeleted(prodId); + for (Long id : ids) { + // 删除 + skuMapper.deleteBySkuId(id); + } + // Step 4: 提取所有仍在使用的属性值(去重 + trim) + Set currentlyUsedValues = new HashSet<>(); + for (String props : activeProperties) { + if (props != null && !props.trim().isEmpty()) { + String[] values = props.split(","); + for (String v : values) { + currentlyUsedValues.add(v.trim()); + } + } + } + // Step 5: 查询该商品下所有 rule=1 的销售属性值(未删除的) + List allPropValues = prodPropValueMapper.selectSalesValuesByProdId(prodId); + + // Step 6: 收集需要删除的属性值 ID + List valueIdsToDelete = new ArrayList<>(); + for (ProdPropValueDO pv : allPropValues) { + String value = pv.getPropValue().trim(); + if (!currentlyUsedValues.contains(value)) { + valueIdsToDelete.add(pv.getId()); + } + } + // Step 7: 批量删除无用的属性值 + if (!valueIdsToDelete.isEmpty()) { + prodPropValueMapper.batchMarkDeleted(valueIdsToDelete); + } + } + + //恢复SKU + @Override + @Transactional(rollbackFor = Exception.class) + public void restoreSkuList(List ids) { + List skuList = skuMapper.getskuListBySkuIds(ids); + if (skuList.isEmpty()) { + return; + } + + // 获取商品下所有被删除的SKU(除了当前要恢复的 ids) + List skuAllDeletedList = skuMapper.getskuListByDeleted(skuList.get(0).getProdId(), ids); + + Set allDeletedValues = new HashSet<>(); + for (SkuDO sku : skuAllDeletedList) { + if (sku.getProperties() != null && !sku.getProperties().trim().isEmpty()) { + String[] values = sku.getProperties().split(","); + for (String v : values) { + allDeletedValues.add(v.trim()); + } + } + } + + Set currentlyUsedValues = new HashSet<>(); + for (SkuDO sku : skuList) { + skuMapper.updateSkuDeleted(sku.getSkuId()); + if (sku.getProperties() != null && !sku.getProperties().trim().isEmpty()) { + String[] values = sku.getProperties().split(","); + for (String v : values) { + currentlyUsedValues.add(v.trim()); + } + } + } + + // === 核心修改点:提取 currentlyUsedValues 中不在 allDeletedValues 的值(即新增启用的规格值)=== + Set valuesToRestore = new HashSet<>(currentlyUsedValues); + valuesToRestore.removeAll(allDeletedValues); // 只保留“之前被删掉过”的规格值 + + // 如果没有需要恢复的规格值,直接返回 + if (valuesToRestore.isEmpty()) { + return; + } + + // 查询商品下所有属性值 + Long prodId = skuList.get(0).getProdId(); + List allPropValues = prodPropValueMapper.selectRestoreProp(prodId); + + if (!allPropValues.isEmpty()) { + for (ProdPropValueDO pv : allPropValues) { + // 仅当该属性值是“当前使用”且“之前被删除”的(即在 valuesToRestore 中),才恢复 + if (valuesToRestore.contains(pv.getPropValue())) { + pv.setIsExpire(BaseEnum.NO_ZERO.getKey()); // 标记为未过期 + prodPropValueMapper.updateById(pv); + } + } + } + } + + @Override + public void restorePropList(List ids) { + prodPropValueMapper.restorePropValue(ids); + List prodPropValueDOList = prodPropValueMapper.getskuListByPropValueIds(ids); + for (ProdPropValueDO prodPropValueDO : prodPropValueDOList) { + int maxPropValue =prodPropValueMapper.getMaxPropValue(prodPropValueDO.getPropId()); + prodPropValueDO.setSort(maxPropValue+1); + prodPropValueService.updateById(prodPropValueDO); + } + } + + + @Override + public void updatSkuIsShelf(Long id, Integer isShelf) { + // 校验存在 + validateSkuExists(id); + + SkuDO prodSku = skuMapper.selectById(id); + // Step 1: 获取该商品下所有未禁用的 SKU 的 properties + List activeProperties = skuMapper.selectPropertiesByProdIdShelf(prodSku.getProdId()); + prodSku.setIsShelf(isShelf); + skuMapper.updateById(prodSku); + // Step 2: 提取所有正在被使用的属性值(去重) + Set currentlyUsedValues = new HashSet<>(); + for (String props : activeProperties) { + if (props != null && !props.trim().isEmpty()) { + String[] values = props.split(","); + for (String v : values) { + currentlyUsedValues.add(v.trim()); + } + } + } + // Step 3: 查询该商品下所有 rule=1 的属性值(销售属性) + List allPropValues = prodPropValueMapper.selectSalesValuesByState(prodSku.getProdId()); + // Step 4: 遍历每个属性值,检查是否还在被使用 + for (ProdPropValueDO pv : allPropValues) { + String value = pv.getPropValue().trim(); + // 如果当前属性值不在“活跃使用”列表中,说明没有未删除的 SKU 使用它 + if (!currentlyUsedValues.contains(value)) { + // 可以安全禁用该属性值 + ProdPropValueDO prodPropValueDO = new ProdPropValueDO(); + prodPropValueDO.setId(pv.getId()); + prodPropValueDO.setState(BaseEnum.NO_ZERO.getKey()); + prodPropValueMapper.updateById(prodPropValueDO); + } + } + } + + @Override + public void updatSkuIsShelfs(List ids, Integer isShelf) { + if (ids == null || ids.isEmpty()) { + return; + } + + // Step 1: 查询这些 SKU 的基本信息(主要是 prod_id) + List skuList = skuMapper.selectByIds(ids); + if (skuList.isEmpty()) { + return; + } + + Long prodId = skuList.get(0).getProdId(); + // 校验是否属于同一个商品(可选) + boolean allSameProd = skuList.stream().allMatch(s -> s.getProdId().equals(prodId)); + if (!allSameProd) { + throw new IllegalArgumentException("批量删除的 SKU 必须属于同一个商品"); + } + for (Long id : ids) { + SkuDO sku = new SkuDO(); + sku.setSkuId(id); + sku.setIsShelf(isShelf); + skuMapper.updateById(sku); + } + // ================================ + //新增逻辑:判断商品整体上下架状态,并更新 tz_prod_prop_value.state + // ================================ + // 查询该商品下所有未删除的 SKU 的 is_shelf 状态 + List allSkuShelfStatus = skuMapper.selectShelfStatusByProdId(prodId); + + if (allSkuShelfStatus.isEmpty()) { + return; // 没有 SKU,无需处理 + } + + boolean allShelf = allSkuShelfStatus.stream().allMatch(status -> status == 1); // 全部上架 + boolean allOffShelf = allSkuShelfStatus.stream().allMatch(status -> status == 0); // 全部下架 + + Integer targetState = null; + if (allShelf) { + targetState = 1; // 启用 + } else if (allOffShelf) { + targetState = 0; // 禁用 + } + // 混合状态:不修改 state + // 如果需要更新状态,则批量更新 tz_prod_prop_value 的 state 字段 + if (targetState != null) { + prodPropValueMapper.updateStateByProdId(prodId, targetState); + } + } + + + private void validateSkuExists(Long id) { + if (skuMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SKU_NOT_EXISTS); + } + } + + @Override + public SkuDO getSku(Long id) { + return skuMapper.selectById(id); + } + + @Override + public PageResult getSkuRecycleBinPageList(SkuPageReqVO pageReqVO) { + IPage prodPageList = skuMapper.getSkuRecycleBinPageList(MyBatisUtils.buildPage(pageReqVO), pageReqVO.getProdId(), pageReqVO.getProperties()); + for (SkuRecycleBinVO prodPage : prodPageList.getRecords()) { + if (prodPage.getDeleteTime() != null) { + prodPage.setRemainingDays(DateUtils.getRemainingDays(prodPage.getDeleteTime())); + } + } + return new PageResult<>(prodPageList.getRecords(), prodPageList.getTotal()); + } + + @Override + public PageResult getSkuPageList(SkuPageReqVO pageReqVO) { + IPage prodPageList = skuMapper.getSkuPageList(MyBatisUtils.buildPage(pageReqVO), pageReqVO.getProdId(), pageReqVO.getSkuId(), pageReqVO.getProperties()); + + return new PageResult<>(prodPageList.getRecords(), prodPageList.getTotal()); + } + + + @Override + public PageResult getSkuPage(SkuPageReqVO pageReqVO) { + return null; + } + + @Override + @Transactional + public void updateServiceDetails(List skuServiceDetailsList) { + if (ObjectUtils.isNotEmpty(skuServiceDetailsList)) { + skuServiceDetailsMapper.delete(SkuServiceDetailsDO::getServiceId, skuServiceDetailsList.get(0).getServiceId()); + skuServiceDetailsMapper.insertBatch(skuServiceDetailsList); + } + } + + @Override + @Transactional + public void updateMaterial(List skuServiceMaterialList) { + if (ObjectUtils.isNotEmpty(skuServiceMaterialList)) { + skuServiceMaterialMapper.delete(SkuServiceMaterialDO::getServiceId, skuServiceMaterialList.get(0).getServiceId()); + skuServiceMaterialMapper.insertBatch(skuServiceMaterialList); + } + } + + @Override + @Transactional + public void updateTransportAdress(List skuServiceTransportDOList) { + if (ObjectUtils.isNotEmpty(skuServiceTransportDOList)) { + skuServiceTransportMapper.delete(SkuServiceTransportDO::getServiceId, skuServiceTransportDOList.get(0).getServiceId()); + skuServiceTransportMapper.insertBatch(skuServiceTransportDOList); + } + } + + @Override + public void updateDeliver(List skuServiceDeliverList) { + if (ObjectUtils.isNotEmpty(skuServiceDeliverList)) { + skuServiceDeliverMapper.delete(SkuServiceDeliverDO::getServiceId, skuServiceDeliverList.get(0).getServiceId()); + skuServiceDeliverMapper.insertBatch(skuServiceDeliverList); + } + } + + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceMaterialServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceMaterialServiceImpl.java new file mode 100644 index 0000000..9131578 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceMaterialServiceImpl.java @@ -0,0 +1,76 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceMaterialDO; +import com.tashow.cloud.product.mapper.SkuServiceMaterialMapper; +import com.tashow.cloud.product.service.SkuServiceMaterialService; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicematerial.SkuServiceMaterialSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; + + +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 服务物料详情 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class SkuServiceMaterialServiceImpl implements SkuServiceMaterialService { + + @Resource + private SkuServiceMaterialMapper skuServiceMaterialMapper; + + @Override + public Long createSkuServiceMaterial(SkuServiceMaterialSaveReqVO createReqVO) { + // 插入 + SkuServiceMaterialDO skuServiceMaterial = BeanUtils.toBean(createReqVO, SkuServiceMaterialDO.class); + skuServiceMaterialMapper.insert(skuServiceMaterial); + // 返回 + return skuServiceMaterial.getId(); + } + + @Override + public void updateSkuServiceMaterial(SkuServiceMaterialSaveReqVO updateReqVO) { + // 校验存在 + validateSkuServiceMaterialExists(updateReqVO.getId()); + // 更新 + SkuServiceMaterialDO updateObj = BeanUtils.toBean(updateReqVO, SkuServiceMaterialDO.class); + skuServiceMaterialMapper.updateById(updateObj); + } + + @Override + public void deleteSkuServiceMaterial(Long id) { + // 校验存在 + validateSkuServiceMaterialExists(id); + // 删除 + skuServiceMaterialMapper.deleteById(id); + } + + private void validateSkuServiceMaterialExists(Long id) { + if (skuServiceMaterialMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SKU_SERVICE_MATERIAL_NOT_EXISTS); + } + } + + @Override + public SkuServiceMaterialDO getSkuServiceMaterial(Long id) { + return skuServiceMaterialMapper.selectById(id); + } + + @Override + public PageResult getSkuServiceMaterialPage(SkuServiceMaterialPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceTransportServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceTransportServiceImpl.java new file mode 100644 index 0000000..41627e4 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServiceTransportServiceImpl.java @@ -0,0 +1,74 @@ +package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.SkuServiceTransportDO; +import com.tashow.cloud.product.mapper.SkuServiceTransportMapper; +import com.tashow.cloud.product.service.SkuServiceTransportService; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicetransport.SkuServiceTransportSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; + +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 服务遗体运输 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class SkuServiceTransportServiceImpl implements SkuServiceTransportService { + + @Resource + private SkuServiceTransportMapper skuServiceTransportMapper; + + @Override + public Long createSkuServiceTransport(SkuServiceTransportSaveReqVO createReqVO) { + // 插入 + SkuServiceTransportDO skuServiceTransport = BeanUtils.toBean(createReqVO, SkuServiceTransportDO.class); + skuServiceTransportMapper.insert(skuServiceTransport); + // 返回 + return skuServiceTransport.getId(); + } + + @Override + public void updateSkuServiceTransport(SkuServiceTransportSaveReqVO updateReqVO) { + // 校验存在 + validateSkuServiceTransportExists(updateReqVO.getId()); + // 更新 + SkuServiceTransportDO updateObj = BeanUtils.toBean(updateReqVO, SkuServiceTransportDO.class); + skuServiceTransportMapper.updateById(updateObj); + } + + @Override + public void deleteSkuServiceTransport(Long id) { + // 校验存在 + validateSkuServiceTransportExists(id); + // 删除 + skuServiceTransportMapper.deleteById(id); + } + + private void validateSkuServiceTransportExists(Long id) { + if (skuServiceTransportMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SKU_SERVICE_TRANSPORT_NOT_EXISTS); + } + } + + @Override + public SkuServiceTransportDO getSkuServiceTransport(Long id) { + return skuServiceTransportMapper.selectById(id); + } + + @Override + public PageResult getSkuServiceTransportPage(SkuServiceTransportPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServicesFormServiceImpl.java b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServicesFormServiceImpl.java new file mode 100644 index 0000000..5f226d1 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/java/com/tashow/cloud/product/service/impl/SkuServicesFormServiceImpl.java @@ -0,0 +1,73 @@ + package com.tashow.cloud.product.service.impl; + +import com.tashow.cloud.productapi.api.product.dto.SkuServicesFormDO; +import com.tashow.cloud.product.mapper.SkuServicesFormMapper; +import com.tashow.cloud.product.service.SkuServicesFormService; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormPageReqVO; +import com.tashow.cloud.productapi.api.product.vo.skuservicesform.SkuServicesFormSaveReqVO; +import com.tashow.cloud.productapi.enums.ErrorCodeConstants; +import org.springframework.stereotype.Service; +import jakarta.annotation.Resource; +import org.springframework.validation.annotation.Validated; +import org.springframework.transaction.annotation.Transactional; +import java.util.*; +import com.tashow.cloud.common.pojo.PageResult; +import com.tashow.cloud.common.pojo.PageParam; +import com.tashow.cloud.common.util.object.BeanUtils; +import static com.tashow.cloud.common.exception.util.ServiceExceptionUtil.exception; + +/** + * 商品SKU扩展服务表单 Service 实现类 + * + * @author 芋道源码 + */ +@Service +@Validated +public class SkuServicesFormServiceImpl implements SkuServicesFormService { + + @Resource + private SkuServicesFormMapper skuServicesFormMapper; + + @Override + public Long createSkuServicesForm(SkuServicesFormSaveReqVO createReqVO) { + // 插入 + SkuServicesFormDO skuServicesForm = BeanUtils.toBean(createReqVO, SkuServicesFormDO.class); + skuServicesFormMapper.insert(skuServicesForm); + // 返回 + return skuServicesForm.getId(); + } + + @Override + public void updateSkuServicesForm(SkuServicesFormSaveReqVO updateReqVO) { + // 校验存在 + validateSkuServicesFormExists(updateReqVO.getId()); + // 更新 + SkuServicesFormDO updateObj = BeanUtils.toBean(updateReqVO, SkuServicesFormDO.class); + skuServicesFormMapper.updateById(updateObj); + } + + @Override + public void deleteSkuServicesForm(Long id) { + // 校验存在 + validateSkuServicesFormExists(id); + // 删除 + skuServicesFormMapper.deleteById(id); + } + + private void validateSkuServicesFormExists(Long id) { + if (skuServicesFormMapper.selectById(id) == null) { + throw exception(ErrorCodeConstants.SKU_SERVICES_FORM_NOT_EXISTS); + } + } + + @Override + public SkuServicesFormDO getSkuServicesForm(Long id) { + return skuServicesFormMapper.selectById(id); + } + + @Override + public PageResult getSkuServicesFormPage(SkuServicesFormPageReqVO pageReqVO) { + return null; + } + +} \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/application-local.yaml b/tashow-module/tashow-module-product/src/main/resources/application-local.yaml new file mode 100644 index 0000000..e56317a --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/application-local.yaml @@ -0,0 +1,16 @@ +--- #################### 注册中心 + 配置中心相关配置 #################### + +spring: + cloud: + nacos: + server-addr: 43.139.42.137:8848 # Nacos 服务器地址 + username: nacos # Nacos 账号 + password: nacos # Nacos 密码 + discovery: # 【配置中心】配置项 + namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境 + group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP + metadata: + version: 1.0.0 # 服务实例的版本号,可用于灰度发布 + config: # 【注册中心】配置项 + namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境 + group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP diff --git a/tashow-module/tashow-module-product/src/main/resources/application.yaml b/tashow-module/tashow-module-product/src/main/resources/application.yaml new file mode 100644 index 0000000..1d33782 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/application.yaml @@ -0,0 +1,12 @@ +server: + port: 48083 +spring: + application: + name: product-server + profiles: + active: local + config: + import: + - optional:classpath:application-${spring.profiles.active}.yaml # 加载【本地】配置 + - optional:nacos:application.yaml # 加载【Nacos】的配置 + - optional:nacos:${spring.application.name}-${spring.profiles.active}.yaml # 加载【Nacos】的配置 diff --git a/tashow-module/tashow-module-product/src/main/resources/logback-spring.xml b/tashow-module/tashow-module-product/src/main/resources/logback-spring.xml new file mode 100644 index 0000000..8bef45c --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/logback-spring.xml @@ -0,0 +1,83 @@ + + + + + + + + + +       + + + ${PATTERN_DEFAULT} + + + + + + + + + + ${PATTERN_DEFAULT} + + + + ${LOG_FILE} + + + ${LOGBACK_ROLLINGPOLICY_FILE_NAME_PATTERN:-${LOG_FILE}.%d{yyyy-MM-dd}.%i.gz} + + ${LOGBACK_ROLLINGPOLICY_CLEAN_HISTORY_ON_START:-false} + + ${LOGBACK_ROLLINGPOLICY_MAX_FILE_SIZE:-10MB} + + ${LOGBACK_ROLLINGPOLICY_TOTAL_SIZE_CAP:-0} + + ${LOGBACK_ROLLINGPOLICY_MAX_HISTORY:-30} + + + + + + 0 + + 256 + + + + + + + + ${PATTERN_DEFAULT} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/CategoryMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/CategoryMapper.xml new file mode 100644 index 0000000..a8dc9eb --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/CategoryMapper.xml @@ -0,0 +1,31 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdAdditionalFeeDatesMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdAdditionalFeeDatesMapper.xml new file mode 100644 index 0000000..595494e --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdAdditionalFeeDatesMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + delete from tz_prod_additional_fee_dates where prod_id = #{prodId} AND type = #{type} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdAdditionalFeePeriodsMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdAdditionalFeePeriodsMapper.xml new file mode 100644 index 0000000..80bd3d5 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdAdditionalFeePeriodsMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdEmergencyResponseIntervalsMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdEmergencyResponseIntervalsMapper.xml new file mode 100644 index 0000000..cae46ea --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdEmergencyResponseIntervalsMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_prod_emergency_response_intervals where config_id = #{configId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdEmergencyResponseMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdEmergencyResponseMapper.xml new file mode 100644 index 0000000..c17a966 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdEmergencyResponseMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdExtendMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdExtendMapper.xml new file mode 100644 index 0000000..50520d3 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdExtendMapper.xml @@ -0,0 +1,18 @@ + + + + + + + UPDATE tz_prod_extend + SET + is_disable = #{isDisable}, + is_expire = #{isExpire} + WHERE prod_id = #{prodId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdMapper.xml new file mode 100644 index 0000000..1d744e7 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdMapper.xml @@ -0,0 +1,634 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + UPDATE tz_prod + SET deleted = 0 + WHERE prod_id IN + + #{id} + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdPropMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdPropMapper.xml new file mode 100644 index 0000000..f2b23af --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdPropMapper.xml @@ -0,0 +1,17 @@ + + + + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdPropValueMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdPropValueMapper.xml new file mode 100644 index 0000000..5eb4f81 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdPropValueMapper.xml @@ -0,0 +1,130 @@ + + + + + + + insert into tz_prod_prop_value (prop_id,prop_value) values + + (#{propId},#{prodPropValue.propValue}) + + + + + + + + + + + + + + + UPDATE tz_prod_prop_value + SET state = #{state} + WHERE prop_id IN ( + SELECT id FROM tz_prod_prop + WHERE prod_id = #{prodId} + AND deleted = 0 + ) + AND deleted = 0 + + + + + UPDATE tz_prod_prop_value + SET is_expire = 1, delete_time = NOW() + WHERE id IN + + #{id} + + + + + + UPDATE tz_prod_prop_value + SET + deleted = 1, delete_time = NOW() + WHERE id = #{id} + + + + + + + + + + + + UPDATE tz_prod_prop_value + SET is_expire = 1, deleted = 0 + WHERE id IN + + #{id} + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdReservationConfigMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdReservationConfigMapper.xml new file mode 100644 index 0000000..0ca09cf --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdReservationConfigMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_prod_reservation_config where prod_id = #{prodId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceAreaRelevanceMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceAreaRelevanceMapper.xml new file mode 100644 index 0000000..80a5ae6 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceAreaRelevanceMapper.xml @@ -0,0 +1,15 @@ + + + + + + + + delete from tz_prod_service_area_relevance where prod_id = #{prodId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceAreasMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceAreasMapper.xml new file mode 100644 index 0000000..c9c6983 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceAreasMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceOverAreaRulesMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceOverAreaRulesMapper.xml new file mode 100644 index 0000000..f9d6186 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdServiceOverAreaRulesMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdTagsMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdTagsMapper.xml new file mode 100644 index 0000000..31b83fe --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdTagsMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdWeightRangePricesMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdWeightRangePricesMapper.xml new file mode 100644 index 0000000..645da2c --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProdWeightRangePricesMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_prod_weight_range_prices where prod_id = #{prodId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProductOrderLimitMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProductOrderLimitMapper.xml new file mode 100644 index 0000000..080f880 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ProductOrderLimitMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/ShopDetailMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ShopDetailMapper.xml new file mode 100644 index 0000000..e7edae8 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/ShopDetailMapper.xml @@ -0,0 +1,12 @@ + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuMapper.xml new file mode 100644 index 0000000..d1aed74 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuMapper.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + UPDATE tz_sku + SET + deleted = 1, + delete_time = now() + WHERE sku_id = #{skuId} + + + + + UPDATE tz_sku + SET deleted = 1, + delete_time = now() + WHERE sku_id IN + + #{id} + + + + + + + + + + + + UPDATE tz_sku + SET deleted = 0 + WHERE sku_id = #{skuId} + + + + + UPDATE tz_sku + SET deleted = 0 + WHERE sku_id IN + + #{id} + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceDeliverMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceDeliverMapper.xml new file mode 100644 index 0000000..2cbaf7c --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceDeliverMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_sku_service_deliver where service_id = #{serviceId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceDetailsMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceDetailsMapper.xml new file mode 100644 index 0000000..a74ad84 --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceDetailsMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_sku_service_details where service_id = #{serviceId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceMaterialMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceMaterialMapper.xml new file mode 100644 index 0000000..ad0ec3c --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceMaterialMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_sku_service_material where service_id = #{serviceId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceTransportMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceTransportMapper.xml new file mode 100644 index 0000000..a7aa6ec --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServiceTransportMapper.xml @@ -0,0 +1,14 @@ + + + + + + + delete from tz_sku_service_transport where service_id = #{serviceId} + + \ No newline at end of file diff --git a/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServicesFormMapper.xml b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServicesFormMapper.xml new file mode 100644 index 0000000..cc2896a --- /dev/null +++ b/tashow-module/tashow-module-product/src/main/resources/mapper/product/SkuServicesFormMapper.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/tashow-module/tashow-module-system/pom.xml b/tashow-module/tashow-module-system/pom.xml index 65c03b2..4326422 100644 --- a/tashow-module/tashow-module-system/pom.xml +++ b/tashow-module/tashow-module-system/pom.xml @@ -155,6 +155,11 @@ org.springframework.boot spring-boot-test + diff --git a/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/SystemServerApplication.java b/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/SystemServerApplication.java index 04a5497..6c2e2b8 100644 --- a/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/SystemServerApplication.java +++ b/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/SystemServerApplication.java @@ -2,6 +2,7 @@ package com.tashow.cloud.system; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; +import org.springframework.cloud.openfeign.EnableFeignClients; import org.springframework.scheduling.annotation.EnableAsync; /** @@ -10,10 +11,12 @@ import org.springframework.scheduling.annotation.EnableAsync; */ @SpringBootApplication @EnableAsync // 开启异步 +//@EnableFeignClients(basePackages = "com.tashow.cloud.productapi.api") public class SystemServerApplication { public static void main(String[] args) { SpringApplication.run(SystemServerApplication.class, args); + System.out.println("系统启动成功"); } } diff --git a/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/controller/admin/prod/CategoryController.java b/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/controller/admin/prod/CategoryController.java new file mode 100644 index 0000000..6d3b203 --- /dev/null +++ b/tashow-module/tashow-module-system/src/main/java/com/tashow/cloud/system/controller/admin/prod/CategoryController.java @@ -0,0 +1,41 @@ +/* +package com.tashow.cloud.system.controller.admin.prod; + +import com.tashow.cloud.common.pojo.CommonResult; + +import com.tashow.cloud.productapi.api.product.CategoryApi; +import com.tashow.cloud.productapi.api.product.dto.CategoryDto; +import jakarta.annotation.Resource; +import jakarta.annotation.security.PermitAll; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import java.util.List; + +import static com.tashow.cloud.common.pojo.CommonResult.success; + +@RestController +@RequestMapping("/category") +@Validated +public class CategoryController { + + @Resource + private CategoryApi categoryService; + + */ +/** + * 获取菜单页面的表 + * @return + *//* + + + @GetMapping("/categoryList") + @PermitAll + public CommonResult> categoryList(@RequestParam(value = "grade", required = false) Integer grade, + @RequestParam(value = "categoryId", required = false) Long categoryId, + @RequestParam(value = "status", required = false) Integer status) { + return success(categoryService.categoryList(grade, categoryId, status)); + } + + +}*/ diff --git a/tashow-module/tashow-module-system/src/main/resources/application-local.yaml b/tashow-module/tashow-module-system/src/main/resources/application-local.yaml index 03bada2..a4d2d57 100644 --- a/tashow-module/tashow-module-system/src/main/resources/application-local.yaml +++ b/tashow-module/tashow-module-system/src/main/resources/application-local.yaml @@ -5,11 +5,11 @@ spring: username: nacos # Nacos 账号 password: nacos # Nacos 密码 discovery: # 【配置中心】配置项 - namespace: dev # 命名空间。这里使用 dev 开发环境 + namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境 group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP metadata: version: 1.0.0 # 服务实例的版本号,可用于灰度发布 config: # 【注册中心】配置项 - namespace: dev # 命名空间。这里使用 dev 开发环境 + namespace: 16bd40df-7cc7-4c2c-82c2-6186ade7bb08 # 命名空间。这里使用 dev 开发环境 group: DEFAULT_GROUP # 使用的 Nacos 配置分组,默认为 DEFAULT_GROUP