提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.dal.mysql.tenant; |
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.system.controller.admin.tenant.vo.tenant.TenantPageReqVO; |
|
7 |
import com.iailab.module.system.dal.dataobject.tenant.TenantDO; |
|
8 |
import org.apache.ibatis.annotations.Mapper; |
|
9 |
|
|
10 |
import java.util.List; |
|
11 |
|
|
12 |
/** |
|
13 |
* 租户 Mapper |
|
14 |
* |
|
15 |
* @author iailab |
|
16 |
*/ |
|
17 |
@Mapper |
|
18 |
public interface TenantMapper extends BaseMapperX<TenantDO> { |
|
19 |
|
|
20 |
default PageResult<TenantDO> selectPage(TenantPageReqVO reqVO) { |
|
21 |
return selectPage(reqVO, new LambdaQueryWrapperX<TenantDO>() |
|
22 |
.likeIfPresent(TenantDO::getName, reqVO.getName()) |
|
23 |
.likeIfPresent(TenantDO::getContactName, reqVO.getContactName()) |
|
24 |
.likeIfPresent(TenantDO::getContactMobile, reqVO.getContactMobile()) |
|
25 |
.eqIfPresent(TenantDO::getStatus, reqVO.getStatus()) |
|
26 |
.betweenIfPresent(TenantDO::getCreateTime, reqVO.getCreateTime()) |
|
27 |
.orderByDesc(TenantDO::getId)); |
|
28 |
} |
|
29 |
|
|
30 |
default TenantDO selectByName(String name) { |
|
31 |
return selectOne(TenantDO::getName, name); |
|
32 |
} |
|
33 |
|
|
34 |
default TenantDO selectByWebsite(String website) { |
|
35 |
return selectOne(TenantDO::getWebsite, website); |
|
36 |
} |
|
37 |
|
|
38 |
default Long selectCountByPackageId(Long packageId) { |
|
39 |
return selectCount(TenantDO::getPackageId, packageId); |
|
40 |
} |
|
41 |
|
|
42 |
default List<TenantDO> selectListByPackageId(Long packageId) { |
|
43 |
return selectList(TenantDO::getPackageId, packageId); |
|
44 |
} |
|
45 |
|
|
46 |
} |