<?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.willalp.yiqing.mapper.HsYiqingUserQueResultMapper">

    <resultMap type="com.willalp.yiqing.domain.HsYiqingUserQueResult" id="HsYiqingUserQueResultResult">
                    <result property="id" column="id"/>
                    <result property="yqUserId" column="yq_user_id"/>
                    <result property="yqQueId" column="yq_que_id"/>
                    <result property="queResultText" column="que_result_text"/>
                    <result property="isDelete" column="is_delete"/>
                    <result property="createBy" column="create_by"/>
                    <result property="createTime" column="create_time"/>
                    <result property="updateBy" column="update_by"/>
                    <result property="updateTime" column="update_time"/>
                    <result property="remark" column="remark"/>
            </resultMap>
    
    <sql id="selectHsYiqingUserQueResultVo">
        select id, yq_user_id, yq_que_id, que_result_text, is_delete, create_by, create_time, update_by, update_time, remark        from hs_yiqing_user_que_result
    </sql>

    <select id="selectHsYiqingUserQueResultList" parameterType="HsYiqingUserQueResult" resultMap="HsYiqingUserQueResultResult">
        <include refid="selectHsYiqingUserQueResultVo"/>
        <where>
            is_delete = 0
                                                                                                    <if test="yqUserId != null  and yqUserId != ''">
                            and yq_user_id = #{yqUserId}
                        </if>
                                                                                                            <if test="yqQueId != null  and yqQueId != ''">
                            and yq_que_id = #{yqQueId}
                        </if>
                                                                                                            <if test="queResultText != null  and queResultText != ''">
                            and que_result_text = #{queResultText}
                        </if>
                                                                                                            <if test="isDelete != null ">
                            and is_delete = #{isDelete}
                        </if>
                                                                                                                                                                                                    </where>
    </select>
</mapper>
