12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <?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.ematou.wxbase.mapper.OperationRecordMapper">
- <sql id="Base_Column_List">
- op_id, app_code, creater_sn, create_time, moder_sn, mod_time, tstm
- </sql>
- <insert id="insertRecord" parameterType="com.ematou.wxbase.entity.OperationRecord">
- insert into wxoperation_record
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="record.appCode != null">
- app_code,
- </if>
- <if test="record.createrSn != null">
- creater_sn,
- </if>
- <if test="record.createTime != null">
- create_time,
- </if>
- <if test="record.moderSn != null">
- moder_sn,
- </if>
- <if test="record.modTime != null">
- mod_time,
- </if>
- <if test="record.tstm != null">
- tstm,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="record.appCode != null">
- #{record.appCode},
- </if>
- <if test="record.createrSn != null">
- #{record.createrSn},
- </if>
- <if test="record.createTime != null">
- #{record.createTime,jdbcType=VARCHAR},
- </if>
- <if test="record.moderSn != null">
- #{record.moderSn},
- </if>
- <if test="record.modTime != null">
- #{record.modTime,jdbcType=VARCHAR},
- </if>
- <if test="record.tstm != null">
- #{record.tstm},
- </if>
- </trim>
- </insert>
- <select id="queryAll" resultType="com.ematou.wxbase.entity.OperationRecord" parameterType="map">
- select
- <include refid="Base_Column_List"/>
- from wx_operation_record
- <if test="param.containsKey('order')">
- order by #{param.order}
- </if>
- <if test="param.containsKey('page') and param.containsKey('limit')">
- limit #{param.page},#{param.limit}
- </if>
- <if test="param.containsKey('page') == false and param.containsKey('limit')">
- limit #{param.limit}
- </if>
- </select>
- </mapper>
|