FProBehInforMapper.xml 4.48 KB
Newer Older
耿迪迪's avatar
耿迪迪 committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
<?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.zehong.system.mapper.FProBehInforMapper">
    
    <resultMap type="FProBehInfor" id="FProBehInforResult">
        <result property="fProBehInforId"    column="f_pro_beh_infor_id"    />
        <result property="fIdNo"    column="f_id_no"    />
        <result property="fExpertEval"    column="f_expert_eval"    />
        <result property="fSelectionEvent"    column="f_selection_event"    />
        <result property="fSelectionStartTime"    column="f_selection_start_time"    />
        <result property="fScorDesc"    column="f_scor_desc"    />
        <result property="fUpdateTime"    column="f_update_time"    />
        <result property="fRepStatus"    column="f_rep_status"    />
        <result property="fRepDate"    column="f_rep_date"    />
    </resultMap>

    <sql id="selectFProBehInforVo">
        select f_pro_beh_infor_id, f_id_no, f_expert_eval, f_selection_event, f_selection_start_time, f_scor_desc, f_update_time, f_rep_status, f_rep_date from f_pro_beh_infor
    </sql>

    <select id="selectFProBehInforList" parameterType="FProBehInfor" resultMap="FProBehInforResult">
        <include refid="selectFProBehInforVo"/>
        <where>  
            <if test="fIdNo != null  and fIdNo != ''"> and f_id_no like concat('%', #{fIdNo}, '%')</if>
            <if test="fRepStatus != null "> and f_rep_status = #{fRepStatus}</if>
        </where>
耿迪迪's avatar
耿迪迪 committed
29
        ORDER BY f_update_time DESC
耿迪迪's avatar
耿迪迪 committed
30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86
    </select>
    
    <select id="selectFProBehInforById" parameterType="Long" resultMap="FProBehInforResult">
        <include refid="selectFProBehInforVo"/>
        where f_pro_beh_infor_id = #{fProBehInforId}
    </select>
        
    <insert id="insertFProBehInfor" parameterType="FProBehInfor" useGeneratedKeys="true" keyProperty="fProBehInforId">
        insert into f_pro_beh_infor
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="fIdNo != null and fIdNo != ''">f_id_no,</if>
            <if test="fExpertEval != null and fExpertEval != ''">f_expert_eval,</if>
            <if test="fSelectionEvent != null">f_selection_event,</if>
            <if test="fSelectionStartTime != null">f_selection_start_time,</if>
            <if test="fScorDesc != null">f_scor_desc,</if>
            <if test="fUpdateTime != null">f_update_time,</if>
            <if test="fRepStatus != null">f_rep_status,</if>
            <if test="fRepDate != null">f_rep_date,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="fIdNo != null and fIdNo != ''">#{fIdNo},</if>
            <if test="fExpertEval != null and fExpertEval != ''">#{fExpertEval},</if>
            <if test="fSelectionEvent != null">#{fSelectionEvent},</if>
            <if test="fSelectionStartTime != null">#{fSelectionStartTime},</if>
            <if test="fScorDesc != null">#{fScorDesc},</if>
            <if test="fUpdateTime != null">#{fUpdateTime},</if>
            <if test="fRepStatus != null">#{fRepStatus},</if>
            <if test="fRepDate != null">#{fRepDate},</if>
         </trim>
    </insert>

    <update id="updateFProBehInfor" parameterType="FProBehInfor">
        update f_pro_beh_infor
        <trim prefix="SET" suffixOverrides=",">
            <if test="fIdNo != null and fIdNo != ''">f_id_no = #{fIdNo},</if>
            <if test="fExpertEval != null and fExpertEval != ''">f_expert_eval = #{fExpertEval},</if>
            <if test="fSelectionEvent != null">f_selection_event = #{fSelectionEvent},</if>
            <if test="fSelectionStartTime != null">f_selection_start_time = #{fSelectionStartTime},</if>
            <if test="fScorDesc != null">f_scor_desc = #{fScorDesc},</if>
            <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
            <if test="fRepStatus != null">f_rep_status = #{fRepStatus},</if>
            <if test="fRepDate != null">f_rep_date = #{fRepDate},</if>
        </trim>
        where f_pro_beh_infor_id = #{fProBehInforId}
    </update>

    <delete id="deleteFProBehInforById" parameterType="Long">
        delete from f_pro_beh_infor where f_pro_beh_infor_id = #{fProBehInforId}
    </delete>

    <delete id="deleteFProBehInforByIds" parameterType="String">
        delete from f_pro_beh_infor where f_pro_beh_infor_id in 
        <foreach item="fProBehInforId" collection="array" open="(" separator="," close=")">
            #{fProBehInforId}
        </foreach>
    </delete>
</mapper>