TProAppInforBrowseMapper.xml 13.7 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 29 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
<?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.TProAppInforBrowseMapper">
    
    <resultMap type="TProAppInforBrowse" id="TProAppInforBrowseResult">
        <result property="fProAppInforId"    column="f_pro_app_infor_id"    />
        <result property="fCode"    column="f_code"    />
        <result property="fName"    column="f_name"    />
        <result property="fIdNo"    column="f_id_no"    />
        <result property="fSex"    column="f_sex"    />
        <result property="fBirthday"    column="f_birthday"    />
        <result property="fEmail"    column="f_email"    />
        <result property="fPhone"    column="f_phone"    />
        <result property="fEducation"    column="f_education"    />
        <result property="fGraduationSchool"    column="f_graduation_school"    />
        <result property="fMajor"    column="f_major"    />
        <result property="fGraduationTime"    column="f_graduation_time"    />
        <result property="fEntUuid"    column="f_ent_uuid"    />
        <result property="fWorkUnit"    column="f_work_unit"    />
        <result property="fWorkTime"    column="f_work_time"    />
        <result property="fDepartment"    column="f_department"    />
        <result property="fDuties"    column="f_duties"    />
        <result property="fMajorTitle"    column="f_major_title"    />
        <result property="fMajorNow"    column="f_major_now"    />
        <result property="fMajorLife"    column="f_major_life"    />
        <result property="fGasType"    column="f_gas_type"    />
        <result property="fGoodArea"    column="f_good_area"    />
        <result property="fLearningWorkExperience"    column="f_learning_work_experience"    />
        <result property="fArea"    column="f_area"    />
        <result property="fDeleteFlag"    column="f_delete_flag"    />
        <result property="fCRecord"    column="f_c_record"    />
        <result property="fPRecord"    column="f_p_record"    />
        <result property="fPicture"    column="f_picture"    />
        <result property="fUpdateTime"    column="f_update_time"    />
        <result property="fThisProvinceFlag"    column="f_this_province_flag"    />
        <result property="fValidType"    column="f_valid_type"    />
        <result property="fEmployBatch"    column="f_employ_batch"    />
    </resultMap>

    <sql id="selectTProAppInforBrowseVo">
        select f_pro_app_infor_id, f_code, f_name, f_id_no, f_sex, f_birthday, f_email, f_phone, f_education, f_graduation_school, f_major, f_graduation_time, f_ent_uuid, f_work_unit, f_work_time, f_department, f_duties, f_major_title, f_major_now, f_major_life, f_gas_type, f_good_area, f_learning_work_experience, f_area, f_delete_flag, f_c_record, f_p_record, f_picture, f_update_time, f_this_province_flag, f_valid_type, f_employ_batch from t_pro_app_infor_browse
    </sql>

    <select id="selectTProAppInforBrowseList" parameterType="TProAppInforBrowse" resultMap="TProAppInforBrowseResult">
        <include refid="selectTProAppInforBrowseVo"/>
        <where>  
            <if test="fCode != null  and fCode != ''"> and f_code like concat('%', #{fCode}, '%')</if>
            <if test="fName != null  and fName != ''"> and f_name like concat('%', #{fName}, '%')</if>
            <if test="fIdNo != null  and fIdNo != ''"> and f_id_no like concat('%', #{fIdNo}, '%')</if>
            <if test="fPhone != null  and fPhone != ''"> and f_phone like concat('%', #{fPhone}, '%')</if>
            <if test="fThisProvinceFlag != null  and fThisProvinceFlag != ''"> and f_this_province_flag = #{fThisProvinceFlag}</if>
            <if test="fValidType != null "> and f_valid_type = #{fValidType}</if>
        </where>
耿迪迪's avatar
耿迪迪 committed
56
        ORDER BY f_update_time DESC
耿迪迪's avatar
耿迪迪 committed
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 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
    </select>
    
    <select id="selectTProAppInforBrowseById" parameterType="Long" resultMap="TProAppInforBrowseResult">
        <include refid="selectTProAppInforBrowseVo"/>
        where f_pro_app_infor_id = #{fProAppInforId}
    </select>
        
    <insert id="insertTProAppInforBrowse" parameterType="TProAppInforBrowse" useGeneratedKeys="true" keyProperty="fProAppInforId">
        insert into t_pro_app_infor_browse
        <trim prefix="(" suffix=")" suffixOverrides=",">
            <if test="fCode != null and fCode != ''">f_code,</if>
            <if test="fName != null and fName != ''">f_name,</if>
            <if test="fIdNo != null and fIdNo != ''">f_id_no,</if>
            <if test="fSex != null">f_sex,</if>
            <if test="fBirthday != null">f_birthday,</if>
            <if test="fEmail != null">f_email,</if>
            <if test="fPhone != null and fPhone != ''">f_phone,</if>
            <if test="fEducation != null">f_education,</if>
            <if test="fGraduationSchool != null">f_graduation_school,</if>
            <if test="fMajor != null and fMajor != ''">f_major,</if>
            <if test="fGraduationTime != null">f_graduation_time,</if>
            <if test="fEntUuid != null">f_ent_uuid,</if>
            <if test="fWorkUnit != null">f_work_unit,</if>
            <if test="fWorkTime != null">f_work_time,</if>
            <if test="fDepartment != null">f_department,</if>
            <if test="fDuties != null">f_duties,</if>
            <if test="fMajorTitle != null and fMajorTitle != ''">f_major_title,</if>
            <if test="fMajorNow != null and fMajorNow != ''">f_major_now,</if>
            <if test="fMajorLife != null">f_major_life,</if>
            <if test="fGasType != null and fGasType != ''">f_gas_type,</if>
            <if test="fGoodArea != null and fGoodArea != ''">f_good_area,</if>
            <if test="fLearningWorkExperience != null">f_learning_work_experience,</if>
            <if test="fArea != null and fArea != ''">f_area,</if>
            <if test="fDeleteFlag != null">f_delete_flag,</if>
            <if test="fCRecord != null">f_c_record,</if>
            <if test="fPRecord != null">f_p_record,</if>
            <if test="fPicture != null">f_picture,</if>
            <if test="fUpdateTime != null">f_update_time,</if>
            <if test="fThisProvinceFlag != null">f_this_province_flag,</if>
            <if test="fValidType != null">f_valid_type,</if>
            <if test="fEmployBatch != null">f_employ_batch,</if>
         </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
            <if test="fCode != null and fCode != ''">#{fCode},</if>
            <if test="fName != null and fName != ''">#{fName},</if>
            <if test="fIdNo != null and fIdNo != ''">#{fIdNo},</if>
            <if test="fSex != null">#{fSex},</if>
            <if test="fBirthday != null">#{fBirthday},</if>
            <if test="fEmail != null">#{fEmail},</if>
            <if test="fPhone != null and fPhone != ''">#{fPhone},</if>
            <if test="fEducation != null">#{fEducation},</if>
            <if test="fGraduationSchool != null">#{fGraduationSchool},</if>
            <if test="fMajor != null and fMajor != ''">#{fMajor},</if>
            <if test="fGraduationTime != null">#{fGraduationTime},</if>
            <if test="fEntUuid != null">#{fEntUuid},</if>
            <if test="fWorkUnit != null">#{fWorkUnit},</if>
            <if test="fWorkTime != null">#{fWorkTime},</if>
            <if test="fDepartment != null">#{fDepartment},</if>
            <if test="fDuties != null">#{fDuties},</if>
            <if test="fMajorTitle != null and fMajorTitle != ''">#{fMajorTitle},</if>
            <if test="fMajorNow != null and fMajorNow != ''">#{fMajorNow},</if>
            <if test="fMajorLife != null">#{fMajorLife},</if>
            <if test="fGasType != null and fGasType != ''">#{fGasType},</if>
            <if test="fGoodArea != null and fGoodArea != ''">#{fGoodArea},</if>
            <if test="fLearningWorkExperience != null">#{fLearningWorkExperience},</if>
            <if test="fArea != null and fArea != ''">#{fArea},</if>
            <if test="fDeleteFlag != null">#{fDeleteFlag},</if>
            <if test="fCRecord != null">#{fCRecord},</if>
            <if test="fPRecord != null">#{fPRecord},</if>
            <if test="fPicture != null">#{fPicture},</if>
            <if test="fUpdateTime != null">#{fUpdateTime},</if>
            <if test="fThisProvinceFlag != null">#{fThisProvinceFlag},</if>
            <if test="fValidType != null">#{fValidType},</if>
            <if test="fEmployBatch != null">#{fEmployBatch},</if>
         </trim>
    </insert>

    <update id="updateTProAppInforBrowse" parameterType="TProAppInforBrowse">
        update t_pro_app_infor_browse
        <trim prefix="SET" suffixOverrides=",">
            <if test="fCode != null and fCode != ''">f_code = #{fCode},</if>
            <if test="fName != null and fName != ''">f_name = #{fName},</if>
            <if test="fIdNo != null and fIdNo != ''">f_id_no = #{fIdNo},</if>
            <if test="fSex != null">f_sex = #{fSex},</if>
            <if test="fBirthday != null">f_birthday = #{fBirthday},</if>
            <if test="fEmail != null">f_email = #{fEmail},</if>
            <if test="fPhone != null and fPhone != ''">f_phone = #{fPhone},</if>
            <if test="fEducation != null">f_education = #{fEducation},</if>
            <if test="fGraduationSchool != null">f_graduation_school = #{fGraduationSchool},</if>
            <if test="fMajor != null and fMajor != ''">f_major = #{fMajor},</if>
            <if test="fGraduationTime != null">f_graduation_time = #{fGraduationTime},</if>
            <if test="fEntUuid != null">f_ent_uuid = #{fEntUuid},</if>
            <if test="fWorkUnit != null">f_work_unit = #{fWorkUnit},</if>
            <if test="fWorkTime != null">f_work_time = #{fWorkTime},</if>
            <if test="fDepartment != null">f_department = #{fDepartment},</if>
            <if test="fDuties != null">f_duties = #{fDuties},</if>
            <if test="fMajorTitle != null and fMajorTitle != ''">f_major_title = #{fMajorTitle},</if>
            <if test="fMajorNow != null and fMajorNow != ''">f_major_now = #{fMajorNow},</if>
            <if test="fMajorLife != null">f_major_life = #{fMajorLife},</if>
            <if test="fGasType != null and fGasType != ''">f_gas_type = #{fGasType},</if>
            <if test="fGoodArea != null and fGoodArea != ''">f_good_area = #{fGoodArea},</if>
            <if test="fLearningWorkExperience != null">f_learning_work_experience = #{fLearningWorkExperience},</if>
            <if test="fArea != null and fArea != ''">f_area = #{fArea},</if>
            <if test="fDeleteFlag != null">f_delete_flag = #{fDeleteFlag},</if>
            <if test="fCRecord != null">f_c_record = #{fCRecord},</if>
            <if test="fPRecord != null">f_p_record = #{fPRecord},</if>
            <if test="fPicture != null">f_picture = #{fPicture},</if>
            <if test="fUpdateTime != null">f_update_time = #{fUpdateTime},</if>
            <if test="fThisProvinceFlag != null">f_this_province_flag = #{fThisProvinceFlag},</if>
            <if test="fValidType != null">f_valid_type = #{fValidType},</if>
            <if test="fEmployBatch != null">f_employ_batch = #{fEmployBatch},</if>
        </trim>
        where f_pro_app_infor_id = #{fProAppInforId}
    </update>

    <delete id="deleteTProAppInforBrowseById" parameterType="Long">
        delete from t_pro_app_infor_browse where f_pro_app_infor_id = #{fProAppInforId}
    </delete>

    <delete id="deleteTProAppInforBrowseByIds" parameterType="String">
        delete from t_pro_app_infor_browse where f_pro_app_infor_id in 
        <foreach item="fProAppInforId" collection="array" open="(" separator="," close=")">
            #{fProAppInforId}
        </foreach>
    </delete>
182

耿迪迪's avatar
耿迪迪 committed
183
    <insert id="batchInsertTProAppInforBrowse" parameterType="TProAppInforBrowse" useGeneratedKeys="true" keyProperty="fProAppInforId">
184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253
        insert into t_pro_app_infor_browse
        (
            f_code,
            f_name,
            f_id_no,
            f_sex,
            f_birthday,
            f_email,
            f_phone,
            f_education,
            f_graduation_school,
            f_major,
            f_graduation_time,
            f_ent_uuid,
            f_work_unit,
            f_work_time,
            f_department,
            f_duties,
            f_major_title,
            f_major_now,
            f_major_life,
            f_gas_type,
            f_good_area,
            f_learning_work_experience,
            f_area,
            f_delete_flag,
            f_c_record,
            f_p_record,
            f_picture,
            f_update_time,
            f_this_province_flag,
            f_valid_type,
            f_employ_batch
        )VALUES
        <foreach collection="list" separator="," item="item">
            (
                #{item.fCode},
                #{item.fName},
                #{item.fIdNo},
                #{item.fSex},
                #{item.fBirthday},
                #{item.fEmail},
                #{item.fPhone},
                #{item.fEducation},
                #{item.fGraduationSchool},
                #{item.fMajor},
                #{item.fGraduationTime},
                #{item.fEntUuid},
                #{item.fWorkUnit},
                #{item.fWorkTime},
                #{item.fDepartment},
                #{item.fDuties},
                #{item.fMajorTitle},
                #{item.fMajorNow},
                #{item.fMajorLife},
                #{item.fGasType},
                #{item.fGoodArea},
                #{item.fLearningWorkExperience},
                #{item.fArea},
                #{item.fDeleteFlag},
                #{item.fCRecord},
                #{item.fPRecord},
                #{item.fPicture},
                #{item.fUpdateTime},
                #{item.fThisProvinceFlag},
                #{item.fValidType},
                #{item.fEmployBatch}
            )
        </foreach>
    </insert>
耿迪迪's avatar
耿迪迪 committed
254
</mapper>