mirror of
				https://gitee.com/hhyykk/ipms-sjy.git
				synced 2025-11-04 04:08:43 +08:00 
			
		
		
		
	system:简化 mapper 的实现
This commit is contained in:
		@@ -13,8 +13,7 @@ import java.util.List;
 | 
			
		||||
public interface UserPostMapper extends BaseMapperX<UserPostDO> {
 | 
			
		||||
 | 
			
		||||
    default List<UserPostDO> selectListByUserId(Long userId) {
 | 
			
		||||
        return selectList(new LambdaQueryWrapperX<UserPostDO>()
 | 
			
		||||
                .eq(UserPostDO::getUserId, userId));
 | 
			
		||||
        return selectList(UserPostDO::getUserId, userId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    default void deleteByUserIdAndPostId(Long userId, Collection<Long> postIds) {
 | 
			
		||||
@@ -24,8 +23,7 @@ public interface UserPostMapper extends BaseMapperX<UserPostDO> {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    default List<UserPostDO> selectListByPostIds(Collection<Long> postIds) {
 | 
			
		||||
        return selectList(new LambdaQueryWrapperX<UserPostDO>()
 | 
			
		||||
                .in(UserPostDO::getPostId, postIds));
 | 
			
		||||
        return selectList(UserPostDO::getPostId, postIds);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    default void deleteByUserId(Long userId) {
 | 
			
		||||
 
 | 
			
		||||
@@ -24,9 +24,8 @@ public interface SocialUserBindMapper extends BaseMapperX<SocialUserBindDO> {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    default SocialUserBindDO selectByUserTypeAndSocialUserId(Integer userType, Long socialUserId) {
 | 
			
		||||
        return selectOne(new LambdaQueryWrapperX<SocialUserBindDO>()
 | 
			
		||||
                .eq(SocialUserBindDO::getUserType, userType)
 | 
			
		||||
                .eq(SocialUserBindDO::getSocialUserId, socialUserId));
 | 
			
		||||
        return selectOne(SocialUserBindDO::getUserType, userType,
 | 
			
		||||
                SocialUserBindDO::getSocialUserId, socialUserId);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    default List<SocialUserBindDO> selectListByUserIdAndUserType(Long userId, Integer userType) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user