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

import com.rf.psychological.miniapp.praise.model.PraiseEntity;

import java.util.List;
import java.util.Map;

/**
 * @Description:点赞接口
 * @Author: mimang
 * @Date: 2023/5/26
 */
public interface PraiseService {


    /**
     * 保存点赞数据
     * @param entity
     * @return
     */
    PraiseEntity save(PraiseEntity entity);

    /**
     * 获取该量表或认知任务的点赞数据
     * @param businessId
     * @return
     */
    List<Map> queryByBusinessId(String businessId);

    PraiseEntity findById(String id);

    /**
     * 取消点赞
     * @param entity
     * @return
     */
    PraiseEntity cancel(PraiseEntity entity);

    PraiseEntity isPraise(String businessId, String userId, String type);
    PraiseEntity isPraise(String businessId, String userId);
}
