【功能完善】商城: 客服
This commit is contained in:
@@ -51,7 +51,8 @@ public class ProductBrowseHistoryController {
|
||||
convertSet(pageResult.getList(), ProductBrowseHistoryDO::getSpuId));
|
||||
return success(BeanUtils.toBean(pageResult, ProductBrowseHistoryRespVO.class,
|
||||
vo -> Optional.ofNullable(spuMap.get(vo.getSpuId()))
|
||||
.ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice()))));
|
||||
.ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice())
|
||||
.setSalesCount(spu.getSalesCount()).setStock(spu.getStock()))));
|
||||
}
|
||||
|
||||
}
|
@@ -1,12 +1,9 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.history.vo;
|
||||
|
||||
import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
|
||||
import com.alibaba.excel.annotation.ExcelProperty;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static io.swagger.v3.oas.annotations.media.Schema.RequiredMode.REQUIRED;
|
||||
|
||||
@Schema(description = "管理后台 - 商品浏览记录 Response VO")
|
||||
@@ -31,4 +28,10 @@ public class ProductBrowseHistoryRespVO {
|
||||
@Schema(description = "商品单价", example = "100")
|
||||
private Integer price;
|
||||
|
||||
@Schema(description = "商品销量", example = "100")
|
||||
private Integer salesCount;
|
||||
|
||||
@Schema(description = "库存", example = "100")
|
||||
private Integer stock;
|
||||
|
||||
}
|
@@ -71,7 +71,8 @@ public class AppProductBrowseHistoryController {
|
||||
Map<Long, ProductSpuDO> spuMap = convertMap(productSpuService.getSpuList(spuIds), ProductSpuDO::getId);
|
||||
return success(BeanUtils.toBean(pageResult, AppProductBrowseHistoryRespVO.class,
|
||||
vo -> Optional.ofNullable(spuMap.get(vo.getSpuId()))
|
||||
.ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice()))));
|
||||
.ifPresent(spu -> vo.setSpuName(spu.getName()).setPicUrl(spu.getPicUrl()).setPrice(spu.getPrice())
|
||||
.setSalesCount(spu.getSalesCount()).setStock(spu.getStock()))));
|
||||
}
|
||||
|
||||
}
|
||||
|
@@ -26,4 +26,11 @@ public class AppProductBrowseHistoryRespVO {
|
||||
@Schema(description = "商品单价", example = "100")
|
||||
private Integer price;
|
||||
|
||||
@Schema(description = "商品销量", example = "100")
|
||||
private Integer salesCount;
|
||||
|
||||
@Schema(description = "库存", example = "100")
|
||||
private Integer stock;
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user