<?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_EchartsCofingMapper" >
|
<resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" >
|
<id column="EchartsId" property="echartsid" jdbcType="INTEGER" />
|
<result column="EchartsType" property="echartstype" jdbcType="VARCHAR" />
|
<result column="EchartsTitle" property="echartstitle" jdbcType="VARCHAR" />
|
<result column="EchartsUrl" property="echartsUrl" jdbcType="VARCHAR" />
|
<result column="Type" property="type" jdbcType="VARCHAR" />
|
</resultMap>
|
<resultMap id="ResultMapWithBLOBs" type="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" extends="BaseResultMap" >
|
<result column="EchartsOption" property="echartsoption" jdbcType="LONGVARCHAR" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
EchartsId, EchartsType, EchartsTitle,EchartsUrl
|
</sql>
|
<sql id="Blob_Column_List" >
|
EchartsOption
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
,
|
<include refid="Blob_Column_List" />
|
from RES_ECHARTSCOFING
|
where EchartsId = #{echartsid,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
delete from RES_ECHARTSCOFING
|
where EchartsId = #{echartsid,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" >
|
insert into RES_ECHARTSCOFING ( EchartsType, EchartsTitle,
|
EchartsOption)
|
values ( #{echartstype,jdbcType=VARCHAR}, #{echartstitle,jdbcType=VARCHAR},
|
#{echartsoption,jdbcType=LONGVARCHAR})
|
</insert>
|
|
<select id="selectByType" resultType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" parameterType="java.lang.String">
|
select * from RES_ECHARTSCOFING where EchartsType = #{echartstype,jdbcType=VARCHAR}
|
</select>
|
<insert id="insertSelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing">
|
<selectKey keyProperty="echartsid" resultType="java.lang.Integer" order="BEFORE">
|
select NEXTVAL('RES_ECHARTSCOFING_INS_SEQ') from dual
|
</selectKey>
|
insert into RES_ECHARTSCOFING
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="echartsid != null" >
|
EchartsId,
|
</if>
|
<if test="echartstype != null" >
|
EchartsType,
|
</if>
|
<if test="echartstitle != null" >
|
EchartsTitle,
|
</if>
|
<if test="echartsoption != null" >
|
EchartsOption,
|
</if>
|
<if test="echartsUrl != null" >
|
EchartsUrl,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="echartsid != null" >
|
#{echartsid,jdbcType=INTEGER},
|
</if>
|
<if test="echartstype != null" >
|
#{echartstype,jdbcType=VARCHAR},
|
</if>
|
<if test="echartstitle != null" >
|
#{echartstitle,jdbcType=VARCHAR},
|
</if>
|
<if test="echartsoption != null" >
|
#{echartsoption,jdbcType=LONGVARCHAR},
|
</if>
|
<if test="echartsUrl != null" >
|
#{echartsUrl,jdbcType=LONGVARCHAR},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" >
|
update RES_ECHARTSCOFING
|
<set >
|
<if test="echartstype != null" >
|
EchartsType = #{echartstype,jdbcType=VARCHAR},
|
</if>
|
<if test="echartstitle != null" >
|
EchartsTitle = #{echartstitle,jdbcType=VARCHAR},
|
</if>
|
<if test="echartsoption != null" >
|
EchartsOption = #{echartsoption,jdbcType=LONGVARCHAR},
|
</if>
|
<if test="echartsUrl != null" >
|
EchartsUrl = #{echartsUrl,jdbcType=LONGVARCHAR},
|
</if>
|
</set>
|
where EchartsId = #{echartsid,jdbcType=INTEGER}
|
</update>
|
|
<select id="selectAllChart" resultType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" parameterType="java.lang.Integer">
|
SELECT * from RES_ECHARTSCOFING where type=#{settype ,jdbcType=INTEGER} ORDER BY EchartsId
|
</select>
|
|
<select id="selectEchartsType" resultType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing" parameterType="com.landtool.lanbase.modules.res.entity.Res_EchartsConfing">
|
SELECT tmp.* from (select b.*,row_number() over() as rownumber from RES_ECHARTSCOFING b where EchartsTitle= #{echartstitle}) tmp where <![CDATA[ rownumber < 2 ]]>
|
</select>
|
</mapper>
|