1234567891011121314151617181920212223242526272829303132 |
- <?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.ClickRecordMapper">
- <!-- 开启二级缓存 -->
- <!--<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>-->
- <select id="getMyCollect" resultType="cn.ubitech.ttc.entity.ClickRecord">
- select * from click_record where moduleid = #{moduleid} and clicktype = #{clicktype} and userid = #{userid} and status = 1 order by createtime desc
- </select>
- <select id="getMyCollectCount" resultType="java.lang.Integer">
- select count(*) from click_record where moduleid = #{moduleid} and clicktype = #{clicktype} and userid = #{userid} and status = 1
- </select>
- <select id="getCountByGroup" resultType="cn.ubitech.ttc.model.click.clickrecordModel">
- SELECT
- c.*, COUNT(c.targetid)as countvalue
- FROM
- click_record c,
- resourcelibrary r,
- typeentry t
- WHERE
- c.targetid = r.id
- AND c.moduleid = t.itemvalue
- AND t.typename = 'tablecode'
- AND c.clicktype=#{clicktype}
- AND t.tcname = #{tcname}
- GROUP BY
- c.targetid
- </select>
- </mapper>
|