并行运行的Bug

店铺信息
This commit is contained in:
2024-09-13 16:01:42 +08:00
parent 62e1ec8196
commit 12c8894436
3 changed files with 18 additions and 2 deletions

View File

@@ -389,7 +389,7 @@ public class ProductService {
*/
public List<TbProduct> handleDate(List<TbProduct> products,boolean check,Integer isSale,boolean isVip){
if (!CollectionUtils.isEmpty(products)) {
products.parallelStream().forEach(it -> {
products.forEach(it -> {
if(check){
List<TbProductGroup> tbProductGroups = tbProductGroupMapper.selectByProductId(it.getShopId(), it.getId().toString());
for (TbProductGroup g : tbProductGroups) {