SpmkExecutorMapper.xml 5.56 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
<?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="cn.timer.api.dao.spmk.SpmkExecutorMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.spmk.SpmkExecutor" >
                <id column="id" property="id" />
                <result column="approve_execute_record_id" property="approveExecuteRecordId" />
                <result column="emp_num" property="empNum" />
                <result column="executor_name" property="executorName" />
                <result column="operator_header_url" property="operatorHeaderUrl" />
                <result column="opinion" property="opinion" />
                <result column="sts" property="sts" />
                <result column="create_time" property="createTime" />
15
                <result column="update_time" property="updateTime" />
16
                <result column="signature_img" property="signatureImg" />
17 18 19 20 21 22 23 24 25 26
    </resultMap>

    <sql id="Base_Column_List">
                id,
                approve_execute_record_id,
                emp_num,
                executor_name,
                operator_header_url,
                opinion,
                sts,
27
                create_time,
28 29
                update_time,
                signature_img,
30 31 32 33 34 35 36 37 38 39
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id SpmkExecutor_id,
                approve_execute_record_id SpmkExecutor_approve_execute_record_id,
                emp_num SpmkExecutor_emp_num,
                executor_name SpmkExecutor_executor_name,
                operator_header_url SpmkExecutor_operator_header_url,
                opinion SpmkExecutor_opinion,
                sts SpmkExecutor_sts,
40 41
                create_time SpmkExecutor_create_time,
                update_time SpmkExecutor_update_time
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
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.spmk.SpmkExecutor">
        INSERT INTO spmk_executor
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != approveExecuteRecordId'>
                        approve_execute_record_id,
                        </if>
                        <if test ='null != empNum'>
                        emp_num,
                        </if>
                        <if test ='null != executorName'>
                        executor_name,
                        </if>
                        <if test ='null != operatorHeaderUrl'>
                        operator_header_url,
                        </if>
                        <if test ='null != opinion'>
                        opinion,
                        </if>
                        <if test ='null != sts'>
                        sts,
                        </if>
                        <if test ='null != createTime'>
68 69 70 71
                        create_time,
                        </if>
                        <if test ='null != updateTime'>
                        update_time
72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != approveExecuteRecordId'>
                        #{approveExecuteRecordId},
                        </if>
                        <if test ='null != empNum'>
                        #{empNum},
                        </if>
                        <if test ='null != executorName'>
                        #{executorName},
                        </if>
                        <if test ='null != operatorHeaderUrl'>
                        #{operatorHeaderUrl},
                        </if>
                        <if test ='null != opinion'>
                        #{opinion},
                        </if>
                        <if test ='null != sts'>
                        #{sts},
                        </if>
                        <if test ='null != createTime'>
94 95 96 97
                        #{createTime},
                        </if>
                        <if test ='null != updateTime'>
                        #{updateTime}
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115
                        </if>
        </trim>
    </insert>

    <delete id="delete" >
        DELETE FROM spmk_executor
        WHERE id = #{id}
    </delete>

    <update id="update" parameterType="cn.timer.api.bean.spmk.SpmkExecutor">
        UPDATE spmk_executor
        <set>
                    <if test ='null != approveExecuteRecordId'>approve_execute_record_id = #{approveExecuteRecordId},</if>
                    <if test ='null != empNum'>emp_num = #{empNum},</if>
                    <if test ='null != executorName'>executor_name = #{executorName},</if>
                    <if test ='null != operatorHeaderUrl'>operator_header_url = #{operatorHeaderUrl},</if>
                    <if test ='null != opinion'>opinion = #{opinion},</if>
                    <if test ='null != sts'>sts = #{sts},</if>
116 117
                    <if test ='null != createTime'>create_time = #{createTime},</if>
                    <if test ='null != updateTime'>update_time = #{updateTime}</if>
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
        </set>
        WHERE id = #{id}
    </update>


    <select id="load" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM spmk_executor
        WHERE id = #{id}
    </select>

    <select id="pageList" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM spmk_executor
        LIMIT #{offset}, #{pageSize}
    </select>

    <select id="pageListCount" resultType="java.lang.Integer">
        SELECT count(1)
        FROM spmk_executor
    </select>

	 -->

</mapper>