YgglAttaZcxxbMapper.xml 5.76 KB
Newer Older
yuquan.zhu 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 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 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
<?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.yggl.YgglAttaZcxxbMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.yggl.YgglAttaZcxxb" >
        	<id column="id" property="id" />
                <result column="Id" property="id" />
                <result column="emp_num" property="empNum" />
                <result column="zc_name" property="zcName" />
                <result column="zc_type" property="zcType" />
                <result column="time" property="time" />
                <result column="zcpdjg" property="zcpdjg" />
                <result column="zczs_id" property="zczsId" />
                <result column="is_zgzc" property="isZgzc" />
                <result column="zc_remark" property="zcRemark" />
                <result column="org_code" property="orgCode" />
    </resultMap>

    <sql id="Base_Column_List">
                Id,
                emp_num,
                zc_name,
                zc_type,
                time,
                zcpdjg,
                zczs_id,
                is_zgzc,
                zc_remark,
                org_code
    </sql>
    
    <sql id="Base_Column_List_Alias">
                Id YgglAttaZcxxb_Id,
                emp_num YgglAttaZcxxb_emp_num,
                zc_name YgglAttaZcxxb_zc_name,
                zc_type YgglAttaZcxxb_zc_type,
                time YgglAttaZcxxb_time,
                zcpdjg YgglAttaZcxxb_zcpdjg,
                zczs_id YgglAttaZcxxb_zczs_id,
                is_zgzc YgglAttaZcxxb_is_zgzc,
                zc_remark YgglAttaZcxxb_zc_remark,
                org_code YgglAttaZcxxb_org_code
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.yggl.YgglAttaZcxxb">
        INSERT INTO yggl_atta_zcxxb
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != id'>
                        Id,
                        </if>
                        <if test ='null != empNum'>
                        emp_num,
                        </if>
                        <if test ='null != zcName'>
                        zc_name,
                        </if>
                        <if test ='null != zcType'>
                        zc_type,
                        </if>
                        <if test ='null != time'>
                        time,
                        </if>
                        <if test ='null != zcpdjg'>
                        zcpdjg,
                        </if>
                        <if test ='null != zczsId'>
                        zczs_id,
                        </if>
                        <if test ='null != isZgzc'>
                        is_zgzc,
                        </if>
                        <if test ='null != zcRemark'>
                        zc_remark,
                        </if>
                        <if test ='null != orgCode'>
                        org_code
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != id'>
                        #{id},
                        </if>
                        <if test ='null != empNum'>
                        #{empNum},
                        </if>
                        <if test ='null != zcName'>
                        #{zcName},
                        </if>
                        <if test ='null != zcType'>
                        #{zcType},
                        </if>
                        <if test ='null != time'>
                        #{time},
                        </if>
                        <if test ='null != zcpdjg'>
                        #{zcpdjg},
                        </if>
                        <if test ='null != zczsId'>
                        #{zczsId},
                        </if>
                        <if test ='null != isZgzc'>
                        #{isZgzc},
                        </if>
                        <if test ='null != zcRemark'>
                        #{zcRemark},
                        </if>
                        <if test ='null != orgCode'>
                        #{orgCode}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.yggl.YgglAttaZcxxb">
        UPDATE yggl_atta_zcxxb
        <set>
                    <if test ='null != id'>Id = #{id},</if>
                    <if test ='null != empNum'>emp_num = #{empNum},</if>
                    <if test ='null != zcName'>zc_name = #{zcName},</if>
                    <if test ='null != zcType'>zc_type = #{zcType},</if>
                    <if test ='null != time'>time = #{time},</if>
                    <if test ='null != zcpdjg'>zcpdjg = #{zcpdjg},</if>
                    <if test ='null != zczsId'>zczs_id = #{zczsId},</if>
                    <if test ='null != isZgzc'>is_zgzc = #{isZgzc},</if>
                    <if test ='null != zcRemark'>zc_remark = #{zcRemark},</if>
                    <if test ='null != orgCode'>org_code = #{orgCode}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>