123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137 |
- <?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="cn.ubitech.ttc.dao.ConnectioninfoMapper">
- <!-- 开启二级缓存 -->
- <!--<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>-->
- <select id="getConnectionByOrgidAndUserid" resultType="cn.ubitech.ttc.model.datatools.dataentry.ConnectioninfoModel">
- SELECT c.*
- FROM conn_org_lk col,
- connectioninfo c,
- sys_page sp
- WHERE col.orgid = #{orgid}
- AND col.connid = c.id
- AND c.templettype = sp.id
- AND sp.funid = #{funid}
- AND c.creator = #{userid}
- AND c.title LIKE #{keyword}
- AND c.node IN
- <foreach collection="nodeList" item="id" index="index"
- open="(" close=")" separator=",">
- #{id}
- </foreach>
- order by c.createtime desc
- </select>
- <select id="getConnectionByOrgid" resultType="cn.ubitech.ttc.model.datatools.dataentry.ConnectioninfoModel">
- SELECT c.*
- FROM conn_org_lk col,
- connectioninfo c,
- sys_page sp
- WHERE col.orgid = #{orgid}
- AND col.connid = c.id
- AND c.templettype = sp.id
- AND sp.funid = #{funid}
- AND c.title LIKE #{keyword}
- AND c.templettype IN
- <foreach collection="funidlist" item="id" index="index"
- open="(" close=")" separator=",">
- #{id}
- </foreach>
- AND c.node IN
- <foreach collection="nodeList" item="id" index="index"
- open="(" close=")" separator=",">
- #{id}
- </foreach>
- order by c.createtime desc
- </select>
- <select id="getConnectionByKeyword"
- resultType="cn.ubitech.ttc.model.datatools.dataentry.ConnectioninfoModel">
- select *
- from connectioninfo c ,
- sys_page sp
- where c.templettype = sp.id
- AND sp.funid = #{funid}
- AND c.title LIKE #{keyword}
- order by c.createtime desc
- </select>
- <select id="getConnectionByOrgidCount" resultType="java.lang.Integer">
- select count(*) from (
- SELECT c.*
- FROM conn_org_lk col,
- connectioninfo c,
- sys_page sp
- WHERE col.orgid = #{orgid}
- AND col.connid = c.id
- AND c.templettype = sp.id
- AND sp.funid = #{funid}
- AND c.templettype IN
- <foreach collection="funidlist" item="id" index="index"
- open="(" close=")" separator=",">
- #{id}
- </foreach>
- AND c.node IN
- <foreach collection="nodeList" item="id" index="index"
- open="(" close=")" separator=",">
- #{id}
- </foreach>
- AND c.title LIKE #{keyword}) a
- </select>
- <select id="getCountByGroup" resultType="cn.ubitech.ttc.model.datatools.dataentry.ConnectioninfoModell">
- SELECT
- p.*, count(p.id) as countvalue
- FROM
- connectioninfo p
- GROUP BY
- p.creator;
- </select>
- <select id="getOrgCreatorByConnid" resultType="cn.ubitech.ttc.entity.OrganizationInfo">
- SELECT
- oi.*
- FROM organization_info oi
- INNER JOIN conn_org_lk col
- ON oi.id = col.orgid
- WHERE col.connid = #{connid}
- limit 0,1
- </select>
- <select id="getConnNameByNode" resultType="java.lang.String">
- SELECT
- DISTINCT i.title
- FROM connectioninfo i
- WHERE i.node = #{node}
- AND ishighorginspect = "1"
- <if test='keyfilter != "0"'>
- AND i.title like '%${keyfilter}%'
- </if>
- </select>
- <select id="getConnectionByConnid" resultType="cn.ubitech.ttc.entity.Connectioninfo">
- SELECT
- *
- FROM connectioninfo
- WHERE id = #{connid}
- AND isresourcelibrarydata = "0"
- </select>
- <select id="getConnNameByUserid" resultType="cn.ubitech.ttc.entity.Connectioninfo">
- SELECT *
- FROM connectioninfo i
- WHERE i.node = #{node}
- AND creator = #{userid}
- AND ishighorginspect = "1"
- <if test='keyfilter != "0"'>
- AND i.title like '%${keyfilter}%'
- </if>
- <if test='keyfilter == "0"'>
- AND i.title = #{title}
- </if>
- <if test='keyfilter != "0"'>
- AND i.title like '%${keyfilter}%'
- </if>
- <if test='sortKey != "0"'>
- order by ${sortKey} desc
- </if>
- </select>
- </mapper>
|