123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?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.InfoCommentMapper">
- <!-- 开启二级缓存 -->
- <!--<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>-->
- <select id="getConnInfoModelByCommentId" resultType="cn.ubitech.ttc.model.information.BaseInfoModel">
- SELECT
- i.id infoid,
- i.title title
- FROM connectioninfo i,
- info_comment c
- WHERE i.id = c.infoid
- AND c.infotype = 81
- AND i.isenabled = 1
- AND c.id = #{commentid}
- </select>
- <select id="getResourceInfoModelByCommentId" resultType="cn.ubitech.ttc.model.information.BaseInfoModel">
- SELECT
- i.id infoid,
- i.title title
- FROM resourcelibrary i,
- info_comment c
- WHERE i.id = c.infoid
- AND c.infotype = 81
- AND i.isenabled = 1
- AND c.id = #{commentid}
- </select>
- <select id="getCountGroupbyResourceid" resultType="cn.ubitech.ttc.model.information.BaseInfoModel">
- SELECT
- i.infoid AS infoid,
- COUNT(i.infoid) AS ishastag
- FROM
- info_comment i,
- resourcelibrary l,
- typeentry t
- WHERE
- i.infoid = l.id
- AND t.itemvalue = i.infotype
- AND t.tcname = 'resourcelibrary'
- GROUP BY
- i.infoid;
- </select>
- </mapper>
|