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

Commit 308de968 authored by GaoHu's avatar GaoHu

修改新预约,根据spuId和店铺id查询返回sku列表新增状态4返回已上架未开售的sku

parent 38e514d9
...@@ -23,7 +23,7 @@ public class GoblinStoreMgtGoodsSkuFilterParam implements Serializable { ...@@ -23,7 +23,7 @@ public class GoblinStoreMgtGoodsSkuFilterParam implements Serializable {
private Integer pageNum; private Integer pageNum;
@ApiModelProperty(position = 13, required = false, value = "搜索关键字[128]") @ApiModelProperty(position = 13, required = false, value = "搜索关键字[128]")
private String keyword; private String keyword;
@ApiModelProperty(position = 14, required = false, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架]", allowableValues = "0,1,2,3") @ApiModelProperty(position = 14, required = false, value = "商品上架状态[0-待上架|1-下架|2-违规|3-上架|4-已上架未开售]", allowableValues = "0,1,2,3")
private String shelvesStatus; private String shelvesStatus;
} }
...@@ -42,6 +42,7 @@ import java.util.regex.Pattern; ...@@ -42,6 +42,7 @@ import java.util.regex.Pattern;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS; import static com.liquidnet.commons.lang.util.DateUtil.DTF_YMD_HMS;
import static com.liquidnet.commons.lang.util.DateUtil.now;
@Component @Component
public class GoblinMongoUtils { public class GoblinMongoUtils {
...@@ -1552,8 +1553,12 @@ public class GoblinMongoUtils { ...@@ -1552,8 +1553,12 @@ public class GoblinMongoUtils {
criteria.and("name").regex(pattern); criteria.and("name").regex(pattern);
} }
if (StringUtils.isNotBlank(filterParam.getShelvesStatus())) { if (StringUtils.isNotBlank(filterParam.getShelvesStatus())) {
if ("4".equals(filterParam.getShelvesStatus())){
criteria.and("shelvesStatus").is("3").and("saleStartTime").gte(now());
}else {
criteria.and("shelvesStatus").is(filterParam.getShelvesStatus()); criteria.and("shelvesStatus").is(filterParam.getShelvesStatus());
} }
}
Query query = Query.query(criteria); Query query = Query.query(criteria);
long count = mongoTemplate.count(query, GoblinGoodsSkuInfoVo.class.getSimpleName()); long count = mongoTemplate.count(query, GoblinGoodsSkuInfoVo.class.getSimpleName());
......
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