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

Commit bec2e19b authored by 张国柄's avatar 张国柄

~api:店铺商品管理:批量导入数据;

parent 545c4a3d
......@@ -840,10 +840,13 @@ public class GoblinMongoUtils {
return pagedResult.setList(list).setTotal(count, pageSize);
}
// 根据sku条码获取sku总数
public long countMgtGoodsSkuBySkuNoList(String storeId, List<String> skuNoList) {
return mongoTemplate.count(Query.query(Criteria.where("delFlg").is("0").and("storeId").is(storeId).and("skuNo").in(skuNoList)),
GoblinMixDetailsVo.class, GoblinMixDetailsVo.class.getSimpleName());
// 根据sku条码获取skuNo
public List<String> existGoodsSkuNoBySkuNoList(String storeId, List<String> skuNoList) {
Query query = Query.query(Criteria.where("delFlg").is("0").and("storeId").is(storeId).and("skuNo").in(skuNoList));
query.fields().include("skuNo");
List<GoblinGoodsSkuInfoVo> vos = mongoTemplate.find(query, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
return CollectionUtils.isEmpty(vos) ? null : vos.stream().map(GoblinGoodsSkuInfoVo::getSkuNo).collect(Collectors.toList());
// return mongoTemplate.count(query, GoblinGoodsSkuInfoVo.class, GoblinGoodsSkuInfoVo.class.getSimpleName());
}
// SKU信息
......
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