提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.dal.mysql.social; |
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.socail.vo.client.SocialClientPageReqVO; |
|
7 |
import com.iailab.module.system.dal.dataobject.social.SocialClientDO; |
|
8 |
import org.apache.ibatis.annotations.Mapper; |
|
9 |
|
|
10 |
@Mapper |
|
11 |
public interface SocialClientMapper extends BaseMapperX<SocialClientDO> { |
|
12 |
|
|
13 |
default SocialClientDO selectBySocialTypeAndUserType(Integer socialType, Integer userType) { |
|
14 |
return selectOne(SocialClientDO::getSocialType, socialType, |
|
15 |
SocialClientDO::getUserType, userType); |
|
16 |
} |
|
17 |
|
|
18 |
default PageResult<SocialClientDO> selectPage(SocialClientPageReqVO reqVO) { |
|
19 |
return selectPage(reqVO, new LambdaQueryWrapperX<SocialClientDO>() |
|
20 |
.likeIfPresent(SocialClientDO::getName, reqVO.getName()) |
|
21 |
.eqIfPresent(SocialClientDO::getSocialType, reqVO.getSocialType()) |
|
22 |
.eqIfPresent(SocialClientDO::getUserType, reqVO.getUserType()) |
|
23 |
.likeIfPresent(SocialClientDO::getClientId, reqVO.getClientId()) |
|
24 |
.eqIfPresent(SocialClientDO::getStatus, reqVO.getStatus()) |
|
25 |
.orderByDesc(SocialClientDO::getId)); |
|
26 |
} |
|
27 |
|
|
28 |
} |