mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-18 20:21:52 +08:00
mall + promotion:review 页面装修
This commit is contained in:
@@ -1,39 +0,0 @@
|
||||
package cn.iocoder.yudao.module.product.controller.app.spu.vo;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "用户 App - 商品 SPU 分页项 Response VO")
|
||||
@Data
|
||||
public class AppProductSpuPageItemRespVO {
|
||||
|
||||
@Schema(description = "商品 SPU 编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||
private Long id;
|
||||
|
||||
@Schema(description = "商品名称", requiredMode = Schema.RequiredMode.REQUIRED, example = "芋道")
|
||||
@NotEmpty(message = "商品名称不能为空")
|
||||
private String name;
|
||||
|
||||
@Schema(description = "分类编号", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
@NotNull(message = "分类编号不能为空")
|
||||
private Long categoryId;
|
||||
|
||||
@Schema(description = "商品图片的数组", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||
private List<String> picUrls;
|
||||
|
||||
@Schema(description = " 最小价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer minPrice;
|
||||
|
||||
@Schema(description = "最大价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer maxPrice;
|
||||
|
||||
// ========== 统计相关字段 =========
|
||||
|
||||
@Schema(description = "商品销量", example = "1024")
|
||||
private Integer salesCount;
|
||||
|
||||
}
|
@@ -20,6 +20,9 @@ public class AppProductSpuPageReqVO extends PageParam {
|
||||
public static final String SORT_FIELD_SALES_COUNT = "salesCount";
|
||||
|
||||
public static final String RECOMMEND_TYPE_HOT = "hot";
|
||||
public static final String RECOMMEND_TYPE_BENEFIT = "benefit";
|
||||
public static final String RECOMMEND_TYPE_BEST = "best";
|
||||
public static final String RECOMMEND_TYPE_NEW = "new";
|
||||
public static final String RECOMMEND_TYPE_GOOD = "good";
|
||||
|
||||
@Schema(description = "分类编号", example = "1")
|
||||
|
@@ -32,6 +32,9 @@ public class AppProductSpuPageRespVO {
|
||||
@Schema(description = "商品价格,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer price;
|
||||
|
||||
@Schema(description = "市场价,单位使用:分", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
|
||||
private Integer marketPrice;
|
||||
|
||||
@Schema(description = "库存", requiredMode = Schema.RequiredMode.REQUIRED, example = "666")
|
||||
private Integer stock;
|
||||
|
||||
|
@@ -67,6 +67,12 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> {
|
||||
// 推荐类型的过滤条件
|
||||
if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_HOT)) {
|
||||
query.eq(ProductSpuDO::getRecommendHot, true);
|
||||
} else if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_BENEFIT)) {
|
||||
query.eq(ProductSpuDO::getRecommendBenefit, true);
|
||||
} else if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_BEST)) {
|
||||
query.eq(ProductSpuDO::getRecommendBest, true);
|
||||
} else if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_NEW)) {
|
||||
query.eq(ProductSpuDO::getRecommendNew, true);
|
||||
} else if (ObjUtil.equal(pageReqVO.getRecommendType(), AppProductSpuPageReqVO.RECOMMEND_TYPE_GOOD)) {
|
||||
query.eq(ProductSpuDO::getRecommendGood, true);
|
||||
}
|
||||
|
Reference in New Issue
Block a user