校验
This commit is contained in:
@@ -337,6 +337,7 @@ public class TbShopSyncInfoServiceImpl extends ServiceImpl<TbShopSyncInfoMapper,
|
|||||||
public void syncGroupPackage(Integer shopId, Map<Integer, Integer> pros, Map<Integer, Integer> skus) {
|
public void syncGroupPackage(Integer shopId, Map<Integer, Integer> pros, Map<Integer, Integer> skus) {
|
||||||
productRepository.findPackageByShopId(shopId.toString()).forEach(tbProduct -> {
|
productRepository.findPackageByShopId(shopId.toString()).forEach(tbProduct -> {
|
||||||
tbProduct.setProGroupVo(JSONUtil.parseJSONStrTList(tbProduct.getGroupSnap(), ProductGroupVo.class));
|
tbProduct.setProGroupVo(JSONUtil.parseJSONStrTList(tbProduct.getGroupSnap(), ProductGroupVo.class));
|
||||||
|
if (tbProduct.getProGroupVo() != null) {
|
||||||
tbProduct.getProGroupVo().forEach(proGroupVo -> {
|
tbProduct.getProGroupVo().forEach(proGroupVo -> {
|
||||||
proGroupVo.getGoods().forEach(goods -> {
|
proGroupVo.getGoods().forEach(goods -> {
|
||||||
if (pros.containsKey(goods.getProId())) {
|
if (pros.containsKey(goods.getProId())) {
|
||||||
@@ -357,6 +358,7 @@ public class TbShopSyncInfoServiceImpl extends ServiceImpl<TbShopSyncInfoMapper,
|
|||||||
});
|
});
|
||||||
tbProduct.setGroupSnap(ListUtil.listToJsonString(tbProduct.getProGroupVo()));
|
tbProduct.setGroupSnap(ListUtil.listToJsonString(tbProduct.getProGroupVo()));
|
||||||
productRepository.save(tbProduct);
|
productRepository.save(tbProduct);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user