diff --git a/db/800pjcloudx_hardware.sql b/db/800pjcloudx_hardware.sql index 43680bc87..b44a8d788 100644 --- a/db/800pjcloudx_hardware.sql +++ b/db/800pjcloudx_hardware.sql @@ -286,6 +286,10 @@ CREATE TABLE hard_spu repertory_count int DEFAULT 0 NOT NULL COMMENT '库存', sort int DEFAULT 0 NOT NULL COMMENT '排序', status char(1) DEFAULT '0' COMMENT '是否启用', + is_default char(1) DEFAULT '0' COMMENT '是否为标品', + ks_status char(1) DEFAULT '0' COMMENT '旷世审核状态', + ks_status_title varchar(64) NOT NULL COMMENT '旷世审核状态标题', + ks_comments varchar(512) DEFAULT NULL COMMENT '旷世审核状态描述', create_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '创建人', create_time datetime DEFAULT NULL COMMENT '创建时间', update_by varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '修改人', diff --git a/pjcloud-hardware/pjcloud-hardware-api/src/main/java/com/bsd/pjcloud/hard/api/entity/spu/HardSpuEntity.java b/pjcloud-hardware/pjcloud-hardware-api/src/main/java/com/bsd/pjcloud/hard/api/entity/spu/HardSpuEntity.java index 1f9fc1499..35080d105 100644 --- a/pjcloud-hardware/pjcloud-hardware-api/src/main/java/com/bsd/pjcloud/hard/api/entity/spu/HardSpuEntity.java +++ b/pjcloud-hardware/pjcloud-hardware-api/src/main/java/com/bsd/pjcloud/hard/api/entity/spu/HardSpuEntity.java @@ -6,6 +6,7 @@ import io.swagger.v3.oas.annotations.media.Schema; import lombok.Data; import lombok.EqualsAndHashCode; import com.bsd.pjcloud.common.core.util.TenantTable; + import java.time.LocalDateTime; /** @@ -19,100 +20,124 @@ import java.time.LocalDateTime; public class HardSpuEntity extends Model { - /** - * 编号 - */ + /** + * 编号 + */ @TableId(type = IdType.ASSIGN_ID) - @Schema(description="编号") + @Schema(description = "编号") private Long id; - /** - * 商品分类id - */ - @Schema(description="商品分类id") + /** + * 商品分类id + */ + @Schema(description = "商品分类id") private Long spuCategoryId; - /** - * 商品名 - */ - @Schema(description="商品名") + /** + * 商品名 + */ + @Schema(description = "商品名") private String name; - /** - * 商品图片 - */ - @Schema(description="商品图片") + /** + * 商品图片 + */ + @Schema(description = "商品图片") private String pic; - /** - * 单价(分) - */ - @Schema(description="单价(分)") + /** + * 单价(分) + */ + @Schema(description = "单价(分)") private Integer price; - /** - * 销量 - */ - @Schema(description="销量") + /** + * 销量 + */ + @Schema(description = "销量") private Integer salesCount; - /** - * 库存 - */ - @Schema(description="库存") + /** + * 库存 + */ + @Schema(description = "库存") private Integer repertoryCount; - /** - * 排序 - */ - @Schema(description="排序") + /** + * 排序 + */ + @Schema(description = "排序") private Integer sort; - /** - * 是否启用 - */ - @Schema(description="是否启用") + /** + * 是否启用 + */ + @Schema(description = "是否启用") private String status; - /** - * 创建人 - */ - @TableField(fill = FieldFill.INSERT) - @Schema(description="创建人") + /** + * 是否为标品 + */ + @Schema(description = "是否为标品") + private String isDefault; + + /** + * 旷世审核状态 + */ + @Schema(description = "旷世审核状态") + private String ksStatus; + + /** + * 旷世审核状态标题 + */ + @Schema(description = "旷世审核状态标题") + private String ksStatusTitle; + + /** + * 旷世审核状态描述 + */ + @Schema(description = "旷世审核状态描述") + private String ksComments; + + /** + * 创建人 + */ + @TableField(fill = FieldFill.INSERT) + @Schema(description = "创建人") private String createBy; - /** - * 创建时间 - */ - @TableField(fill = FieldFill.INSERT) - @Schema(description="创建时间") + /** + * 创建时间 + */ + @TableField(fill = FieldFill.INSERT) + @Schema(description = "创建时间") private LocalDateTime createTime; - /** - * 修改人 - */ - @TableField(fill = FieldFill.INSERT_UPDATE) - @Schema(description="修改人") + /** + * 修改人 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @Schema(description = "修改人") private String updateBy; - /** - * 修改时间 - */ - @TableField(fill = FieldFill.INSERT_UPDATE) - @Schema(description="修改时间") + /** + * 修改时间 + */ + @TableField(fill = FieldFill.INSERT_UPDATE) + @Schema(description = "修改时间") private LocalDateTime updateTime; - /** - * 删除标记 - */ + /** + * 删除标记 + */ @TableLogic - @TableField(fill = FieldFill.INSERT) - @Schema(description="删除标记") + @TableField(fill = FieldFill.INSERT) + @Schema(description = "删除标记") private String delFlag; - /** - * 租户ID - */ - @Schema(description="租户ID") + /** + * 租户ID + */ + @Schema(description = "租户ID") private Long tenantId; } \ No newline at end of file diff --git a/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/spu/HardSpuMapper.xml b/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/spu/HardSpuMapper.xml index 7476464ae..74f2e8901 100644 --- a/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/spu/HardSpuMapper.xml +++ b/pjcloud-hardware/pjcloud-hardware-biz/src/main/resources/mapper/spu/HardSpuMapper.xml @@ -12,6 +12,10 @@ + + + + @@ -30,6 +34,10 @@ a.repertory_count, a.sort, a.status, + a.is_default, + a.ks_status, + a.ks_status_title, + a.ks_comments, a.create_by, a.create_time, a.update_by, @@ -40,6 +48,24 @@ a.del_flag = '0' + + and a.name like concat('%', #{dto.name}, '%') + + + and a.spu_category_id = #{dto.spuCategoryId} + + + and a.spu_category_id = #{dto.spuCategoryId} + + + and a.status = #{dto.status} + + + and a.is_default = #{dto.isDefault} + + + and a.ks_status = #{dto.ksStatus} + and a.create_time between #{dto.createTimeList[0]} and #{dto.createTimeList[1]} @@ -53,5 +79,6 @@ + order by a.sort desc, a.create_time desc \ No newline at end of file