<?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.chinaweal.aiccs.org.mapper.SysMenuMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.chinaweal.aiccs.org.entity.SysMenu">
        <id column="sysMenuID" property="sysMenuID" />
        <result column="sysMenuTypeID" property="sysMenuTypeID" />
        <result column="menuTypeID" property="menuTypeID" />
        <result column="sysMenuName" property="sysMenuName" />
        <result column="sysMenuFiled" property="sysMenuFiled" />
        <result column="resourceURL" property="resourceURL" />
        <result column="parentID" property="parentID" />
        <result column="remark" property="remark" />
        <result column="orgLevel" property="orgLevel" />
        <result column="resourceType" property="resourceType" />
        <result column="sysIndex" property="sysIndex" />
    </resultMap>

    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        sysMenuID, sysMenuTypeID, menuTypeID, sysMenuName, sysMenuFiled, resourceURL, parentID, remark, orgLevel, resourceType, sysIndex
    </sql>

    <select id="listOrgOperationLog" resultType="com.chinaweal.aiccs.org.entity.dto.OrgOperationLogDto">
        select tu.userName, tu.realName, tl.operationInfo, tl.operationTime  from t_loglist tl, t_users tu where tl.operationID = tu.userID
        <if test="params.startDate !=null and params.startDate !=''">
            and tl.operationTime between #{params.startDate} and #{params.endDate}
        </if>
        order by tl.operationTime desc
    </select>
</mapper>
