提交 | 用户 | 时间
|
e7c126
|
1 |
package com.iailab.module.system.dal.mysql.social; |
H |
2 |
|
|
3 |
import com.iailab.framework.mybatis.core.mapper.BaseMapperX; |
|
4 |
import com.iailab.framework.mybatis.core.query.LambdaQueryWrapperX; |
|
5 |
import com.iailab.module.system.dal.dataobject.social.SocialUserBindDO; |
|
6 |
import org.apache.ibatis.annotations.Mapper; |
|
7 |
|
|
8 |
import java.util.List; |
|
9 |
|
|
10 |
@Mapper |
|
11 |
public interface SocialUserBindMapper extends BaseMapperX<SocialUserBindDO> { |
|
12 |
|
|
13 |
default void deleteByUserTypeAndUserIdAndSocialType(Integer userType, Long userId, Integer socialType) { |
|
14 |
delete(new LambdaQueryWrapperX<SocialUserBindDO>() |
|
15 |
.eq(SocialUserBindDO::getUserType, userType) |
|
16 |
.eq(SocialUserBindDO::getUserId, userId) |
|
17 |
.eq(SocialUserBindDO::getSocialType, socialType)); |
|
18 |
} |
|
19 |
|
|
20 |
default void deleteByUserTypeAndSocialUserId(Integer userType, Long socialUserId) { |
|
21 |
delete(new LambdaQueryWrapperX<SocialUserBindDO>() |
|
22 |
.eq(SocialUserBindDO::getUserType, userType) |
|
23 |
.eq(SocialUserBindDO::getSocialUserId, socialUserId)); |
|
24 |
} |
|
25 |
|
|
26 |
default SocialUserBindDO selectByUserTypeAndSocialUserId(Integer userType, Long socialUserId) { |
|
27 |
return selectOne(SocialUserBindDO::getUserType, userType, |
|
28 |
SocialUserBindDO::getSocialUserId, socialUserId); |
|
29 |
} |
|
30 |
|
|
31 |
default List<SocialUserBindDO> selectListByUserIdAndUserType(Long userId, Integer userType) { |
|
32 |
return selectList(new LambdaQueryWrapperX<SocialUserBindDO>() |
|
33 |
.eq(SocialUserBindDO::getUserId, userId) |
|
34 |
.eq(SocialUserBindDO::getUserType, userType)); |
|
35 |
} |
|
36 |
|
|
37 |
default SocialUserBindDO selectByUserIdAndUserTypeAndSocialType(Long userId, Integer userType, Integer socialType) { |
|
38 |
return selectOne(new LambdaQueryWrapperX<SocialUserBindDO>() |
|
39 |
.eq(SocialUserBindDO::getUserId, userId) |
|
40 |
.eq(SocialUserBindDO::getUserType, userType) |
|
41 |
.eq(SocialUserBindDO::getSocialType, socialType)); |
|
42 |
} |
|
43 |
|
|
44 |
} |