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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
<?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_Theme_ModuleMapper">
  <resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    <result column="MODULEID" jdbcType="INTEGER" property="moduleid" />
    <result column="PANELRESID" jdbcType="INTEGER" property="panelresid" />
    <result column="MAPRESID" jdbcType="INTEGER" property="mapresid" />
    <result column="TITLE" jdbcType="VARCHAR" property="title" />
    <result column="DIYUSERID" jdbcType="INTEGER" property="diyuserid" />
    <result column="DIYTIME" jdbcType="TIMESTAMP" property="diytime" />
    <result column="PANELURL" jdbcType="VARCHAR" property="panelurl" />
    <result column="CLUSTERSTYLE" jdbcType="VARCHAR" property="diyuserid" />
    <result column="SERVICECONFIG" jdbcType="VARCHAR" property="serviceconfig" />
    <result column="ISCLICKCHARTFILTER" jdbcType="INTEGER" property="isclickchartfilter" />
    <result column="ISMAPLINKAGE" jdbcType="INTEGER" property="ismaplinkage" />
    <result column="ASSOCIATIONLAYER" jdbcType="VARCHAR" property="associationlayer" />
    <result column="ECHARTSHEIGHT" jdbcType="DECIMAL" property="echartsheight" />
    <result column="THEMEMAPID" jdbcType="INTEGER" property="thememapid" />
    <result column="FITBROWSER" jdbcType="VARCHAR" property="fitbrowser" />
  </resultMap>
  <insert id="insert" parameterType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    insert into RES_THEME_MODULE (MODULEID, PANELRESID, MAPRESID,
      TITLE, DIYUSERID, DIYTIME,PANELURL,CLUSTERSTYLE,SERVICECONFIG,ISCLICKCHARTFILTER,ISMAPLINKAGE,ASSOCIATIONLAYER,ECHARTSHEIGHT,THEMEMAPID
      )
    values (#{moduleid,jdbcType=INTEGER}, #{panelresid,jdbcType=INTEGER}, #{mapresid,jdbcType=INTEGER}, 
      #{title,jdbcType=VARCHAR}, #{diyuserid,jdbcType=INTEGER}, #{diytime,jdbcType=TIMESTAMP},#{panelurl,jdbcType=VARCHAR}
      ,#{clusterstyle,jdbcType=INTEGER},#{serviceconfig,jdbcType=VARCHAR},
      #{isclickchartfilter,jdbcType=INTEGER},#{ismaplinkage,jdbcType=INTEGER},#{associationlayer,jdbcType=VARCHAR}
      ,#{echartsheight,jdbcType=DECIMAL},#{thememapid,jdbcType=INTEGER}
      )
  </insert>
  <insert id="insertSelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    <selectKey keyProperty="moduleid" resultType="java.lang.Integer" order="BEFORE">
      select  NEXTVAL('RES_THEME_MODULE_INS_SEQ') from dual
    </selectKey>
    insert into RES_THEME_MODULE
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="moduleid != null">
        MODULEID,
      </if>
      <if test="panelresid != null">
        PANELRESID,
      </if>
      <if test="mapresid != null">
        MAPRESID,
      </if>
      <if test="title != null">
        TITLE,
      </if>
      <if test="diyuserid != null">
        DIYUSERID,
      </if>
      <if test="diytime != null">
        DIYTIME,
      </if>
      <if test="panelurl != null">
        panelurl,
      </if>
      <if test="clusterstyle != null">
        CLUSTERSTYLE,
      </if>
      <if test="serviceconfig != null">
        SERVICECONFIG,
      </if>
      <if test="isclickchartfilter != null">
        ISCLICKCHARTFILTER,
      </if>
      <if test="ismaplinkage != null">
        ISMAPLINKAGE,
      </if>
      <if test="associationlayer != null">
        ASSOCIATIONLAYER,
      </if>
      <if test="thememapid != null">
        THEMEMAPID,
      </if>
      <if test="fitbrowser != null">
        FITBROWSER,
      </if>
        ECHARTSHEIGHT,
    </trim>
    <trim prefix="values (" suffix=")" suffixOverrides=",">
      <if test="moduleid != null">
        #{moduleid,jdbcType=INTEGER},
      </if>
      <if test="panelresid != null">
        #{panelresid,jdbcType=INTEGER},
      </if>
      <if test="mapresid != null">
        #{mapresid,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        #{title,jdbcType=VARCHAR},
      </if>
      <if test="diyuserid != null">
        #{diyuserid,jdbcType=INTEGER},
      </if>
      <if test="diytime != null">
        #{diytime,jdbcType=TIMESTAMP},
      </if>
      <if test="panelurl != null">
        #{panelurl,jdbcType=VARCHAR},
      </if>
      <if test="clusterstyle != null">
        #{clusterstyle,jdbcType=INTEGER},
      </if>
      <if test="serviceconfig != null">
        #{serviceconfig,jdbcType=VARCHAR},
      </if>
      <if test="isclickchartfilter != null">
        #{isclickchartfilter,jdbcType=INTEGER},
      </if>
      <if test="ismaplinkage != null">
        #{ismaplinkage,jdbcType=INTEGER},
      </if>
      <if test="associationlayer != null">
        #{associationlayer,jdbcType=VARCHAR},
      </if>
      <if test="thememapid != null">
        #{thememapid,jdbcType=INTEGER},
      </if>
      <if test="fitbrowser != null">
        #{fitbrowser,jdbcType=VARCHAR},
      </if>
        #{echartsheight,jdbcType=DECIMAL}
    </trim>
  </insert>
 
  <select id="selectList" parameterType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module" resultType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module" >
    SELECT a.* FROM RES_THEME_MODULE a
    <if test="maptitle!=null and maptitle != '' ">
      left join RES_MAININFO b on a.mapresid = b.RESOURCEID
    </if>
    <where>
      <if test="title!=null and title != '' ">
        and (a.TITLE like '%'||#{title}||'%')
      </if>
      <if test="selectids!=null and selectids != '' ">
        and MODULEID not in (${selectids})
      </if>
      <if test="maptitle!=null and maptitle != '' ">
        and b.TITLE like '%'||#{maptitle}||'%'
      </if>
    </where>
    ORDER BY MODULEID
  </select>
 
  <select id="selectByid" parameterType="java.lang.Integer" resultType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    select * from RES_THEME_MODULE WHERE MODULEID = #{moduleid,jdbcType=INTEGER}
  </select>
 
  <update id="updateById" parameterType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    UPDATE RES_THEME_MODULE
    <set>
        PANELRESID =  #{panelresid,jdbcType=INTEGER},
      <if test="mapresid != null">
        MAPRESID =  #{mapresid,jdbcType=INTEGER},
      </if>
      <if test="title != null">
        TITLE =  #{title,jdbcType=VARCHAR},
      </if>
      <if test="diyuserid != null">
        DIYUSERID = #{diyuserid,jdbcType=INTEGER},
      </if>
      <if test="diytime != null">
        DIYTIME = #{diytime,jdbcType=TIMESTAMP},
      </if>
      <if test="clusterstyle != null">
        CLUSTERSTYLE = #{clusterstyle,jdbcType=INTEGER},
      </if>
      <if test="serviceconfig != null">
        SERVICECONFIG = #{serviceconfig,jdbcType=VARCHAR},
      </if>
      <if test="isclickchartfilter != null">
        ISCLICKCHARTFILTER = #{isclickchartfilter,jdbcType=INTEGER},
      </if>
      <if test="ismaplinkage != null">
        ISMAPLINKAGE = #{ismaplinkage,jdbcType=INTEGER},
      </if>
      <if test="associationlayer != null">
        ASSOCIATIONLAYER = #{associationlayer,jdbcType=VARCHAR},
      </if>
      <if test="thememapid != null">
        THEMEMAPID = #{thememapid,jdbcType=INTEGER},
      </if>
      <if test="fitbrowser != null">
        FITBROWSER= #{fitbrowser,jdbcType=VARCHAR},
      </if>
        ECHARTSHEIGHT = #{echartsheight,jdbcType=DECIMAL},
        panelurl = #{panelurl}
    </set>
    WHERE MODULEID = #{moduleid,jdbcType=INTEGER}
  </update>
 
  <delete id="deleteById" parameterType="java.lang.Integer">
    DELETE FROM RES_THEME_MODULE WHERE MODULEID = #{moduleid,jdbcType=INTEGER}
  </delete>
 
  <select id="getThemeModuleList" resultType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    select tmp.* from (
      select
      b.*,
      row_number() over () as rownumber
      from
      RES_THEME_RELATION a left join RES_THEME_MODULE b on a.MODULEID=b.MODULEID
      where
      a.THEMEID=#{themeid,jdbcType=INTEGER}
    ) tmp
    <where>
      <if test="isOneMap == 0">
        <![CDATA[ rownumber < 5 ]]>
      </if>
    </where>
    ORDER BY ORDERID
  </select>
 
  <select id="getIgnoreThemeModuleList" resultType="com.landtool.lanbase.modules.res.entity.Res_Theme_Module">
    SELECT b.* FROM RES_THEME_RELATION a
    left join RES_THEME_MODULE b on a.MODULEID=b.MODULEID
    <where>
      <if test="themeid != null and themeid != ''">
        and a.THEMEID = ${themeid}
      </if>
    <if test="moduleIdList != null and moduleIdList != ''">
        and a.MODULEID not in(${moduleIdList})
    </if>
    <if test="title!=null and title != '' ">
        and (b.TITLE like '%'||#{title}||'%')
    </if>
    </where>
    ORDER BY diytime
  </select>
 
  <select id="selectMapList" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
    SELECT a.* from RES_MAININFO a LEFT JOIN RES_EXTINTEGRATE b on(a.resourceid = b.resourceid) where a.AUDITSTATUS = 2 and a.RESOURCESTATUS = 0
     and a.resourceclass = 'KJ_ZTDT' OR (a.resourceclass = 'YWJC' and b.integratetype = '数据集成') OR a.resourceclass = 'KJ_YWTC' ORDER BY a.pubdate
  </select>
 
  <select id="selectCatalog" resultType="com.landtool.lanbase.modules.res.entity.Res_Catalog">
      select distinct b.CATLOGID,b.CATLOGCODE,b.PARENTID,b.TITLE,b.PINGYINFIIRST,b.IMGURL,b.ORDERID,b.CREATEUSER,b.CREATEDATE,b.ICON
      from RES_CATALOG b
      left join (
      SELECT CATLOGCODE FROM RES_MAININFO a
      LEFT JOIN RES_EXTINTEGRATE b ON a.resourceid=b.resourceid
      where 1 = 1
      and a.AUDITSTATUS = 2
      and a.RESOURCESTATUS = 0
      <if test="type == 1">
        and a.resourceclass = 'YWJC' and integratetype = '页面集成' and showmodel = 'Iframe区块'
      </if>
      <if test="type == 2">
        and ((a.resourceclass = 'YWJC' and b.integratetype = '数据集成') OR a.resourceclass = 'KJ_YWTC' OR a.resourceclass = 'KJ_ZTDT')
      </if>
      <if test="title!=null and title != '' ">
        and (a.TITLE like '%' || #{title} || '%' OR replace(a.KEYWORDS,',','') like '%' || #{title} || '%')
      </if>
      group by CATLOGCODE
      ) c on b.CATLOGCODE = substr(c.CATLOGCODE, 1, LENGTH(b.CATLOGCODE))
      where parentid = #{parentid} and c.CATLOGCODE is not null
      order by ORDERID
  </select>
 
  <select id="selectCatalogZiYuanList" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
    select distinct a.RESOURCEID,a.CATLOGID, a.TITLE,
    a.ABBREVIATION, a.PINGYINFIIRST, a.CATLOGCODE,
    a.KEYWORDS, a.DESURL,
    a.IMGURL, a.RESOURCECLASS,
    a.DATASOURCES, a.PRODUCTIONTIME,
    a.UPDATETIMES, a.PUBDATE, a.PUBUNITID,
    a.CREATEUSERID, a.ADMINISTRATIVEID, a.SECURITYLEV,
    a.SHARPROTOCOL, a.ESPPROXY, a.USERNAME,
    a.PASSWORD, a.RESOURCESTATUS,
    a.AUDITSTATUS, a.DISPLAYBY2D, a.DISPLAYBY3D,
    a.ORDERID from RES_MAININFO a
    LEFT JOIN RES_EXTINTEGRATE b ON a.resourceid=b.resourceid
    where 1 = 1
    and a.AUDITSTATUS = 2
    and a.RESOURCESTATUS = 0
    <if test="type == 1">
      and a.resourceclass = 'YWJC' and integratetype = '页面集成' and showmodel = 'Iframe区块'
    </if>
    <if test="type == 2">
      and ((a.resourceclass = 'YWJC' and b.integratetype = '数据集成') OR a.resourceclass = 'KJ_YWTC' OR a.resourceclass = 'KJ_ZTDT')
    </if>
    <if test="title!=null and title != '' ">
      and (a.TITLE like '%' || #{title} || '%' OR replace(a.KEYWORDS,',','') like '%' || #{title} || '%')
    </if>
    <if test="keyWord != null and keyWord != ''">
      and (a.PINGYINFIIRST like '%'||#{keyWord}||'%' or a.TITLE like '%'||#{keyWord}||'%')
    </if>
    <if test="parentid != null and parentid != ''">
      and a.CATLOGID = #{parentid,jdbcType=DECIMAL}
    </if>
    order by a.ORDERID
  </select>
</mapper>