kimi
2020-05-27 c007f0ca1785db093d48f4846cda82fe8e955765
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?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="com.highdatas.mdm.mapper.MasterAuthorMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.highdatas.mdm.entity.MasterAuthor">
        <id column="id" property="id" />
        <result column="type" property="type" />
        <result column="table_name" property="tableName" />
        <result column="active" property="active" />
        <result column="create_time" property="createTime" />
        <result column="update_time" property="updateTime" />
    </resultMap>
 
    <select id="selectAuthorUserCnt" resultType="java.util.Map"  statementType="STATEMENT">
      SELECT count(character_id) as cnt, character_id as user_id from master_author WHERE type = 'user' and user_group = 0 and active = 1 GROUP BY character_id
    </select>
 
    <select id="selectViewCnt" resultType="java.util.Map"  statementType="STATEMENT">
        SELECT count(user_id) as cnt, user_id as user_id from sys_view WHERE   active = 1 GROUP BY user_id
    </select>
</mapper>