mall: 商品的代码 review
parent
034de50999
commit
c25791047f
|
@ -20,5 +20,4 @@ public class ProductPropertyRespVO extends ProductPropertyBaseVO {
|
||||||
@ApiModelProperty(value = "创建时间", required = true)
|
@ApiModelProperty(value = "创建时间", required = true)
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,5 @@ public class ProductPropertyValueBaseVO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "备注", example = "颜色")
|
@ApiModelProperty(value = "备注", example = "颜色")
|
||||||
private String remark;
|
private String remark;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -14,7 +14,7 @@ import java.util.List;
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class ProductSkuCreateOrUpdateReqVO extends ProductSkuBaseVO {
|
public class ProductSkuCreateOrUpdateReqVO extends ProductSkuBaseVO {
|
||||||
|
|
||||||
@ApiModelProperty(value = "商品 id", example = "1")
|
@ApiModelProperty(value = "商品 SKU 编号", example = "1")
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -55,7 +55,8 @@ public class ProductSpuDetailRespVO extends ProductSpuBaseVO {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiModelProperty(value = "分类id数组,一直递归到一级父节点", example = "[1,2,4]")
|
// TODO @luowenfeng: 只返回 categoryId 可以么? 如果是为了前端修改时使用, 会拿到下拉列表, 自动选中合适的. 可以微信讨论下, 我也不完全确定哈;
|
||||||
|
@ApiModelProperty(value = "分类 id 数组,一直递归到一级父节点", example = "[1,2,4]")
|
||||||
private List<Long> categoryIds;
|
private List<Long> categoryIds;
|
||||||
|
|
||||||
@ApiModelProperty(value = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]")
|
@ApiModelProperty(value = "规格属性修改和详情展示组合", example = "[{\"propertyId\":2,\"name\":\"内存\",\"propertyValues\":[{\"v1\":11,\"v2\":\"64G\"},{\"v1\":10,\"v2\":\"32G\"}]},{\"propertyId\":3,\"name\":\"尺寸\",\"propertyValues\":[{\"v1\":16,\"v2\":\"6.1\"},{\"v1\":15,\"v2\":\"5.7\"}]}]")
|
||||||
|
|
|
@ -14,19 +14,19 @@ import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_
|
||||||
@ToString(callSuper = true)
|
@ToString(callSuper = true)
|
||||||
public class ProductSpuPageReqVO extends PageParam {
|
public class ProductSpuPageReqVO extends PageParam {
|
||||||
|
|
||||||
@ApiModelProperty(value = "商品名称")
|
@ApiModelProperty(value = "商品名称", example = "yutou")
|
||||||
private String name;
|
private String name;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商品编码", example = "yudaoyuanma")
|
@ApiModelProperty(value = "商品编码", example = "yudaoyuanma")
|
||||||
private String code;
|
private String code;
|
||||||
|
|
||||||
@ApiModelProperty(value = "分类id")
|
@ApiModelProperty(value = "分类id", example = "1")
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "商品品牌编号", example = "1")
|
@ApiModelProperty(value = "商品品牌编号", example = "1")
|
||||||
private Long brandId;
|
private Long brandId;
|
||||||
|
|
||||||
@ApiModelProperty(value = "上下架状态: 0 上架(开启) 1 下架(禁用)")
|
@ApiModelProperty(value = "上下架状态", example = "1", notes = "参见 CommonStatusEnum 枚举值")
|
||||||
private Integer status;
|
private Integer status;
|
||||||
|
|
||||||
@ApiModelProperty(value = "销量最小值", example = "1")
|
@ApiModelProperty(value = "销量最小值", example = "1")
|
||||||
|
@ -41,6 +41,7 @@ public class ProductSpuPageReqVO extends PageParam {
|
||||||
@ApiModelProperty(value = "市场价最大值", example = "1024")
|
@ApiModelProperty(value = "市场价最大值", example = "1024")
|
||||||
private Integer marketPriceMax;
|
private Integer marketPriceMax;
|
||||||
|
|
||||||
|
// TODO @luowenfeng: 这个可以改成前端基于 tab, 传递不同的条件么?
|
||||||
@ApiModelProperty(value = "tab 状态 null 全部, 0:销售中(上架) 1:仓库中(下架) 2:预警中", example = "1")
|
@ApiModelProperty(value = "tab 状态 null 全部, 0:销售中(上架) 1:仓库中(下架) 2:预警中", example = "1")
|
||||||
private Integer tabStatus;
|
private Integer tabStatus;
|
||||||
|
|
||||||
|
|
|
@ -17,7 +17,7 @@ import java.util.List;
|
||||||
@Mapper
|
@Mapper
|
||||||
public interface ProductPropertyValueMapper extends BaseMapperX<ProductPropertyValueDO> {
|
public interface ProductPropertyValueMapper extends BaseMapperX<ProductPropertyValueDO> {
|
||||||
|
|
||||||
// TODO @franky:方法名,selectListByXXX。mapper 的操作都是 crud
|
// TODO @luowenfeng:方法名,selectListByXXX。mapper 的操作都是 crud
|
||||||
default List<ProductPropertyValueDO> getPropertyValueListByPropertyId(List<Long> propertyIds) {
|
default List<ProductPropertyValueDO> getPropertyValueListByPropertyId(List<Long> propertyIds) {
|
||||||
// TODO @franky:调用父类的 selectList
|
// TODO @franky:调用父类的 selectList
|
||||||
return selectList(new LambdaQueryWrapperX<ProductPropertyValueDO>()
|
return selectList(new LambdaQueryWrapperX<ProductPropertyValueDO>()
|
||||||
|
@ -25,7 +25,7 @@ public interface ProductPropertyValueMapper extends BaseMapperX<ProductPropertyV
|
||||||
}
|
}
|
||||||
|
|
||||||
default void deletePropertyValueByPropertyId(Long propertyId) {
|
default void deletePropertyValueByPropertyId(Long propertyId) {
|
||||||
// TODO @franky:delete(new ) 即可
|
// TODO @luowenfeng:delete(new ) 即可
|
||||||
LambdaQueryWrapperX<ProductPropertyValueDO> queryWrapperX = new LambdaQueryWrapperX<>();
|
LambdaQueryWrapperX<ProductPropertyValueDO> queryWrapperX = new LambdaQueryWrapperX<>();
|
||||||
queryWrapperX.eq(ProductPropertyValueDO::getPropertyId, propertyId)
|
queryWrapperX.eq(ProductPropertyValueDO::getPropertyId, propertyId)
|
||||||
.eq(ProductPropertyValueDO::getDeleted, false);
|
.eq(ProductPropertyValueDO::getDeleted, false);
|
||||||
|
@ -39,4 +39,5 @@ public interface ProductPropertyValueMapper extends BaseMapperX<ProductPropertyV
|
||||||
.eqIfPresent(ProductPropertyValueDO::getStatus, reqVO.getStatus())
|
.eqIfPresent(ProductPropertyValueDO::getStatus, reqVO.getStatus())
|
||||||
.orderByDesc(ProductPropertyValueDO::getId));
|
.orderByDesc(ProductPropertyValueDO::getId));
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@ public interface ProductSpuMapper extends BaseMapperX<ProductSpuDO> {
|
||||||
.leIfPresent(ProductSpuDO::getMarketPrice, reqVO.getMarketPriceMax())
|
.leIfPresent(ProductSpuDO::getMarketPrice, reqVO.getMarketPriceMax())
|
||||||
.geIfPresent(ProductSpuDO::getMarketPrice, reqVO.getMarketPriceMin())
|
.geIfPresent(ProductSpuDO::getMarketPrice, reqVO.getMarketPriceMin())
|
||||||
.orderByDesc(ProductSpuDO::getSort);
|
.orderByDesc(ProductSpuDO::getSort);
|
||||||
|
// TODO @芋艿: 需要优化下这里的代码
|
||||||
if(reqVO.getTabStatus()!= null && reqVO.getTabStatus() == 2){
|
if(reqVO.getTabStatus()!= null && reqVO.getTabStatus() == 2){
|
||||||
productSpuDOLambdaQueryWrapperX.inIfPresent(ProductSpuDO::getId, spuIds);
|
productSpuDOLambdaQueryWrapperX.inIfPresent(ProductSpuDO::getId, spuIds);
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -93,12 +93,13 @@ public class ProductCategoryServiceImpl implements ProductCategoryService {
|
||||||
@Override
|
@Override
|
||||||
public void validateCategoryLevel(Long id) {
|
public void validateCategoryLevel(Long id) {
|
||||||
Long parentId = id;
|
Long parentId = id;
|
||||||
for (int i = 0; i < 3; i++) {
|
for (int i = 0; i < 3; i++) { // TODO @luowenfeng: 建议还是先获得 level; 然后判断 level 是不是满足; 这样逻辑会更清晰一些;
|
||||||
if (Objects.equals(parentId, ProductCategoryDO.PARENT_ID_NULL)) {
|
if (Objects.equals(parentId, ProductCategoryDO.PARENT_ID_NULL)) {
|
||||||
throw exception(CATEGORY_LEVEL_ERROR);
|
throw exception(CATEGORY_LEVEL_ERROR);
|
||||||
}
|
}
|
||||||
ProductCategoryDO category = productCategoryMapper.selectById(parentId);
|
ProductCategoryDO category = productCategoryMapper.selectById(parentId);
|
||||||
if (category == null) {
|
if (category == null) {
|
||||||
|
// TODO @luowenfeng: 应该抛出 CATEGORY_LEVEL_ERROR
|
||||||
throw exception(CATEGORY_NOT_EXISTS);
|
throw exception(CATEGORY_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
parentId = category.getParentId();
|
parentId = category.getParentId();
|
||||||
|
|
|
@ -54,13 +54,14 @@ public interface ProductPropertyService {
|
||||||
List<ProductPropertyRespVO> getPropertyList(ProductPropertyListReqVO listReqVO);
|
List<ProductPropertyRespVO> getPropertyList(ProductPropertyListReqVO listReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取属性及属性值列表 分页
|
* 获取属性名称分页
|
||||||
* @param pageReqVO
|
*
|
||||||
* @return
|
* @param pageReqVO 分页条件
|
||||||
|
* @return 规格名称分页
|
||||||
*/
|
*/
|
||||||
PageResult<ProductPropertyRespVO> getPropertyPage(ProductPropertyPageReqVO pageReqVO);
|
PageResult<ProductPropertyRespVO> getPropertyPage(ProductPropertyPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
// TODO luowenfeng: getProperty 就可以拉, 不用到 Resp
|
||||||
ProductPropertyRespVO getPropertyResp(Long id);
|
ProductPropertyRespVO getPropertyResp(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -71,11 +72,11 @@ public interface ProductPropertyService {
|
||||||
*/
|
*/
|
||||||
List<ProductPropertyRespVO> getPropertyList(Collection<Long> ids);
|
List<ProductPropertyRespVO> getPropertyList(Collection<Long> ids);
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得规格名称列表
|
* 获得规格名称 + 值的列表
|
||||||
* @param listReqVO 集合查询
|
*
|
||||||
* @return 规格名称集合
|
* @param listReqVO 列表查询
|
||||||
|
* @return 规格名称 + 值的列表
|
||||||
*/
|
*/
|
||||||
List<ProductPropertyAndValueRespVO> getPropertyAndValueList(ProductPropertyListReqVO listReqVO);
|
List<ProductPropertyAndValueRespVO> getPropertyAndValueList(ProductPropertyListReqVO listReqVO);
|
||||||
|
|
||||||
|
|
|
@ -46,6 +46,7 @@ public class ProductPropertyServiceImpl implements ProductPropertyService {
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public Long createProperty(ProductPropertyCreateReqVO createReqVO) {
|
public Long createProperty(ProductPropertyCreateReqVO createReqVO) {
|
||||||
|
// TODO @luowenfeng: 插入和更新的时候, 要校验 name 的唯一性;
|
||||||
// 插入
|
// 插入
|
||||||
ProductPropertyDO property = ProductPropertyConvert.INSTANCE.convert(createReqVO);
|
ProductPropertyDO property = ProductPropertyConvert.INSTANCE.convert(createReqVO);
|
||||||
productPropertyMapper.insert(property);
|
productPropertyMapper.insert(property);
|
||||||
|
@ -96,6 +97,7 @@ public class ProductPropertyServiceImpl implements ProductPropertyService {
|
||||||
//获取属性列表
|
//获取属性列表
|
||||||
PageResult<ProductPropertyDO> pageResult = productPropertyMapper.selectPage(pageReqVO);
|
PageResult<ProductPropertyDO> pageResult = productPropertyMapper.selectPage(pageReqVO);
|
||||||
PageResult<ProductPropertyRespVO> propertyRespVOPageResult = ProductPropertyConvert.INSTANCE.convertPage(pageResult);
|
PageResult<ProductPropertyRespVO> propertyRespVOPageResult = ProductPropertyConvert.INSTANCE.convertPage(pageResult);
|
||||||
|
// TODO @luofengwen: 下面的代码, 如果不要,可以删除哈; git 可以拿到记录的
|
||||||
// List<Long> propertyIds = propertyRespVOPageResult.getList().stream().map(ProductPropertyAndValueRespVO::getId).collect(Collectors.toList());
|
// List<Long> propertyIds = propertyRespVOPageResult.getList().stream().map(ProductPropertyAndValueRespVO::getId).collect(Collectors.toList());
|
||||||
//
|
//
|
||||||
// //获取属性值列表
|
// //获取属性值列表
|
||||||
|
@ -116,7 +118,6 @@ public class ProductPropertyServiceImpl implements ProductPropertyService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProductPropertyRespVO getPropertyResp(Long id) {
|
public ProductPropertyRespVO getPropertyResp(Long id) {
|
||||||
//查询规格
|
|
||||||
ProductPropertyDO property = getProperty(id);
|
ProductPropertyDO property = getProperty(id);
|
||||||
return ProductPropertyConvert.INSTANCE.convert(property);
|
return ProductPropertyConvert.INSTANCE.convert(property);
|
||||||
}
|
}
|
||||||
|
@ -130,13 +131,15 @@ public class ProductPropertyServiceImpl implements ProductPropertyService {
|
||||||
public List<ProductPropertyAndValueRespVO> getPropertyAndValueList(ProductPropertyListReqVO listReqVO) {
|
public List<ProductPropertyAndValueRespVO> getPropertyAndValueList(ProductPropertyListReqVO listReqVO) {
|
||||||
List<ProductPropertyRespVO> propertyList = getPropertyList(listReqVO);
|
List<ProductPropertyRespVO> propertyList = getPropertyList(listReqVO);
|
||||||
|
|
||||||
//查询属性值
|
// 查询属性值
|
||||||
List<ProductPropertyValueDO> valueDOList = productPropertyValueMapper.getPropertyValueListByPropertyId(CollectionUtils.convertList(propertyList, ProductPropertyRespVO::getId));
|
List<ProductPropertyValueDO> valueDOList = productPropertyValueMapper.getPropertyValueListByPropertyId(CollectionUtils.convertList(propertyList, ProductPropertyRespVO::getId));
|
||||||
|
// CollectionUtils.convertMultiMap() // TODO @luofengwen: 可以使用这个方法哈
|
||||||
Map<Long, List<ProductPropertyValueRespVO>> valueDOMap = valueDOList.stream()
|
Map<Long, List<ProductPropertyValueRespVO>> valueDOMap = valueDOList.stream()
|
||||||
.map(ProductPropertyValueConvert.INSTANCE::convert)
|
.map(ProductPropertyValueConvert.INSTANCE::convert)
|
||||||
.collect(Collectors.groupingBy(ProductPropertyValueRespVO::getPropertyId));
|
.collect(Collectors.groupingBy(ProductPropertyValueRespVO::getPropertyId));
|
||||||
//组装
|
// 组装 TODO @luowenfeng: CollectionUtils 转换哈;
|
||||||
return propertyList.stream().map(m -> {
|
return propertyList.stream().map(m -> {
|
||||||
|
// TODO @luowenfeng: 使用 mapstruct convert 哈
|
||||||
ProductPropertyAndValueRespVO productPropertyAndValueRespVO = BeanUtil.copyProperties(m, ProductPropertyAndValueRespVO.class);
|
ProductPropertyAndValueRespVO productPropertyAndValueRespVO = BeanUtil.copyProperties(m, ProductPropertyAndValueRespVO.class);
|
||||||
productPropertyAndValueRespVO.setValues(valueDOMap.get(m.getId()));
|
productPropertyAndValueRespVO.setValues(valueDOMap.get(m.getId()));
|
||||||
return productPropertyAndValueRespVO;
|
return productPropertyAndValueRespVO;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import javax.annotation.Resource;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p> TODO @luowenfeng: 类注释
|
||||||
*
|
*
|
||||||
* </p>
|
* </p>
|
||||||
*
|
*
|
||||||
|
@ -31,6 +31,7 @@ public class ProductPropertyValueServiceImpl implements ProductPropertyValueServ
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Long createPropertyValue(ProductPropertyValueCreateReqVO createReqVO) {
|
public Long createPropertyValue(ProductPropertyValueCreateReqVO createReqVO) {
|
||||||
|
// TODO @luowenfeng: 需要校验下在这个 propertyId, 新增和更新, name 都要唯一
|
||||||
ProductPropertyValueDO convert = ProductPropertyValueConvert.INSTANCE.convert(createReqVO);
|
ProductPropertyValueDO convert = ProductPropertyValueConvert.INSTANCE.convert(createReqVO);
|
||||||
productPropertyValueMapper.insert(convert);
|
productPropertyValueMapper.insert(convert);
|
||||||
return convert.getId();
|
return convert.getId();
|
||||||
|
|
|
@ -83,8 +83,9 @@ public interface ProductSkuService {
|
||||||
*/
|
*/
|
||||||
void deleteSkuBySpuId(Long spuId);
|
void deleteSkuBySpuId(Long spuId);
|
||||||
|
|
||||||
|
// TODO @luowenfeng: 可以改成返回 ProductSkuDO 列表; 然后, 上层业务在做处理;
|
||||||
/**
|
/**
|
||||||
* 获得商品预警中的spu集合
|
* 获得商品预警中的 SPU 集合
|
||||||
*
|
*
|
||||||
* @return 商品spuId集合
|
* @return 商品spuId集合
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -135,6 +135,7 @@ public class ProductSkuServiceImpl implements ProductSkuService {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Long> getRemindSpuIds() {
|
public List<Long> getRemindSpuIds() {
|
||||||
|
// TODO @luowenfeng: mybatis plus 不能出现在 Service 哈; 把这个查询, 下沉一个方法到 mapper 里
|
||||||
List<ProductSkuDO> productSkuDOS = productSkuMapper.selectList(new QueryWrapper<ProductSkuDO>().apply("stock <= warn_stock"));
|
List<ProductSkuDO> productSkuDOS = productSkuMapper.selectList(new QueryWrapper<ProductSkuDO>().apply("stock <= warn_stock"));
|
||||||
return productSkuDOS.stream().map(ProductSkuDO::getSpuId).distinct().collect(Collectors.toList());
|
return productSkuDOS.stream().map(ProductSkuDO::getSpuId).distinct().collect(Collectors.toList());
|
||||||
}
|
}
|
||||||
|
|
|
@ -33,38 +33,38 @@ public interface ProductSpuService {
|
||||||
void updateSpu(@Valid ProductSpuUpdateReqVO updateReqVO);
|
void updateSpu(@Valid ProductSpuUpdateReqVO updateReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除商品spu
|
* 删除商品 SPU
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
*/
|
*/
|
||||||
void deleteSpu(Long id);
|
void deleteSpu(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得商品spu详情
|
* 获得商品 SPU 详情
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @return 商品spu
|
* @return 商品 SPU
|
||||||
*/
|
*/
|
||||||
ProductSpuDetailRespVO getSpuDetail(Long id);
|
ProductSpuDetailRespVO getSpuDetail(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得商品spu
|
* 获得商品 SPU
|
||||||
*
|
*
|
||||||
* @param id 编号
|
* @param id 编号
|
||||||
* @return 商品spu
|
* @return 商品 SPU
|
||||||
*/
|
*/
|
||||||
ProductSpuRespVO getSpu(Long id);
|
ProductSpuRespVO getSpu(Long id);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得商品spu列表
|
* 获得商品 SPU 列表
|
||||||
*
|
*
|
||||||
* @param ids 编号
|
* @param ids 编号数组
|
||||||
* @return 商品spu列表
|
* @return 商品 SPU 列表
|
||||||
*/
|
*/
|
||||||
List<ProductSpuDO> getSpuList(Collection<Long> ids);
|
List<ProductSpuDO> getSpuList(Collection<Long> ids);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得商品spu分页
|
* 获得商品 SPU 分页
|
||||||
*
|
*
|
||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 商品spu分页
|
* @return 商品spu分页
|
||||||
|
@ -72,12 +72,11 @@ public interface ProductSpuService {
|
||||||
PageResult<ProductSpuRespVO> getSpuPage(ProductSpuPageReqVO pageReqVO);
|
PageResult<ProductSpuRespVO> getSpuPage(ProductSpuPageReqVO pageReqVO);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获得商品spu分页
|
* 获得商品 SPU 分页 // TODO @luowenfeng: 中文和英文之间, 要有一个空格; 这样, 阅读起来会更清晰; 我已经都改啦
|
||||||
*
|
*
|
||||||
* @param pageReqVO 分页查询
|
* @param pageReqVO 分页查询
|
||||||
* @return 商品spu分页
|
* @return 商品spu分页
|
||||||
*/
|
*/
|
||||||
PageResult<AppSpuPageRespVO> getSpuPage(AppSpuPageReqVO pageReqVO);
|
PageResult<AppSpuPageRespVO> getSpuPage(AppSpuPageReqVO pageReqVO);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -192,6 +192,7 @@ public class ProductSpuServiceImpl implements ProductSpuService {
|
||||||
public PageResult<ProductSpuRespVO> getSpuPage(ProductSpuPageReqVO pageReqVO) {
|
public PageResult<ProductSpuRespVO> getSpuPage(ProductSpuPageReqVO pageReqVO) {
|
||||||
List<Long> remindSpuIds= null;
|
List<Long> remindSpuIds= null;
|
||||||
// todo @yunai 预警类型的判断应该可以优化,看下怎么处理
|
// todo @yunai 预警类型的判断应该可以优化,看下怎么处理
|
||||||
|
// TODO @luowenfeng: 先这么简单处理; 性能应该影响不大的;
|
||||||
if(pageReqVO.getTabStatus() != null && pageReqVO.getTabStatus() == 2){
|
if(pageReqVO.getTabStatus() != null && pageReqVO.getTabStatus() == 2){
|
||||||
remindSpuIds= productSkuService.getRemindSpuIds();
|
remindSpuIds= productSkuService.getRemindSpuIds();
|
||||||
if(remindSpuIds.isEmpty()){
|
if(remindSpuIds.isEmpty()){
|
||||||
|
|
|
@ -39,6 +39,7 @@
|
||||||
<el-tab-pane label="价格库存" name="rates" class="rates">
|
<el-tab-pane label="价格库存" name="rates" class="rates">
|
||||||
<el-form ref="rates" :model="ratesForm" :rules="rules">
|
<el-form ref="rates" :model="ratesForm" :rules="rules">
|
||||||
<el-form-item label="启用多规格">
|
<el-form-item label="启用多规格">
|
||||||
|
<!-- TODO @luowenfeng: 1) activeSwitch 可以考虑改成; specSwitch, 更清晰一点, activeSwitch 太通用了; changeRadio 改成 changeSpecSwitch -->
|
||||||
<el-switch v-model="activeSwitch" @change="changeRadio"></el-switch>
|
<el-switch v-model="activeSwitch" @change="changeRadio"></el-switch>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue