Update MemberBrandAttentionRepository.java

This commit is contained in:
macro 2021-08-22 10:29:00 +08:00
parent 0e22b919c4
commit a8f0d6fffd

View File

@ -11,9 +11,24 @@ import java.util.List;
* 会员品牌关注Repository * 会员品牌关注Repository
* Created by macro on 2018/8/2. * Created by macro on 2018/8/2.
*/ */
public interface MemberBrandAttentionRepository extends MongoRepository<MemberBrandAttention,String> { public interface MemberBrandAttentionRepository extends MongoRepository<MemberBrandAttention, String> {
/**
* 根据会员ID和品牌ID查找记录
*/
MemberBrandAttention findByMemberIdAndBrandId(Long memberId, Long brandId); MemberBrandAttention findByMemberIdAndBrandId(Long memberId, Long brandId);
int deleteByMemberIdAndBrandId(Long memberId,Long brandId);
/**
* 根据会员ID和品牌ID删除记录
*/
int deleteByMemberIdAndBrandId(Long memberId, Long brandId);
/**
* 根据会员ID分页查找记录
*/
Page<MemberBrandAttention> findByMemberId(Long memberId, Pageable pageable); Page<MemberBrandAttention> findByMemberId(Long memberId, Pageable pageable);
/**
* 根据会员ID删除记录
*/
void deleteAllByMemberId(Long memberId); void deleteAllByMemberId(Long memberId);
} }