KqglAssoDkjlMapper.xml 10.5 KB
Newer Older
ilal 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
<?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.kqmk.KqglAssoDkjlMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.kqmk.KqglAssoDkjl" >
                <id column="id" property="id" />
                <result column="dktime" property="dktime" />
                <result column="lon" property="lon" />
                <result column="lat" property="lat" />
                <result column="address" property="address" />
                <result column="results" property="results" />
                <result column="user_id" property="userId" />
                <result column="type" property="type" />
                <result column="status" property="status" />
                <result column="sort" property="sort" />
                <result column="card_type" property="cardType" />
                <result column="mac" property="mac" />
                <result column="macname" property="macname" />
                <result column="qyid" property="qyid" />
                <result column="attdate" property="attdate" />
                <result column="attime" property="attime" />
                <result column="dkmxid" property="dkmxid" />
                <result column="bcid" property="bcid" />
                <result column="remarks" property="remarks" />
                <result column="punchmode" property="punchmode" />
                <result column="punchequipment" property="punchequipment" />
lal committed
28
                <result column="commentary" property="commentary" />
ilal committed
29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
    </resultMap>

    <sql id="Base_Column_List">
                id,
                dktime,
                lon,
                lat,
                address,
                results,
                user_id,
                type,
                status,
                sort,
                card_type,
                mac,
                macname,
                qyid,
                attdate,
                attime,
                dkmxid,
                bcid,
                remarks,
                punchmode,
lal committed
52 53
                punchequipment,
                commentary
ilal committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id KqglAssoDkjl_id,
                dktime KqglAssoDkjl_dktime,
                lon KqglAssoDkjl_lon,
                lat KqglAssoDkjl_lat,
                address KqglAssoDkjl_address,
                results KqglAssoDkjl_results,
                user_id KqglAssoDkjl_user_id,
                type KqglAssoDkjl_type,
                status KqglAssoDkjl_status,
                sort KqglAssoDkjl_sort,
                card_type KqglAssoDkjl_card_type,
                mac KqglAssoDkjl_mac,
                macname KqglAssoDkjl_macname,
                qyid KqglAssoDkjl_qyid,
                attdate KqglAssoDkjl_attdate,
                attime KqglAssoDkjl_attime,
                dkmxid KqglAssoDkjl_dkmxid,
                bcid KqglAssoDkjl_bcid,
                remarks KqglAssoDkjl_remarks,
                punchmode KqglAssoDkjl_punchmode,
lal committed
77 78
                punchequipment KqglAssoDkjl_punchequipment,
                commentary KqglAssoDkjl_explain
ilal committed
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
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkjl">
        INSERT INTO kqgl_asso_dkjl
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != dktime'>
                        dktime,
                        </if>
                        <if test ='null != lon'>
                        lon,
                        </if>
                        <if test ='null != lat'>
                        lat,
                        </if>
                        <if test ='null != address'>
                        address,
                        </if>
                        <if test ='null != results'>
                        results,
                        </if>
                        <if test ='null != userId'>
                        user_id,
                        </if>
                        <if test ='null != type'>
                        type,
                        </if>
                        <if test ='null != status'>
                        status,
                        </if>
                        <if test ='null != sort'>
                        sort,
                        </if>
                        <if test ='null != cardType'>
                        card_type,
                        </if>
                        <if test ='null != mac'>
                        mac,
                        </if>
                        <if test ='null != macname'>
                        macname,
                        </if>
                        <if test ='null != qyid'>
                        qyid,
                        </if>
                        <if test ='null != attdate'>
                        attdate,
                        </if>
                        <if test ='null != attime'>
                        attime,
                        </if>
                        <if test ='null != dkmxid'>
                        dkmxid,
                        </if>
                        <if test ='null != bcid'>
                        bcid,
                        </if>
                        <if test ='null != remarks'>
                        remarks,
                        </if>
                        <if test ='null != punchmode'>
                        punchmode,
                        </if>
                        <if test ='null != punchequipment'>
lal committed
144 145 146 147
                        punchequipment,
                        </if>
                        <if test ='null != commentary'>
                        commentary
ilal committed
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 182 183 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
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != dktime'>
                        #{dktime},
                        </if>
                        <if test ='null != lon'>
                        #{lon},
                        </if>
                        <if test ='null != lat'>
                        #{lat},
                        </if>
                        <if test ='null != address'>
                        #{address},
                        </if>
                        <if test ='null != results'>
                        #{results},
                        </if>
                        <if test ='null != userId'>
                        #{userId},
                        </if>
                        <if test ='null != type'>
                        #{type},
                        </if>
                        <if test ='null != status'>
                        #{status},
                        </if>
                        <if test ='null != sort'>
                        #{sort},
                        </if>
                        <if test ='null != cardType'>
                        #{cardType},
                        </if>
                        <if test ='null != mac'>
                        #{mac},
                        </if>
                        <if test ='null != macname'>
                        #{macname},
                        </if>
                        <if test ='null != qyid'>
                        #{qyid},
                        </if>
                        <if test ='null != attdate'>
                        #{attdate},
                        </if>
                        <if test ='null != attime'>
                        #{attime},
                        </if>
                        <if test ='null != dkmxid'>
                        #{dkmxid},
                        </if>
                        <if test ='null != bcid'>
                        #{bcid},
                        </if>
                        <if test ='null != remarks'>
                        #{remarks},
                        </if>
                        <if test ='null != punchmode'>
                        #{punchmode},
                        </if>
                        <if test ='null != punchequipment'>
lal committed
209 210 211 212
                        #{punchequipment},
                        </if>
                        <if test ='null != commentary'>
                        #{commentary}
ilal committed
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
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.kqmk.KqglAssoDkjl">
        UPDATE kqgl_asso_dkjl
        <set>
                    <if test ='null != dktime'>dktime = #{dktime},</if>
                    <if test ='null != lon'>lon = #{lon},</if>
                    <if test ='null != lat'>lat = #{lat},</if>
                    <if test ='null != address'>address = #{address},</if>
                    <if test ='null != results'>results = #{results},</if>
                    <if test ='null != userId'>user_id = #{userId},</if>
                    <if test ='null != type'>type = #{type},</if>
                    <if test ='null != status'>status = #{status},</if>
                    <if test ='null != sort'>sort = #{sort},</if>
                    <if test ='null != cardType'>card_type = #{cardType},</if>
                    <if test ='null != mac'>mac = #{mac},</if>
                    <if test ='null != macname'>macname = #{macname},</if>
                    <if test ='null != qyid'>qyid = #{qyid},</if>
                    <if test ='null != attdate'>attdate = #{attdate},</if>
                    <if test ='null != attime'>attime = #{attime},</if>
                    <if test ='null != dkmxid'>dkmxid = #{dkmxid},</if>
                    <if test ='null != bcid'>bcid = #{bcid},</if>
                    <if test ='null != remarks'>remarks = #{remarks},</if>
                    <if test ='null != punchmode'>punchmode = #{punchmode},</if>
lal committed
244 245
                    <if test ='null != punchequipment'>punchequipment = #{punchequipment},</if>
                    <if test ='null != commentary'>commentary = #{commentary}</if>
ilal committed
246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>