<?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_ExtBaseMapMapper" >
|
<resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap" >
|
<id column="RESOURCEID" property="resourceid" jdbcType="DECIMAL" />
|
<result column="PUBLISHSOFT" property="publishsoft" jdbcType="OTHER" />
|
<result column="BASEMAPTYPE" property="basemaptype" jdbcType="OTHER" />
|
<result column="IMAGEACCURACY" property="imageaccuracy" jdbcType="OTHER" />
|
<result column="DISPLAYLEV" property="displaylev" jdbcType="CHAR" />
|
<result column="REFMARKINFID" property="refmarkinfid" jdbcType="DECIMAL" />
|
<result column="EXTPROPERTY" property="extproperty" jdbcType="OTHER" />
|
<result column="FULLXMIN" property="fullxmin" jdbcType="DECIMAL" />
|
<result column="FULLXMAX" property="fullxmax" jdbcType="DECIMAL" />
|
<result column="FULLYMIN" property="fullymin" jdbcType="DECIMAL" />
|
<result column="FULLYMAX" property="fullymax" jdbcType="DECIMAL" />
|
<result column="SUPPORTDYNAMIC" property="supportdynamic" jdbcType="DECIMAL" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
RESOURCEID, PUBLISHSOFT, BASEMAPTYPE, IMAGEACCURACY, DISPLAYLEV, REFMARKINFID, EXTPROPERTY,
|
FULLXMIN, FULLXMAX, FULLYMIN, FULLYMAX, SUPPORTDYNAMIC
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
from RES_EXTBASEMAP
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
delete from RES_EXTBASEMAP
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</delete>
|
<insert id="insert" parameterType="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap" >
|
insert into RES_EXTBASEMAP (RESOURCEID, PUBLISHSOFT, BASEMAPTYPE,
|
IMAGEACCURACY, DISPLAYLEV, REFMARKINFID,
|
EXTPROPERTY, FULLXMIN, FULLXMAX,
|
FULLYMIN, FULLYMAX)
|
values (#{resourceid,jdbcType=DECIMAL}, #{publishsoft,jdbcType=VARCHAR}, #{basemaptype,jdbcType=VARCHAR},
|
#{imageaccuracy,jdbcType=VARCHAR}, #{displaylev,jdbcType=CHAR}, #{refmarkinfid,jdbcType=DECIMAL},
|
#{extproperty,jdbcType=VARCHAR}, #{fullxmin,jdbcType=DECIMAL}, #{fullxmax,jdbcType=DECIMAL},
|
#{fullymin,jdbcType=DECIMAL}, #{fullymax,jdbcType=DECIMAL}, #{supportdynamic,jdbcType=DECIMAL})
|
</insert>
|
<insert id="insertSelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap" >
|
insert into RES_EXTBASEMAP
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="resourceid != null" >
|
RESOURCEID,
|
</if>
|
<if test="publishsoft != null" >
|
PUBLISHSOFT,
|
</if>
|
<if test="basemaptype != null" >
|
BASEMAPTYPE,
|
</if>
|
<if test="imageaccuracy != null" >
|
IMAGEACCURACY,
|
</if>
|
<if test="displaylev != null" >
|
DISPLAYLEV,
|
</if>
|
<if test="refmarkinfid != null" >
|
REFMARKINFID,
|
</if>
|
<if test="extproperty != null" >
|
EXTPROPERTY,
|
</if>
|
<if test="fullxmin != null" >
|
FULLXMIN,
|
</if>
|
<if test="fullxmax != null" >
|
FULLXMAX,
|
</if>
|
<if test="fullymin != null" >
|
FULLYMIN,
|
</if>
|
<if test="fullymax != null" >
|
FULLYMAX,
|
</if>
|
<if test="supportdynamic != null">
|
SUPPORTDYNAMIC,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="resourceid != null" >
|
#{resourceid,jdbcType=DECIMAL},
|
</if>
|
<if test="publishsoft != null" >
|
#{publishsoft,jdbcType=OTHER},
|
</if>
|
<if test="basemaptype != null" >
|
#{basemaptype,jdbcType=OTHER},
|
</if>
|
<if test="imageaccuracy != null" >
|
#{imageaccuracy,jdbcType=OTHER},
|
</if>
|
<if test="displaylev != null" >
|
#{displaylev,jdbcType=CHAR},
|
</if>
|
<if test="refmarkinfid != null" >
|
#{refmarkinfid,jdbcType=DECIMAL},
|
</if>
|
<if test="extproperty != null" >
|
#{extproperty,jdbcType=OTHER},
|
</if>
|
<if test="fullxmin != null" >
|
#{fullxmin,jdbcType=DECIMAL},
|
</if>
|
<if test="fullxmax != null" >
|
#{fullxmax,jdbcType=DECIMAL},
|
</if>
|
<if test="fullymin != null" >
|
#{fullymin,jdbcType=DECIMAL},
|
</if>
|
<if test="fullymax != null" >
|
#{fullymax,jdbcType=DECIMAL},
|
</if>
|
<if test="supportdynamic != null">
|
#{supportdynamic,jdbcType=DECIMAL},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap" >
|
update RES_EXTBASEMAP
|
<set >
|
<if test="publishsoft != null" >
|
PUBLISHSOFT = #{publishsoft,jdbcType=OTHER},
|
</if>
|
<if test="basemaptype != null" >
|
BASEMAPTYPE = #{basemaptype,jdbcType=OTHER},
|
</if>
|
<if test="imageaccuracy != null" >
|
IMAGEACCURACY = #{imageaccuracy,jdbcType=OTHER},
|
</if>
|
<if test="displaylev != null" >
|
DISPLAYLEV = #{displaylev,jdbcType=CHAR},
|
</if>
|
<if test="refmarkinfid != null" >
|
REFMARKINFID = #{refmarkinfid,jdbcType=DECIMAL},
|
</if>
|
<if test="extproperty != null" >
|
EXTPROPERTY = #{extproperty,jdbcType=OTHER},
|
</if>
|
<if test="fullxmin != null" >
|
FULLXMIN = #{fullxmin,jdbcType=DECIMAL},
|
</if>
|
<if test="fullxmax != null" >
|
FULLXMAX = #{fullxmax,jdbcType=DECIMAL},
|
</if>
|
<if test="fullymin != null" >
|
FULLYMIN = #{fullymin,jdbcType=DECIMAL},
|
</if>
|
<if test="fullymax != null" >
|
FULLYMAX = #{fullymax,jdbcType=DECIMAL},
|
</if>
|
<if test="supportdynamic != null">
|
SUPPORTDYNAMIC = #{supportdynamic,jdbcType=DECIMAL},
|
</if>
|
</set>
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap" >
|
update RES_EXTBASEMAP
|
set PUBLISHSOFT = #{publishsoft,jdbcType=VARCHAR},
|
BASEMAPTYPE = #{basemaptype,jdbcType=VARCHAR},
|
IMAGEACCURACY = #{imageaccuracy,jdbcType=VARCHAR},
|
DISPLAYLEV = #{displaylev,jdbcType=CHAR},
|
REFMARKINFID = #{refmarkinfid,jdbcType=DECIMAL},
|
EXTPROPERTY = #{extproperty,jdbcType=VARCHAR},
|
FULLXMIN = #{fullxmin,jdbcType=DECIMAL},
|
FULLXMAX = #{fullxmax,jdbcType=DECIMAL},
|
FULLYMIN = #{fullymin,jdbcType=DECIMAL},
|
FULLYMAX = #{fullymax,jdbcType=DECIMAL},
|
SUPPORTDYNAMIC = #{supportdynamic,jdbcType=DECIMAL}
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</update>
|
|
<select id="selectBaseMapJoinMainInfoCount" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" resultType="java.lang.Integer">
|
select COUNT(*) from RES_EXTBASEMAP a left join RES_MAININFO b on(a.RESOURCEID = b.RESOURCEID)
|
<where>
|
RESOURCESTATUS = 0 and AUDITSTATUS = 2
|
<if test="title!=null and title != '' ">
|
and b.TITLE like '%${title}%'
|
</if>
|
<if test="datasources !=null and datasources != '' ">
|
and b.DATASOURCES=#{datasources,jdbcType=OTHER}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectBaseMapJoinMainInfo" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select b.TITLE,b.RESOURCEID,b.DATASOURCES from RES_EXTBASEMAP a left join RES_MAININFO b on(a.RESOURCEID = b.RESOURCEID)
|
<where>
|
RESOURCESTATUS = 0 and AUDITSTATUS = 2
|
<if test="title!=null and title != '' ">
|
and b.TITLE like '%${title}%'
|
</if>
|
<if test="datasources !=null and datasources != '' ">
|
and b.DATASOURCES = #{datasources,jdbcType=OTHER}
|
</if>
|
<if test="resourceclass != null" >
|
and b.RESOURCECLASS = #{resourceclass,jdbcType=OTHER}
|
</if>
|
</where>
|
order by b.RESOURCEID
|
</select>
|
|
<select id="selectBaseMapJoinMainInfoTree" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select distinct b.TITLE,b.RESOURCEID,b.DATASOURCES,b.resourceclass from (select RESOURCEID from RES_EXTBASEMAP
|
<if test="isNotOnlyBaseMap != null and isNotOnlyBaseMap != ''">
|
union select RESOURCEID from RES_EXTTHEMEMAP
|
</if>
|
) a
|
left join RES_MAININFO b on(a.RESOURCEID = b.RESOURCEID)
|
<where>
|
RESOURCESTATUS = 0 and AUDITSTATUS = 2
|
<if test="title!=null and title != '' ">
|
and b.TITLE like '%${title}%'
|
</if>
|
<if test="parentid != null and parentid != ''">
|
and b.CATLOGID = #{parentid}
|
</if>
|
<if test="keyWord != null and keyWord != ''">
|
and (b.PINGYINFIIRST like '%'||#{keyWord}||'%' or b.TITLE like '%'||#{keyWord}||'%')
|
</if>
|
</where>
|
order by b.RESOURCEID
|
</select>
|
|
<select id="selectBaseMapJoinMainInfoNode" 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 a.CATLOGCODE from (select RESOURCEID from RES_EXTBASEMAP
|
<if test="isNotOnlyBaseMap != null and isNotOnlyBaseMap != ''">
|
union select RESOURCEID from RES_EXTTHEMEMAP
|
</if>
|
) e
|
LEFT join RES_MAININFO a on(a.RESOURCEID = e.RESOURCEID)
|
WHERE RESOURCESTATUS = 0 and AUDITSTATUS = 2
|
<if test="title!=null and title != '' ">
|
and a.TITLE like '%${title}%'
|
</if>
|
group by CATLOGCODE
|
) r on b.CATLOGCODE = substr(r.CATLOGCODE, 1, LENGTH(b.CATLOGCODE))
|
where parentid = #{parentid} and r.CATLOGCODE is not null
|
order by ORDERID
|
</select>
|
|
<select id="queryApiList" parameterType="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap" resultType="com.landtool.lanbase.modules.res.entity.Res_ExtBaseMap">
|
select * from RES_EXTBASEMAP
|
<where>
|
<if test="resourceid != null">
|
and RESOURCEID = #{resourceid}
|
</if>
|
<if test="publishsoft != null and publishsoft != '' ">
|
and publishsoft = #{publishsoft}
|
</if>
|
<if test="basemaptype != null and basemaptype != '' ">
|
and basemaptype = #{basemaptype}
|
</if>
|
<if test="imageaccuracy != null and imageaccuracy != '' ">
|
and imageaccuracy = #{imageaccuracy}
|
</if>
|
<if test="displaylev != null and displaylev != '' ">
|
and displaylev = #{displaylev}
|
</if>
|
<if test="refmarkinfid != null">
|
and refmarkinfid = #{refmarkinfid}
|
</if>
|
<if test="extproperty != null and extproperty != '' ">
|
and extproperty = #{extproperty}
|
</if>
|
</where>
|
order by RESOURCEID
|
</select>
|
|
<select id="selectByBaseMapType" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
SELECT b.TITLE,b.RESOURCEID,b.DATASOURCES from RES_EXTBASEMAP a left join RES_MAININFO b on(a.RESOURCEID = b.RESOURCEID)
|
<where>
|
b.RESOURCESTATUS = 0 and b.AUDITSTATUS = 2 and a.basemaptype = '标注' and b.RESOURCEID != #{resourceid,jdbcType=DECIMAL}
|
<if test="title!=null and title != '' ">
|
and (b.TITLE like '%${title}%' or b.pingyinfiirst like '%${title}%')
|
</if>
|
</where>
|
order by b.RESOURCEID
|
</select>
|
|
<select id="getBaseMapForBZTree" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
SELECT distinct b.TITLE,b.RESOURCEID,b.DATASOURCES from RES_EXTBASEMAP a left join RES_MAININFO b on(a.RESOURCEID = b.RESOURCEID)
|
<where>
|
b.RESOURCESTATUS = 0 and b.AUDITSTATUS = 2 and a.basemaptype = '标注' and b.RESOURCEID != #{resourceid}
|
<if test="title!=null and title != '' ">
|
and (b.TITLE like '%${title}%' or b.pingyinfiirst like '%${title}%')
|
</if>
|
<if test="parentid != null and parentid != ''">
|
and b.CATLOGID = #{parentid}
|
</if>
|
<if test="keyWord != null and keyWord != ''">
|
and (b.PINGYINFIIRST like '%'||#{keyWord}||'%' or b.TITLE like '%'||#{keyWord}||'%')
|
</if>
|
</where>
|
order by b.RESOURCEID
|
</select>
|
|
<select id="getBaseMapForBZNode" resultType="com.landtool.lanbase.modules.res.entity.Res_Catalog">
|
SELECT DISTINCT c.* FROM (
|
SELECT
|
CATLOGID,
|
CATLOGCODE,
|
PARENTID,
|
TITLE,
|
PINGYINFIIRST,
|
IMGURL,
|
ORDERID,
|
CREATEUSER,
|
CREATEDATE,
|
ICON
|
FROM RES_CATALOG
|
) c
|
LEFT JOIN (
|
select distinct CATLOGCODE from RES_MAININFO a where RESOURCEID in(
|
select RESOURCEID from RES_EXTBASEMAP where basemaptype = '标注'
|
) and a.RESOURCESTATUS = 0 AND a.AUDITSTATUS = 2 AND a.RESOURCEID != #{resourceid}
|
<if test="title!=null and title != '' ">
|
and b.TITLE like '%${title}%'
|
</if>
|
) r ON c.CATLOGCODE = substr(r.CATLOGCODE,1,LENGTH(c.CATLOGCODE))
|
WHERE parentid = #{parentid} AND r.CATLOGCODE IS NOT NULL ORDER BY ORDERID
|
</select>
|
</mapper>
|