<?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="org.springblade.modules.mdjfpj.mapper.PjMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="pjResultMap" type="org.springblade.modules.mdjfpj.entity.PjEntity">
        <result column="id" property="id"/>
        <result column="jf_id" property="jfId"/>
        <result column="tj_id" property="tjId"/>
        <result column="jfry_id" property="jfryId"/>
        <result column="jfpj" property="jfpj"/>
        <result column="yfry_id" property="yfryId"/>
        <result column="yfpj" property="yfpj"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>


    <select id="selectPjPage" resultMap="pjResultMap">
        select * from mdjf_pj where is_deleted = 0
    </select>


    <select id="exportPj" resultType="org.springblade.modules.mdjfpj.excel.PjExcel">
        SELECT * FROM mdjf_pj ${ew.customSqlSegment}
    </select>

    <insert id="saveMdjfPjJl">
        INSERT INTO jdrh.mdjf_pj_new
        (id, jf_id, tj_id, ry_id, pj, create_user, create_dept, create_time, update_user, update_time, status, is_deleted)
        VALUES(#{id},
            #{jfId},
            #{tjId},
            #{ryId},
            #{pj},
            #{createUser},
            #{createDept},
            #{createTime},
            #{updateUser},
            #{updateTime},
            #{status},
            #{isDeleted});
    </insert>
</mapper>
