package com.rf.psychological.miniapp.browse.service;

import com.rf.psychological.miniapp.browse.model.BrowseEntity;
import org.springframework.data.domain.Page;

/**
 * @Description:浏览接口
 * @Author: mimang
 * @Date: 2023/5/16
 */
public interface BrowseService {

    /**
     * 浏览信息保存
     * @param entity
     * @return
     */
    public BrowseEntity save(BrowseEntity entity);

    /**
     * 根据用户ID获取到浏览记录
     * @param userId
     * @param page
     * @param pageSize
     * @return
     */
    Page<BrowseEntity> queryByUserId(String userId, int page, int pageSize);

    /**
     * 根据用户ID删除浏览记录
     * @param id
     */
    void deleteByUserId(String id);

    BrowseEntity findByUserIdAndBusinessId(String userId, String businessId);

    BrowseEntity update(BrowseEntity entity);
}
