package cn.hnthyy.thmz.mapper.thmz;

import cn.hnthyy.thmz.entity.thmz.ReqrecRequestRelation;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

public interface ReqrecRequestRelationMapper {
    /**
     * 新增挂号关系
     *
     * @param reqrecRequestRelation
     * @return
     */
    @Insert("INSERT INTO t_reqrec_request_relation(request_id,serial_no,op_date) VALUES (#{requestId,jdbcType=BIGINT}," +
            "#{serialNo,jdbcType=INTEGER},#{opDate,jdbcType=TIMESTAMP})")
    int insertReqrecRequestRelation(ReqrecRequestRelation reqrecRequestRelation);

    /**
     * 根据流水号查询关系记录
     * @param serialNo
     * @return
     */
    @Select("select * from t_reqrec_request_relation where serial_no =#{serialNo,jdbcType=INTEGER}")
    ReqrecRequestRelation selectReqrecRequestRelation(@Param("serialNo") Integer serialNo);
}
