<?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.yifu.cloud.plus.v1.yifu.archives.mapper.FeedBackDetailMapper">
	<resultMap id="BaseResultMap" type="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
		<id column="id" jdbcType="VARCHAR" property="id" />
		<result column="FEEDBACK_PERSON" jdbcType="VARCHAR" property="feedbackPerson" />
		<result column="FEEDBACK_TIME" jdbcType="TIMESTAMP" property="feedbackTime" />
		<result column="FEEDBACK_REASON" jdbcType="VARCHAR" property="feedbackReason" />
		<result column="FEEDBACK_DETAIL" jdbcType="VARCHAR" property="feedbackDetail" />
		<result column="APPLY_NO" jdbcType="VARCHAR" property="applyNo" />
		<result column="IS_FEEDBACK" jdbcType="VARCHAR" property="isFeedback" />
		<result column="CONTRACT_ALERT_ID" jdbcType="VARCHAR" property="contractAlertId" />
	</resultMap>
	<sql id="Base_Column_List">
		id, FEEDBACK_PERSON, FEEDBACK_TIME, FEEDBACK_REASON, FEEDBACK_DETAIL, CONTRACT_ALERT_ID
	</sql>

	<select id="getDetail" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
		SELECT *
		FROM feed_back_detail a
		where a.APPLY_NO=#{applyNo}
		order by FEEDBACK_TIME DESC
	</select>

	<select id="getAll" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
		SELECT *
		FROM feed_back_detail a
	</select>
	<select id="findByApplyNo" resultType="com.yifu.cloud.plus.v1.yifu.archives.entity.FeedBackDetail">
		SELECT *
		FROM feed_back_detail a
		where a.APPLY_NO=#{applyNo}
		ORDER BY FEEDBACK_TIME desc LIMIT 1
	</select>
</mapper>
