提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.infra.dal.mysql.codegen; |
H |
2 |
|
|
3 |
import com.iailab.framework.common.pojo.PageResult; |
|
4 |
import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
|
5 |
import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; |
|
6 |
import com.iailab.module.infra.controller.admin.codegen.vo.table.CodegenTablePageReqVO; |
|
7 |
import com.iailab.module.infra.dal.dataobject.codegen.CodegenTableDO; |
|
8 |
import org.apache.ibatis.annotations.Mapper; |
|
9 |
|
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
@Mapper |
|
13 |
public interface CodegenTableMapper extends BaseMapperX<CodegenTableDO> { |
|
14 |
|
|
15 |
default CodegenTableDO selectByTableNameAndDataSourceConfigId(String tableName, Long dataSourceConfigId) { |
|
16 |
return selectOne(CodegenTableDO::getTableName, tableName, |
|
17 |
CodegenTableDO::getDataSourceConfigId, dataSourceConfigId); |
|
18 |
} |
|
19 |
|
|
20 |
default PageResult<CodegenTableDO> selectPage(CodegenTablePageReqVO pageReqVO) { |
|
21 |
return selectPage(pageReqVO, new LambdaQueryWrapperX<CodegenTableDO>() |
|
22 |
.likeIfPresent(CodegenTableDO::getTableName, pageReqVO.getTableName()) |
|
23 |
.likeIfPresent(CodegenTableDO::getTableComment, pageReqVO.getTableComment()) |
|
24 |
.likeIfPresent(CodegenTableDO::getClassName, pageReqVO.getClassName()) |
|
25 |
.betweenIfPresent(CodegenTableDO::getCreateTime, pageReqVO.getCreateTime()) |
|
26 |
.orderByDesc(CodegenTableDO::getUpdateTime) |
|
27 |
); |
|
28 |
} |
|
29 |
|
|
30 |
default List<CodegenTableDO> selectListByDataSourceConfigId(Long dataSourceConfigId) { |
|
31 |
return selectList(CodegenTableDO::getDataSourceConfigId, dataSourceConfigId); |
|
32 |
} |
|
33 |
|
|
34 |
default List<CodegenTableDO> selectListByTemplateTypeAndMasterTableId(Integer templateType, Long masterTableId) { |
|
35 |
return selectList(CodegenTableDO::getTemplateType, templateType, |
|
36 |
CodegenTableDO::getMasterTableId, masterTableId); |
|
37 |
} |
|
38 |
|
|
39 |
} |