From c3107b22be0bab9025c30bad3f6fcfb93a5306fe Mon Sep 17 00:00:00 2001 From: wxy Date: Tue, 23 Apr 2024 15:35:11 +0800 Subject: [PATCH] 1 --- .../com/muyu/product/domain/DTO/Brand.java | 52 - .../com/muyu/product/domain/DTO/Category.java | 54 -- .../com/muyu/product/domain/DTO/Images.java | 24 - .../com/muyu/product/domain/DTO/Ladder.java | 24 - .../com/muyu/product/domain/DTO/Member.java | 27 - .../com/muyu/product/domain/DTO/Number.java | 30 - .../muyu/product/domain/DTO/Preference.java | 32 - .../com/muyu/product/domain/DTO/Price.java | 24 - .../com/muyu/product/domain/DTO/Product.java | 114 --- .../muyu/product/domain/DTO/ProductSku.java | 55 -- .../product/domain/DTO/ProductSkuAttr.java | 37 - .../muyu/product/domain/DTO/ProductType.java | 22 - .../product/domain/DTO/ProductTypeAttr.java | 67 -- .../domain/DTO/ProductTypeAttrValue.java | 42 - .../product/domain/DTO/ServiceMiddle.java | 24 - .../com/muyu/product/domain/DTO/Services.java | 21 - .../muyu/product/domain/DTO/TypeAttrs.java | 21 - .../product/domain/DTO/ValidationResult.java | 24 - .../product/domain/PmsSkuStockExample.java | 890 ------------------ .../muyu/product/domain/Resp/ProductResp.java | 119 --- .../product/domain/Resp/ProductTypeResp.java | 70 -- .../java/com/muyu/product/domain/StrPool.java | 48 - .../muyu/product/domain/req/ProductReq.java | 56 -- .../product/domain/req/ProductSkuNew.java | 36 - .../domain/req/ProductTypeAttrReq.java | 63 -- .../product/domain/req/QueryProductReq.java | 39 - .../product/domain/util/CommonResult.java | 133 --- .../muyu/product/domain/util/Constants.java | 133 --- .../muyu/product/domain/util/IErrorCode.java | 16 - .../muyu/product/domain/util/ResultCode.java | 29 - .../domain/validator/ConstraintValidator.java | 17 - .../domain/validator/FlagValidator.java | 24 - .../domain/validator/FlagValidatorClass.java | 29 - .../product/domain/vo/ProductCategoryVo.java | 28 - .../com/muyu/product/domain/vo/ProductVo.java | 52 - .../muyu/product/MuYuProductApplication.java | 23 - .../controller/ArgumentController.java | 56 -- .../product/controller/BrandController.java | 45 - .../controller/CategoryController.java | 61 -- .../product/controller/ProductController.java | 107 --- .../product/controller/SkuController.java | 44 - .../product/controller/TypeController.java | 94 -- .../muyu/product/mapper/ArgumentMapper.java | 23 - .../com/muyu/product/mapper/BrandMapper.java | 20 - .../muyu/product/mapper/CategoryMapper.java | 23 - .../muyu/product/mapper/ProductMapper.java | 28 - .../muyu/product/mapper/ProductSkuMapper.java | 23 - .../muyu/product/mapper/PromotionMapper.java | 21 - .../muyu/product/mapper/ServicesMapper.java | 16 - .../com/muyu/product/mapper/SkuMapper.java | 20 - .../com/muyu/product/mapper/TypeMapper.java | 41 - .../muyu/product/service/ArgumentService.java | 20 - .../muyu/product/service/BrandService.java | 18 - .../muyu/product/service/CategoryService.java | 22 - .../muyu/product/service/ProductService.java | 27 - .../product/service/ProductTypeService.java | 8 - .../muyu/product/service/ServiceService.java | 12 - .../com/muyu/product/service/SkuService.java | 15 - .../com/muyu/product/service/TypeService.java | 32 - .../service/impl/ArgumentServiceImpl.java | 68 -- .../service/impl/BrandServiceImpl.java | 39 - .../service/impl/CategoryServiceImpl.java | 47 - .../service/impl/ProductServiceImpl.java | 261 ----- .../service/impl/ServiceServiceImpl.java | 23 - .../product/service/impl/SkuServiceImpl.java | 40 - .../product/service/impl/TypeServiceImpl.java | 99 -- .../src/main/resources/bootstrap.yml | 5 +- .../mapper/product/ArgumentMapper.xml | 33 - .../resources/mapper/product/BrandMapper.xml | 51 - .../mapper/product/CategoryMapper.xml | 80 -- .../mapper/product/ProductMapper.xml | 135 --- .../mapper/product/ProductSkuMapper.xml | 66 -- .../mapper/product/PromotionMapper.xml | 39 - .../mapper/product/ServicesMapper.xml | 16 - .../resources/mapper/product/SkuMapper.xml | 28 - .../resources/mapper/product/TypeMapper.xml | 160 ---- 76 files changed, 2 insertions(+), 4463 deletions(-) delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Brand.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Category.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Images.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Ladder.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Member.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Number.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Preference.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Price.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Product.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSku.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSkuAttr.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductType.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttr.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttrValue.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ServiceMiddle.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Services.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/TypeAttrs.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ValidationResult.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/PmsSkuStockExample.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductResp.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductTypeResp.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/StrPool.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductReq.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductSkuNew.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductTypeAttrReq.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/QueryProductReq.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/CommonResult.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/Constants.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/IErrorCode.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/ResultCode.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/ConstraintValidator.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidator.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidatorClass.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/vo/ProductCategoryVo.java delete mode 100644 muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/vo/ProductVo.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/MuYuProductApplication.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryController.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/SkuController.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/TypeController.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/PromotionMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ServicesMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/SkuMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/TypeMapper.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/BrandService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductTypeService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ServiceService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/SkuService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/TypeService.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ServiceServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/SkuServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/TypeServiceImpl.java delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductSkuMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/PromotionMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ServicesMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/SkuMapper.xml delete mode 100644 muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/TypeMapper.xml diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Brand.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Brand.java deleted file mode 100644 index 94e80fc..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Brand.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.muyu.product.domain.DTO; - - - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:49 - */ -@Data -@ApiModel(value = "Brand",description = "品牌表") -public class Brand extends BaseEntity { - - @ApiModelProperty(value = "id") - private String id; - - @ApiModelProperty(value = "名称") - private String brandName; - - @ApiModelProperty(value = "首字母") - private String firstLetter; - - @ApiModelProperty(value = "排序 0靠后") - private Integer sort; - - @ApiModelProperty(value = "是否为品牌制造商:0-不是;1-是") - private Integer factoryStatus; - - @ApiModelProperty(value = "是否显示 :0-不显示;1-显示") - private Integer showStatus; - - @ApiModelProperty(value = "产品数量") - private Integer productCount; - - @ApiModelProperty(value = "产品评论数量") - private Integer productCommentCount; - - @ApiModelProperty(value = "品牌logo") - private String logo; - - @ApiModelProperty(value = "专区大图") - private String bigPic; - - @ApiModelProperty(value = "品牌故事") - private String brandStory; - - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Category.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Category.java deleted file mode 100644 index 339de1c..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Category.java +++ /dev/null @@ -1,54 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:50 - */ -@Data -@ApiModel(value = "Category", description = "商品分类信息") -public class Category extends BaseEntity { - - - @ApiModelProperty(value = "id") - private Integer id; - - @ApiModelProperty(value = "上级分类的编号:0表示一级分类") - private Integer parentId; - - @ApiModelProperty(value = "名称") - private String categoryName; - - @ApiModelProperty(value = "分类级别:0->1级;1->2级") - private Integer level; - - @ApiModelProperty(value = "商品数量") - private Integer productCount; - - @ApiModelProperty(value = "商品单位") - private String productUnit; - - @ApiModelProperty(value = "是否显示在导航栏:0->不显示;1->显示") - private Integer navStatus; - - @ApiModelProperty(value = "显示状态:0->不显示;1->显示") - private Integer showStatus; - - @ApiModelProperty(value = "排序") - private Integer sort; - - @ApiModelProperty(value = "图标") - private String icon; - - @ApiModelProperty(value = "关键字") - private String keywords; - - @ApiModelProperty(value = "描述") - private String description; - - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Images.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Images.java deleted file mode 100644 index d75cd84..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Images.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:53 - */ -@Data -@ApiModel(value = "Images", description = "产品图片信息") -public class Images extends BaseEntity { - - @ApiModelProperty(value = "图片ID") - private Integer id; - - @ApiModelProperty(value = "产品ID") - private Integer productId; - - @ApiModelProperty(value = "图片URL") - private String imagesUrl; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Ladder.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Ladder.java deleted file mode 100644 index 60b0151..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Ladder.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:53 - */ -@Data -@ApiModel(value = "Ladder", description = "阶梯信息") -public class Ladder extends BaseEntity { - - @ApiModelProperty(value = "阶梯ID") - private Integer id; - - @ApiModelProperty(value = "阶梯数量") - private Integer ladderNum; - - @ApiModelProperty(value = "阶梯折扣") - private Double ladderDiscount; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Member.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Member.java deleted file mode 100644 index 6a37239..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Member.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:55 - */ -@Data -@ApiModel(value = "Member", description = "会员信息") -public class Member extends BaseEntity { - - @ApiModelProperty(value = "会员ID") - private Integer id; - - @ApiModelProperty(value = "黄金会员折扣") - private Double memberGold; - - @ApiModelProperty(value = "白金会员折扣") - private Double memberSilver; - - @ApiModelProperty(value = "钻石会员折扣") - private Double memberDiamond; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Number.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Number.java deleted file mode 100644 index 3a6c3c7..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Number.java +++ /dev/null @@ -1,30 +0,0 @@ -package com.muyu.product.domain.DTO; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:55 - */ -public enum Number { - - /** 0 **/ - zero("0"), - /** 1 **/ - one("1"), - /** 2 **/ - two("2"), - /** 3 **/ - three("3"), - /** 4 **/ - four("4"); - private String value; - - private Number(String value) - { - this.value = value; - } - - public String getValue() - { - return value; - } -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Preference.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Preference.java deleted file mode 100644 index 4d2a03c..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Preference.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.fasterxml.jackson.annotation.JsonFormat; -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.Date; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:56 - */ -@Data -@ApiModel(value = "Preference", description = "特惠信息") -public class Preference extends BaseEntity { - - @ApiModelProperty(value = "特惠ID") - private Integer id; - - @ApiModelProperty(value = "特惠开始时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date preferenceStartTime; - - @ApiModelProperty(value = "特惠结束时间") - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date preferenceEndTime; - - @ApiModelProperty(value = "促销价格") - private Double preferencePrice; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Price.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Price.java deleted file mode 100644 index 40afcef..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Price.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:56 - */ -@ApiModel(value = "Price", description = "价格信息") -@Data -public class Price extends BaseEntity { - - @ApiModelProperty(value = "价格ID") - private Integer id; - - @ApiModelProperty(value = "价格最大值") - private Double priceMax; - - @ApiModelProperty(value = "价格减免") - private Double priceReduction; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Product.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Product.java deleted file mode 100644 index f011f34..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Product.java +++ /dev/null @@ -1,114 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:57 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@ApiModel(description = "产品实体类") -public class Product extends BaseEntity { - - @ApiModelProperty(value = "id") - private Integer id; - - @ApiModelProperty(value = "名称",required = true) - @NotEmpty(message = "名称不能为空") - private String productName; - - @ApiModelProperty(value = "货号",required = true) - @NotNull(message = "货号不能为空") - private String productNumber; - - @ApiModelProperty(value = "审核状态 (1:通过, 2:驳回)") - private Integer productExamine; - - @ApiModelProperty(value = "分类",required = true) - @NotNull(message = "分类不能不选择") - private Integer categoryId; - - @ApiModelProperty(value = "品牌",required = true) - @NotNull(message = "品牌不能不选择") - private Integer brandId; - - @ApiModelProperty(value = "商品类型",required = true) - private Integer typeId; - - @ApiModelProperty(value = "副标题") - private String productSubheading; - - @ApiModelProperty(value = "商品介绍") - private String productInformation; - - @ApiModelProperty(value = "单位") - private String productUnit; - - @ApiModelProperty(value = "重量") - private Double productWeight; - - @ApiModelProperty(value = "排序") - private Integer productSort; - - @ApiModelProperty(value = "市场价") - private Integer marketPrice; - - @ApiModelProperty(value = "积分") - private Integer productPoints; - - @ApiModelProperty(value = "成长值") - private Integer productGrowth; - - @ApiModelProperty(value = "最大积分值") - private Integer productMaxPoints; - - @ApiModelProperty(value = "预告商品 (1:是, 2:否)") - private Integer productForeknow; - - @ApiModelProperty(value = "上下架状态 (1:上架, 2:下架)") - private Integer productStatus; - - @ApiModelProperty(value = "新品 (1:是, 2:否)") - private Integer productNew; - - @ApiModelProperty(value = "推荐 (1:是, 2:否)") - private Integer productRecommended; - - @ApiModelProperty(value = "详情标题") - private String detailsTitle; - - @ApiModelProperty(value = "详情描述") - private String detailsInformation; - - @ApiModelProperty(value = "关键字") - private String detailsKeyWord; - - @ApiModelProperty(value = "备注") - private String detailsRemark; - - @ApiModelProperty(value = "优惠方法") - @NotNull(message = "优惠方式不能不选择") - private Integer methodType; - - @ApiModelProperty(value = "优惠Id") - private Integer methodId; - - @ApiModelProperty(value = "移动端信息") - private String moveInformation; - - @ApiModelProperty(value = "PC端信息") - private String pcInformation; - - private Integer sales; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSku.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSku.java deleted file mode 100644 index a5890cb..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSku.java +++ /dev/null @@ -1,55 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigInteger; -import java.util.HashMap; -import java.util.Map; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:57 - */ -@Data -@ApiModel(value = "ProductSku", description = "商品SKU信息") -public class ProductSku extends HashMap { - - @ApiModelProperty(value = "SKUId",required = true) - private long id; - - @ApiModelProperty(value = "销售价格",required = true) - private Double salePrice; - - @ApiModelProperty(value = "促销价格",required = true) - private Double promotionPrice; - - @ApiModelProperty(value = "库存",required = true) - private Integer stock; - - @ApiModelProperty(value = "预警库存",required = true) - private Integer stockAlert; - - @ApiModelProperty(value = "商品Id") - private Integer productId; - - @ApiModelProperty(value = "SKU背景图地址") - private String bgImg; - - @ApiModelProperty(value = "创建人") - private String createBy; - - @ApiModelProperty(value= "创建时间") - private String createTime; - - @ApiModelProperty(value = "修改时间") - private String updateTime; - - @ApiModelProperty(value = "是否删除 0-是 1-否") - private int isDelete; - - - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSkuAttr.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSkuAttr.java deleted file mode 100644 index 19d91f8..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductSkuAttr.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.math.BigInteger; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:58 - */ -@ApiModel(value = "ProductSkuAttr", description = "产品SKU属性信息") -@Data -public class ProductSkuAttr extends BaseEntity { - - @ApiModelProperty(value = "ID") - private Integer id; - - @ApiModelProperty(value = "SKU ID") - private long skuId; - - @ApiModelProperty(value = "属性ID") - private Integer attrId; - - @ApiModelProperty(value = "属性值ID") - private Integer attrValueId; - - @ApiModelProperty(value = "手工录入属性值") - private String attrValue; - - @ApiModelProperty(value = "类型:0-属性,1-参数") - private Integer flag; - - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductType.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductType.java deleted file mode 100644 index 2d5c3af..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductType.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/3 10:54 - */ -@Data -@ApiModel(value = "ProductType") -public class ProductType extends BaseEntity { - - - private Integer id; - - @ApiModelProperty(name = "类型名称" ,value = "类型名称") - private String typeName; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttr.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttr.java deleted file mode 100644 index 0cf3d26..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttr.java +++ /dev/null @@ -1,67 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:58 - */ -@Data -@ApiModel(value = "ProductTypeAttr", description = "产品类型属性信息") -public class ProductTypeAttr extends BaseEntity { - - @ApiModelProperty(value = "ID") - private Integer id; - - @ApiModelProperty(value = "商品类型ID") - private Integer productTypeId; - - @ApiModelProperty(value = "属性名称") - private String attrName; - - @ApiModelProperty(value = "是否支持多选:0-是,1-否") - private Integer multipleChoice; - - @ApiModelProperty(value = "录入方式:0-列表选择,1-手动") - private Integer inputMethod; - - @ApiModelProperty(value = "排序") - private Integer sort; - - @ApiModelProperty(value = "分类标识:0-属性,1-参数") - private Integer flag; - - @ApiModelProperty(value = "筛选:0-普通,1-颜色") - private Integer screen; - - @ApiModelProperty(value = "检索:1-不需要,2-关键字,3-范围检索") - private Integer search; - - @ApiModelProperty(value = "商品属性关联:1-是,2-否") - private Integer association; - - @ApiModelProperty(value = "属性是否可选:1-唯一,2-单选,3-复选") - private Integer stats; - - @ApiModelProperty(value = "属性值的录入方式:1-手工录入,2-从列表中选择") - private Integer input; - - @ApiModelProperty(value = "属性值可选值列表") - private String selection; - - @ApiModelProperty(value = "手动新增:0-是,1-否") - private Integer manualOperation; - - - @ApiModelProperty(value = "类型名称") - private String typeName; - - @ApiModelProperty(value = "类型集合") - private List typeAttrs; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttrValue.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttrValue.java deleted file mode 100644 index 86bc612..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ProductTypeAttrValue.java +++ /dev/null @@ -1,42 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:59 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@ApiModel(value = "ProductTypeAttrValue", description = "产品类型属性值信息") -public class ProductTypeAttrValue extends BaseEntity { - - @ApiModelProperty(value = "ID") - private Integer id; - - @ApiModelProperty(value = "属性ID") - private Integer typeAttrId; - - @ApiModelProperty(value = "属性值详情") - private String typeAttrValue; - - @ApiModelProperty(value = "录入方式:0-自动,1-手动") - private Integer inputMethod; - - - // 添加集合属性及其getter方法 - private List productTypeAttrValueList; - - public List getProductTypeAttrValueList() { - return productTypeAttrValueList; - } - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ServiceMiddle.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ServiceMiddle.java deleted file mode 100644 index dbc2f48..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ServiceMiddle.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 16:59 - */ -@Data -@ApiModel(value = "ServiceMiddle", description = "服务与商品关联信息") -public class ServiceMiddle extends BaseEntity { - - @ApiModelProperty(value = "Id") - private Integer id; - - @ApiModelProperty(value = "商品Id") - private Integer productId; - - @ApiModelProperty(value = "服务Id") - private Integer serviceId; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Services.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Services.java deleted file mode 100644 index 9a483ea..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/Services.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:00 - */ -@Data -@ApiModel(value = "Services", description = "服务信息") -public class Services extends BaseEntity { - - @ApiModelProperty(value = "服务Id") - private Integer id; - - @ApiModelProperty(value = "服务名称") - private String serviceName; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/TypeAttrs.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/TypeAttrs.java deleted file mode 100644 index 8af32d0..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/TypeAttrs.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.muyu.product.domain.DTO; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/3 10:56 - */ - -@Data -@ApiModel(value = "TypeAttrs") -public class TypeAttrs extends BaseEntity { - - @ApiModelProperty(value = "Id") - private Integer typeAttrValueId; - @ApiModelProperty(value = "名称") - private String typeAttrValueName; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ValidationResult.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ValidationResult.java deleted file mode 100644 index 14ec081..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/DTO/ValidationResult.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.muyu.product.domain.DTO; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:01 - */ -public class ValidationResult { - - private boolean isValid; - private String errorMessage; - - public ValidationResult(boolean isValid, String errorMessage) { - this.isValid = isValid; - this.errorMessage = errorMessage; - } - - public boolean isValid() { - return isValid; - } - - public String getErrorMessage() { - return errorMessage; - } -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/PmsSkuStockExample.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/PmsSkuStockExample.java deleted file mode 100644 index 7d72e40..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/PmsSkuStockExample.java +++ /dev/null @@ -1,890 +0,0 @@ -package com.muyu.product.domain; - -import java.math.BigDecimal; -import java.util.ArrayList; -import java.util.List; - -public class PmsSkuStockExample { - protected String orderByClause; - - protected boolean distinct; - - protected List oredCriteria; - - public PmsSkuStockExample() { - oredCriteria = new ArrayList<>(); - } - - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - public String getOrderByClause() { - return orderByClause; - } - - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - public boolean isDistinct() { - return distinct; - } - - public List getOredCriteria() { - return oredCriteria; - } - - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList<>(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andProductIdIsNull() { - addCriterion("product_id is null"); - return (Criteria) this; - } - - public Criteria andProductIdIsNotNull() { - addCriterion("product_id is not null"); - return (Criteria) this; - } - - public Criteria andProductIdEqualTo(Long value) { - addCriterion("product_id =", value, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdNotEqualTo(Long value) { - addCriterion("product_id <>", value, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdGreaterThan(Long value) { - addCriterion("product_id >", value, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdGreaterThanOrEqualTo(Long value) { - addCriterion("product_id >=", value, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdLessThan(Long value) { - addCriterion("product_id <", value, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdLessThanOrEqualTo(Long value) { - addCriterion("product_id <=", value, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdIn(List values) { - addCriterion("product_id in", values, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdNotIn(List values) { - addCriterion("product_id not in", values, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdBetween(Long value1, Long value2) { - addCriterion("product_id between", value1, value2, "productId"); - return (Criteria) this; - } - - public Criteria andProductIdNotBetween(Long value1, Long value2) { - addCriterion("product_id not between", value1, value2, "productId"); - return (Criteria) this; - } - - public Criteria andSkuCodeIsNull() { - addCriterion("sku_code is null"); - return (Criteria) this; - } - - public Criteria andSkuCodeIsNotNull() { - addCriterion("sku_code is not null"); - return (Criteria) this; - } - - public Criteria andSkuCodeEqualTo(String value) { - addCriterion("sku_code =", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeNotEqualTo(String value) { - addCriterion("sku_code <>", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeGreaterThan(String value) { - addCriterion("sku_code >", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeGreaterThanOrEqualTo(String value) { - addCriterion("sku_code >=", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeLessThan(String value) { - addCriterion("sku_code <", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeLessThanOrEqualTo(String value) { - addCriterion("sku_code <=", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeLike(String value) { - addCriterion("sku_code like", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeNotLike(String value) { - addCriterion("sku_code not like", value, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeIn(List values) { - addCriterion("sku_code in", values, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeNotIn(List values) { - addCriterion("sku_code not in", values, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeBetween(String value1, String value2) { - addCriterion("sku_code between", value1, value2, "skuCode"); - return (Criteria) this; - } - - public Criteria andSkuCodeNotBetween(String value1, String value2) { - addCriterion("sku_code not between", value1, value2, "skuCode"); - return (Criteria) this; - } - - public Criteria andPriceIsNull() { - addCriterion("price is null"); - return (Criteria) this; - } - - public Criteria andPriceIsNotNull() { - addCriterion("price is not null"); - return (Criteria) this; - } - - public Criteria andPriceEqualTo(BigDecimal value) { - addCriterion("price =", value, "price"); - return (Criteria) this; - } - - public Criteria andPriceNotEqualTo(BigDecimal value) { - addCriterion("price <>", value, "price"); - return (Criteria) this; - } - - public Criteria andPriceGreaterThan(BigDecimal value) { - addCriterion("price >", value, "price"); - return (Criteria) this; - } - - public Criteria andPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("price >=", value, "price"); - return (Criteria) this; - } - - public Criteria andPriceLessThan(BigDecimal value) { - addCriterion("price <", value, "price"); - return (Criteria) this; - } - - public Criteria andPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("price <=", value, "price"); - return (Criteria) this; - } - - public Criteria andPriceIn(List values) { - addCriterion("price in", values, "price"); - return (Criteria) this; - } - - public Criteria andPriceNotIn(List values) { - addCriterion("price not in", values, "price"); - return (Criteria) this; - } - - public Criteria andPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("price between", value1, value2, "price"); - return (Criteria) this; - } - - public Criteria andPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("price not between", value1, value2, "price"); - return (Criteria) this; - } - - public Criteria andStockIsNull() { - addCriterion("stock is null"); - return (Criteria) this; - } - - public Criteria andStockIsNotNull() { - addCriterion("stock is not null"); - return (Criteria) this; - } - - public Criteria andStockEqualTo(Integer value) { - addCriterion("stock =", value, "stock"); - return (Criteria) this; - } - - public Criteria andStockNotEqualTo(Integer value) { - addCriterion("stock <>", value, "stock"); - return (Criteria) this; - } - - public Criteria andStockGreaterThan(Integer value) { - addCriterion("stock >", value, "stock"); - return (Criteria) this; - } - - public Criteria andStockGreaterThanOrEqualTo(Integer value) { - addCriterion("stock >=", value, "stock"); - return (Criteria) this; - } - - public Criteria andStockLessThan(Integer value) { - addCriterion("stock <", value, "stock"); - return (Criteria) this; - } - - public Criteria andStockLessThanOrEqualTo(Integer value) { - addCriterion("stock <=", value, "stock"); - return (Criteria) this; - } - - public Criteria andStockIn(List values) { - addCriterion("stock in", values, "stock"); - return (Criteria) this; - } - - public Criteria andStockNotIn(List values) { - addCriterion("stock not in", values, "stock"); - return (Criteria) this; - } - - public Criteria andStockBetween(Integer value1, Integer value2) { - addCriterion("stock between", value1, value2, "stock"); - return (Criteria) this; - } - - public Criteria andStockNotBetween(Integer value1, Integer value2) { - addCriterion("stock not between", value1, value2, "stock"); - return (Criteria) this; - } - - public Criteria andLowStockIsNull() { - addCriterion("low_stock is null"); - return (Criteria) this; - } - - public Criteria andLowStockIsNotNull() { - addCriterion("low_stock is not null"); - return (Criteria) this; - } - - public Criteria andLowStockEqualTo(Integer value) { - addCriterion("low_stock =", value, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockNotEqualTo(Integer value) { - addCriterion("low_stock <>", value, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockGreaterThan(Integer value) { - addCriterion("low_stock >", value, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockGreaterThanOrEqualTo(Integer value) { - addCriterion("low_stock >=", value, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockLessThan(Integer value) { - addCriterion("low_stock <", value, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockLessThanOrEqualTo(Integer value) { - addCriterion("low_stock <=", value, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockIn(List values) { - addCriterion("low_stock in", values, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockNotIn(List values) { - addCriterion("low_stock not in", values, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockBetween(Integer value1, Integer value2) { - addCriterion("low_stock between", value1, value2, "lowStock"); - return (Criteria) this; - } - - public Criteria andLowStockNotBetween(Integer value1, Integer value2) { - addCriterion("low_stock not between", value1, value2, "lowStock"); - return (Criteria) this; - } - - public Criteria andPicIsNull() { - addCriterion("pic is null"); - return (Criteria) this; - } - - public Criteria andPicIsNotNull() { - addCriterion("pic is not null"); - return (Criteria) this; - } - - public Criteria andPicEqualTo(String value) { - addCriterion("pic =", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicNotEqualTo(String value) { - addCriterion("pic <>", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicGreaterThan(String value) { - addCriterion("pic >", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicGreaterThanOrEqualTo(String value) { - addCriterion("pic >=", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicLessThan(String value) { - addCriterion("pic <", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicLessThanOrEqualTo(String value) { - addCriterion("pic <=", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicLike(String value) { - addCriterion("pic like", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicNotLike(String value) { - addCriterion("pic not like", value, "pic"); - return (Criteria) this; - } - - public Criteria andPicIn(List values) { - addCriterion("pic in", values, "pic"); - return (Criteria) this; - } - - public Criteria andPicNotIn(List values) { - addCriterion("pic not in", values, "pic"); - return (Criteria) this; - } - - public Criteria andPicBetween(String value1, String value2) { - addCriterion("pic between", value1, value2, "pic"); - return (Criteria) this; - } - - public Criteria andPicNotBetween(String value1, String value2) { - addCriterion("pic not between", value1, value2, "pic"); - return (Criteria) this; - } - - public Criteria andSaleIsNull() { - addCriterion("sale is null"); - return (Criteria) this; - } - - public Criteria andSaleIsNotNull() { - addCriterion("sale is not null"); - return (Criteria) this; - } - - public Criteria andSaleEqualTo(Integer value) { - addCriterion("sale =", value, "sale"); - return (Criteria) this; - } - - public Criteria andSaleNotEqualTo(Integer value) { - addCriterion("sale <>", value, "sale"); - return (Criteria) this; - } - - public Criteria andSaleGreaterThan(Integer value) { - addCriterion("sale >", value, "sale"); - return (Criteria) this; - } - - public Criteria andSaleGreaterThanOrEqualTo(Integer value) { - addCriterion("sale >=", value, "sale"); - return (Criteria) this; - } - - public Criteria andSaleLessThan(Integer value) { - addCriterion("sale <", value, "sale"); - return (Criteria) this; - } - - public Criteria andSaleLessThanOrEqualTo(Integer value) { - addCriterion("sale <=", value, "sale"); - return (Criteria) this; - } - - public Criteria andSaleIn(List values) { - addCriterion("sale in", values, "sale"); - return (Criteria) this; - } - - public Criteria andSaleNotIn(List values) { - addCriterion("sale not in", values, "sale"); - return (Criteria) this; - } - - public Criteria andSaleBetween(Integer value1, Integer value2) { - addCriterion("sale between", value1, value2, "sale"); - return (Criteria) this; - } - - public Criteria andSaleNotBetween(Integer value1, Integer value2) { - addCriterion("sale not between", value1, value2, "sale"); - return (Criteria) this; - } - - public Criteria andPromotionPriceIsNull() { - addCriterion("promotion_price is null"); - return (Criteria) this; - } - - public Criteria andPromotionPriceIsNotNull() { - addCriterion("promotion_price is not null"); - return (Criteria) this; - } - - public Criteria andPromotionPriceEqualTo(BigDecimal value) { - addCriterion("promotion_price =", value, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceNotEqualTo(BigDecimal value) { - addCriterion("promotion_price <>", value, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceGreaterThan(BigDecimal value) { - addCriterion("promotion_price >", value, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceGreaterThanOrEqualTo(BigDecimal value) { - addCriterion("promotion_price >=", value, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceLessThan(BigDecimal value) { - addCriterion("promotion_price <", value, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceLessThanOrEqualTo(BigDecimal value) { - addCriterion("promotion_price <=", value, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceIn(List values) { - addCriterion("promotion_price in", values, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceNotIn(List values) { - addCriterion("promotion_price not in", values, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("promotion_price between", value1, value2, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andPromotionPriceNotBetween(BigDecimal value1, BigDecimal value2) { - addCriterion("promotion_price not between", value1, value2, "promotionPrice"); - return (Criteria) this; - } - - public Criteria andLockStockIsNull() { - addCriterion("lock_stock is null"); - return (Criteria) this; - } - - public Criteria andLockStockIsNotNull() { - addCriterion("lock_stock is not null"); - return (Criteria) this; - } - - public Criteria andLockStockEqualTo(Integer value) { - addCriterion("lock_stock =", value, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockNotEqualTo(Integer value) { - addCriterion("lock_stock <>", value, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockGreaterThan(Integer value) { - addCriterion("lock_stock >", value, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockGreaterThanOrEqualTo(Integer value) { - addCriterion("lock_stock >=", value, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockLessThan(Integer value) { - addCriterion("lock_stock <", value, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockLessThanOrEqualTo(Integer value) { - addCriterion("lock_stock <=", value, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockIn(List values) { - addCriterion("lock_stock in", values, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockNotIn(List values) { - addCriterion("lock_stock not in", values, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockBetween(Integer value1, Integer value2) { - addCriterion("lock_stock between", value1, value2, "lockStock"); - return (Criteria) this; - } - - public Criteria andLockStockNotBetween(Integer value1, Integer value2) { - addCriterion("lock_stock not between", value1, value2, "lockStock"); - return (Criteria) this; - } - - public Criteria andSpDataIsNull() { - addCriterion("sp_data is null"); - return (Criteria) this; - } - - public Criteria andSpDataIsNotNull() { - addCriterion("sp_data is not null"); - return (Criteria) this; - } - - public Criteria andSpDataEqualTo(String value) { - addCriterion("sp_data =", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataNotEqualTo(String value) { - addCriterion("sp_data <>", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataGreaterThan(String value) { - addCriterion("sp_data >", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataGreaterThanOrEqualTo(String value) { - addCriterion("sp_data >=", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataLessThan(String value) { - addCriterion("sp_data <", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataLessThanOrEqualTo(String value) { - addCriterion("sp_data <=", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataLike(String value) { - addCriterion("sp_data like", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataNotLike(String value) { - addCriterion("sp_data not like", value, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataIn(List values) { - addCriterion("sp_data in", values, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataNotIn(List values) { - addCriterion("sp_data not in", values, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataBetween(String value1, String value2) { - addCriterion("sp_data between", value1, value2, "spData"); - return (Criteria) this; - } - - public Criteria andSpDataNotBetween(String value1, String value2) { - addCriterion("sp_data not between", value1, value2, "spData"); - return (Criteria) this; - } - } - - public static class Criteria extends GeneratedCriteria { - protected Criteria() { - super(); - } - } - - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductResp.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductResp.java deleted file mode 100644 index f71c556..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductResp.java +++ /dev/null @@ -1,119 +0,0 @@ -package com.muyu.product.domain.Resp; - -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import javax.validation.constraints.NotEmpty; -import javax.validation.constraints.NotNull; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/30 12:27 - */ - -@Data -public class ProductResp { - - @ApiModelProperty(value = "id") - private Integer id; - - @ApiModelProperty(value = "名称") - @NotEmpty(message = "名称不能为空") - private String productName; - - @ApiModelProperty(value = "货号") - @NotNull(message = "货号不能为空") - private String productNumber; - - - @ApiModelProperty(value = "销量") - private Integer sales; - - @ApiModelProperty(value = "审核状态 (1:通过, 2:驳回)") - private Integer productExamine; - - @ApiModelProperty(value = "品牌") - @NotNull(message = "品牌不能不选择") - private Integer brandId; - - @ApiModelProperty(value = "商品类型") - @NotNull(message = "商品类型不能不选择") - private Integer typeId; - - @ApiModelProperty(value = "副标题") - private String productSubheading; - - @ApiModelProperty(value = "商品介绍") - private String productInformation; - - @ApiModelProperty(value = "单位") - private String productUnit; - - @ApiModelProperty(value = "重量") - private Double productWeight; - - @ApiModelProperty(value = "排序") - private Integer productSort; - - @ApiModelProperty(value = "促销表id") - private Integer promotionId; - - @ApiModelProperty(value = "积分") - private Integer productPoints; - - @ApiModelProperty(value = "成长值") - private Integer productGrowth; - - @ApiModelProperty(value = "最大积分值") - private Integer productMaxPoints; - - @ApiModelProperty(value = "预告商品 (1:是, 2:否)") - private Integer productForeknow; - - @ApiModelProperty(value = "上下架状态 (1:上架, 2:下架)") - private Integer productStatus; - - @ApiModelProperty(value = "新品 (1:是, 2:否)") - private Integer productNew; - - @ApiModelProperty(value = "推荐 (1:是, 2:否)") - private Integer productRecommended; - - @ApiModelProperty(value = "详情标题") - private String detailsTitle; - - @ApiModelProperty(value = "详情描述") - private String detailsInformation; - - @ApiModelProperty(value = "关键字") - private String detailsKeyWord; - - @ApiModelProperty(value = "备注") - private String detailsRemark; - - @ApiModelProperty(value = "优惠方法") - @NotNull(message = "优惠方式不能不选择") - private Integer methodType; - - @ApiModelProperty(value = "优惠Id") - private Integer methodId; - - @ApiModelProperty(value = "移动端信息") - private String moveInformation; - - @ApiModelProperty(value = "PC端信息") - private String pcInformation; - - @ApiModelProperty(value = "售价") - private Double salePrice; - - @ApiModelProperty(value = "品牌名称") - private String brandName; - - @ApiModelProperty(value = "类型名称") - private String typeName; - - @ApiModelProperty(value = "图片") - private String imagesUrl; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductTypeResp.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductTypeResp.java deleted file mode 100644 index 5bae6a4..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/Resp/ProductTypeResp.java +++ /dev/null @@ -1,70 +0,0 @@ -package com.muyu.product.domain.Resp; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 11:19 - */ -@Data -@ApiModel(value = "ProductTypeResp", description = "类型返回值") -public class ProductTypeResp { - - - @ApiModelProperty(value = "id") - private Integer id; - - @ApiModelProperty(value = "类型名称") - private String typeName; - - @ApiModelProperty(value = "属性名称") - private String attrName; - - @ApiModelProperty(value = "是否支持多选:0-是,1-否") - private Integer multipleChoice; - - @ApiModelProperty(value = "录入方式:0-列表选择,1-手动") - private Integer inputMethod; - - @ApiModelProperty(value = "排序") - private Integer sort; - - @ApiModelProperty(value = "分类标识:0-属性,1-参数") - private Integer flag; - - @ApiModelProperty(value = "筛选:0-普通,1-颜色") - private Integer screen; - - @ApiModelProperty(value = "检索:1-不需要,2-关键字,3-范围检索") - private Integer search; - - @ApiModelProperty(value = "商品属性关联:1-是,2-否") - private Integer association; - - @ApiModelProperty(value = "属性是否可选:1-唯一,2-单选,3-复选") - private Integer stats; - - @ApiModelProperty(value = "属性值的录入方式:1-手工录入,2-从列表中选择") - private Integer input; - - @ApiModelProperty(value = "属性值可选值列表") - private String selection; - - @ApiModelProperty(value = "手动新增:0-是,1-否") - private Integer manualOperation; - - @ApiModelProperty(value = "属性ID") - private Integer typeAttrId; - - @ApiModelProperty(value = "属性值详情") - private Integer typeAttrValue; - - @ApiModelProperty(value = "属性数量") - private Integer countNum; - - @ApiModelProperty(value = "参数数量") - private Integer countParam; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/StrPool.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/StrPool.java deleted file mode 100644 index 82285f7..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/StrPool.java +++ /dev/null @@ -1,48 +0,0 @@ -package com.muyu.product.domain;// -// Source code recreated from a .class file by IntelliJ IDEA -// (powered by FernFlower decompiler) -// - - - -public interface StrPool { - char C_SPACE = ' '; - char C_TAB = '\t'; - char C_DOT = '.'; - char C_SLASH = '/'; - char C_BACKSLASH = '\\'; - char C_CR = '\r'; - char C_LF = '\n'; - char C_UNDERLINE = '_'; - char C_COMMA = ','; - char C_DELIM_START = '{'; - char C_DELIM_END = '}'; - char C_BRACKET_START = '['; - char C_BRACKET_END = ']'; - char C_COLON = ':'; - char C_AT = '@'; - String TAB = "\t"; - String DOT = "."; - String DOUBLE_DOT = ".."; - String SLASH = "/"; - String BACKSLASH = "\\"; - String CR = "\r"; - String LF = "\n"; - String CRLF = "\r\n"; - String UNDERLINE = "_"; - String DASHED = "-"; - String COMMA = ","; - String DELIM_START = "{"; - String DELIM_END = "}"; - String BRACKET_START = "["; - String BRACKET_END = "]"; - String COLON = ":"; - String AT = "@"; - String HTML_NBSP = " "; - String HTML_AMP = "&"; - String HTML_QUOTE = """; - String HTML_APOS = "'"; - String HTML_LT = "<"; - String HTML_GT = ">"; - String EMPTY_JSON = "{}"; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductReq.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductReq.java deleted file mode 100644 index eeccfa0..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductReq.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.muyu.product.domain.req; - - - -import com.muyu.product.domain.DTO.*; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -import javax.validation.Valid; -import java.util.HashMap; -import java.util.List; - -/** - * - * @author A3385 - */ -@Data -@AllArgsConstructor -@NoArgsConstructor -@ApiModel(value = "ProductReq", description = "商品添加接收信息") -public class ProductReq { - - @ApiModelProperty(value = "商品") - @Valid - private Product product; - - @ApiModelProperty(value = "商品图片列表") - private List productImages; - - @ApiModelProperty(value = "商品Sku集合") - private List productSkus; - - @ApiModelProperty(value = "服务id") - private List serviceIds; - - @ApiModelProperty(value = "阶梯优惠") - private List ladder; - - @ApiModelProperty(value = "会员信息") - private Member member; - - @ApiModelProperty(value = "优惠信息") - private Preference preference; - - @ApiModelProperty(value = "价格信息") - private List price; - - - - - - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductSkuNew.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductSkuNew.java deleted file mode 100644 index b9d043e..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductSkuNew.java +++ /dev/null @@ -1,36 +0,0 @@ -package com.muyu.product.domain.req; - -import com.muyu.common.core.domain.BaseEntity; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 20:00 - */ -@Data -@ApiModel(value = "ProductSkuNew", description = "ProductSkuNew") -public class ProductSkuNew extends BaseEntity { - - @ApiModelProperty(value = "SKUId") - private long id; - - @ApiModelProperty(value = "销售价格") - private Double salePrice; - - @ApiModelProperty(value = "促销价格") - private Double promotionPrice; - - @ApiModelProperty(value = "库存") - private Integer stock; - - @ApiModelProperty(value = "预警库存") - private Integer stockAlert; - - @ApiModelProperty(value = "商品Id") - private Integer productId; - - @ApiModelProperty(value = "SKU背景图地址") - private String bgImg; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductTypeAttrReq.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductTypeAttrReq.java deleted file mode 100644 index 81af590..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/ProductTypeAttrReq.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.muyu.product.domain.req; - -import com.muyu.common.core.domain.BaseEntity; -import com.muyu.product.domain.DTO.ProductTypeAttrValue; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/7 19:05 - */ -@Data -@ApiModel(value = "ProductTypeAttrReq", description = "商品类型添加值") -public class ProductTypeAttrReq extends BaseEntity { - @ApiModelProperty(value = "ID") - private Integer id; - - @ApiModelProperty(value = "商品类型ID") - private Integer productTypeId; - - @ApiModelProperty(value = "属性名称") - private String attrName; - - @ApiModelProperty(value = "是否支持多选:0-是,1-否") - private Integer multipleChoice; - - @ApiModelProperty(value = "录入方式:0-列表选择,1-手动") - private Integer inputMethod; - - @ApiModelProperty(value = "排序") - private Integer sort; - - @ApiModelProperty(value = "分类标识:0-属性,1-参数") - private Integer flag; - - @ApiModelProperty(value = "筛选:0-普通,1-颜色") - private Integer screen; - - @ApiModelProperty(value = "检索:1-不需要,2-关键字,3-范围检索") - private Integer search; - - @ApiModelProperty(value = "商品属性关联:1-是,2-否") - private Integer association; - - @ApiModelProperty(value = "属性是否可选:1-唯一,2-单选,3-复选") - private Integer stats; - - @ApiModelProperty(value = "属性值的录入方式:1-手工录入,2-从列表中选择") - private Integer input; - - @ApiModelProperty(value = "属性值可选值列表") - private String selection; - - @ApiModelProperty(value = "手动新增:0-是,1-否") - private Integer manualOperation; - - @ApiModelProperty(value = "添加类型得具体值") - private String productTypeAttrValueList; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/QueryProductReq.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/QueryProductReq.java deleted file mode 100644 index 5989f28..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/req/QueryProductReq.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.muyu.product.domain.req; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.Data; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 19:58 - */ -@ApiModel(value = "QueryProductReq", description = "接收到的参数值") -@Data -public class QueryProductReq { - - @ApiModelProperty(value = "名称") - private String productName; - - @ApiModelProperty(value = "货号") - private String productNumber; - - @ApiModelProperty(value = "上下架状态 (1:上架, 2:下架)") - private Integer productStatus; - - @ApiModelProperty(value = "审核状态 (1:通过, 2:驳回)") - private Integer productExamine; - - @ApiModelProperty(value = "品牌") - private Integer brandId; - - @ApiModelProperty(value = "商品类型") - private Integer typeId; - - @ApiModelProperty(value = "分页参数") - private Integer pageNum = 1; - - @ApiModelProperty(value = "分页参数") - private Integer pageSize = 10; - -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/CommonResult.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/CommonResult.java deleted file mode 100644 index 85bdfad..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/CommonResult.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.muyu.product.domain.util; - -/** - * 通用返回结果封装类 - * Created by macro on 2019/4/19. - */ -public class CommonResult { - /** - * 状态码 - */ - private long code; - /** - * 提示信息 - */ - private String message; - /** - * 数据封装 - */ - private T data; - - protected CommonResult() { - } - - protected CommonResult(long code, String message, T data) { - this.code = code; - this.message = message; - this.data = data; - } - - /** - * 成功返回结果 - * - * @param data 获取的数据 - */ - public static CommonResult success(T data) { - return new CommonResult(ResultCode.SUCCESS.getCode(), ResultCode.SUCCESS.getMessage(), data); - } - - /** - * 成功返回结果 - * - * @param data 获取的数据 - * @param message 提示信息 - */ - public static CommonResult success(T data, String message) { - return new CommonResult(ResultCode.SUCCESS.getCode(), message, data); - } - - /** - * 失败返回结果 - * @param errorCode 错误码 - */ - public static CommonResult failed(IErrorCode errorCode) { - return new CommonResult(errorCode.getCode(), errorCode.getMessage(), null); - } - - /** - * 失败返回结果 - * @param errorCode 错误码 - * @param message 错误信息 - */ - public static CommonResult failed(IErrorCode errorCode,String message) { - return new CommonResult(errorCode.getCode(), message, null); - } - - /** - * 失败返回结果 - * @param message 提示信息 - */ - public static CommonResult failed(String message) { - return new CommonResult(ResultCode.FAILED.getCode(), message, null); - } - - /** - * 失败返回结果 - */ - public static CommonResult failed() { - return failed(ResultCode.FAILED); - } - - /** - * 参数验证失败返回结果 - */ - public static CommonResult validateFailed() { - return failed(ResultCode.VALIDATE_FAILED); - } - - /** - * 参数验证失败返回结果 - * @param message 提示信息 - */ - public static CommonResult validateFailed(String message) { - return new CommonResult(ResultCode.VALIDATE_FAILED.getCode(), message, null); - } - - /** - * 未登录返回结果 - */ - public static CommonResult unauthorized(T data) { - return new CommonResult(ResultCode.UNAUTHORIZED.getCode(), ResultCode.UNAUTHORIZED.getMessage(), data); - } - - /** - * 未授权返回结果 - */ - public static CommonResult forbidden(T data) { - return new CommonResult(ResultCode.FORBIDDEN.getCode(), ResultCode.FORBIDDEN.getMessage(), data); - } - - public long getCode() { - return code; - } - - public void setCode(long code) { - this.code = code; - } - - public String getMessage() { - return message; - } - - public void setMessage(String message) { - this.message = message; - } - - public T getData() { - return data; - } - - public void setData(T data) { - this.data = data; - } -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/Constants.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/Constants.java deleted file mode 100644 index 8297ccc..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/Constants.java +++ /dev/null @@ -1,133 +0,0 @@ -package com.muyu.product.domain.util; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/27 21:20 - */ -public class Constants { - /** - * UTF-8 字符集 - */ - public static final String UTF8 = "UTF-8"; - - /** - * GBK 字符集 - */ - public static final String GBK = "GBK"; - - /** - * www主域 - */ - public static final String WWW = "www."; - - /** - * RMI 远程方法调用 - */ - public static final String LOOKUP_RMI = "rmi:"; - - /** - * LDAP 远程方法调用 - */ - public static final String LOOKUP_LDAP = "ldap:"; - - /** - * LDAPS 远程方法调用 - */ - public static final String LOOKUP_LDAPS = "ldaps:"; - - /** - * http请求 - */ - public static final String HTTP = "http://"; - - /** - * https请求 - */ - public static final String HTTPS = "https://"; - - /** - * 成功标记 - */ - public static final Integer SUCCESS = 200; - - /** - * 失败标记 - */ - public static final Integer FAIL = 500; - - /** - * 登录成功状态 - */ - public static final String LOGIN_SUCCESS_STATUS = "0"; - - /** - * 登录失败状态 - */ - public static final String LOGIN_FAIL_STATUS = "1"; - - /** - * 登录成功 - */ - public static final String LOGIN_SUCCESS = "Success"; - - /** - * 注销 - */ - public static final String LOGOUT = "Logout"; - - /** - * 注册 - */ - public static final String REGISTER = "Register"; - - /** - * 登录失败 - */ - public static final String LOGIN_FAIL = "Error"; - - /** - * 当前记录起始索引 - */ - public static final String PAGE_NUM = "pageNum"; - - /** - * 每页显示记录数 - */ - public static final String PAGE_SIZE = "pageSize"; - - /** - * 排序列 - */ - public static final String ORDER_BY_COLUMN = "orderByColumn"; - - /** - * 排序的方向 "desc" 或者 "asc". - */ - public static final String IS_ASC = "isAsc"; - - /** - * 验证码有效期(分钟) - */ - public static final long CAPTCHA_EXPIRATION = 2; - - /** - * 资源映射路径 前缀 - */ - public static final String RESOURCE_PREFIX = "/profile"; - - /** - * 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全) - */ - public static final String[] JSON_WHITELIST_STR = { "org.springframework", "com.bwie" }; - - /** - * 定时任务白名单配置(仅允许访问的包名,如其他需要可以自行添加) - */ - public static final String[] JOB_WHITELIST_STR = { "com.bwie.job.task" }; - - /** - * 定时任务违规的字符 - */ - public static final String[] JOB_ERROR_STR = { "java.net.URL", "javax.naming.InitialContext", "org.yaml.snakeyaml", - "org.springframework", "org.apache", "com.bwie.common.core.utils.file" }; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/IErrorCode.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/IErrorCode.java deleted file mode 100644 index 62e1954..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/IErrorCode.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.muyu.product.domain.util; - -/** - * API返回码接口 - */ -public interface IErrorCode { - /** - * 返回码 - */ - long getCode(); - - /** - * 返回信息 - */ - String getMessage(); -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/ResultCode.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/ResultCode.java deleted file mode 100644 index 1adf9c2..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/util/ResultCode.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.muyu.product.domain.util; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/24 19:26 - */ -public enum ResultCode implements IErrorCode{ - - SUCCESS(200, "操作成功"), - FAILED(500, "操作失败"), - VALIDATE_FAILED(404, "参数检验失败"), - UNAUTHORIZED(401, "暂未登录或token已经过期"), - FORBIDDEN(403, "没有相关权限"); - private long code; - private String message; - - private ResultCode(long code, String message) { - this.code = code; - this.message = message; - } - - public long getCode() { - return code; - } - - public String getMessage() { - return message; - } -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/ConstraintValidator.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/ConstraintValidator.java deleted file mode 100644 index bb605ee..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/ConstraintValidator.java +++ /dev/null @@ -1,17 +0,0 @@ -package com.muyu.product.domain.validator; - -import com.fasterxml.jackson.databind.introspect.Annotated; - -import javax.validation.ConstraintValidatorContext; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/24 9:39 - */ -public interface ConstraintValidator { - - default void initialize(A constraintAnnotation) { - } - - boolean isValid(T var1, ConstraintValidatorContext var2); -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidator.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidator.java deleted file mode 100644 index e208df9..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidator.java +++ /dev/null @@ -1,24 +0,0 @@ -package com.muyu.product.domain.validator; - -import javax.validation.Constraint; -import java.lang.annotation.*; -import javax.validation.Payload; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/24 9:34 - */ - -@Documented -@Retention(RetentionPolicy.RUNTIME) -@Target({ElementType.FIELD,ElementType.PARAMETER}) -@Constraint(validatedBy = FlagValidatorClass.class) -public @interface FlagValidator { - String[] value() default {}; - - String message() default "flag is not found"; - - Class[] groups() default {}; - - Class[] payload() default {}; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidatorClass.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidatorClass.java deleted file mode 100644 index e004119..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/validator/FlagValidatorClass.java +++ /dev/null @@ -1,29 +0,0 @@ -package com.muyu.product.domain.validator; - -import com.muyu.product.domain.validator.FlagValidator; - -import javax.validation.ConstraintValidator; -import javax.validation.ConstraintValidatorContext; - -/** - * 状态标记校验器 - */ -public class FlagValidatorClass implements ConstraintValidator { - private String[] values; - @Override - public void initialize(FlagValidator flagValidator) { - this.values = flagValidator.value(); - } - - @Override - public boolean isValid(Integer value, ConstraintValidatorContext constraintValidatorContext) { - boolean isValid = false; - for(int i=0;i childrenList; -} diff --git a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/vo/ProductVo.java b/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/vo/ProductVo.java deleted file mode 100644 index b03baa3..0000000 --- a/muyu-modules/muyu-product/muyu-product-commo/src/main/java/com/muyu/product/domain/vo/ProductVo.java +++ /dev/null @@ -1,52 +0,0 @@ -package com.muyu.product.domain.vo; - -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiModelProperty; -import lombok.AllArgsConstructor; -import lombok.Data; -import lombok.NoArgsConstructor; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/10 下午8:47 - */ -@Data -@ApiModel(value = "ProductVo") -@AllArgsConstructor -@NoArgsConstructor -public class ProductVo { - - @ApiModelProperty(value = "产品id") - private Integer id; - - @ApiModelProperty(value = "产品名称") - private String productName; - - @ApiModelProperty(value = "产品信息") - private String productInformation; - - @ApiModelProperty(value = "详情标题") - private String detailsTitle; - - @ApiModelProperty(value = "详情信息") - private String detailsInformation; - - @ApiModelProperty(value = "品牌名称") - private String brandName; - - @ApiModelProperty(value = "销售价格") - private Double salePrice; - - @ApiModelProperty(value = "促销价格") - private Double promotionPrice; - - @ApiModelProperty(value = "图片链接") - private String imagesUrl; - - @ApiModelProperty(value = "服务名称") - private String serviceName; - - @ApiModelProperty(value = "类型名称") - private String typeName; - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/MuYuProductApplication.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/MuYuProductApplication.java deleted file mode 100644 index 14f8d49..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/MuYuProductApplication.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.muyu.product; - -import com.muyu.common.security.annotation.EnableCustomConfig; -import com.muyu.common.security.annotation.EnableMyFeignClients; -import com.muyu.common.swagger.annotation.EnableCustomSwagger2; -import org.springframework.boot.SpringApplication; -import org.springframework.boot.autoconfigure.SpringBootApplication; -import org.springframework.context.annotation.ComponentScan; -import org.springframework.context.annotation.ComponentScans; -import org.springframework.stereotype.Component; - -/** - * @author A3385 - */ -@EnableCustomConfig -@EnableCustomSwagger2 -@EnableMyFeignClients -@SpringBootApplication -public class MuYuProductApplication { - public static void main(String[] args) { - SpringApplication.run(MuYuProductApplication.class); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java deleted file mode 100644 index 63ed98b..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ArgumentController.java +++ /dev/null @@ -1,56 +0,0 @@ -package com.muyu.product.controller; - -import com.muyu.common.core.domain.AjaxResult; -import com.muyu.common.core.domain.R; -import com.muyu.product.domain.DTO.Brand; -import com.muyu.product.domain.DTO.Services; -import com.muyu.product.domain.vo.ProductCategoryVo; -import com.muyu.product.service.ArgumentService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; - -import java.util.List; - -import static com.muyu.common.core.domain.AjaxResult.success; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:09 - */ -@RestController -@RequestMapping("argument") -@Api(value = "下拉框查询") -public class ArgumentController { - - - @Autowired - private ArgumentService argumentService; - - @ApiOperation("品牌下拉框查询") - @GetMapping("/queryBrand/{brandName}") - public AjaxResult queryBrand(@PathVariable String brandName){ - Listlist = argumentService.queryBrand(brandName); - return success(list); - } - - - @GetMapping("/queryService") - @ApiOperation("查询服务") - public AjaxResult queryService(){ - Listlist=argumentService.queryService(); - return success(list); - } - - @GetMapping("/queryCategory") - @ApiOperation("分类查询") - public R>queryCategory(){ - return R.ok(argumentService.queryCategory()); - } -} - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java deleted file mode 100644 index 17ad392..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/BrandController.java +++ /dev/null @@ -1,45 +0,0 @@ -package com.muyu.product.controller; - -import com.muyu.common.core.domain.AjaxResult; -import com.muyu.product.domain.DTO.Brand; -import com.muyu.product.service.BrandService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/2 19:49 - */ -@RestController -@RequestMapping("/brand") -@Api("品牌管理") -public class BrandController { - - @Autowired - private BrandService brandService; - - - @PostMapping - @ApiOperation("品牌添加") - public AjaxResult insertBrand(@RequestBody Brand brand){ - Integer res=brandService.insertBrand(brand); - return AjaxResult.success(res==1?"添加成功":"添加失败"); - } - - @DeleteMapping("/{brandId}") - @ApiOperation("品牌删除") - public AjaxResult deleteBrand(@PathVariable Integer brandId){ - Integer res = brandService.deleteBrand(brandId); - return AjaxResult.success(res==1?"删除成功":"删除失败"); - } - - @PutMapping - @ApiOperation("品牌修改") - public AjaxResult updateBrand(@RequestBody Brand brand){ - Integer res = brandService.updateBrand(brand); - return AjaxResult.success(res==1?"修改成功":"修改失败"); - } - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryController.java deleted file mode 100644 index 4759f46..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryController.java +++ /dev/null @@ -1,61 +0,0 @@ -package com.muyu.product.controller; - -import com.muyu.common.core.domain.AjaxResult; -import com.muyu.product.domain.DTO.Category; -import com.muyu.product.service.CategoryService; -import io.swagger.annotations.ApiModel; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 10:31 - */ - -@RestController -@RequestMapping("/category") -public class CategoryController { - - @Autowired - private CategoryService categoryService; - - @GetMapping("/queryCategory") - @ApiOperation("类型列表") - public AjaxResult queryCategory(){ - Listlist=categoryService.queryCategory(); - return AjaxResult.success(list); - } - - @ApiOperation("查询分类父级") - @GetMapping("/queryCategorParent") - public AjaxResult queryCategorParent(){ - Listlist=categoryService.queryCategorParent(); - return AjaxResult.success(list); - } - @DeleteMapping("{categoryId}") - @ApiOperation("分类删除") - public AjaxResult deleteCategory(@PathVariable Integer categoryId){ - Integer res = categoryService.deleteCategory(categoryId); - return AjaxResult.success(res==1?"删除成功":"删除失败"); - } - - @PostMapping - @ApiOperation("分类添加") - public AjaxResult insertCategory(@RequestBody(required = false) Category category){ - if (category == null) { - return AjaxResult.error("请求体不能为空"); - } - Integer res = categoryService.insertCategory(category); - return AjaxResult.success(res == 1 ? "添加成功" : "添加失败"); - } - - @PutMapping - @ApiOperation("分类修改") - public AjaxResult updateCategory(@RequestBody Category category){ - Integer res = categoryService.updateCategory(category); - return AjaxResult.success(res==1?"修改成功":"修改失败"); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java deleted file mode 100644 index 658d1d2..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/ProductController.java +++ /dev/null @@ -1,107 +0,0 @@ -package com.muyu.product.controller; - -import com.github.pagehelper.PageInfo; -import com.muyu.common.core.domain.AjaxResult; -import com.muyu.common.core.utils.StringUtils; -import com.muyu.common.core.utils.file.FileTypeUtils; -import com.muyu.common.core.utils.file.MimeTypeUtils; -import com.muyu.common.system.domain.SysFile; -import com.muyu.common.system.remote.RemoteFileService; -import com.muyu.product.domain.DTO.Product; -import com.muyu.product.domain.Resp.ProductResp; -import com.muyu.product.domain.req.ProductReq; -import com.muyu.product.domain.req.QueryProductReq; -import com.muyu.common.core.domain.R; -import com.muyu.product.domain.vo.ProductVo; -import com.muyu.product.service.ProductService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiModelProperty; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; -import org.springframework.web.multipart.MultipartFile; - -import javax.validation.Valid; - -import java.util.Arrays; - -import static com.muyu.common.core.domain.AjaxResult.error; -import static com.muyu.common.core.domain.AjaxResult.success; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:09 - */ -@RestController -@RequestMapping("/product") -@Api(value = "商品管理") -public class ProductController { - - @Autowired - private ProductService productService; - - @Autowired - private RemoteFileService remoteFileService; - - - @ApiOperation("查询商品信息") - @GetMapping("/queryProduct") - public AjaxResult queryProduct(QueryProductReq req){ - PageInfo list = productService.queryProduct(req); - return success(list); - } - - - @ApiOperation("添加商品") - @PostMapping("/productInsert") - public R productInsert(@Valid @RequestBody ProductReq productReq){ - productService.productInsert(productReq); - return R.ok(null,"添加成功"); - } - - @ApiOperation("删除商品") - @DeleteMapping("{id}") - public AjaxResult deleteProduct(@PathVariable Integer id){ - Integer res = productService.deleteProduct(id); - return AjaxResult.success(res==1?"删除成功":"删除失败"); - } - - @ApiOperation("修改商品") - @PostMapping("/productUpdate") - public R productUpdate(@Valid @RequestBody ProductReq productReq){ - productService.productUpdate(productReq); - return R.ok(null,"添加成功"); - } - - - @ApiOperation("图片上传") - @PostMapping("/upload") - public AjaxResult avatar(@RequestParam("file") MultipartFile file) - { - if (!file.isEmpty()) - { - String extension = FileTypeUtils.getExtension(file); - if (!StringUtils.equalsAnyIgnoreCase(extension, MimeTypeUtils.IMAGE_EXTENSION)) - { - return error("文件格式不正确,请上传" + Arrays.toString(MimeTypeUtils.IMAGE_EXTENSION) + "格式"); - } - R fileResult = remoteFileService.upload(file); - if (StringUtils.isNull(fileResult) || StringUtils.isNull(fileResult.getData())) - { - return error("文件服务异常,请联系管理员"); - } - String url = fileResult.getData().getUrl(); - AjaxResult ajax = AjaxResult.success(); - ajax.put("imgUrl", url); - return ajax; - } - return error("上传图片异常,请联系管理员"); - } - - @ApiOperation("测试商品信息") - @GetMapping("/queryProductDetails/{id}") - public R queryProductDetails(@PathVariable Integer id){ - ProductVo productVo = productService.queryProductDetails(id); - return R.ok(productVo); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/SkuController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/SkuController.java deleted file mode 100644 index 915c1b8..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/SkuController.java +++ /dev/null @@ -1,44 +0,0 @@ -package com.muyu.product.controller; - -import com.muyu.product.domain.DTO.ProductSku; -import com.muyu.product.domain.util.CommonResult; -import com.muyu.product.service.SkuService; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/5 20:34 - */ -@RestController -@RequestMapping("/sku") -public class SkuController { - - - - @Autowired - private SkuService skuservice; - - @ApiOperation("根据商品ID及sku编码模糊搜索sku库存") - @RequestMapping(value = "/{pid}", method = RequestMethod.GET) - @ResponseBody - public CommonResult> getList(@PathVariable Long pid, @RequestParam(value = "keyword",required = false) String keyword) { - List skuStockList = skuservice.getList(pid, keyword); - return CommonResult.success(skuStockList); - } - - @ApiOperation("批量更新sku库存信息") - @RequestMapping(value = "update/{pid}",method = RequestMethod.POST) - @ResponseBody - public CommonResult update(@PathVariable Long pid,@RequestBody List skuList){ - int count = skuservice.update(pid,skuList); - if(count>0){ - return CommonResult.success(count); - }else { - return CommonResult.failed(); - } - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/TypeController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/TypeController.java deleted file mode 100644 index 95249c7..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/TypeController.java +++ /dev/null @@ -1,94 +0,0 @@ -package com.muyu.product.controller; - -import com.muyu.common.core.domain.AjaxResult; -import com.muyu.common.core.domain.R; -import com.muyu.product.domain.DTO.ProductType; -import com.muyu.product.domain.DTO.ProductTypeAttr; -import com.muyu.product.domain.Resp.ProductTypeResp; -import com.muyu.product.domain.req.ProductTypeAttrReq; -import com.muyu.product.service.TypeService; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.*; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 11:15 - */ -@RestController -@RequestMapping("/type") -@Api("类型管理") -public class TypeController { - - @Autowired - private TypeService typeService; - - - @GetMapping("/queryTypeAll") - @ApiOperation("类型查询") - public AjaxResult queryTypeAll(){ - List list =typeService.queryTypeAll(); - return AjaxResult.success(list); - } - - /** - * 类型所有查询 - * @return - */ - @GetMapping("/queryTypeAttr/{flag}/{id}") - @ApiOperation("属性/参数类型查询") - public AjaxResult queryType(@PathVariable Integer flag,@PathVariable Integer id){ - List list =typeService.queryType(flag,id); - return AjaxResult.success(list); - } - - - @DeleteMapping("/{typeId}") - @ApiOperation("类型删除") - public AjaxResult deleteType(@PathVariable Integer typeId){ - Integer res = typeService.deleteType(typeId); - return AjaxResult.success(res==1?"删除成功":"删除失败"); - } - - @ApiOperation("类型值删除") - @DeleteMapping("/deleteTypeAttr/{typeId}") - public R deleteTypeAttr(@PathVariable Integer typeId){ - Integer res = typeService.deleteTypeAttr(typeId); - return R.ok(res==1?"删除成功":"删除失败"); - } - - @ApiOperation("类型添加") - @PostMapping("/insertType") - public R insertType(@RequestBody ProductType productType){ - Integer res = typeService.insertType(productType); - return R.ok(res==1?"添加成功":"添加失败"); - } - - @ApiOperation("类型修改") - @PostMapping("updateType") - public R updateType(@RequestBody ProductType productType){ - Integer res = typeService.updateType(productType); - return R.ok(res==1?"修改成功":"修改失败"); - } - - @ApiOperation("类型值添加") - @PostMapping("/insertTypeAttr") - public R insertTypeAttr(@RequestBody ProductTypeAttrReq productTypeAttrReq){ - Integer res = typeService.insertTypeAttr(productTypeAttrReq); - return R.ok(res==1?"添加成功":"添加失败"); - } - - @ApiOperation("类型值修改") - @PostMapping("/updateTypeAttr") - public R updateTypeAttr(@RequestBody ProductTypeAttrReq productTypeAttrReq){ - Integer res = typeService.updateTypeAttr(productTypeAttrReq); - return R.ok(res==1?"修改成功":"修改失败"); - } - - - - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java deleted file mode 100644 index c3c0370..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ArgumentMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.Brand; -import com.muyu.product.domain.DTO.Category; -import com.muyu.product.domain.DTO.Services; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.web.bind.annotation.PathVariable; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:07 - */ -@Mapper -public interface ArgumentMapper { - List queryBrand(@PathVariable String brandName); - - List queryService(); - - List queryCategory(); - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java deleted file mode 100644 index 8a12f77..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/BrandMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.Brand; -import org.apache.ibatis.annotations.Mapper; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/2 19:51 - */ - -@Mapper -public interface BrandMapper { - - - Integer deleteBrand(Integer brandId); - - Integer insertBrand(Brand brand); - - Integer updateBrand(Brand brand); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryMapper.java deleted file mode 100644 index 1872bc3..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.Category; -import org.apache.ibatis.annotations.Mapper; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 10:32 - */ -@Mapper -public interface CategoryMapper { - List queryCategory(); - - Integer deleteCategory(Integer categoryId); - - Integer insertCategory(Category category); - - Integer updateCategory(Category category); - - List queryCategorParent(); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java deleted file mode 100644 index 792aedf..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductMapper.java +++ /dev/null @@ -1,28 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.Product; -import com.muyu.product.domain.Resp.ProductResp; -import com.muyu.product.domain.req.QueryProductReq; -import com.muyu.product.domain.vo.ProductVo; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:06 - */ -public interface ProductMapper { - - List queryProduct(QueryProductReq productReq); - - Integer insertProduct(Product product); - - void updateMothodId(Integer id); - - Integer findProductNumber(String productNumber); - - - Integer deleteProduct(Integer id); - - ProductVo queryProductDetails(Integer id); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java deleted file mode 100644 index 514117d..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ProductSkuMapper.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.ProductSku; -import com.muyu.product.domain.DTO.ProductSkuAttr; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:29 - */ -@Mapper -public interface ProductSkuMapper { - - void insertProductSkuAttr(@Param("productSkuAttrs") List productSkuAttrs); - - void insertProductSku(@Param("productSkus") List productSkus, @Param("id") Integer id, @Param("createBy") String createBy); - - Integer findSkuId(@Param("productSkus") List productSkus); - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/PromotionMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/PromotionMapper.java deleted file mode 100644 index e5fca48..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/PromotionMapper.java +++ /dev/null @@ -1,21 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.Ladder; -import com.muyu.product.domain.DTO.Member; -import com.muyu.product.domain.DTO.Preference; -import com.muyu.product.domain.DTO.Price; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:07 - */ -public interface PromotionMapper { - - void insertPreference(Preference preference); - - void insertMember(Member member); - - void insertLadder(Ladder item); - - void insertPrice(Price item); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ServicesMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ServicesMapper.java deleted file mode 100644 index 24384e8..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/ServicesMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package com.muyu.product.mapper; - -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:07 - */ -@Mapper -public interface ServicesMapper { - - int insertProductService(@Param("id") Integer id, @Param("serviceIds") List serviceIds); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/SkuMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/SkuMapper.java deleted file mode 100644 index 478606a..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/SkuMapper.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.muyu.product.mapper; - - -import com.muyu.product.domain.DTO.ProductSku; -import com.muyu.product.domain.PmsSkuStockExample; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/5 20:39 - */ -@Mapper -public interface SkuMapper { - List selectByExample(PmsSkuStockExample example); - - int replaceList(@Param("list")List fileterSkuList); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/TypeMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/TypeMapper.java deleted file mode 100644 index fee96f2..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/TypeMapper.java +++ /dev/null @@ -1,41 +0,0 @@ -package com.muyu.product.mapper; - -import com.muyu.product.domain.DTO.ProductType; -import com.muyu.product.domain.DTO.ProductTypeAttr; -import com.muyu.product.domain.DTO.ProductTypeAttrValue; -import com.muyu.product.domain.Resp.ProductTypeResp; -import com.muyu.product.domain.req.ProductTypeAttrReq; -import org.apache.ibatis.annotations.Mapper; -import org.apache.ibatis.annotations.Param; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 11:15 - */ -@Mapper -public interface TypeMapper { - - - List queryType(@Param("flag") Integer flag, @Param("id") Integer id); - - List queryTypeAll(); - - Integer deleteType(@Param("typeId") Integer typeId, @Param("name") String name); - - Integer insertType(ProductType productType); - - Integer updateType(ProductType productType); - - Integer insertTypeAttr(ProductTypeAttrReq productTypeAttrReq); - - - Integer deleteTypeAttr(Integer id); - - Integer updateAttr(ProductTypeAttrReq productTypeAttrReq); - - void deleteTypeAttrValue(Integer typeId); - - void insertTypeValue(ProductTypeAttrValue productTypeAttrValue); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java deleted file mode 100644 index a13bae6..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ArgumentService.java +++ /dev/null @@ -1,20 +0,0 @@ -package com.muyu.product.service; - -import com.muyu.product.domain.DTO.Brand; -import com.muyu.product.domain.DTO.Services; -import com.muyu.product.domain.vo.ProductCategoryVo; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:05 - */ -public interface ArgumentService { - List queryBrand(String brandName); - - List queryService(); - - List queryCategory(); - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/BrandService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/BrandService.java deleted file mode 100644 index e79eab9..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/BrandService.java +++ /dev/null @@ -1,18 +0,0 @@ -package com.muyu.product.service; - -import com.muyu.product.domain.DTO.Brand; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/2 19:51 - */ -public interface BrandService { - Integer insertBrand(Brand brand); - - Integer deleteBrand(Integer brandId); - - - - - Integer updateBrand(Brand brand); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryService.java deleted file mode 100644 index 7c1e48a..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryService.java +++ /dev/null @@ -1,22 +0,0 @@ -package com.muyu.product.service; - -import com.muyu.product.domain.DTO.Category; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 10:31 - */ -public interface CategoryService { - List queryCategory(); - - Integer deleteCategory(Integer categoryId); - - Integer insertCategory(Category category); - - Integer updateCategory(Category category); - - List queryCategorParent(); - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductService.java deleted file mode 100644 index 7492057..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductService.java +++ /dev/null @@ -1,27 +0,0 @@ -package com.muyu.product.service; - -import com.github.pagehelper.PageInfo; -import com.muyu.product.domain.DTO.Product; -import com.muyu.product.domain.DTO.ProductSku; -import com.muyu.product.domain.DTO.ProductSkuAttr; -import com.muyu.product.domain.Resp.ProductResp; -import com.muyu.product.domain.req.ProductReq; -import com.muyu.product.domain.req.QueryProductReq; -import com.muyu.product.domain.vo.ProductVo; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:05 - */ -public interface ProductService { - PageInfo queryProduct(QueryProductReq req); - - void productInsert(ProductReq productReq); - - - Integer deleteProduct(Integer id); - - void productUpdate(ProductReq productReq); - - ProductVo queryProductDetails(Integer id); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductTypeService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductTypeService.java deleted file mode 100644 index aabb0bf..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ProductTypeService.java +++ /dev/null @@ -1,8 +0,0 @@ -package com.muyu.product.service; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:05 - */ -public interface ProductTypeService { -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ServiceService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ServiceService.java deleted file mode 100644 index ffc7514..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/ServiceService.java +++ /dev/null @@ -1,12 +0,0 @@ -package com.muyu.product.service; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:05 - */ -public interface ServiceService { - - int insertProductService(Integer productId,List serviceIds); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/SkuService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/SkuService.java deleted file mode 100644 index 127d1bb..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/SkuService.java +++ /dev/null @@ -1,15 +0,0 @@ -package com.muyu.product.service; - -import com.muyu.product.domain.DTO.ProductSku; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/5 20:35 - */ -public interface SkuService { - List getList(Long pid, String keyword); - - int update(Long pid, List skuList); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/TypeService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/TypeService.java deleted file mode 100644 index 2a082eb..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/TypeService.java +++ /dev/null @@ -1,32 +0,0 @@ -package com.muyu.product.service; - -import com.muyu.product.domain.DTO.ProductType; -import com.muyu.product.domain.DTO.ProductTypeAttr; -import com.muyu.product.domain.Resp.ProductTypeResp; -import com.muyu.product.domain.req.ProductTypeAttrReq; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 11:15 - */ -public interface TypeService { - - - List queryTypeAll(); - - List queryType(Integer flag, Integer id); - - Integer deleteType(Integer typeId); - - Integer deleteTypeAttr(Integer typeId); - - Integer insertType(ProductType productType); - - Integer updateType(ProductType productType); - - Integer insertTypeAttr(ProductTypeAttrReq productTypeAttrReq); - - Integer updateTypeAttr(ProductTypeAttrReq productTypeAttrReq); -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java deleted file mode 100644 index 4bd5687..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ArgumentServiceImpl.java +++ /dev/null @@ -1,68 +0,0 @@ -package com.muyu.product.service.impl; - -import com.muyu.product.domain.DTO.Brand; -import com.muyu.product.domain.DTO.Category; -import com.muyu.product.domain.DTO.Services; -import com.muyu.product.domain.vo.ProductCategoryVo; -import com.muyu.product.mapper.ArgumentMapper; -import com.muyu.product.service.ArgumentService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.ArrayList; -import java.util.HashMap; -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:06 - */ -@Service -public class ArgumentServiceImpl implements ArgumentService { - - @Autowired - private ArgumentMapper argumentMapper; - @Override - public List queryBrand(String brandName) { - return argumentMapper.queryBrand(brandName); - } - - @Override - public List queryService() { - return argumentMapper.queryService(); - } - - @Override - public List queryCategory() { - ListcategoryList=argumentMapper.queryCategory(); - ListproductCategoryVos=convertToProductCategoryVoTree(categoryList); - return productCategoryVos; - } - - private List convertToProductCategoryVoTree(List categoryList) { - ArrayList productCategoryVos = new ArrayList<>(); - HashMap idToProductCategoryVoMap = new HashMap<>(); - - for (Category category : categoryList) { - ProductCategoryVo productCategoryVo = new ProductCategoryVo(); - productCategoryVo.setId(category.getId()); - productCategoryVo.setName(category.getCategoryName()); - productCategoryVo.setParentId(category.getParentId()); - productCategoryVo.setChildrenList(new ArrayList<>()); - idToProductCategoryVoMap.put(category.getId(),productCategoryVo); - } - - for (ProductCategoryVo productCategoryVo : idToProductCategoryVoMap.values()) { - if(productCategoryVo.getParentId()==0){ - productCategoryVos.add(productCategoryVo); - }else { - Integer parentId = productCategoryVo.getParentId(); - ProductCategoryVo parentProductCategoryVo = idToProductCategoryVoMap.get(parentId); - if(parentProductCategoryVo!=null){ - parentProductCategoryVo.getChildrenList().add(productCategoryVo); - } - } - } - return productCategoryVos; - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java deleted file mode 100644 index 631f4e2..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/BrandServiceImpl.java +++ /dev/null @@ -1,39 +0,0 @@ -package com.muyu.product.service.impl; - -import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.product.domain.DTO.Brand; -import com.muyu.product.mapper.BrandMapper; -import com.muyu.product.service.BrandService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/2 19:51 - */ -@Service -public class BrandServiceImpl implements BrandService { - - @Autowired - private BrandMapper brandMapper; - @Override - public Integer insertBrand(Brand brand) { - brand.setCreateBy(SecurityUtils.getUsername()); - return brandMapper.insertBrand(brand); - } - - @Override - public Integer deleteBrand(Integer brandId) { - return brandMapper.deleteBrand(brandId); - } - - - - @Override - public Integer updateBrand(Brand brand) { - brand.setCreateBy(SecurityUtils.getUsername()); - return brandMapper.updateBrand(brand); - } - - -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryServiceImpl.java deleted file mode 100644 index a0a3375..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/CategoryServiceImpl.java +++ /dev/null @@ -1,47 +0,0 @@ -package com.muyu.product.service.impl; - -import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.product.domain.DTO.Category; -import com.muyu.product.mapper.CategoryMapper; -import com.muyu.product.service.CategoryService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 10:32 - */ -@Service -public class CategoryServiceImpl implements CategoryService { - - @Autowired - private CategoryMapper categoryMapper; - @Override - public List queryCategory() { - return categoryMapper.queryCategory(); - } - - @Override - public Integer deleteCategory(Integer categoryId) { - return categoryMapper.deleteCategory(categoryId); - } - - @Override - public Integer insertCategory(Category category) { - category.setCreateBy(SecurityUtils.getUsername()); - return categoryMapper.insertCategory(category); - } - - @Override - public Integer updateCategory(Category category) { - category.setCreateBy(SecurityUtils.getUsername()); - return categoryMapper.updateCategory(category); - } - - @Override - public List queryCategorParent() { - return categoryMapper.queryCategorParent(); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java deleted file mode 100644 index 5fed8e1..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ProductServiceImpl.java +++ /dev/null @@ -1,261 +0,0 @@ -package com.muyu.product.service.impl; -import com.alibaba.fastjson2.JSONObject; -import com.github.pagehelper.PageHelper; // 导入 PageHelper 类 -import com.github.pagehelper.PageInfo; // 导入 PageInfo 类 -import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.product.domain.DTO.ProductSkuAttr; // 导入 ProductSkuAttr 类 - - -import com.muyu.product.domain.DTO.*; -import com.muyu.product.domain.DTO.Number; -import com.muyu.product.domain.Resp.ProductResp; -import com.muyu.product.domain.req.ProductReq; -import com.muyu.product.domain.req.ProductSkuNew; -import com.muyu.product.domain.req.QueryProductReq; -import com.muyu.product.domain.vo.ProductVo; -import com.muyu.product.mapper.ProductMapper; -import com.muyu.product.mapper.ProductSkuMapper; -import com.muyu.product.mapper.PromotionMapper; -import com.muyu.product.service.ProductService; -import com.muyu.product.service.ServiceService; -import lombok.extern.log4j.Log4j2; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import javax.annotation.Resource; - -import java.time.LocalDateTime; -import java.time.ZoneId; -import java.util.*; -import java.util.concurrent.CompletableFuture; -import java.util.concurrent.ExecutorService; -import java.util.concurrent.Executors; - - -@Service -@Log4j2 -public class ProductServiceImpl implements ProductService { - - @Resource - private ProductMapper productMapper; - - @Autowired - private ServiceService serviceService; - - @Resource - private PromotionMapper promotionMapper; - - @Autowired - private ProductSkuMapper productSkuMapper; - - private ExecutorService executor = Executors.newFixedThreadPool(3); - - - // 检查产品参数 - public void checkProductParams(ProductReq productReq) { - - - try { - // 异步执行方法类型检查 - CompletableFuture methodTypeFuture = - CompletableFuture.supplyAsync(() -> checkMethodType(productReq), executor); - // 异步执行查找skuId检查 - CompletableFuture skuIdFuture = - CompletableFuture.supplyAsync(() -> findSkuId(productReq), executor); - // 异步执行产品编号检查 - CompletableFuture productNumberFuture = - CompletableFuture.supplyAsync(() -> checkProductNumber(productReq), executor); - - // 组合所有的异步任务,判断是否所有检查通过 - CompletableFuture allValidFuture = - CompletableFuture.allOf(methodTypeFuture, skuIdFuture, productNumberFuture) - .thenApply(ignored -> { - boolean allValid = methodTypeFuture.join().isValid() - && skuIdFuture.join().isValid() - && productNumberFuture.join().isValid(); - return allValid ? "所有检查通过" : "存在检查未通过"; - }) - .exceptionally(throwable -> "校验过程发生异常: " + throwable.getMessage()); - - // 输出结果 - allValidFuture.thenAccept(System.out::println); - } catch (Exception e) { - System.err.println("校验过程发生异常: " + e.getMessage()); - } - } - - // 检查产品编号 - private ValidationResult checkProductNumber(ProductReq productReq) { - try { - Integer productNumber = productMapper.findProductNumber(String.valueOf(productReq.getProduct().getProductNumber())); - if (productNumber < Integer.valueOf(Number.zero.getValue())) { - return new ValidationResult(false, "productNumber不能重复"); - } - return new ValidationResult(true, "productNumber检查通过"); - } catch (Exception e) { - return new ValidationResult(false, "检查产品编号时发生异常:" + e.getMessage()); - } - } - private ValidationResult findSkuId(ProductReq productReq) { - Integer skuId = productSkuMapper.findSkuId(productReq.getProductSkus()); - if(skuId>=Integer.valueOf(Number.zero.getValue())){ - return new ValidationResult(false,"skuID不能重复"); - } - return new ValidationResult(true,"通过"); - } - - private ValidationResult checkMethodType(ProductReq productReq) { - if(productReq.getProduct().getMethodType() == null){ - return new ValidationResult(false,"method type 不能空"); - } - return new ValidationResult(true,"通过"); - } - - - @Override - public PageInfo queryProduct(QueryProductReq productReq) { - PageHelper.startPage(productReq.getPageNum(),productReq.getPageSize()); - Listproducts=productMapper.queryProduct(productReq); - PageInfo pageInfo = new PageInfo<>(products); - return pageInfo; - } - - @Override - public void productInsert(ProductReq productReq) { - long start =System.currentTimeMillis(); - - checkProductParams(productReq); - - insertProduct(productReq.getProduct()); - - insertProductService(productReq.getProduct().getId(),productReq.getServiceIds()); - - - insertProductPromotion(productReq); - - // insertProductSku(productReq); - - log.info("耗时:{}",(System.currentTimeMillis()-start)); - - - } - - @Override - public Integer deleteProduct(Integer id) { - return productMapper.deleteProduct(id); - } - - @Override - public void productUpdate(ProductReq productReq) { - - } - - @Override - public ProductVo queryProductDetails(Integer id) { - return productMapper.queryProductDetails(id); - } - - private void insertProductSku(ProductReq productReq) { - List productSkuList = productReq.getProductSkus(); - String createBy = SecurityUtils.getUsername(); - //批量添加 - productSkuMapper.insertProductSku(productSkuList,productReq.getProduct().getId(),createBy); - //添加skuAttr除实体类以外的字段 - ArrayList productSkuAttrs = new ArrayList<>(); - productSkuList.forEach(productSkusReq -> { - //获取id - //productSkusReq.setProductId(productReq.getProduct().getId()); - //获取map的属性值 - ProductSkuNew productSkuNew = com.alibaba.fastjson2.JSONObject.parseObject(com.alibaba.fastjson2.JSONObject.toJSONString(productSkusReq), ProductSkuNew.class); - HashMap hashMap = com.alibaba.fastjson2.JSONObject.parseObject(JSONObject.toJSONString(productSkuNew), HashMap.class); - Set skuReq = productSkusReq.keySet(); - Set sku = hashMap.keySet(); - //添加一个新的set - Set set = skuReq; - //去重 - set.removeAll(sku); - //格属性赋值 - set.forEach(key ->{ - ProductSkuAttr productSkuAttr = new ProductSkuAttr(); - productSkuAttr.setSkuId(productSkuNew.getId()); - productSkuAttr.setAttrId(Integer.valueOf(key.toString())); - productSkuAttr.setAttrValueId(Integer.valueOf(productSkusReq.get(key).toString())); - productSkuAttr.setFlag(Integer.valueOf(Number.zero.getValue())); - productSkuAttrs.add(productSkuAttr); - }); - }); - //批量添加productSkuAttr - productSkuMapper.insertProductSkuAttr(productSkuAttrs); - } - - private void insertProductPromotion(ProductReq productReq) { - Integer methodType = productReq.getProduct().getMethodType(); - - //没有优惠 - if(Number.zero.getValue().equals(String.valueOf(methodType))){ - updateMethodId(Integer.valueOf(Number.zero.getValue())); - } - - //特价优惠 - if(Number.one.getValue().equals(String.valueOf(methodType))){ - Preference preference = productReq.getPreference(); - promotionMapper.insertPreference(preference); - updateMethodId(preference.getId()); - } - - //会员优惠 - if(Number.two.getValue().equals(String.valueOf(methodType))){ - Member member = productReq.getMember(); - promotionMapper.insertMember(member); - updateMethodId(member.getId()); - } - - //阶梯价格 - if(Number.three.getValue().equals(String.valueOf(methodType))){ - List ladder = productReq.getLadder(); - ladder.forEach(item -> { - promotionMapper.insertLadder(item); - }); - } - - //满减价格 - if(Number.four.getValue().equals(String.valueOf(methodType))){ - List price = productReq.getPrice(); - price.forEach(item -> { - promotionMapper.insertPrice(item); - }); - } - } - - private void updateMethodId(Integer id) { - productMapper.updateMothodId(id); - } - - private void insertProductService(Integer id, List serviceIds) { - serviceService.insertProductService(id,serviceIds); - } - - - private void insertProduct(Product product) { - product.setCreateBy(SecurityUtils.getUsername()); - productMapper.insertProduct(product); - } - - private void calculateProductPrice(ProductReq productReq){ - Integer methodType = productReq.getProduct().getMethodType(); - - //特价 - if(Number.one.getValue().equals(String.valueOf(methodType))){ - - LocalDateTime now=LocalDateTime.now(); - - LocalDateTime start = productReq.getPreference().getPreferenceStartTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); - LocalDateTime end = productReq.getPreference().getPreferenceEndTime().toInstant().atZone(ZoneId.systemDefault()).toLocalDateTime(); - - - if(now.isAfter(start)&&now.isBefore(end)){ - - } - } - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ServiceServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ServiceServiceImpl.java deleted file mode 100644 index adf4925..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/ServiceServiceImpl.java +++ /dev/null @@ -1,23 +0,0 @@ -package com.muyu.product.service.impl; - -import com.muyu.product.mapper.ServicesMapper; -import com.muyu.product.service.ServiceService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/3/29 17:05 - */ -@Service -public class ServiceServiceImpl implements ServiceService { - - @Autowired - private ServicesMapper servicesMapper; - @Override - public int insertProductService(Integer productId, List serviceIds) { - return servicesMapper.insertProductService(productId,serviceIds); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/SkuServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/SkuServiceImpl.java deleted file mode 100644 index 9b11883..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/SkuServiceImpl.java +++ /dev/null @@ -1,40 +0,0 @@ -package com.muyu.product.service.impl; - -import com.muyu.common.core.utils.StringUtils; -import com.muyu.product.domain.DTO.ProductSku; -import com.muyu.product.domain.PmsSkuStockExample; -import com.muyu.product.mapper.SkuMapper; -import com.muyu.product.service.SkuService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; -import java.util.stream.Collectors; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/5 20:35 - */ -@Service -public class SkuServiceImpl implements SkuService { - - @Autowired - private SkuMapper skuMapper; - @Override - public List getList(Long pid, String keyword) { - PmsSkuStockExample example = new PmsSkuStockExample(); - PmsSkuStockExample.Criteria criteria = example.createCriteria().andProductIdEqualTo(pid); - if (!StringUtils.isEmpty(keyword)) { - criteria.andSkuCodeLike("%" + keyword + "%"); - } - return skuMapper.selectByExample(example); - } - - @Override - public int update(Long pid, List skuList) { - ListfileterSkuList=skuList.stream() - .filter(item -> pid.equals(item.getProductId())) - .collect(Collectors.toList()); - return skuMapper.replaceList(fileterSkuList); - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/TypeServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/TypeServiceImpl.java deleted file mode 100644 index da2f7a4..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/TypeServiceImpl.java +++ /dev/null @@ -1,99 +0,0 @@ -package com.muyu.product.service.impl; - -import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.product.domain.DTO.ProductType; -import com.muyu.product.domain.DTO.ProductTypeAttr; -import com.muyu.product.domain.DTO.ProductTypeAttrValue; -import com.muyu.product.domain.Resp.ProductTypeResp; -import com.muyu.product.domain.req.ProductTypeAttrReq; -import com.muyu.product.mapper.TypeMapper; -import com.muyu.product.service.TypeService; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.List; - -/** - * @Author: wangxinyuan - * @Date: 2024/4/1 11:15 - */ -@Service -public class TypeServiceImpl implements TypeService { - - @Autowired - private TypeMapper typeMapper; - - - @Override - public List queryTypeAll() { - return typeMapper.queryTypeAll(); - } - - @Override - public List queryType(Integer flag, Integer id) { - return typeMapper.queryType(flag, id); - } - - @Override - public Integer deleteType(Integer typeId) { - String name = SecurityUtils.getUsername(); - return typeMapper.deleteType(typeId, name); - } - - @Override - public Integer deleteTypeAttr(Integer typeId) { - typeMapper.deleteTypeAttrValue(typeId); - return typeMapper.deleteTypeAttr(typeId); - } - - @Override - public Integer insertType(ProductType productType) { - productType.setCreateBy(SecurityUtils.getUsername()); - return typeMapper.insertType(productType); - } - - @Override - public Integer updateType(ProductType productType) { - productType.setCreateBy(SecurityUtils.getUsername()); - return typeMapper.updateType(productType); - } - - @Override - public Integer insertTypeAttr(ProductTypeAttrReq productTypeAttrReq) { - productTypeAttrReq.setCreateBy(SecurityUtils.getUsername()); - Integer res = typeMapper.insertTypeAttr(productTypeAttrReq); - - String[] split = productTypeAttrReq.getProductTypeAttrValueList().split(","); - - if (res > 0) { - Integer typeAttrId = productTypeAttrReq.getId(); - ProductTypeAttrValue productTypeAttrValue = new ProductTypeAttrValue(); - for (String s : split) { - productTypeAttrValue.setCreateBy(SecurityUtils.getUsername()); - productTypeAttrValue.setTypeAttrId(typeAttrId); - productTypeAttrValue.setTypeAttrValue(s); - typeMapper.insertTypeValue(productTypeAttrValue); - } - } - return res; - } - - @Override - public Integer updateTypeAttr(ProductTypeAttrReq productTypeAttrReq) { - productTypeAttrReq.setCreateBy(SecurityUtils.getUsername()); - typeMapper.deleteTypeAttrValue(productTypeAttrReq.getId()); - Integer res = typeMapper.updateAttr(productTypeAttrReq); - String[] split = productTypeAttrReq.getProductTypeAttrValueList().split(","); - if (res > 0) { - Integer typeAttrId = productTypeAttrReq.getId(); - ProductTypeAttrValue productTypeAttrValue = new ProductTypeAttrValue(); - for (String s : split) { - productTypeAttrValue.setCreateBy(SecurityUtils.getUsername()); - productTypeAttrValue.setTypeAttrId(typeAttrId); - productTypeAttrValue.setTypeAttrValue(s); - typeMapper.insertTypeValue(productTypeAttrValue); - } - } - return res; - } -} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/bootstrap.yml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/bootstrap.yml index 4529ab1..3ec906b 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/bootstrap.yml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/bootstrap.yml @@ -6,7 +6,7 @@ server: spring: application: # 应用名称 - name: muyu-product-wxy + name: muyu-product profiles: # 环境配置 active: dev @@ -14,9 +14,8 @@ spring: nacos: discovery: # 服务注册地址 - server-addr: 43.142.117.78:8848 + server-addr: 111.231.174.71:8848 namespace: 9facbf7b-873b-4e11-b54f-00627208906d - ip: 111.231.174.71 config: # 配置中心地址 server-addr: 111.231.174.71:8848 diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml deleted file mode 100644 index 5da7efb..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ArgumentMapper.xml +++ /dev/null @@ -1,33 +0,0 @@ - - - - - - id, - brand_name,first_letter,sort,factory_status,show_status,product_count,product_comment_count,logo,big_pic,brand_story - - - - - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml deleted file mode 100644 index 4ead7a6..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/BrandMapper.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - INSERT INTO `product`.`t_product_brand` ( - `brand_name`, - `first_letter`, - `sort`, - `factory_status`, - `show_status`, - `product_count`, - `product_comment_count`, - `logo`, - `big_pic`, - `brand_story`, - `create_by`, - `create_time` - ) - VALUES - ( - #{brandName}, - #{firstLetter}, - #{sort}, - #{factoryStatus}, - #{showStatus}, - #{productCount}, - #{productCommentCount}, - #{logo}, - #{bigPic}, - #{brandStory}, - #{createBy}, - now() - ); - - - update t_product_brand set brand_name= #{brandName},first_letter=#{firstLetter},sort=#{sort},factory_status=#{factoryStatus} - ,show_status=#{showStatus},product_count=#{productCount},product_comment_count=#{productCommentCount},logo=#{logo}, - big_pic=#{bigPic},brand_story=#{brandStory},create_by=#{createBy},update_time=now() where id = #{id} - - - - - - - update t_product_brand set id_delete = 0 where id = #{id} - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryMapper.xml deleted file mode 100644 index 6f542ba..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryMapper.xml +++ /dev/null @@ -1,80 +0,0 @@ - - - - - - id,parent_id,category_name,level,product_count - ,product_unit,nav_status,show_status,sort,icon,keywords,description - - - - INSERT INTO `t_product_category` ( - `parent_id`, - `category_name`, - `level`, - `product_count`, - `product_unit`, - `nav_status`, - `show_status`, - `sort`, - `icon`, - `keywords`, - `description`, - `create_time`, - `create_by` - ) - VALUES - ( - #{parentId}, - #{categoryName}, - #{level}, - #{productCount}, - #{productUnit}, - #{navStatus}, - #{showStatus}, - #{sort}, - #{icon}, - #{keywords}, - #{description}, - now(), - #{createBy} - ); - - - - update t_product_category set id_delete = 0 where id = #{id} - - - - - UPDATE `t_product_category` - SET `parent_id` = #{parentId}, - `category_name` = #{categoryName}, - `level` = #{level}, - `product_count` = #{productCount}, - `product_unit` = #{productUnit}, - `nav_status` = #{navStatus}, - `show_status` = #{showStatus}, - `sort` = #{sort}, - `icon` = #{icon}, - `keywords` = #{keywords}, - `description` = #{description}, - `update_time` = now(), - `create_by` = #{createBy} - WHERE - `id` = #{id}; - - - - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml deleted file mode 100644 index 8690fc8..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductMapper.xml +++ /dev/null @@ -1,135 +0,0 @@ - - - - - - - t_product.id,product_name,product_number,brand_id,type_id,product_subheading,product_examine, - product_information,product_unit,product_weight,product_sort,product_points, - product_growth,product_max_points,product_foreknow,product_status,product_new, - product_recommended,details_title,details_information,details_key_word,details_remark, - method_type,t_product_brand.brand_name,t_product_type.type_name,sale_price,images_url,sales - - - INSERT INTO `t_product` ( - `product_name`, - `product_number`, - `brand_id`, - `type_id`, - `product_subheading`, - `product_examine`, - `product_information`, - `product_unit`, - `product_weight`, - `product_sort`, - `product_points`, - `product_growth`, - `product_max_points`, - `product_foreknow`, - `product_status`, - `product_new`, - `product_recommended`, - `details_title`, - `details_information`, - `details_key_word`, - `details_remark`, - `method_type`, - `create_by`, - `create_time`, - `sales` - ) VALUES ( - #{productName}, - #{productNumber}, - #{brandId}, - #{typeId}, - #{productSubheading}, - #{productExamine}, - #{productInformation}, - #{productUnit}, - #{productWeight}, - #{productSort}, - #{productPoints}, - #{productGrowth}, - #{productMaxPoints}, - #{productForeknow}, - #{productStatus}, - #{productNew}, - #{productRecommended}, - #{detailsTitle}, - #{detailsInformation}, - #{detailsKeyWord}, - #{detailsRemark}, - #{methodType}, - #{createBy}, - NOW(), - #{sales} - ) - - - - - update t_product set method_id =#{methodId} where id = #{id} - - - - update t_product set id_delete = 0 where id = #{id} - - - - - - - - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductSkuMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductSkuMapper.xml deleted file mode 100644 index a5a2841..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ProductSkuMapper.xml +++ /dev/null @@ -1,66 +0,0 @@ - - - - - - - - - - insert t_product_sku ( - id, - sale_price, - promotion_price, - stock, - stock_alert, - product_id, - bg_img, - create_time - ) - values - - ( - #{productSku.id}, - #{productSku.salePrice}, - #{productSku.promotionPrice}, - #{productSku.stock}, - #{productSku.stockAlert}, - ${id}, - #{productSku.bgImg}, - now() - ) - - - - - - INSERT INTO `t_product_sku_attr` ( - `sku_id`, `attr_id`, `attr_value_id`, `attr_value`, `flag`, `create_time`, `create_by` - ) VALUES - - ( - #{productSkuAttr.skuId}, - #{productSkuAttr.attrId}, - #{productSkuAttr.attrValueId}, - #{productSkuAttr.attrValue}, - #{productSkuAttr.flag}, - now(), - #{productSkuAttr.createBy} - ) - - - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/PromotionMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/PromotionMapper.xml deleted file mode 100644 index 1684e6e..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/PromotionMapper.xml +++ /dev/null @@ -1,39 +0,0 @@ - - - - - - - - - - - INSERT INTO `t_product_preference` ( `preference_start_time`, `preference_end_time`, `preference_price`, `create_time`, `create_by`) - VALUES (#{preferenceStartTime},#{preferenceEndTime},#{preferencePrice}, now(), #{createBy}) - - - - INSERT INTO `t_product_member` ( `member_gold`, `member_silver`, `member_diamond`, `create_time`, `create_by` ) - VALUES - ( #{memberGold},#{memberSilver},#{memberDiamond},now(),#{createBy} ) - - - INSERT INTO `t_product_ladder` ( `ladder_num`, `ladder_discount`, `create_time`, `create_by` ) - VALUES - ( - #{ladderNum}, - #{ladderDiscount}, - now(), - #{createBy} - ) - - - - INSERT INTO `t_product_price` ( `price_max`, `price_reduction`, `create_time`, `create_by`) - VALUES (#{priceMax},#{priceReduction},now(),#{createBy}) - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ServicesMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ServicesMapper.xml deleted file mode 100644 index 061dd6f..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/ServicesMapper.xml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - insert into t_product_service_middle(product_id, service_id) values (1, 2); - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/SkuMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/SkuMapper.xml deleted file mode 100644 index c6a2047..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/SkuMapper.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - - - - REPLACE INTO t_product_sku (id,sale_price, promotion_price, stock, stock_alert, product_id,bg_img) VALUES - - (#{item.id,jdbcType=BIGINT}, - #{item.sale_price,jdbcType=DECIMAL}, - #{item.promotion_price,jdbcType=DECIMAL}, - #{item.stock,jdbcType=INTEGER}, - #{item.stick_alert,jdbcType=INTEGER}, - #{item.product_id,jdbcType=INTEGER}, - #{item.bg_img,jdbcType=VARCHAR}, - - - - - - diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/TypeMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/TypeMapper.xml deleted file mode 100644 index d99c6fe..0000000 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/TypeMapper.xml +++ /dev/null @@ -1,160 +0,0 @@ - - - - - - insert t_product_type(type_name,create_by,create_time) value (#{typeName},#{createBy},now()) - - - - INSERT INTO `product`.`t_product_type_attr` ( - `product_type_id`, - `attr_name`, - `multiple_choice`, - `input_method`, - `sort`, - `flag`, - `screen`, - `search`, - `association`, - `stats`, - `input`, - `selection`, - `manual_operation`, - `create_time`, - `create_by` - ) - VALUES - ( - #{productTypeId}, - #{attrName}, - #{multipleChoice}, - #{input}, - #{sort}, - #{flag}, - #{screen}, - #{search}, - #{association}, - #{stats}, - #{input}, - #{selection}, - #{manualOperation}, - now(), - #{createBy} - ) - - - INSERT INTO `product`.`t_product_type_attr_value` ( `type_attr_id`, `type_attr_value`, `input_method`, `create_time`, `create_by` ) - VALUES - ( - #{typeAttrId}, - #{typeAttrValue}, - #{inputMethod}, - now(), - #{createBy} - ) - - - - update t_product_type set id_delete = 0,update_time = now(),create_by=#{name} where id = #{typeId} - - - - update t_product_type set type_name = #{typeName},update_time = now(),create_by=#{createBy} where id = #{id} - - - - UPDATE `product`.`t_product_type_attr` - SET `product_type_id` = #{productTypeId}, - `attr_name` = #{attrName}, - `multiple_choice` = #{multipleChoice}, - `input_method` = #{inputMethod}, - `sort` = #{sort}, - `flag` = #{flag}, - `screen` = #{screen}, - `search` = #{search}, - `association` = #{association}, - `stats` = #{stats}, - `input` = #{input}, - `selection` = #{selection}, - `manual_operation` = #{manualOperation}, - `update_time` = now(), - `create_by` = #{createBy} - WHERE - `id` = #{id} - - - delete from t_product_type_attr where product_type_id = #{id} - - - delete from t_product_type_attr_value where type_attr_id = #{id} - - - - - - - - - - - - - - - - - - - - - - - - - - - -