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

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

~api:商品管理:删除商品:+mongo.del sku逻辑;

parent 1f69d6a3
......@@ -1320,7 +1320,6 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
spuIdList.addAll(goblinMongoUtils.getMgtSpuIdsForMarketBySpuNos(spuNoList, "0", "1", "2"));
if (goblinMongoUtils.delGoodsInfoVoBySpuIds(storeId, spuIdList, uid, now)) {
goblinMongoUtils.delGoodsSkuInfoVoBySpuIdList(spuIdList, uid, now);
log.info("商品管理:SPU管理:删除处理[UID={},PARAMS={}]", uid, JsonUtils.toJson(mgtGoodsActionParam));
goblinRedisUtils.deleteKeyForSelectGoods();// 精选商品:商品上架、下架、删除 调用的方法
......@@ -1337,6 +1336,7 @@ public class GoblinStoreMgtGoodsServiceImpl implements IGoblinstoreMgtGoodsServi
goblinRedisUtils.delGoodsSkuInfoVo(skuId);
goblinRedisUtils.delGoodsSkuInfoVoByUnShelves(skuId);
});
goblinMongoUtils.delGoodsSkuInfoVo(skuIdList, uid, now);
LinkedList<String> toMqSqls = CollectionUtil.linkedListString();
toMqSqls.add(SqlMapping.get("goblin_goods.update_by_del"));
......
......@@ -820,15 +820,6 @@ public class GoblinMongoUtils {
).getModifiedCount() > 0;
}
public boolean delGoodsSkuInfoVoBySpuIdList(List<String> spuIdList, String operator, LocalDateTime time) {
Object timeMdbObj = mongoConverter.convertToMongoType(time);
return mongoTemplate.getCollection(GoblinGoodsSkuInfoVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("spuId").in(spuIdList).and("delFlg").is("0")).getQueryObject(),
Update.update("delFlg", "1").set("updatedBy", operator).set("updatedAt", timeMdbObj)
.set("deletedBy", operator).set("deletedAt", timeMdbObj).getUpdateObject()
).getModifiedCount() > 0;
}
public List<String> delGoodsSkuInfoVoByStoreId(String storeId, String uid, LocalDateTime time) {
Query query = Query.query(Criteria.where("storeId").is(storeId).and("delFlg").is("0").and("shelvesStatus").is("3"));
query.fields().include("skuId");
......
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