Merge branch 'ww' into test

This commit is contained in:
2024-09-13 16:21:09 +08:00

View File

@@ -389,7 +389,12 @@ public class ProductService {
*/
public List<TbProduct> handleDate(List<TbProduct> products,boolean check,Integer isSale,boolean isVip){
if (!CollectionUtils.isEmpty(products)) {
products.forEach(it -> {
products.parallelStream().forEach(it -> {
TbShopUnit tbShopUnit = unitMapper.selectByPrimaryKey(Integer.valueOf(it.getUnitId()));
if (it.getName().equals("烤牛肉")) {
System.out.println("单位:"+tbShopUnit.getName());
}
it.setUnitSnap(tbShopUnit != null ? tbShopUnit.getName() : "");
if(check){
List<TbProductGroup> tbProductGroups = tbProductGroupMapper.selectByProductId(it.getShopId(), it.getId().toString());
for (TbProductGroup g : tbProductGroups) {
@@ -403,8 +408,6 @@ public class ProductService {
}else {
it.setIsSale(isSale);
}
TbShopUnit tbShopUnit = unitMapper.selectByPrimaryKey(Integer.valueOf(it.getUnitId()));
it.setUnitSnap(tbShopUnit != null ? tbShopUnit.getName() : "");
//购物车数量
it.setCartNumber("0");
List<TbProductSku> tbProductSkus = tbProductSkuMapper.selectGroundingByProId(it.getId());