| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- package com.ydtech.modules.admin.service;
- import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
- import com.baomidou.mybatisplus.extension.service.IService;
- import com.ydtech.modules.admin.model.po.SysQueryVehicleUrl;
- import com.ydtech.modules.admin.model.vo.SysQueryVehicleConfigSaveVo;
- import org.springframework.transaction.annotation.Transactional;
- import java.util.List;
- import java.util.stream.Collectors;
- /**
- * @author Administrator
- * @description 针对表【sys_query_vehicle_url(配置链接)】的数据库操作Service
- * @createDate 2024-08-16 10:20:52
- */
- public interface SysQueryVehicleUrlService extends IService<SysQueryVehicleUrl> {
- /**
- * 删除配置链接信息
- *
- * @param configId 配置id
- * @return 成功失败
- */
- default boolean deleteByConfigId(Integer configId) {
- LambdaQueryWrapper<SysQueryVehicleUrl> wrapper = new LambdaQueryWrapper<>();
- wrapper.eq(SysQueryVehicleUrl::getConfigId, configId);
- return remove(wrapper);
- }
- /**
- *
- * @param configId 配置id
- * @param sysQueryVehicleUrlDTOList 配置列表
- * @return
- */
- @Transactional
- default boolean saveVehicleUrlDTOs(Integer configId, List<SysQueryVehicleConfigSaveVo.SysQueryVehicleUrlDTO> sysQueryVehicleUrlDTOList){
- List<SysQueryVehicleUrl> sysQueryVehicleUrls = sysQueryVehicleUrlDTOList.stream()
- .map(x -> x.toSysQueryVehicleConfig(configId))
- .collect(Collectors.toList());
- return saveBatch(sysQueryVehicleUrls);
- }
- }
|