<?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.landtool.lanbase.modules.res.dao.Res_TemplateDao">
|
<resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Res_Template">
|
<result column="RTID" property="rtid" jdbcType="INTEGER" />
|
<result column="RTNAME" property="rtname" jdbcType="VARCHAR" />
|
<result column="BUSINESSTYPE" property="businesstype" jdbcType="VARCHAR" />
|
<result column="SCALEMIN" property="scalemin" jdbcType="INTEGER" />
|
<result column="SCALEMAX" property="scalemax" jdbcType="INTEGER" />
|
<result column="PAPERSTYLE" property="paperstyle" jdbcType="VARCHAR" />
|
<result column="PAPERDIRECTION" property="paperdirection" jdbcType="VARCHAR" />
|
<result column="CHARTCONTENT" property="chartcontent" jdbcType="VARCHAR" />
|
<result column="MAPSIZE" property="mapsize" jdbcType="INTEGER" />
|
<result column="TEMPLATETYPE" property="templatetype" jdbcType="VARCHAR" />
|
<result column="TEMPLATEURL" property="templateurl" jdbcType="VARCHAR" />
|
<result column="MAPWIDTH" property="mapwidth" jdbcType="DECIMAL" />
|
<result column="MAPHEIGHT" property="mapheight" jdbcType="DECIMAL" />
|
</resultMap>
|
|
<select id="selectResTemplate" resultMap="BaseResultMap" parameterType="com.landtool.lanbase.modules.res.entity.Res_Template">
|
select * from RES_TEMPLATE
|
<where>
|
<if test="rtname!=null and rtname!=''">
|
rtname like ('%' || #{rtname,jdbcType=VARCHAR} || '%')
|
</if>
|
<if test="businesstype!=null and businesstype!=''">
|
AND businesstype = #{businesstype,jdbcType=VARCHAR}
|
</if>
|
<if test="paperstyle!=null and paperstyle!=''">
|
AND paperstyle = #{paperstyle,jdbcType=VARCHAR}
|
</if>
|
<if test="paperdirection!=null and paperdirection!=''">
|
AND paperdirection = #{paperdirection,jdbcType=VARCHAR}
|
</if>
|
<if test="scalemin!=null and scalemin!=''">
|
AND scalemin = #{scalemin}
|
</if>
|
<if test="scalemax!=null and scalemax!=''">
|
AND scalemax = #{scalemax}
|
</if>
|
<if test="templatetype!=null and templatetype!=''">
|
AND templatetype = #{templatetype}
|
</if>
|
</where>
|
ORDER BY rtid
|
</select>
|
|
<select id="selectResTemplateByRtname" resultMap="BaseResultMap">
|
select * from RES_TEMPLATE WHERE rtname=#{rtname}
|
</select>
|
|
<select id="selectResTemplateByRtId" resultMap="BaseResultMap" parameterType="java.lang.Integer">
|
select * from RES_TEMPLATE where rtid=#{rtid,jdbcType=DECIMAL}
|
</select>
|
|
<insert id="saveResTemplate" parameterType="com.landtool.lanbase.modules.res.entity.Res_Template">
|
insert into RES_TEMPLATE
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="rtname != null">
|
RTNAME,
|
</if>
|
<if test="businesstype != null">
|
BUSINESSTYPE,
|
</if>
|
<if test="scalemin != null">
|
SCALEMIN,
|
</if>
|
<if test="scalemax != null">
|
SCALEMAX,
|
</if>
|
<if test="paperstyle != null">
|
PAPERSTYLE,
|
</if>
|
<if test="paperdirection != null">
|
PAPERDIRECTION,
|
</if>
|
<if test="chartcontent != null">
|
CHARTCONTENT,
|
</if>
|
<if test="mapsize != null">
|
MAPSIZE,
|
</if>
|
<if test="templatetype != null">
|
TEMPLATETYPE,
|
</if>
|
<if test="templateurl != null">
|
TEMPLATEURL,
|
</if>
|
<if test="mapwidth != null">
|
MAPWIDTH,
|
</if>
|
<if test="mapheight != null">
|
MAPHEIGHT,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="rtname != null">
|
#{rtname,jdbcType=VARCHAR},
|
</if>
|
<if test="businesstype != null">
|
#{businesstype,jdbcType=VARCHAR},
|
</if>
|
<if test="scalemin != null">
|
#{scalemin,jdbcType=INTEGER},
|
</if>
|
<if test="scalemax != null">
|
#{scalemax,jdbcType=INTEGER},
|
</if>
|
<if test="paperstyle != null">
|
#{paperstyle,jdbcType=VARCHAR},
|
</if>
|
<if test="paperdirection != null">
|
#{paperdirection,jdbcType=VARCHAR},
|
</if>
|
<if test="chartcontent != null">
|
#{chartcontent,jdbcType=CLOB},
|
</if>
|
<if test="mapsize != null">
|
#{mapsize,jdbcType=INTEGER},
|
</if>
|
<if test="templatetype != null">
|
#{templatetype,jdbcType=VARCHAR},
|
</if>
|
<if test="templateurl != null">
|
#{templateurl,jdbcType=VARCHAR},
|
</if>
|
<if test="mapwidth != null">
|
#{mapwidth,jdbcType=DECIMAL},
|
</if>
|
<if test="mapheight != null">
|
#{mapheight,jdbcType=DECIMAL},
|
</if>
|
</trim>
|
</insert>
|
|
<update id="updateResTemplate" parameterType="com.landtool.lanbase.modules.res.entity.Res_Template">
|
UPDATE RES_TEMPLATE
|
<set>
|
<if test="rtname != null">
|
RTNAME = #{rtname,jdbcType=VARCHAR},
|
</if>
|
<if test="businesstype != null">
|
BUSINESSTYPE = #{businesstype,jdbcType=VARCHAR},
|
</if>
|
<if test="scalemin != null">
|
SCALEMIN = #{scalemin,jdbcType=INTEGER},
|
</if>
|
<if test="scalemax != null">
|
SCALEMAX = #{scalemax,jdbcType=INTEGER},
|
</if>
|
<if test="paperstyle != null">
|
PAPERSTYLE = #{paperstyle,jdbcType=VARCHAR},
|
</if>
|
<if test="paperdirection != null">
|
PAPERDIRECTION = #{paperdirection,jdbcType=VARCHAR},
|
</if>
|
<if test="chartcontent != null">
|
CHARTCONTENT = #{chartcontent,jdbcType=CLOB},
|
</if>
|
<if test="mapsize != null">
|
MAPSIZE = #{mapsize,jdbcType=INTEGER},
|
</if>
|
<if test="templatetype != null">
|
TEMPLATETYPE = #{templatetype,jdbcType=VARCHAR},
|
</if>
|
<if test="templateurl != null">
|
TEMPLATEURL = #{templateurl,jdbcType=VARCHAR},
|
</if>
|
<if test="mapwidth != null">
|
MAPWIDTH = #{mapwidth,jdbcType=DECIMAL},
|
</if>
|
<if test="mapheight != null">
|
MAPHEIGHT = #{mapheight,jdbcType=DECIMAL},
|
</if>
|
</set>
|
WHERE RTID = #{rtid,jdbcType=INTEGER}
|
</update>
|
|
<delete id="deleteResTemplate" parameterType="java.lang.Integer">
|
DELETE FROM RES_TEMPLATE WHERE RTID = #{rtid,jdbcType=INTEGER}
|
</delete>
|
|
</mapper>
|