package shop.alien.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import shop.alien.entity.store.StoreCommentAppealLog;
import shop.alien.entity.store.vo.StoreCommentAppealLogVo;

import java.util.List;

/**
 * 评论申诉流程记录表 Mapper 接口
 *
 * @author ssk
 * @since 2025-01-02
 */
public interface StoreCommentAppealLogMapper extends BaseMapper<StoreCommentAppealLog> {

    /**
     * 申诉记录
     *
     * @param appealId 申诉id
     * @return List<StoreCommentAppealLogVo>
     */
    @Select("select a.*, b.dict_detail process_type_str from store_comment_appeal_log a " +
            "left join store_dictionary b on a.process_Type = b.dict_id and b.type_name = 'processType' " +
            "where a.delete_flag = 0 and a.appeal_id = #{appealId}")
    List<StoreCommentAppealLogVo> getStoreCommentAppealLogVo(Integer appealId);

}
