Commit 2340f09c68cfd38ef7eedfa811169f289a12c05f
1 parent
fa982316
mall:调整部分 SPU、SKU 的表设计
Showing
12 changed files
with
88 additions
and
119 deletions
sql/optional/mall/mall.sql
| ... | ... | @@ -71,24 +71,6 @@ INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, com |
| 71 | 71 | VALUES ('规格导出', 'product:property:export', 3, 5, @parentId, '', '', '', 0); |
| 72 | 72 | |
| 73 | 73 | |
| 74 | --- 商品菜单 SQL | |
| 75 | -INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status) | |
| 76 | -VALUES ('商品管理', '', 2, 2, 2001, 'spu', '', 'mall/product/spu/index', 0); | |
| 77 | - | |
| 78 | --- 按钮父菜单ID | |
| 79 | -SELECT @parentId := LAST_INSERT_ID(); | |
| 80 | - | |
| 81 | --- 按钮 SQL | |
| 82 | -INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status) | |
| 83 | -VALUES ('商品查询', 'product:spu:query', 3, 1, @parentId, '', '', '', 0); | |
| 84 | -INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status) | |
| 85 | -VALUES ('商品创建', 'product:spu:create', 3, 2, @parentId, '', '', '', 0); | |
| 86 | -INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status) | |
| 87 | -VALUES ('商品更新', 'product:spu:update', 3, 3, @parentId, '', '', '', 0); | |
| 88 | -INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status) | |
| 89 | -VALUES ('商品删除', 'product:spu:delete', 3, 4, @parentId, '', '', '', 0); | |
| 90 | -INSERT INTO system_menu(name, permission, type, sort, parent_id, path, icon, component, status) | |
| 91 | -VALUES ('商品导出', 'product:spu:export', 3, 5, @parentId, '', '', '', 0); | |
| 92 | 74 | |
| 93 | 75 | |
| 94 | 76 | -- 规格名称表 |
| ... | ... | @@ -127,54 +109,6 @@ create table product_property_value |
| 127 | 109 | ) comment '规格值' character set utf8mb4 |
| 128 | 110 | collate utf8mb4_general_ci; |
| 129 | 111 | |
| 130 | --- spu | |
| 131 | -drop table if exists product_spu; | |
| 132 | -create table product_spu | |
| 133 | -( | |
| 134 | - id bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 135 | - name varchar(128) comment '商品名称', | |
| 136 | - sell_point varchar(128) not null comment '卖点', | |
| 137 | - description text not null comment '描述', | |
| 138 | - category_id bigint not null comment '分类id', | |
| 139 | - pic_urls varchar(1024) not null default '' comment '商品主图地址\n *\n * 数组,以逗号分隔\n 最多上传15张', | |
| 140 | - sort int not null default 0 comment '排序字段', | |
| 141 | - like_count int comment '点赞初始人数', | |
| 142 | - price int comment '价格 单位使用:分', | |
| 143 | - quantity int comment '库存数量', | |
| 144 | - status bit(1) comment '上下架状态: 0 上架(开启) 1 下架(禁用)', | |
| 145 | - create_time datetime default current_timestamp comment '创建时间', | |
| 146 | - update_time datetime default current_timestamp on update current_timestamp comment '更新时间', | |
| 147 | - creator varchar(64) comment '创建人', | |
| 148 | - updater varchar(64) comment '更新人', | |
| 149 | - tenant_id bigint NOT NULL DEFAULT '0' COMMENT '租户编号', | |
| 150 | - deleted bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 151 | - primary key (id) | |
| 152 | -) comment '商品spu' character set utf8mb4 | |
| 153 | - collate utf8mb4_general_ci; | |
| 154 | - | |
| 155 | - | |
| 156 | --- sku | |
| 157 | -drop table if exists product_sku; | |
| 158 | -create table product_sku | |
| 159 | -( | |
| 160 | - id bigint NOT NULL AUTO_INCREMENT COMMENT '主键', | |
| 161 | - spu_id bigint not null comment 'spu编号', | |
| 162 | - properties varchar(64) not null comment '规格值数组-json格式, [{propertId: , valueId: }, {propertId: , valueId: }]', | |
| 163 | - price int not null DEFAULT -1 comment '销售价格,单位:分', | |
| 164 | - original_price int not null DEFAULT -1 comment '原价, 单位: 分', | |
| 165 | - cost_price int not null DEFAULT -1 comment '成本价,单位: 分', | |
| 166 | - bar_code varchar(64) not null comment '条形码', | |
| 167 | - pic_url VARCHAR(128) not null comment '图片地址', | |
| 168 | - status tinyint comment '状态: 0-正常 1-禁用', | |
| 169 | - create_time datetime default current_timestamp comment '创建时间', | |
| 170 | - update_time datetime default current_timestamp on update current_timestamp comment '更新时间', | |
| 171 | - creator varchar(64) comment '创建人', | |
| 172 | - updater varchar(64) comment '更新人', | |
| 173 | - tenant_id bigint NOT NULL DEFAULT '0' COMMENT '租户编号', | |
| 174 | - deleted bit(1) NOT NULL DEFAULT b'0' COMMENT '是否删除', | |
| 175 | - primary key (id) | |
| 176 | -) comment '商品sku' character set utf8mb4 | |
| 177 | - collate utf8mb4_general_ci; | |
| 178 | 112 | |
| 179 | 113 | |
| 180 | 114 | ---Market-Banner管理SQL | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/sku/ProductSkuController.java
| ... | ... | @@ -6,7 +6,7 @@ import cn.iocoder.yudao.framework.excel.core.util.ExcelUtils; |
| 6 | 6 | import cn.iocoder.yudao.framework.operatelog.core.annotations.OperateLog; |
| 7 | 7 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.*; |
| 8 | 8 | import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; |
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 9 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 10 | 10 | import cn.iocoder.yudao.module.product.service.sku.ProductSkuService; |
| 11 | 11 | import io.swagger.annotations.Api; |
| 12 | 12 | import io.swagger.annotations.ApiImplicitParam; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/sku/ProductSkuConvert.java
| ... | ... | @@ -10,8 +10,7 @@ import org.mapstruct.Mapping; |
| 10 | 10 | import org.mapstruct.Named; |
| 11 | 11 | import org.mapstruct.factory.Mappers; |
| 12 | 12 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.*; |
| 13 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 14 | -import org.springframework.util.StringUtils; | |
| 13 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 15 | 14 | |
| 16 | 15 | /** |
| 17 | 16 | * 商品sku Convert | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/convert/spu/ProductSpuConvert.java
| 1 | 1 | package cn.iocoder.yudao.module.product.convert.spu; |
| 2 | 2 | |
| 3 | -import java.util.*; | |
| 4 | - | |
| 5 | 3 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 6 | - | |
| 4 | +import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; | |
| 7 | 5 | import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageReqVO; |
| 8 | 6 | import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageRespVO; |
| 7 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | |
| 9 | 8 | import org.mapstruct.Mapper; |
| 10 | -import org.mapstruct.Mapping; | |
| 11 | -import org.mapstruct.Named; | |
| 12 | 9 | import org.mapstruct.factory.Mappers; |
| 13 | -import cn.iocoder.yudao.module.product.controller.admin.spu.vo.*; | |
| 14 | -import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; | |
| 15 | -import org.springframework.util.StringUtils; | |
| 10 | + | |
| 11 | +import java.util.List; | |
| 16 | 12 | |
| 17 | 13 | /** |
| 18 | 14 | * 商品spu Convert |
| ... | ... | @@ -24,18 +20,12 @@ public interface ProductSpuConvert { |
| 24 | 20 | |
| 25 | 21 | ProductSpuConvert INSTANCE = Mappers.getMapper(ProductSpuConvert.class); |
| 26 | 22 | |
| 27 | - @Mapping(source = "picUrls", target = "picUrls", qualifiedByName = "translatePicUrlsFromStringList") | |
| 28 | 23 | ProductSpuDO convert(ProductSpuCreateReqVO bean); |
| 29 | 24 | |
| 30 | - @Mapping(source = "picUrls", target = "picUrls", qualifiedByName = "translatePicUrlsFromStringList") | |
| 31 | 25 | ProductSpuDO convert(SpuUpdateReqVO bean); |
| 32 | 26 | |
| 33 | - @Mapping(source = "picUrls", target = "picUrls", qualifiedByName = "tokenizeToStringArray") | |
| 34 | 27 | SpuRespVO convert(ProductSpuDO bean); |
| 35 | 28 | |
| 36 | - @Mapping(source = "picUrls", target = "picUrls", qualifiedByName = "tokenizeToStringArray") | |
| 37 | - SpuExcelVO convertToExcelVO(ProductSpuDO bean); | |
| 38 | - | |
| 39 | 29 | List<SpuRespVO> convertList(List<ProductSpuDO> list); |
| 40 | 30 | |
| 41 | 31 | PageResult<SpuRespVO> convertPage(PageResult<ProductSpuDO> page); |
| ... | ... | @@ -44,16 +34,6 @@ public interface ProductSpuConvert { |
| 44 | 34 | |
| 45 | 35 | SpuPageReqVO convert(AppSpuPageReqVO bean); |
| 46 | 36 | |
| 47 | - @Mapping(source = "picUrls", target = "picUrls", qualifiedByName = "tokenizeToStringArray") | |
| 48 | 37 | AppSpuPageRespVO convertAppResp(ProductSpuDO list); |
| 49 | 38 | |
| 50 | - @Named("tokenizeToStringArray") | |
| 51 | - default List<String> translatePicUrlsArrayFromString(String picUrls) { | |
| 52 | - return Arrays.asList(StringUtils.tokenizeToStringArray(picUrls, ",")); | |
| 53 | - } | |
| 54 | - | |
| 55 | - @Named("translatePicUrlsFromStringList") | |
| 56 | - default String translatePicUrlsFromList(List<String> picUrls) { | |
| 57 | - return StringUtils.collectionToCommaDelimitedString(picUrls); | |
| 58 | - } | |
| 59 | 39 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/group/ProductGroupDO.java
0 → 100644
| 1 | +package cn.iocoder.yudao.module.product.dal.dataobject.group; | |
| 2 | + | |
| 3 | +import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; | |
| 4 | +import com.baomidou.mybatisplus.annotation.KeySequence; | |
| 5 | +import com.baomidou.mybatisplus.annotation.TableId; | |
| 6 | +import com.baomidou.mybatisplus.annotation.TableName; | |
| 7 | +import lombok.*; | |
| 8 | + | |
| 9 | +/** | |
| 10 | + * 商品分组 DO | |
| 11 | + * | |
| 12 | + * @author 芋道源码 | |
| 13 | + */ | |
| 14 | +@TableName("product_group") | |
| 15 | +@KeySequence("product_group_seq") // 用于 Oracle、PostgreSQL、Kingbase、DB2、H2 数据库的主键自增。如果是 MySQL 等数据库,可不写。 | |
| 16 | +@Data | |
| 17 | +@EqualsAndHashCode(callSuper = true) | |
| 18 | +@ToString(callSuper = true) | |
| 19 | +@Builder | |
| 20 | +@NoArgsConstructor | |
| 21 | +@AllArgsConstructor | |
| 22 | +public class ProductGroupDO extends BaseDO { | |
| 23 | + | |
| 24 | + /** | |
| 25 | + * 商品分组编号,自增 | |
| 26 | + */ | |
| 27 | + @TableId | |
| 28 | + private Long id; | |
| 29 | + | |
| 30 | + // TODO 芋艿:字段补全 | |
| 31 | + | |
| 32 | +} | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/sku/ProductSkuDO.java renamed to yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSkuDO.java
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/spu/ProductSpuDO.java
| 1 | 1 | package cn.iocoder.yudao.module.product.dal.dataobject.spu; |
| 2 | 2 | |
| 3 | +import cn.iocoder.yudao.framework.common.enums.CommonStatusEnum; | |
| 3 | 4 | import cn.iocoder.yudao.framework.mybatis.core.dataobject.BaseDO; |
| 5 | +import cn.iocoder.yudao.module.product.dal.dataobject.brand.ProductBrandDO; | |
| 6 | +import cn.iocoder.yudao.module.product.dal.dataobject.category.ProductCategoryDO; | |
| 7 | +import cn.iocoder.yudao.module.product.dal.dataobject.group.ProductGroupDO; | |
| 4 | 8 | import com.baomidou.mybatisplus.annotation.KeySequence; |
| 9 | +import com.baomidou.mybatisplus.annotation.TableField; | |
| 5 | 10 | import com.baomidou.mybatisplus.annotation.TableId; |
| 6 | 11 | import com.baomidou.mybatisplus.annotation.TableName; |
| 12 | +import com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler; | |
| 7 | 13 | import lombok.*; |
| 8 | 14 | |
| 15 | +import java.util.List; | |
| 16 | + | |
| 9 | 17 | /** |
| 10 | - * 商品spu DO | |
| 18 | + * 商品 SPU DO | |
| 11 | 19 | * |
| 12 | 20 | * @author 芋道源码 |
| 13 | 21 | */ |
| ... | ... | @@ -22,7 +30,7 @@ import lombok.*; |
| 22 | 30 | public class ProductSpuDO extends BaseDO { |
| 23 | 31 | |
| 24 | 32 | /** |
| 25 | - * 主键 | |
| 33 | + * 商品 SPU 编号,自增 | |
| 26 | 34 | */ |
| 27 | 35 | @TableId |
| 28 | 36 | private Long id; |
| ... | ... | @@ -31,41 +39,62 @@ public class ProductSpuDO extends BaseDO { |
| 31 | 39 | */ |
| 32 | 40 | private String name; |
| 33 | 41 | /** |
| 34 | - * 卖点 | |
| 42 | + * 商品卖点 | |
| 35 | 43 | */ |
| 36 | 44 | private String sellPoint; |
| 37 | 45 | /** |
| 38 | - * 描述 | |
| 46 | + * 商品详情 | |
| 39 | 47 | */ |
| 40 | 48 | private String description; |
| 41 | 49 | /** |
| 42 | - * 分类id | |
| 50 | + * 商品分类编号 | |
| 51 | + * | |
| 52 | + * 关联 {@link ProductCategoryDO#getId()} | |
| 43 | 53 | */ |
| 44 | 54 | private Long categoryId; |
| 45 | 55 | /** |
| 46 | - * 商品主图地址,* 数组,以逗号分隔,最多上传15张 | |
| 56 | + * 商品品牌编号 | |
| 57 | + * | |
| 58 | + * 关联 {@link ProductBrandDO#getId()} | |
| 59 | + */ | |
| 60 | + private Long brandId; | |
| 61 | + /** | |
| 62 | + * 商品分组编号数组 | |
| 63 | + * | |
| 64 | + * 关联 {@link ProductGroupDO#getId()} | |
| 65 | + */ | |
| 66 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 67 | + private List<Long> groupIds; | |
| 68 | + /** | |
| 69 | + * 商品图片地址数组 | |
| 47 | 70 | */ |
| 48 | - // TODO franky:List<String>。可以参考别的模块,怎么处理这种类型的哈 | |
| 49 | - private String picUrls; | |
| 71 | + @TableField(typeHandler = JacksonTypeHandler.class) | |
| 72 | + private List<String> picUrls; | |
| 50 | 73 | /** |
| 51 | 74 | * 排序字段 |
| 52 | 75 | */ |
| 53 | 76 | private Integer sort; |
| 54 | 77 | /** |
| 55 | - * 点赞初始人数 | |
| 78 | + * 商品状态 | |
| 79 | + * | |
| 80 | + * 枚举 {@link CommonStatusEnum} | |
| 56 | 81 | */ |
| 57 | - private Integer likeCount; | |
| 82 | + private Integer status; | |
| 58 | 83 | /** |
| 59 | - * 价格 单位使用:分 | |
| 84 | + * 价格,单位使用:分 | |
| 85 | + * | |
| 86 | + * 基于其对应的 {@link ProductSkuDO#getPrice()} 最小值 | |
| 60 | 87 | */ |
| 61 | 88 | private Integer price; |
| 62 | 89 | /** |
| 63 | 90 | * 库存数量 |
| 91 | + * | |
| 92 | + * 基于其对应的 {@link ProductSkuDO#getPrice()} 求和 | |
| 64 | 93 | */ |
| 65 | 94 | private Integer quantity; |
| 66 | - /** | |
| 67 | - * 上下架状态: 0 上架(开启) 1 下架(禁用) | |
| 68 | - */ | |
| 69 | - private Boolean status; | |
| 95 | + | |
| 96 | + | |
| 97 | + // TODO 芋艿:配送方式:商家配送、商家自提 | |
| 98 | + // TODO 芋艿:运费设置;如果选择了 “商家配送” 配送方式,则选择「运费设置」编号 | |
| 70 | 99 | |
| 71 | 100 | } | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/mysql/sku/ProductSkuMapper.java
| ... | ... | @@ -5,7 +5,7 @@ import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX; |
| 5 | 5 | import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX; |
| 6 | 6 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuExportReqVO; |
| 7 | 7 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuPageReqVO; |
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 8 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 9 | 9 | import org.apache.ibatis.annotations.Mapper; |
| 10 | 10 | |
| 11 | 11 | import java.util.List; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuService.java
| ... | ... | @@ -5,7 +5,7 @@ import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuCreateR |
| 5 | 5 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuExportReqVO; |
| 6 | 6 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuPageReqVO; |
| 7 | 7 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.ProductSkuUpdateReqVO; |
| 8 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 8 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 9 | 9 | |
| 10 | 10 | import javax.validation.Valid; |
| 11 | 11 | import java.util.Collection; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/sku/ProductSkuServiceImpl.java
| ... | ... | @@ -6,7 +6,7 @@ import cn.iocoder.yudao.module.product.controller.admin.property.vo.ProductPrope |
| 6 | 6 | import cn.iocoder.yudao.module.product.controller.admin.propertyvalue.vo.ProductPropertyValueRespVO; |
| 7 | 7 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.*; |
| 8 | 8 | import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; |
| 9 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 9 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 10 | 10 | import cn.iocoder.yudao.module.product.dal.mysql.sku.ProductSkuMapper; |
| 11 | 11 | import cn.iocoder.yudao.module.product.enums.ErrorCodeConstants; |
| 12 | 12 | import cn.iocoder.yudao.module.product.service.property.ProductPropertyService; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/service/spu/ProductSpuServiceImpl.java
| ... | ... | @@ -12,7 +12,7 @@ import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageReqVO; |
| 12 | 12 | import cn.iocoder.yudao.module.product.controller.app.spu.vo.AppSpuPageRespVO; |
| 13 | 13 | import cn.iocoder.yudao.module.product.convert.sku.ProductSkuConvert; |
| 14 | 14 | import cn.iocoder.yudao.module.product.convert.spu.ProductSpuConvert; |
| 15 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 15 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 16 | 16 | import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSpuDO; |
| 17 | 17 | import cn.iocoder.yudao.module.product.dal.mysql.spu.ProductSpuMapper; |
| 18 | 18 | import cn.iocoder.yudao.module.product.service.category.ProductCategoryService; | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/test/java/cn/iocoder/yudao/module/product/service/sku/SkuServiceImplTest.java
| ... | ... | @@ -2,29 +2,24 @@ package cn.iocoder.yudao.module.product.service.sku; |
| 2 | 2 | |
| 3 | 3 | import org.junit.jupiter.api.Disabled; |
| 4 | 4 | import org.junit.jupiter.api.Test; |
| 5 | -import org.springframework.boot.test.mock.mockito.MockBean; | |
| 6 | 5 | |
| 7 | 6 | import javax.annotation.Resource; |
| 8 | 7 | |
| 9 | 8 | import cn.iocoder.yudao.framework.test.core.ut.BaseDbUnitTest; |
| 10 | 9 | |
| 11 | 10 | import cn.iocoder.yudao.module.product.controller.admin.sku.vo.*; |
| 12 | -import cn.iocoder.yudao.module.product.dal.dataobject.sku.ProductSkuDO; | |
| 11 | +import cn.iocoder.yudao.module.product.dal.dataobject.spu.ProductSkuDO; | |
| 13 | 12 | import cn.iocoder.yudao.module.product.dal.mysql.sku.ProductSkuMapper; |
| 14 | 13 | import cn.iocoder.yudao.framework.common.pojo.PageResult; |
| 15 | 14 | |
| 16 | -import javax.annotation.Resource; | |
| 17 | 15 | import org.springframework.context.annotation.Import; |
| 18 | 16 | import java.util.*; |
| 19 | 17 | |
| 20 | -import static cn.hutool.core.util.RandomUtil.*; | |
| 21 | 18 | import static cn.iocoder.yudao.module.product.enums.ErrorCodeConstants.*; |
| 22 | 19 | import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.*; |
| 23 | 20 | import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*; |
| 24 | 21 | import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.*; |
| 25 | -import static cn.iocoder.yudao.framework.common.util.date.DateUtils.*; | |
| 26 | 22 | import static org.junit.jupiter.api.Assertions.*; |
| 27 | -import static org.mockito.Mockito.*; | |
| 28 | 23 | |
| 29 | 24 | /** |
| 30 | 25 | * {@link ProductSkuServiceImpl} 的单元测试类 | ... | ... |