master:用户进货车放开登录权限;

pull/1121/head
liujiang 2025-11-28 22:43:06 +08:00
parent f505e01a7c
commit 84ce358c28
1 changed files with 5 additions and 1 deletions

View File

@ -254,9 +254,13 @@ public class ShoppingCartServiceImpl implements IShoppingCartService {
@Override
@Transactional(readOnly = true)
public List<ShoppingCartDTO> getList(ShopCartListDTO listDTO) {
Long userId = SecurityUtils.getUserIdSafe();
if (ObjectUtils.isEmpty(userId)) {
return Collections.emptyList();
}
List<ShoppingCart> shoppingCartList = this.shopCartMapper.selectList(new LambdaQueryWrapper<ShoppingCart>()
.in(ShoppingCart::getStoreProdId, listDTO.getStoreProdIdList()).eq(ShoppingCart::getDelFlag, Constants.UNDELETED)
.eq(ShoppingCart::getUserId, SecurityUtils.getUserId()));
.eq(ShoppingCart::getUserId, userId));
if (CollectionUtils.isEmpty(shoppingCartList)) {
return new ArrayList<>();
}