<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.cool.store.mapper.PreFryApprovalRecordsMapper">
  <resultMap id="BaseResultMap" type="com.cool.store.entity.PreFryApprovalRecordsDO">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="apply_id" jdbcType="BIGINT" property="applyId" />
    <result column="record_type" jdbcType="TINYINT" property="recordType" />
    <result column="operation_status" jdbcType="TINYINT" property="operationStatus" />
    <result column="operator_name" jdbcType="VARCHAR" property="operatorName" />
    <result column="remark" jdbcType="VARCHAR" property="remark" />
    <result column="created_time" jdbcType="TIMESTAMP" property="createdTime" />
    <result column="updated_time" jdbcType="TIMESTAMP" property="updatedTime" />
  </resultMap>

  <!-- 根据申请ID查询审批记录 -->
  <select id="selectByApplyId" resultMap="BaseResultMap">
    SELECT *
    FROM xfsg_pre_fry_approval_records
    WHERE apply_id = #{applyId}
    ORDER BY created_time ASC
  </select>

</mapper>