package com.ruoyi.web.work.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.web.work.domain.StatementDetail;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

/**
 * @author lsw
 * @date 2024-04-20
 */
public interface StatementDetailMapper extends BaseMapper<StatementDetail> {
    List<StatementDetail> selectList(StatementDetail statementDetail);


    @Update("UPDATE tb_statement_detail  SET state = 1 WHERE statement_id =#{statementId}")
    boolean updateState(@Param("statementId") Long statementId);

    @Select("SELECT * FROM tb_statement_detail WHERE id_card=#{idCard} AND statement_id=#{statementId}")
    StatementDetail check(StatementDetail statementDetail);
}
