Jay
2024-10-09 41aaa0cc7c5fe00724be8fa44764a1fbc0c46dc9
提交 | 用户 | 时间
e7c126 1 package com.iailab.module.infra.dal.mysql.file;
H 2
3 import com.iailab.module.infra.dal.dataobject.file.FileContentDO;
4 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
5 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
6 import org.apache.ibatis.annotations.Mapper;
7
8 import java.util.List;
9
10 @Mapper
11 public interface FileContentMapper extends BaseMapper<FileContentDO> {
12
13     default void deleteByConfigIdAndPath(Long configId, String path) {
14         this.delete(new LambdaQueryWrapper<FileContentDO>()
15                 .eq(FileContentDO::getConfigId, configId)
16                 .eq(FileContentDO::getPath, path));
17     }
18
19     default List<FileContentDO> selectListByConfigIdAndPath(Long configId, String path) {
20         return selectList(new LambdaQueryWrapper<FileContentDO>()
21                 .eq(FileContentDO::getConfigId, configId)
22                 .eq(FileContentDO::getPath, path));
23     }
24
25 }