记得上下班打卡 | git大法好,push需谨慎

Commit 0f60fdac authored by 张国柄's avatar 张国柄

~api:mgt.商品列表+条件spuType:商品类型[0-常规|1-数字藏品];

parent e054f495
......@@ -41,4 +41,6 @@ public class GoblinStoreMgtGoodsFilterParam implements Serializable {
private BigDecimal priceGe;
@ApiModelProperty(position = 20, required = false, value = "价格区间MAX")
private BigDecimal priceLe;
@ApiModelProperty(position = 21, required = false, value = "商品类型[0-常规|1-数字藏品]")
private int spuType;
}
package com.liquidnet.service.goblin.dto.manage.vo;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
......@@ -7,8 +8,9 @@ import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
@ApiModel(value = "GoblinStoreMgtGoodsVo", description = "商品管理:商品列表信息")
@ApiModel(value = "GoblinStoreMgtGoodsListVo", description = "商品管理:商品列表信息")
@Data
@JsonIgnoreProperties(ignoreUnknown = true)
public class GoblinStoreMgtGoodsListVo implements Serializable, Cloneable {
private static final long serialVersionUID = -5926827517337445529L;
@ApiModelProperty(position = 10, value = "店铺ID[64]")
......
......@@ -212,7 +212,7 @@ public class GoblinStoreMgtGoodsController {
return resultFlg ? ResponseDto.success() : ResponseDto.failure();
}
@ApiOperationSupport(order = 31)
@ApiOperationSupport(order = 301)
@ApiOperation(value = "SKU管理-数字藏品")
@PostMapping("digital/operate")
public ResponseDto<Object> digitalAction(@Valid @RequestBody GoblinStoreMgtGoodsSkuActionParam mgtGoodsSkuActionParam) {
......@@ -469,7 +469,7 @@ public class GoblinStoreMgtGoodsController {
return ResponseDto.success(goodsInfoVo.getSpuId());
}
@ApiOperationSupport(order = 41)
@ApiOperationSupport(order = 401)
@ApiOperation(value = "SPU添加-数字藏品")
@PostMapping("digital/add")
public ResponseDto<Object> digitalAdd(@Valid @RequestBody GoblinStoreMgtDigitalGoodsAddParam mgtDigitalGoodsAddParam) {
......@@ -613,7 +613,7 @@ public class GoblinStoreMgtGoodsController {
return resultFlg ? ResponseDto.success() : ResponseDto.failure();
}
@ApiOperationSupport(order = 61)
@ApiOperationSupport(order = 601)
@ApiOperation(value = "SPU编辑-数字藏品", notes = "只修改商品信息,不包含价格库存相关信息")
@PutMapping("digital/edit_spu")
public ResponseDto<Object> digitalEditSpu(@Valid @RequestBody GoblinStoreMgtDigitalGoodsAddParam mgtDigitalGoodsEditParam) {
......@@ -850,7 +850,7 @@ public class GoblinStoreMgtGoodsController {
}
}
@ApiOperationSupport(order = 71)
@ApiOperationSupport(order = 701)
@ApiOperation(value = "商品编辑:SKU编辑-数字藏品", notes = "只修改单品信息,不包含商品信息")
@PutMapping("digital/edit_sku")
public ResponseDto<Object> digitalEditSku(@Valid @RequestBody GoblinStoreMgtDigitalGoodsAddSkuParam mgtDigitalGoodsEditSkuParam) {
......@@ -1022,7 +1022,7 @@ public class GoblinStoreMgtGoodsController {
return ResponseDto.success();
}
@ApiOperationSupport(order = 81)
@ApiOperationSupport(order = 801)
@ApiOperation(value = "商品编辑:SKU添加-数字藏品")
@PostMapping("digital/add_sku")
public ResponseDto<Object> digitalSkuAdd(@Valid @RequestBody GoblinStoreMgtDigitalGoodsAddSkuParam mgtDigitalGoodsAddSkuParam) {
......
......@@ -962,6 +962,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
List<String> skuIdList = mgtGoodsInfoVo.getSkuIdList();
if (CollectionUtils.isEmpty(skuIdList)) {
skuIdList = CollectionUtil.linkedListString();
mgtGoodsInfoVo.setCoverPic(initGoodsSkuInfoVo.getSkuPic());// 默认使用第一个SKU图片作为SPU封面图
}
skuIdList.add(initGoodsSkuInfoVo.getSkuId());
mgtGoodsInfoVo.setSkuIdList(skuIdList);
......
......@@ -359,6 +359,11 @@ public class GoblinMongoUtils {
// SPU分页
public PagedResult<GoblinStoreMgtGoodsListVo> getMgtGoodsInfoVos(GoblinStoreMgtGoodsFilterParam filterParam) {
Criteria criteria = Criteria.where("delFlg").is("0").and("storeId").is(filterParam.getStoreId()).and("marketId").exists(false);
if (0 == filterParam.getSpuType()) {
criteria.andOperator(Criteria.where("spuType").exists(false).orOperator(Criteria.where("spuType").is(0)));
} else {
criteria.and("spuType").is(1);
}
if (StringUtils.isNotBlank(filterParam.getKeyword())) {
Pattern pattern = Pattern.compile("^.*" + filterParam.getKeyword() + ".*$", Pattern.CASE_INSENSITIVE);
criteria.and("name").regex(pattern);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment