提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.infra.dal.mysql.config; |
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.config.vo.ConfigPageReqVO; |
|
7 |
import com.iailab.module.infra.dal.dataobject.config.ConfigDO; |
|
8 |
import org.apache.ibatis.annotations.Mapper; |
|
9 |
|
|
10 |
@Mapper |
|
11 |
public interface ConfigMapper extends BaseMapperX<ConfigDO> { |
|
12 |
|
|
13 |
default ConfigDO selectByKey(String key) { |
|
14 |
return selectOne(ConfigDO::getConfigKey, key); |
|
15 |
} |
|
16 |
|
|
17 |
default PageResult<ConfigDO> selectPage(ConfigPageReqVO reqVO) { |
|
18 |
return selectPage(reqVO, new LambdaQueryWrapperX<ConfigDO>() |
|
19 |
.likeIfPresent(ConfigDO::getName, reqVO.getName()) |
|
20 |
.likeIfPresent(ConfigDO::getConfigKey, reqVO.getKey()) |
|
21 |
.eqIfPresent(ConfigDO::getType, reqVO.getType()) |
|
22 |
.betweenIfPresent(ConfigDO::getCreateTime, reqVO.getCreateTime())); |
|
23 |
} |
|
24 |
|
|
25 |
} |