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

Commit 2acf665e authored by 胡佳晨's avatar 胡佳晨

Merge remote-tracking branch 'origin/pre' into pre

parents 7ba24a05 01227d6b
......@@ -54,7 +54,7 @@ public class PlatformGoblinGoodsTaskController {
try {
platformGoblinGoodsService.shelvesProcessing(spuIdList);
} catch (Exception e) {
log.error("商品上架处理[totalCount={},spuIdList={}]", totalCount, JsonUtils.toJson(spuIdList));
log.error("Ex.商品上架处理[totalCount={},spuIdList={}],{}", totalCount, JsonUtils.toJson(spuIdList), e.getMessage());
return ResponseDto.failure(String.format("商品上架处理失败[totalCount=%s]", totalCount));
}
}
......
......@@ -51,9 +51,10 @@ public class PlatformGoblinGoodsService extends ServiceImpl<GoblinGoodsMapper, G
updateSkuWrapper.in(GoblinGoodsSku::getSpuId, spuIdList);
updateSkuWrapper.eq(GoblinGoodsSku::getDelFlg, "0");
LiquidnetServiceException liquidnetServiceException = new LiquidnetServiceException();
if (goblinGoodsSkuMapper.update(updateSku, updateSkuWrapper) > 0) {
UpdateResult updateSpuResult = mongoTemplate.getCollection(GoblinGoodsInfoVo.class.getSimpleName()).updateMany(
Query.query(Criteria.where("spuId").in(spuIdList).and("shelvesStatus").is("0").and("shelvesHandle").is("3")).getQueryObject(),
Query.query(Criteria.where("spuId").in(spuIdList).and("shelvesStatus").in("0", "1").and("shelvesHandle").is("3")).getQueryObject(),
Update.update("shelvesStatus", "3").set("shelvesAt", now).getUpdateObject()
);
if (updateSpuResult.getModifiedCount() > 0) {
......@@ -83,10 +84,15 @@ public class PlatformGoblinGoodsService extends ServiceImpl<GoblinGoodsMapper, G
Query.query(Criteria.where("spuId").in(spuIdList).and("shelvesAt").is(now)).getQueryObject(),
Update.update("shelvesStatus", "0").set("shelvesAt", of).getUpdateObject()
);
liquidnetServiceException.setMessage("更新失败:Mongo.GoblinGoodsSkuInfoVo");
}
} else {
liquidnetServiceException.setMessage("更新失败:Mongo.GoblinGoodsInfoVo");
}
} else {
liquidnetServiceException.setMessage("更新失败:Mysql.GoblinGoodsSku");
}
throw new LiquidnetServiceException();
throw liquidnetServiceException;
}
}
}
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