package top.tqx.demo_1.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import top.tqx.demo_1.entity.FAQ;

import java.util.List;

@Mapper
public interface FAQMapper extends BaseMapper<FAQ> {

    List<FAQ> selectByStatus(String status);

    List<FAQ> searchByQuestion(String keyword);

    int updateFrequency(@Param("id") Long id, @Param("frequency") Integer frequency);

    int updateAvgRating(@Param("id") Long id, @Param("avgRating") Double avgRating);
}