| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- <?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.com.goldenwater.dcproj.dao.ErrorDao">
- <resultMap type="cn.com.goldenwater.dcproj.model.Error" id="errorResultMap">
- <result property="id" column="ID"/>
- <result property="intm" column="INTM"/>
- <result property="content" column="CONTENT"/>
- <result property="url" column="URL"/>
- </resultMap>
-
- <sql id="table_columns">
- ID,
- INTM,
- CONTENT,
- URL
- </sql>
- <sql id="entity_properties">
- #{id},
- #{intm},
- #{content},
- #{url}
- </sql>
- <!-- 使用like用法:columnName like concat('%',#columnName#,'%') -->
- <sql id="page_where">
- <trim prefix="where" prefixOverrides="and | or ">
- <if test="intm != null">and INTM = #{intm}</if>
- <if test="content != null and content != ''">and CONTENT = #{content}</if>
- <if test="url != null and url != ''">and URL = #{url}</if>
- </trim>
- </sql>
- <select id="get" resultMap="errorResultMap" parameterType="String" >
- select <include refid="table_columns" /> from GW_SYS_ERROR where ID = #{id}
- </select>
- <select id="getBy" resultMap="errorResultMap">
- select <include refid="table_columns" /> from GW_SYS_ERROR <include refid="page_where" />
- </select>
- <select id="findAll" resultMap="errorResultMap">
- select <include refid="table_columns" /> from GW_SYS_ERROR
- </select>
- <select id="findList" resultMap="errorResultMap">
- select <include refid="table_columns" /> from GW_SYS_ERROR <include refid="page_where" />
- </select>
- <select id="selectCount" resultType="int" >
- select count(ID) from GW_SYS_ERROR <include refid="page_where" />
- </select>
- <insert id="insert" parameterType="cn.com.goldenwater.dcproj.model.Error">
- insert into GW_SYS_ERROR( <include refid="table_columns" /> )
- values ( <include refid="entity_properties" /> )
- </insert>
- <delete id="delete" parameterType="java.lang.String">
- delete from GW_SYS_ERROR where ID = #{id}
- </delete>
- <delete id="deleteBy" parameterType="cn.com.goldenwater.dcproj.model.Error">
- delete from GW_SYS_ERROR <include refid="page_where" />
- </delete>
- <update id="deleteInFlag" parameterType="java.lang.String">
- update GW_SYS_ERROR set flag_valid = 0 where ID = #{id}
- </update>
- <update id="update" parameterType="cn.com.goldenwater.dcproj.model.Error">
- update GW_SYS_ERROR
- <trim prefix="set" suffixOverrides=",">
- <if test="intm != null">INTM = #{intm},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="url != null and url != ''">URL = #{url},</if>
- </trim>
- <where>ID = #{id}</where>
- </update>
- <update id="updateBy" parameterType="cn.com.goldenwater.dcproj.model.Error">
- update GW_SYS_ERROR
- <trim prefix="set" suffixOverrides=",">
- <if test="intm != null">INTM = #{intm},</if>
- <if test="content != null and content != ''">CONTENT = #{content},</if>
- <if test="url != null and url != ''">URL = #{url},</if>
- </trim>
- <include refid="page_where" />
- </update>
- <!-- 其他自定义SQL -->
- </mapper>
|