查询联系人判空

This commit is contained in:
gong
2025-12-08 17:43:27 +08:00
parent 396995c0da
commit 03482e745d

View File

@@ -10,6 +10,7 @@ import com.mybatisflex.spring.service.impl.ServiceImpl;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
import java.util.Set;
import java.util.stream.Collectors;
@@ -27,6 +28,10 @@ public class BkContactListServiceImpl extends ServiceImpl<BkContactListMapper, B
@Override
public List<BkContactList> getUserList(Long shopId, Set<String> phones) {
if (phones == null || phones.isEmpty()) {
return new ArrayList<>();
}
remove(QueryWrapper.create().eq(BkContactList::getShopId, shopId));
List<BkContactList> collect = phones.stream()
.filter(StrUtil::isNotEmpty)