2
13693261870
2022-09-16 653761a31dfeb50dd3d007e892d69c90bf0cdafc
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
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
<?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>