123456789101112131415161718192021222324252627282930 |
- <?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.ImUserTopicMapper">
- <!-- 开启二级缓存 -->
- <!--<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>-->
- <select id="getuserTopicByuserid" resultType="cn.ubitech.ttc.model.im.IMUserTopicModel">
- select
- iut.*,
- it.topicname
- from im_user_topic iut, im_topic it
- where iut.userid = #{userid}
- and iut.isactive = 1 and iut.topicid = it.id and it.isactive = 1
- </select>
- <select id="getuserTopic" resultType="cn.ubitech.ttc.model.im.IMUserTopicModel">
- select
- iut.*,
- it.topicname
- from im_user_topic iut, im_topic it
- where iut.userid = #{userid} and iut.type = #{type} and iut.reciverid = #{reciverid} and iut.topicid = it.id and it.isactive = 1
- </select>
- <select id="getUserChatlist" resultType="cn.ubitech.ttc.model.im.IMUserTopicModel">
- SELECT
- iut.*,
- it.topicname
- FROM im_user_topic iut, im_topic it
- WHERE iut.userId = #{userid} AND iut.isactive = 1 AND iut.topicid = it.id AND it.isactive = 1
- </select>
- </mapper>
|