<?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>
|