批量规格匹配规格错乱数据优化
This commit is contained in:
parent
085799d908
commit
7466689bc1
@ -288,7 +288,7 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
|
|||||||
item.setItem_spec(item_spec);
|
item.setItem_spec(item_spec);
|
||||||
shopProductInfo.setProduct_spec(productSpec);
|
shopProductInfo.setProduct_spec(productSpec);
|
||||||
}
|
}
|
||||||
String product_uniqid=ShopJsonUtils.generateJsonWithOrgJson(item.getSpec_item_ids(),new Object[]{item.getItem_id(),item.getItem_unit_price(),"",item.getItem_enable()});
|
String product_uniqid=ShopJsonUtils.generateJsonWithOrgJson(item.getSpec_item_ids(),new Object[]{item.getItem_id(),item.getItem_unit_price(),"","1001"});
|
||||||
shopProductInfo.setProduct_uniqid(product_uniqid);
|
shopProductInfo.setProduct_uniqid(product_uniqid);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -311,6 +311,7 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
|
|||||||
query.or(q -> q.eq("store_id", base.getStore_id())
|
query.or(q -> q.eq("store_id", base.getStore_id())
|
||||||
.eq("product_id", base.getProduct_id()));
|
.eq("product_id", base.getProduct_id()));
|
||||||
});
|
});
|
||||||
|
query.orderByAsc("product_id");
|
||||||
return shopProductItemService.list(query);
|
return shopProductItemService.list(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -332,6 +333,7 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
|
|||||||
shopProductBaseList.forEach(base -> {
|
shopProductBaseList.forEach(base -> {
|
||||||
query.or(q -> q.eq("product_id", base.getProduct_id()));
|
query.or(q -> q.eq("product_id", base.getProduct_id()));
|
||||||
});
|
});
|
||||||
|
query.orderByAsc("product_id");
|
||||||
return shopProductInfoService.list(query);
|
return shopProductInfoService.list(query);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -411,6 +413,8 @@ public class ProductMappingServiceImpl extends BaseServiceImpl<ProductMappingMap
|
|||||||
QueryWrapper<ShopProductBase> queryWrapper= new QueryWrapper<>();
|
QueryWrapper<ShopProductBase> queryWrapper= new QueryWrapper<>();
|
||||||
queryWrapper.eq("product_state_id", StateCode.PRODUCT_STATE_OFF_THE_SHELF_UNCHECK);
|
queryWrapper.eq("product_state_id", StateCode.PRODUCT_STATE_OFF_THE_SHELF_UNCHECK);
|
||||||
queryWrapper.eq("store_id", storeId);
|
queryWrapper.eq("store_id", storeId);
|
||||||
|
queryWrapper.gt("unit_price", BigDecimal.ZERO);
|
||||||
|
queryWrapper.orderByAsc("product_id");
|
||||||
long total=shopProductBaseService.count(queryWrapper);
|
long total=shopProductBaseService.count(queryWrapper);
|
||||||
|
|
||||||
int pages= CommonUtil.getPagesCount(Math.toIntExact(total),SHOPBASEPAGE);
|
int pages= CommonUtil.getPagesCount(Math.toIntExact(total),SHOPBASEPAGE);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user