mirror of
https://gitee.com/hhyykk/ipms-sjy.git
synced 2025-08-12 09:11:53 +08:00
promotion:完善优惠劵模板的功能
This commit is contained in:
@@ -53,6 +53,7 @@ public class ProductSpuController {
|
||||
return success(true);
|
||||
}
|
||||
|
||||
// TODO 芋艿:修改接口
|
||||
@GetMapping("/get/detail")
|
||||
@ApiOperation("获得商品 SPU")
|
||||
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
|
||||
@@ -79,6 +80,14 @@ public class ProductSpuController {
|
||||
return success(ProductSpuConvert.INSTANCE.convertList(list));
|
||||
}
|
||||
|
||||
@GetMapping("/get-simple-list")
|
||||
@ApiOperation("获得商品 SPU 精简列表")
|
||||
@PreAuthorize("@ss.hasPermission('product:spu:query')")
|
||||
public CommonResult<List<ProductSpuSimpleRespVO>> getSpuSimpleList() {
|
||||
List<ProductSpuDO> list = spuService.getSpuList();
|
||||
return success(ProductSpuConvert.INSTANCE.convertList02(list));
|
||||
}
|
||||
|
||||
@GetMapping("/page")
|
||||
@ApiOperation("获得商品 SPU 分页")
|
||||
@PreAuthorize("@ss.hasPermission('product:spu:query')")
|
||||
|
@@ -0,0 +1,27 @@
|
||||
package cn.iocoder.yudao.module.product.controller.admin.spu.vo;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.ToString;
|
||||
|
||||
@ApiModel("管理后台 - 商品 SPU 精简 Response VO")
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
@ToString(callSuper = true)
|
||||
public class ProductSpuSimpleRespVO extends ProductSpuBaseVO {
|
||||
|
||||
@ApiModelProperty(value = "主键", required = true, example = "1")
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "商品名称", required = true, example = "芋道")
|
||||
private String name;
|
||||
|
||||
@ApiModelProperty(value = " 最小价格,单位使用:分", required = true, example = "1024")
|
||||
private Integer minPrice;
|
||||
|
||||
@ApiModelProperty(value = "最大价格,单位使用:分", required = true, example = "1024")
|
||||
private Integer maxPrice;
|
||||
|
||||
}
|
@@ -36,5 +36,7 @@ public interface ProductSpuConvert {
|
||||
AppSpuPageRespVO convertAppResp(ProductSpuDO list);
|
||||
|
||||
List<SpuInfoRespDTO> convertList2(List<ProductSpuDO> list);
|
||||
|
||||
|
||||
List<ProductSpuSimpleRespVO> convertList02(List<ProductSpuDO> list);
|
||||
|
||||
}
|
||||
|
@@ -63,6 +63,13 @@ public interface ProductSpuService {
|
||||
*/
|
||||
List<ProductSpuDO> getSpuList(Collection<Long> ids);
|
||||
|
||||
/**
|
||||
* 获得所有商品 SPU 列表
|
||||
*
|
||||
* @return 商品 SPU 列表
|
||||
*/
|
||||
List<ProductSpuDO> getSpuList();
|
||||
|
||||
/**
|
||||
* 获得商品 SPU 分页
|
||||
*
|
||||
|
@@ -176,6 +176,11 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||
return productSpuMapper.selectBatchIds(ids);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProductSpuDO> getSpuList() {
|
||||
return productSpuMapper.selectList();
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageResult<ProductSpuRespVO> getSpuPage(ProductSpuPageReqVO pageReqVO) {
|
||||
// 库存告警的 SPU 编号的集合
|
||||
|
Reference in New Issue
Block a user