kimi
2020-02-14 18097001d683a155257d7d38ebedbfe58269449b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
<?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.SysOperateLogMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.highdatas.mdm.entity.SysOperateLog">
        <id column="id" property="id" />
        <result column="charge_id" property="chargeId" />
        <result column="operate" property="operate" />
        <result column="desp" property="desp" />
        <result column="maintain_id" property="maintainId" />
        <result column="menu_id" property="menuId" />
    </resultMap>
 
    <select id="getCount" resultType="java.lang.Long" statementType="STATEMENT" >
        SELECT
        count(1)
        FROM `sys_operate_log` log
        LEFT JOIN `t_user` on `t_user`.user_id = log.charge_id
        LEFT JOIN maintain m on m.id = log.maintain_id
        LEFT JOIN flows f on f.business_id = m.id
        LEFT JOIN menu_mapping mm on mm.id = menumapping_id
 
        WHERE f.business_type = 'maintain' and ${where}
    </select>
 
    <select id="getInfo" resultType="java.util.Map" statementType="STATEMENT" >
        SELECT
        m.version,
        mm.code, mm.name, user_name as userName, log.create_time, log.desp,log.operate, f.`status`
        FROM `sys_operate_log` log
        LEFT JOIN `t_user` on `t_user`.user_id = log.charge_id
        LEFT JOIN maintain m on m.id = log.maintain_id
        LEFT JOIN flows f on f.business_id = m.id
        LEFT JOIN menu_mapping mm on mm.id = menumapping_id
         WHERE f.business_type = 'maintain' and ${where}
         ORDER  BY log.create_time desc
         ${limit}
    </select>
</mapper>