CloudauthoritygroupMapper.xml 1.3 KB

12345678910111213141516171819202122
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  3. <mapper namespace="cn.ubitech.ttc.dao.CloudauthoritygroupMapper">
  4. <!-- 开启二级缓存 -->
  5. <!--<cache type="org.mybatis.caches.ehcache.LoggingEhcache"/>-->
  6. <cache type="org.mybatis.caches.ehcache.EhcacheCache">
  7. <property name="timeToIdleSeconds" value="3600"/>
  8. <property name="timeToLiveSeconds" value="3600"/>
  9. <property name="maxEntriesLocalHeap" value="1000"/>
  10. <property name="maxEntriesLocalDisk" value="10000000"/>
  11. <property name="memoryStoreEvictionPolicy" value="LRU"/>
  12. </cache>
  13. <select id="getGroupByAuthorityId" resultType="cn.ubitech.ttc.entity.Cloudauthoritygroup">
  14. select g.id, g.comefrom, g.ccomefrom,g.parentid,g.istemplate,g.authname,g.authstatus,g.ispublic,g.remark,g.pushvaluededuct,g.createtime,
  15. g.creator,g.updatetime,g.updater,lk.typecode from cloudauthoritygroup g,autho_group_lk lk where g.id = lk.gid and lk.cid = #{cid}
  16. </select>
  17. <select id="getGroupByUserId" resultType="cn.ubitech.ttc.entity.Cloudauthoritygroup">
  18. select cg.* from cloudauthoritygroup cg,cloudauthoritygroupuser cgu where cg.id = cgu.gid and cgu.isenabled = 1
  19. and cgu.userid = #{userid}
  20. </select>
  21. </mapper>