Update MemberProductCollectionRepository.java

This commit is contained in:
macro 2021-08-24 20:42:35 +08:00
parent a8f0d6fffd
commit 845c4adc99

View File

@ -12,8 +12,23 @@ import java.util.List;
* Created by macro on 2018/8/2.
*/
public interface MemberProductCollectionRepository extends MongoRepository<MemberProductCollection, String> {
/**
* 根据会员ID和商品ID查找记录
*/
MemberProductCollection findByMemberIdAndProductId(Long memberId, Long productId);
/**
* 根据会员ID和商品ID删除记录
*/
int deleteByMemberIdAndProductId(Long memberId, Long productId);
/**
* 根据会员ID分页查询记录
*/
Page<MemberProductCollection> findByMemberId(Long memberId, Pageable pageable);
/**
* 根据会员ID删除录
*/
void deleteAllByMemberId(Long memberId);
}