提交 | 用户 | 时间
|
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.user.SocialUserPageReqVO; |
|
7 |
import com.iailab.module.system.dal.dataobject.social.SocialUserDO; |
|
8 |
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
|
9 |
import org.apache.ibatis.annotations.Mapper; |
|
10 |
|
|
11 |
@Mapper |
|
12 |
public interface SocialUserMapper extends BaseMapperX<SocialUserDO> { |
|
13 |
|
|
14 |
default SocialUserDO selectByTypeAndCodeAnState(Integer type, String code, String state) { |
|
15 |
return selectOne(new LambdaQueryWrapper<SocialUserDO>() |
|
16 |
.eq(SocialUserDO::getType, type) |
|
17 |
.eq(SocialUserDO::getCode, code) |
|
18 |
.eq(SocialUserDO::getState, state)); |
|
19 |
} |
|
20 |
|
|
21 |
default SocialUserDO selectByTypeAndOpenid(Integer type, String openid) { |
|
22 |
return selectOne(new LambdaQueryWrapper<SocialUserDO>() |
|
23 |
.eq(SocialUserDO::getType, type) |
|
24 |
.eq(SocialUserDO::getOpenid, openid)); |
|
25 |
} |
|
26 |
|
|
27 |
default PageResult<SocialUserDO> selectPage(SocialUserPageReqVO reqVO) { |
|
28 |
return selectPage(reqVO, new LambdaQueryWrapperX<SocialUserDO>() |
|
29 |
.eqIfPresent(SocialUserDO::getType, reqVO.getType()) |
|
30 |
.likeIfPresent(SocialUserDO::getNickname, reqVO.getNickname()) |
|
31 |
.likeIfPresent(SocialUserDO::getOpenid, reqVO.getOpenid()) |
|
32 |
.betweenIfPresent(SocialUserDO::getCreateTime, reqVO.getCreateTime()) |
|
33 |
.orderByDesc(SocialUserDO::getId)); |
|
34 |
} |
|
35 |
|
|
36 |
} |