<?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_MainInfoMapper" >
|
<resultMap id="BaseResultMap" type="com.landtool.lanbase.modules.res.entity.Res_MainInfo" >
|
<id column="RESOURCEID" property="resourceid" jdbcType="DECIMAL" />
|
<result column="CATLOGID" property="catlogid" jdbcType="DECIMAL" />
|
<result column="TITLE" property="title" jdbcType="OTHER" />
|
<result column="ABBREVIATION" property="abbreviation" jdbcType="OTHER" />
|
<result column="PINGYINFIIRST" property="pingyinfiirst" jdbcType="OTHER" />
|
<result column="CATLOGCODE" property="catlogcode" jdbcType="OTHER" />
|
<result column="KEYWORDS" property="keywords" jdbcType="OTHER" />
|
<result column="DESCRIPTION" property="description" jdbcType="OTHER" />
|
<result column="DESURL" property="desurl" jdbcType="OTHER" />
|
<result column="IMGURL" property="imgurl" jdbcType="OTHER" />
|
<result column="RESOURCECLASS" property="resourceclass" jdbcType="OTHER" />
|
<result column="DATASOURCES" property="datasources" jdbcType="DECIMAL" />
|
<result column="PRODUCTIONTIME" property="productiontime" jdbcType="TIMESTAMP" />
|
<result column="UPDATETIMES" property="updatetimes" jdbcType="OTHER" />
|
<result column="PUBDATE" property="pubdate" jdbcType="TIMESTAMP" />
|
<result column="PUBUNITID" property="pubunitid" jdbcType="OTHER" />
|
<result column="CREATEUSERID" property="createuserid" jdbcType="OTHER" />
|
<result column="ADMINISTRATIVEID" property="administrativeid" jdbcType="OTHER" />
|
<result column="SECURITYLEV" property="securitylev" jdbcType="OTHER" />
|
<result column="SHARPROTOCOL" property="sharprotocol" jdbcType="OTHER" />
|
<result column="ESPPROXY" property="espproxy" jdbcType="DECIMAL" />
|
<result column="USERNAME" property="username" jdbcType="OTHER" />
|
<result column="PASSWORD" property="password" jdbcType="OTHER" />
|
<result column="TOKEN" property="token" jdbcType="OTHER" />
|
<result column="RESOURCESTATUS" property="resourcestatus" jdbcType="DECIMAL" />
|
<result column="AUDITSTATUS" property="auditstatus" jdbcType="DECIMAL" />
|
<result column="DISPLAYBY2D" property="displayby2d" jdbcType="DECIMAL" />
|
<result column="DISPLAYBY3D" property="displayby3d" jdbcType="DECIMAL" />
|
<result column="ORDERID" property="orderid" jdbcType="DECIMAL" />
|
<result column="CREATEDATE" property="createdate" jdbcType="TIMESTAMP" />
|
<result column="LASTEDITDATE" property="lasteditdate" jdbcType="TIMESTAMP" />
|
<result column="REMARK" property="remark" jdbcType="OTHER" />
|
<result column="INSTEADAUDIT" property="insteadaudit" jdbcType="NUMERIC" />
|
<result column="GRAPHICSTYLE" property="GraphicStyle" jdbcType="OTHER" />
|
<result column="EXPIRATION" property="expiration" jdbcType="OTHER" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
RES_MAININFO.RESOURCEID, CATLOGID, TITLE, ABBREVIATION, PINGYINFIIRST, CATLOGCODE, KEYWORDS, DESCRIPTION,
|
DESURL, IMGURL, RESOURCECLASS, DATASOURCES, PRODUCTIONTIME,
|
UPDATETIMES, PUBDATE, PUBUNITID, CREATEUSERID, ADMINISTRATIVEID, SECURITYLEV, SHARPROTOCOL,
|
ESPPROXY, USERNAME, PASSWORD, TOKEN, RESOURCESTATUS, AUDITSTATUS, DISPLAYBY2D, DISPLAYBY3D,
|
ORDERID, CREATEDATE, LASTEDITDATE, REMARK,INSTEADAUDIT,GRAPHICSTYLE
|
<!-- EXPIRATION -->
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
from RES_MAININFO
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</select>
|
<select id="selectResMainInfojoinCatalogCount" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" resultType="java.lang.Integer">
|
select COUNT(*) from RES_MAININFO
|
<where>
|
AUDITSTATUS = 2 and RESOURCESTATUS = 0
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR KEYWORDS LIKE '%'||#{title}||'%' OR ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
and (resourceclass like #{resourceclass} || '%' )
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and createuserid = #{createuserid,jdbcType=OTHER}
|
</if>
|
<if test="catlogid!=null and catlogid != '' ">
|
and catlogid = #{catlogid,jdbcType=OTHER}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin},'yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish},'yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
<if test="resourcestatus!=null and (resourcestatus==0 ? '0' : resourcestatus) ">
|
and RESOURCESTATUS = #{resourcestatus,jdbcType=DECIMAL}
|
</if>
|
</where>
|
</select>
|
|
<select id="selectResMainInfojoinCatalog" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select *
|
from RES_MAININFO
|
<where>
|
AUDITSTATUS = 2 and RESOURCESTATUS = 0
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR replace(KEYWORDS,',','') like '%'||#{title}||'%' OR ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
<!--and resourceclass=#{resourceclass,jdbcType=OTHER}-->
|
and (resourceclass like #{resourceclass} || '%' )
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and createuserid = #{createuserid}
|
</if>
|
<if test="catlogcode!=null and catlogcode != '' ">
|
and SUBSTR(catlogcode,1, LENGTH(#{catlogcode,jdbcType=OTHER})) = #{catlogcode,jdbcType=OTHER}
|
</if>
|
<if test="datasources!=null and datasources != '' ">
|
and datasources = #{datasources,jdbcType=OTHER}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
<if test="resourcestatus!=null and (resourcestatus==0 ? '0' : resourcestatus) ">
|
and RESOURCESTATUS = #{resourcestatus,jdbcType=DECIMAL}
|
</if>
|
<if test="ExistPermission !=null">
|
and CREATEUSERID=#{ExistPermission}
|
</if>
|
<if test="sharprotocol !=null and sharprotocol !='' ">
|
and sharprotocol=#{sharprotocol}
|
</if>
|
</where>
|
<if test="sort!=null and sort != '' ">
|
order by ${sort} ${dir}
|
</if>
|
<if test="sort==null">
|
order by CREATEDATE DESC
|
</if>
|
</select>
|
|
<select id="selectResMainInfoFangWenPaiHang" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select * from(select COUNT(*) AS t,a.title,a.resourceid,a.resourceclass,a.pubdate,a.pubunitid
|
from RES_MAININFO a inner join RES_ACTIONRECORD b on(a.resourceid=b.resourceid)
|
<where>
|
AUDITSTATUS = 2 and RESOURCESTATUS = 0 AND b.ACTIONTYPE = '浏览'
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR replace(KEYWORDS,',','') like '%'||#{title}||'%' OR ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
<!--and resourceclass=#{resourceclass,jdbcType=OTHER}-->
|
and (resourceclass like #{resourceclass} || '%' )
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and createuserid = #{createuserid,dbcType=OTHERj}
|
</if>
|
<if test="catlogid!=null and catlogid != '' ">
|
and catlogid = #{catlogid,jdbcType=OTHER}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
group by a.title,a.resourceid,a.resourceclass,a.pubdate,a.pubunitid
|
</where>) v order by t desc
|
</select>
|
|
<select id="selectResMainInfo" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select <include refid="Base_Column_List" />,readcount,applycount
|
from RES_MAININFO
|
left join (select b.RESOURCEID,count(*) as readcount from RES_ACTIONRECORD b where ACTIONTYPE = '浏览' group by b.RESOURCEID)t2 on RES_MAININFO.RESOURCEID = t2.RESOURCEID
|
left join (select c.RESOURCEID,count(*) as applycount from RES_APPLYRECOMMEND c group by c.RESOURCEID)t3 on RES_MAININFO.RESOURCEID = t3.RESOURCEID
|
<where>
|
AUDITSTATUS = 2 and RESOURCESTATUS = 0
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'|| #{title} || '%' OR replace(KEYWORDS,',','') like '%'|| #{title} || '%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
and (resourceclass like #{resourceclass} || '%' )
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and createuserid = #{createuserid}
|
</if>
|
<if test="catlogid!=null and catlogid != '' ">
|
and catlogid = #{catlogid,jdbcType=DECIMAL}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
<if test="auditstatus !=null and (auditstatus==0 ? '0' : auditstatus) ">
|
and auditstatus=#{auditstatus,jdbcType=DECIMAL}
|
</if>
|
<if test="sharprotocol !=null and sharprotocol !='' ">
|
and sharprotocol=#{sharprotocol}
|
</if>
|
</where>
|
<if test="sort!=null and sort != '' ">
|
order by ${sort}
|
</if>
|
<if test="sort==null or sort == '' ">
|
order by CREATEDATE DESC
|
</if>
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
delete from RES_MAININFO
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</delete>
|
<insert id="insert" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" >
|
insert into RES_MAININFO (RESOURCEID, CATLOGID, TITLE,
|
ABBREVIATION, PINGYINFIIRST, CATLOGCODE,
|
KEYWORDS, DESCRIPTION, DESURL,
|
IMGURL, SERVERTYPE, RESOURCECLASS,
|
DATASOURCES, PRODUCTIONTIME,
|
UPDATETIMES, PUBDATE, PUBUNITID,
|
CREATEUSERID, ADMINISTRATIVEID, SECURITYLEV,
|
SHARPROTOCOL, ESPPROXY, USERNAME,
|
PASSWORD, TOKEN, RESOURCESTATUS,
|
AUDITSTATUS, DISPLAYBY2D, DISPLAYBY3D,
|
ORDERID,
|
REMARK,EXPIRATION)
|
values (NEXTVAL('SEQ_RES_MAININFO'), #{catlogid,jdbcType=DECIMAL}, #{title,jdbcType=OTHER},
|
#{abbreviation,jdbcType=OTHER}, #{pingyinfiirst,jdbcType=OTHER}, #{catlogcode,jdbcType=OTHER},
|
#{keywords,jdbcType=OTHER}, #{description,jdbcType=OTHER}, #{desurl,jdbcType=OTHER},
|
#{imgurl,jdbcType=OTHER}, #{servertype,jdbcType=OTHER}, #{resourceclass,jdbcType=OTHER},
|
#{datasources,jdbcType=DECIMAL}, #{productiontime,jdbcType=TIMESTAMP},
|
#{updatetimes,jdbcType=OTHER}, #{pubdate,jdbcType=TIMESTAMP}, #{pubunitid,jdbcType=OTHER},
|
#{createuserid,jdbcType=OTHER}, #{administrativeid,jdbcType=OTHER}, #{securitylev,jdbcType=OTHER},
|
#{sharprotocol,jdbcType=OTHER}, #{espproxy,jdbcType=DECIMAL}, #{username,jdbcType=OTHER},
|
#{password,jdbcType=OTHER}, #{token,jdbcType=OTHER}, #{resourcestatus,jdbcType=DECIMAL},
|
#{auditstatus,jdbcType=DECIMAL}, #{displayby2d,jdbcType=DECIMAL}, #{displayby3d,jdbcType=DECIMAL},
|
#{orderid,jdbcType=DECIMAL},
|
#{remark,jdbcType=OTHER},#{expiration,jdbcType=OTHER}))
|
</insert>
|
<insert id="insertSelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
<selectKey keyProperty="resourceid" resultType="java.lang.Integer" order="BEFORE">
|
select NEXTVAL('RES_MAININFO_INS_SEQ') from dual
|
</selectKey>
|
insert into RES_MAININFO
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="resourceid != null" >
|
RESOURCEID,
|
</if>
|
<if test="catlogid != null" >
|
CATLOGID,
|
</if>
|
<if test="title != null" >
|
TITLE,
|
</if>
|
<if test="abbreviation != null" >
|
ABBREVIATION,
|
</if>
|
<if test="pingyinfiirst != null" >
|
PINGYINFIIRST,
|
</if>
|
<if test="catlogcode != null" >
|
CATLOGCODE,
|
</if>
|
<if test="keywords != null" >
|
KEYWORDS,
|
</if>
|
<if test="description != null" >
|
DESCRIPTION,
|
</if>
|
<if test="desurl != null" >
|
DESURL,
|
</if>
|
<if test="imgurl != null" >
|
IMGURL,
|
</if>
|
|
<if test="resourceclass != null" >
|
RESOURCECLASS,
|
</if>
|
|
<if test="datasources != null" >
|
DATASOURCES,
|
</if>
|
<if test="productiontime != null" >
|
PRODUCTIONTIME,
|
</if>
|
<if test="updatetimes != null" >
|
UPDATETIMES,
|
</if>
|
<if test="pubdate != null" >
|
PUBDATE,
|
</if>
|
<if test="pubunitid != null" >
|
PUBUNITID,
|
</if>
|
<if test="createuserid != null" >
|
CREATEUSERID,
|
</if>
|
<if test="administrativeid != null">
|
ADMINISTRATIVEID,
|
</if>
|
<if test="securitylev != null" >
|
SECURITYLEV,
|
</if>
|
<if test="sharprotocol != null" >
|
SHARPROTOCOL,
|
</if>
|
<if test="espproxy != null" >
|
ESPPROXY,
|
</if>
|
<if test="username != null" >
|
USERNAME,
|
</if>
|
<if test="password != null" >
|
PASSWORD,
|
</if>
|
<if test="token != null" >
|
TOKEN,
|
</if>
|
<if test="resourcestatus != null" >
|
RESOURCESTATUS,
|
</if>
|
<if test="auditstatus != null" >
|
AUDITSTATUS,
|
</if>
|
<if test="displayby2d != null" >
|
DISPLAYBY2D,
|
</if>
|
<if test="displayby3d != null" >
|
DISPLAYBY3D,
|
</if>
|
<if test="orderid != null" >
|
ORDERID,
|
</if>
|
<if test="createdate != null" >
|
CREATEDATE,
|
</if>
|
<if test="lasteditdate != null" >
|
LASTEDITDATE,
|
</if>
|
<if test="remark != null" >
|
REMARK,
|
</if>
|
<if test="insteadaudit != null" >
|
insteadaudit,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
|
<if test="resourceid != null" >
|
#{resourceid,jdbcType=DECIMAL},
|
</if>
|
<if test="catlogid != null" >
|
#{catlogid,jdbcType=DECIMAL},
|
</if>
|
<if test="title != null" >
|
#{title,jdbcType=OTHER},
|
</if>
|
<if test="abbreviation != null" >
|
#{abbreviation,jdbcType=OTHER},
|
</if>
|
<if test="pingyinfiirst != null" >
|
#{pingyinfiirst,jdbcType=OTHER},
|
</if>
|
<if test="catlogcode != null" >
|
#{catlogcode,jdbcType=OTHER},
|
</if>
|
<if test="keywords != null" >
|
#{keywords,jdbcType=OTHER},
|
</if>
|
<if test="description != null" >
|
#{description,jdbcType=OTHER},
|
</if>
|
<if test="desurl != null" >
|
#{desurl,jdbcType=OTHER},
|
</if>
|
<if test="imgurl != null" >
|
#{imgurl,jdbcType=OTHER},
|
</if>
|
<if test="resourceclass != null" >
|
#{resourceclass,jdbcType=OTHER},
|
</if>
|
|
<if test="datasources != null" >
|
#{datasources,jdbcType=DECIMAL},
|
</if>
|
<if test="productiontime != null" >
|
#{productiontime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updatetimes != null" >
|
#{updatetimes,jdbcType=OTHER},
|
</if>
|
<if test="pubdate != null" >
|
#{pubdate,jdbcType=TIMESTAMP},
|
</if>
|
<if test="pubunitid != null" >
|
#{pubunitid,jdbcType=OTHER},
|
</if>
|
<if test="createuserid != null" >
|
#{createuserid,jdbcType=OTHER},
|
</if>
|
<if test="administrativeid != null">
|
#{administrativeid,jdbcType=OTHER},
|
</if>
|
<if test="securitylev != null" >
|
#{securitylev,jdbcType=OTHER},
|
</if>
|
<if test="sharprotocol != null" >
|
#{sharprotocol,jdbcType=OTHER},
|
</if>
|
<if test="espproxy != null" >
|
#{espproxy,jdbcType=DECIMAL},
|
</if>
|
<if test="username != null" >
|
#{username,jdbcType=OTHER},
|
</if>
|
<if test="password != null" >
|
#{password,jdbcType=OTHER},
|
</if>
|
<if test="token != null" >
|
#{token,jdbcType=OTHER},
|
</if>
|
<if test="resourcestatus != null" >
|
#{resourcestatus,jdbcType=DECIMAL},
|
</if>
|
<if test="auditstatus != null" >
|
#{auditstatus,jdbcType=DECIMAL},
|
</if>
|
<if test="displayby2d != null" >
|
#{displayby2d,jdbcType=DECIMAL},
|
</if>
|
<if test="displayby3d != null" >
|
#{displayby3d,jdbcType=DECIMAL},
|
</if>
|
<if test="orderid != null" >
|
#{orderid,jdbcType=DECIMAL},
|
</if>
|
<if test="createdate != null" >
|
#{createdate,jdbcType=TIMESTAMP},
|
</if>
|
<if test="lasteditdate != null" >
|
#{lasteditdate,jdbcType=TIMESTAMP},
|
</if>
|
<if test="remark != null" >
|
#{remark,jdbcType=OTHER},
|
</if>
|
<if test="insteadaudit != null" >
|
#{insteadaudit,jdbcType=NUMERIC}
|
</if>
|
</trim>
|
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" >
|
update RES_MAININFO
|
<set >
|
<if test="catlogid != null" >
|
CATLOGID = #{catlogid,jdbcType=DECIMAL},
|
</if>
|
<if test="title != null" >
|
TITLE = #{title,jdbcType=OTHER},
|
</if>
|
<if test="abbreviation != null" >
|
ABBREVIATION = #{abbreviation,jdbcType=OTHER},
|
</if>
|
<if test="pingyinfiirst != null" >
|
PINGYINFIIRST = #{pingyinfiirst,jdbcType=OTHER},
|
</if>
|
<if test="catlogcode != null" >
|
CATLOGCODE = #{catlogcode,jdbcType=OTHER},
|
</if>
|
<if test="keywords != null" >
|
KEYWORDS = #{keywords,jdbcType=OTHER},
|
</if>
|
<if test="description != null" >
|
DESCRIPTION = #{description,jdbcType=OTHER},
|
</if>
|
<if test="desurl != null" >
|
DESURL = #{desurl,jdbcType=OTHER},
|
</if>
|
<if test="imgurl != null" >
|
IMGURL = #{imgurl,jdbcType=OTHER},
|
</if>
|
<if test="resourceclass != null" >
|
RESOURCECLASS = #{resourceclass,jdbcType=OTHER},
|
</if>
|
<if test="datasources != null" >
|
DATASOURCES = #{datasources,jdbcType=DECIMAL},
|
</if>
|
<if test="productiontime != null" >
|
PRODUCTIONTIME = #{productiontime,jdbcType=TIMESTAMP},
|
</if>
|
<if test="updatetimes != null" >
|
UPDATETIMES = #{updatetimes,jdbcType=OTHER},
|
</if>
|
<if test="pubdate != null" >
|
PUBDATE = #{pubdate,jdbcType=TIMESTAMP},
|
</if>
|
<if test="pubunitid != null" >
|
PUBUNITID = #{pubunitid,jdbcType=OTHER},
|
</if>
|
<if test="createuserid != null" >
|
CREATEUSERID = #{createuserid,jdbcType=OTHER},
|
</if>
|
<if test="administrativeid != null">
|
ADMINISTRATIVEID = #{administrativeid,jdbcType=OTHER},
|
</if>
|
<if test="securitylev != null" >
|
SECURITYLEV = #{securitylev,jdbcType=OTHER},
|
</if>
|
<if test="sharprotocol != null" >
|
SHARPROTOCOL = #{sharprotocol,jdbcType=OTHER},
|
</if>
|
<if test="espproxy != null" >
|
ESPPROXY = #{espproxy,jdbcType=DECIMAL},
|
</if>
|
<if test="username != null" >
|
USERNAME = #{username,jdbcType=OTHER},
|
</if>
|
<if test="password != null" >
|
PASSWORD = #{password,jdbcType=OTHER},
|
</if>
|
<if test="token != null" >
|
TOKEN = #{token,jdbcType=OTHER},
|
</if>
|
<if test="resourcestatus != null" >
|
RESOURCESTATUS = #{resourcestatus,jdbcType=DECIMAL},
|
</if>
|
<if test="auditstatus != null" >
|
AUDITSTATUS = #{auditstatus,jdbcType=DECIMAL},
|
</if>
|
<if test="displayby2d != null" >
|
DISPLAYBY2D = #{displayby2d,jdbcType=DECIMAL},
|
</if>
|
<if test="displayby3d != null" >
|
DISPLAYBY3D = #{displayby3d,jdbcType=DECIMAL},
|
</if>
|
<if test="orderid != null" >
|
ORDERID = #{orderid,jdbcType=DECIMAL},
|
</if>
|
<if test="createdate != null" >
|
CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
|
</if>
|
<if test="lasteditdate != null" >
|
LASTEDITDATE = #{lasteditdate,jdbcType=TIMESTAMP},
|
</if>
|
<if test="remark != null" >
|
REMARK = #{remark,jdbcType=OTHER},
|
</if>
|
<if test="insteadaudit != null" >
|
INSTEADAUDIT=#{insteadaudit,jdbcType=NUMERIC},
|
</if>
|
<if test="GraphicStyle != null" >
|
GraphicStyle=#{GraphicStyle,jdbcType=OTHER},
|
</if>
|
<if test="expiration != null" >
|
EXPIRATION=#{expiration,jdbcType=OTHER}
|
</if>
|
</set>
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" >
|
update RES_MAININFO
|
set CATLOGID = #{catlogid,jdbcType=DECIMAL},
|
TITLE = #{title,jdbcType=OTHER},
|
ABBREVIATION = #{abbreviation,jdbcType=OTHER},
|
PINGYINFIIRST = #{pingyinfiirst,jdbcType=OTHER},
|
CATLOGCODE = #{catlogcode,jdbcType=OTHER},
|
KEYWORDS = #{keywords,jdbcType=OTHER},
|
DESCRIPTION = #{description,jdbcType=OTHER},
|
DESURL = #{desurl,jdbcType=OTHER},
|
IMGURL = #{imgurl,jdbcType=OTHER},
|
RESOURCECLASS = #{resourceclass,jdbcType=OTHER},
|
DATASOURCES = #{datasources,jdbcType=DECIMAL},
|
PRODUCTIONTIME = #{productiontime,jdbcType=TIMESTAMP},
|
UPDATETIMES = #{updatetimes,jdbcType=OTHER},
|
PUBDATE = #{pubdate,jdbcType=TIMESTAMP},
|
PUBUNITID = #{pubunitid,jdbcType=OTHER},
|
CREATEUSERID = #{createuserid,jdbcType=OTHER},
|
SECURITYLEV = #{securitylev,jdbcType=OTHER},
|
SHARPROTOCOL = #{sharprotocol,jdbcType=OTHER},
|
ESPPROXY = #{espproxy,jdbcType=DECIMAL},
|
USERNAME = #{username,jdbcType=OTHER},
|
PASSWORD = #{password,jdbcType=OTHER},
|
TOKEN = #{token,jdbcType=OTHER},
|
RESOURCESTATUS = #{resourcestatus,jdbcType=DECIMAL},
|
AUDITSTATUS = #{auditstatus,jdbcType=DECIMAL},
|
DISPLAYBY2D = #{displayby2d,jdbcType=DECIMAL},
|
DISPLAYBY3D = #{displayby3d,jdbcType=DECIMAL},
|
ORDERID = #{orderid,jdbcType=DECIMAL},
|
CREATEDATE = #{createdate,jdbcType=TIMESTAMP},
|
LASTEDITDATE = #{lasteditdate,jdbcType=TIMESTAMP},
|
REMARK = #{remark,jdbcType=OTHER},
|
INSTEADAUDIT=#{insteadaudit,jdbcType=NUMERIC},
|
EXPIRATION=#{expiration,jdbcType=OTHER}
|
where RESOURCEID = #{resourceid,jdbcType=DECIMAL}
|
</update>
|
<select id="selectZyByMuLuId" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
from RES_MAININFO
|
where CATLOGID = #{muiuid,jdbcType=DECIMAL} order by ORDERID
|
</select>
|
|
<select id="selectResMainInfojoinAuditCount" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="java.lang.Integer">
|
select COUNT(*) from RES_MAININFO a left join RES_AUDIT b on(a.resourceid=b.resourceid)
|
<where>
|
RESOURCESTATUS = 0
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR replace(KEYWORDS,',','') like '%'||#{title}||'%' OR ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
and resourceclass=#{resourceclass,jdbcType=OTHER}
|
</if>
|
<if test="auditstatus!=null and (auditstatus==0 ? '0' : auditstatus) ">
|
and auditstatus = #{auditstatus,jdbcType=DECIMAL}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
|
</where>
|
</select>
|
|
<select id="selectResMainInfojoinAudit" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="com.landtool.lanbase.modules.res.entity.UserDefined.MainInfoJoinAudit">
|
select a.RESOURCEID,a.TITLE,a.RESOURCECLASS,a.AUDITSTATUS,a.PUBUNITID,a.CREATEUSERID,a.PUBDATE,b.AUDITUSERID,b.AUDITTIME,b.AUDITLEV
|
from RES_MAININFO a left join RES_AUDIT b on(a.resourceid=b.resourceid)
|
<where>
|
RESOURCESTATUS = 0
|
<if test="title!=null and title != '' ">
|
and (a.TITLE like '%'||#{title}||'%' OR replace(a.KEYWORDS,',','') like '%'||#{title}||'%' OR a.ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
and (resourceclass like #{resourceclass} || '%')
|
</if>
|
<if test="auditstatus !=null and (auditstatus==0 ? '0' : auditstatus) ">
|
and auditstatus=#{auditstatus,jdbcType=DECIMAL}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
</where>
|
<if test="sort!=null and sort != '' ">
|
order by ${sort} ${dir}
|
</if>
|
<if test="sort==null">
|
order by CREATEDATE DESC
|
</if>
|
</select>
|
|
<select id="selectZTDTList" resultMap="BaseResultMap">
|
SELECT a.RESOURCEID,a.TITLE from RES_MAININFO a
|
left join RES_EXTTHEMEMAP b on a.RESOURCEID=b.RESOURCEID
|
WHERE a.RESOURCECLASS=#{leixiId} and CREATEUSERID=#{userid}
|
and b.MAPJSON is not null
|
and b.TYPE='系统制作'
|
order by PUBDATE desc
|
</select>
|
|
<select id="getAll" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
SELECT
|
<include refid="Base_Column_List" />
|
FROM RES_MAININFO
|
</select>
|
|
<select id="getAllTotal" resultType="Integer">
|
SELECT
|
count(*)
|
FROM RES_MAININFO
|
</select>
|
<select id="selectTwtcForZiYuan" resultMap="BaseResultMap" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo" >
|
select
|
<include refid="Base_Column_List" />
|
from RES_MAININFO
|
<if test="iscollect != null and iscollect == 1">
|
left join RES_ACTIONRECORD b
|
on RES_MAININFO.RESOURCEID = b.RESOURCEID where b.ACTIONTYPE = '收藏'
|
</if>
|
<if test="iscollect == null">
|
where 1 = 1
|
</if>
|
<if test="title!=null and title != '' ">
|
and (RES_MAININFO.TITLE like '%'||#{title}||'%' OR replace(RES_MAININFO.KEYWORDS,',','') like '%'||#{title}||'%')
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and RES_MAININFO.createuserid = #{createuserid,jdbcType=OTHER}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and RES_MAININFO.PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and RES_MAININFO.PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
and RES_MAININFO.CATLOGID = #{catlogid,jdbcType=DECIMAL} and RES_MAININFO.resourceclass=#{resourceclass,jdbcType=OTHER} order by RES_MAININFO.ORDERID
|
</select>
|
|
<select id="selectZTDTCount" resultType="java.lang.Integer" parameterType="java.lang.String">
|
SELECT COUNT(*) from RES_MAININFO WHERE RESOURCECLASS=#{leixiId}
|
</select>
|
|
<select id="queryResMainInfoIdentCurrent" resultType="int">
|
SELECT RES_MAININFO_INS_SEQ.currval FROM DUAL
|
</select>
|
|
<select id="selectDATASOURCES" resultType="java.lang.String" >
|
SELECT DATASOURCES from RES_MAININFO GROUP BY DATASOURCES
|
</select>
|
<select id="selectJcdtList" parameterType="com.landtool.lanbase.modules.res.entity.UserDefined.MainInfoJoinJcdt"
|
resultType="com.landtool.lanbase.modules.res.entity.UserDefined.MainInfoJoinJcdt">
|
select a.RESOURCEID,datasources,title,resourceclass,pubunitid,securitylev,Keywords,basemaptype,pubdate,createuserid
|
from RES_EXTBASEMAP a LEFT JOIN RES_MAININFO b on a.RESOURCEID = b.RESOURCEID
|
<where>
|
AUDITSTATUS = 2 and RESOURCESTATUS = 0
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR replace(KEYWORDS,',','') like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
and resourceclass=#{resourceclass,jdbcType=OTHER}
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and createuserid = #{createuserid,jdbcType=OTHER}
|
</if>
|
<if test="basemaptype!=null and basemaptype != '' ">
|
and basemaptype = #{basemaptype,jdbcType=OTHER}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
</where>
|
<if test="neworder!=null and neworder != '' ">
|
order by CREATEDATE DESC
|
</if>
|
</select>
|
<select id="selectAllOrderByTime" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
WITH tab as (
|
select a.*, row_number() over(order by PUBDATE desc) as rn from RES_MAININFO a where RESOURCESTATUS=0 and AUDITSTATUS=2
|
)
|
|
SELECT * from tab WHERE <![CDATA[ rn <= 9]]>
|
</select>
|
<insert id="insertHotSearch" parameterType="java.lang.String">
|
INSERT INTO RES_HOTSEARCH (KEYWORD,TOTAL) VALUES(#{key},1)
|
</insert>
|
<select id="selectHotSearch" parameterType="java.lang.String" resultType="java.lang.String">
|
select KEYWORD from RES_HOTSEARCH WHERE KEYWORD=#{key,jdbcType=OTHER}
|
</select>
|
<update id="updateHotSearch" parameterType="java.lang.String">
|
update RES_HOTSEARCH SET total =(select total from RES_HOTSEARCH WHERE KEYWORD=#{key,jdbcType=OTHER})+1 WHERE KEYWORD=#{key,jdbcType=OTHER}
|
</update>
|
<select id="selectTopHotSearch" resultType="java.lang.String">
|
with tab as(
|
select row_number() over(order by TOTAL desc) as rn,a.* from RES_HOTSEARCH a where replace(KEYWORD,' ','') is NOT NULL
|
)
|
select KEYWORD from tab where <![CDATA[ rn < 6 ]]>
|
</select>
|
<select id="selectResMainInfoGroupByLeiXing"
|
resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByZiYuanLeiXing">
|
select resourceclass,count(*) count
|
from RES_MAININFO where AUDITSTATUS = 2 and RESOURCESTATUS = 0 group by resourceclass order by count desc
|
</select>
|
<select id="selectResMainInfoGroupByDataSources"
|
resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByDataSources">
|
select datasources,count(*) count
|
from RES_MAININFO where AUDITSTATUS = 2 and RESOURCESTATUS = 0 group by datasources order by count desc
|
</select>
|
<select id="selectResMainInfoGroupByMuLu"
|
resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByMuLu">
|
select * from (
|
select c.CatlogCode, c.Title,(select count(*) from RES_MAININFO a where a.CatlogCode like c.CatlogCode || '%' and AuditStatus = 2 and ResourceStatus = 0) count
|
from Res_Catalog c where c.parentid = 0 order by count desc) TMP where count > 0
|
</select>
|
<select id="selectResMainInfoGroupByPubDate" parameterType="java.lang.Integer"
|
resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByPubDate">
|
select DATEPART(month,pubdate) month,RESOURCECLASS,COUNT(*) count from RES_MAININFO where DATEPART(YEAR,PUBDATE)=#{year,jdbcType=DECIMAL} and AUDITSTATUS=2 and RESOURCESTATUS=0 group by DATEPART(month,pubdate),RESOURCECLASS
|
</select>
|
<select id="selectResMainInfoGroupByGongXiangXieYi"
|
resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByGongXiangXieYi">
|
select sharprotocol,count(*) count
|
from RES_MAININFO where AUDITSTATUS = 2 and RESOURCESTATUS = 0 group by sharprotocol order by count desc
|
</select>
|
<select id="selectResMainInfoGroupByXingZhengQuHua"
|
resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByXingZhengQuHua">
|
select administrativeid,count(*) count
|
from RES_MAININFO where AUDITSTATUS = 2 and RESOURCESTATUS = 0 group by administrativeid order by count desc
|
</select>
|
<select id="selectResMainInfoGroupByDanWei" resultType="com.landtool.lanbase.modules.res.entity.ZiYuanTongJi.GroupByDanWei">
|
select pubunitid,count(*) count
|
from RES_MAININFO where AUDITSTATUS = 2 and RESOURCESTATUS = 0 group by pubunitid order by count desc
|
</select>
|
<select id="getYWJCTreeData" resultMap="BaseResultMap" parameterType="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 1=1
|
<if test="catlogid!=null and (catlogid == 0 ? '0': catlogid) ">
|
AND a.CATLOGID = #{catlogid,jdbcType=DECIMAL}
|
</if>
|
AND a.resourceclass=#{resourceclass,jdbcType=OTHER}
|
AND a.AUDITSTATUS = 2
|
AND a.RESOURCESTATUS=0
|
AND b.Integratetype = '页面集成'
|
AND b.Showmodel = 'Iframe区块'
|
order by a.ORDERID
|
</select>
|
<select id="selectshenheCount" resultType="java.lang.String">
|
select COUNT(*) from RES_MAININFO where RESOURCESTATUS=0 and AUDITSTATUS=1
|
</select>
|
<select id="selectshenqingCount" resultType="java.lang.String">
|
select COUNT(*) from RES_APPLYRECOMMEND where AUDITRESULT=1
|
</select>
|
<select id="selectShoucangCount" parameterType="java.lang.Integer" resultType="java.lang.String">
|
SELECT COUNT(*)as 次数 FROM RES_ACTIONRECORD where USERID=#{Id} and ACTIONTYPE='收藏'
|
</select>
|
<select id="selectZhituCount" parameterType="java.lang.Integer" resultType="java.lang.String">
|
select COUNT(*)
|
from RES_EXTTHEMEMAP a
|
where TYPE='系统'
|
and EXISTS(
|
select RESOURCEID
|
from RES_MAININFO b
|
where a.RESOURCEID = b.RESOURCEID and CREATEUSERID=#{Id}
|
and RESOURCECLASS='KJ_ZTDT'
|
and RESOURCESTATUS=0
|
and AUDITSTATUS=2
|
)
|
</select>
|
<select id="selectWodeshenqing" parameterType="java.lang.Integer" resultType="java.lang.String">
|
select COUNT(*) from RES_APPLYRECOMMEND where AUDITRESULT=1 AND APPUSERID=#{Id} and ISRECOMMEND = 0
|
</select>
|
<select id="selectWodefabu" parameterType="java.lang.Integer" resultType="java.lang.String">
|
SELECT COUNT(*) FROM RES_MAININFO a
|
LEFT JOIN RES_APPLYRECOMMEND b ON a.RESOURCEID = b.RESOURCEID
|
<where>
|
a.AUDITSTATUS = 2 AND a.RESOURCESTATUS = 0 AND b.APPUSERID=#{Id}
|
</where>
|
</select>
|
|
<select id="selectTiTle" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select * from RES_MAININFO a
|
<where>
|
RESOURCESTATUS = 0 and auditstatus = 2
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR replace(KEYWORDS,',','') like '%'||#{title}||'%' OR ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="datasources !=null and datasources != '' ">
|
and (DATASOURCES like #{datasources} || '%' )
|
</if>
|
<if test="resourceclass != null and resourceclass != ''">
|
and RESOURCECLASS = #{resourceclass}
|
</if>
|
and not EXISTS (select AROUNDRESID from RES_QUERYAROUND b where a.RESOURCEID = b.AROUNDRESID and RESOURCEID= #{resourceid,jdbcType=DECIMAL})
|
</where>
|
ORDER by RESOURCEID
|
</select>
|
<insert id="ZiYuanZhouBianGuanLianAdd" parameterType="com.landtool.lanbase.modules.res.entity.Res_QueryAround" >
|
insert into RES_QUERYAROUND (RESOURCEID, AROUNDRESID, ADDUSERID)
|
values (#{resourceid},#{aroundresid},#{adduserid})
|
</insert>
|
<select id="checkZiYuanQuanXian" resultType="java.lang.Integer">
|
SELECT COUNT(*) FROM RES_MAININFO a
|
where a.RESOURCEID = #{resourceid} and (
|
a.CREATEUSERID = #{userid}
|
or (a.AUDITSTATUS = 2
|
and (
|
a.SHARPROTOCOL = '完全公开'
|
or (a.SHARPROTOCOL = '依申请公开' )
|
or (a.SHARPROTOCOL = '单位内公开' and PUBUNITID = #{unitid})
|
or exists(
|
select * from RES_APPLYRECOMMEND b
|
where (
|
(b.APPTYPE in( 0,3) and APPUSERID = concat(#{userid},''))
|
or (b.APPTYPE = 1 and APPUNITID = concat(#{unitid},''))
|
)
|
and b.auditresult = 1
|
and (b.EFFENDTIME is null or b.EFFENDTIME >= now())
|
and a.RESOURCEID = b.RESOURCEID
|
)
|
)
|
)
|
)
|
</select>
|
<select id="selectAllMainInfo" parameterType="com.landtool.lanbase.modules.res.entity.Res_MainInfo"
|
resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select *
|
from RES_MAININFO
|
<where>
|
<if test="title!=null and title != '' ">
|
and (TITLE like '%'||#{title}||'%' OR replace(KEYWORDS,',','') like '%'||#{title}||'%' OR ABBREVIATION like '%'||#{title}||'%')
|
</if>
|
<if test="resourceclass !=null and resourceclass != '' ">
|
and (resourceclass like #{resourceclass} || '%' )
|
</if>
|
<if test="createuserid!=null and createuserid != '' ">
|
and createuserid = #{createuserid}
|
</if>
|
|
<if test="createuserid ==null and faburen!=null and faburen != '' ">
|
and createuserid in( ${faburen} )
|
</if>
|
|
<if test="catlogcode!=null and catlogcode != '' ">
|
and SUBSTR(catlogcode,1, LENGTH(#{catlogcode,jdbcType=OTHER})) = #{catlogcode,jdbcType=OTHER}
|
</if>
|
<if test="datasources!=null and datasources != '' ">
|
and datasources = #{datasources,jdbcType=OTHER}
|
</if>
|
<if test="auditstatus!=null and (auditstatus==0 ? '0' : auditstatus)">
|
and auditstatus = #{auditstatus}
|
</if>
|
<if test="pubdateBegin!=null and pubdateBegin != '' ">
|
<!--and PUBDATE >= cast(#{pubdateBegin} as date)-->
|
and PUBDATE >= to_timestamp(#{pubdateBegin} || ' 00:00:00','yyyy-mm-dd hh24:mi:ss')
|
</if>
|
<if test="pubdatefinish!=null and pubdatefinish != '' ">
|
<![CDATA[ and PUBDATE <= to_timestamp(#{pubdatefinish} || ' 23:59:59','yyyy-mm-dd hh24:mi:ss') ]]>
|
</if>
|
<if test="resourcestatus!=null and (resourcestatus==0 ? '0' : resourcestatus) ">
|
and RESOURCESTATUS = #{resourcestatus,jdbcType=DECIMAL}
|
</if>
|
<if test="ExistPermission !=null">
|
and CREATEUSERID=#{ExistPermission}
|
</if>
|
<if test="sharprotocol !=null and sharprotocol !='' ">
|
and sharprotocol=#{sharprotocol}
|
</if>
|
<if test="spcStatus != null and spcStatus ==1 ">
|
and RES_MAININFO.SPC_STATUS =#{spcStatus}
|
</if>
|
<if test="spcStatus == null">
|
and RES_MAININFO.SPC_STATUS =0
|
</if>
|
</where>
|
<if test="sort!=null and sort != '' ">
|
order by ${sort} ${dir}
|
</if>
|
<if test="sort==null">
|
order by CREATEDATE DESC
|
</if>
|
</select>
|
|
<update id="updateStatusByPrimaryKey">
|
update RES_MAININFO set RESOURCESTATUS = #{resourcestatus} where RESOURCEID= #{resourceid}
|
</update>
|
|
<select id="pingyin" resultType="java.lang.String">
|
select title from RES_MAININFO
|
<where>
|
<if test="keyWord != null and keyWord.trim() != ''">
|
PINGYINFIIRST like '%'||#{keyWord}||'%' or TITLE like '%'||#{keyWord}||'%'
|
</if>
|
</where>
|
</select>
|
|
<select id="getListByMap" resultType="com.landtool.lanbase.modules.res.entity.Res_MainInfo">
|
select * from RES_MAININFO WHERE 1=1
|
<if test="catalogid != null">
|
and catlogid = #{catalogid}
|
</if>
|
<if test="resourceclass != null">
|
and resourceclass = #{resourceclass}
|
</if>
|
<if test="resourceid != null">
|
and resourceid = #{resourceid}
|
</if>
|
ORDER BY resourceid
|
</select>
|
|
<select id="getCountByResourceClass" parameterType="java.lang.String" resultType="java.lang.Integer">
|
select count(1) as count from RES_MAININFO where RESOURCECLASS=#{key} and AUDITSTATUS = 2
|
</select>
|
|
|
<select id="getCountByresCatalogId" parameterType="java.util.HashMap" resultType="java.lang.Integer">
|
select count(1) as count from RES_MAININFO where
|
CATLOGCODE like concat(#{catlogcode},'%')
|
<if test="key!=null and key!='' "> AND RESOURCECLASS=#{key}</if>
|
<if test="spcStatus!=null and spcStatus==1"> AND spc_Status=1 </if>
|
and AUDITSTATUS = 2
|
<if test="childrenNames !=null">
|
and title in
|
<foreach collection="childrenNames" open="(" close=")" separator="," item="childrenName">#{childrenName}</foreach>
|
</if>
|
</select>
|
|
|
<select id="queryForApply" parameterType="java.util.Map" resultType="java.util.Map">
|
select RM.SHARPROTOCOL,RM.CREATEUSERID,RM.RESOURCEID,RE.SERVERURL
|
from RES_MAININFO RM
|
left join RES_EXTMAPURL RE on RM.RESOURCEID=RE.RESOURCEID
|
WHERE RM.RESOURCEID=#{resourceid}
|
</select>
|
</mapper>
|