119 lines
3.3 KiB
XML
119 lines
3.3 KiB
XML
<?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="io.dataease.ext.ExtSysLogMapper">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="query" parameterType="io.dataease.ext.query.GridExample" resultMap="io.dataease.plugins.common.base.mapper.SysLogMapper.ResultMapWithBLOBs">
|
|
select * from sys_log
|
|
|
|
<if test="_parameter != null">
|
|
<include refid="io.dataease.ext.query.GridSql.gridCondition" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
<if test="orderByClause == null">
|
|
order by time desc
|
|
</if>
|
|
</select>
|
|
|
|
|
|
<select id="idAndName" resultType="io.dataease.dto.log.FolderItem" >
|
|
select
|
|
<if test="type == 1">
|
|
id, name
|
|
from datasource
|
|
<where>
|
|
id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 2">
|
|
id, name
|
|
from dataset_group
|
|
<where>
|
|
id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 3">
|
|
id, name
|
|
from panel_group
|
|
<where>
|
|
id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 4">
|
|
id, name
|
|
from chart_view
|
|
<where>
|
|
id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 5">
|
|
id, name
|
|
from panel_group
|
|
<where>
|
|
id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 6">
|
|
user_id as id, nick_name as name
|
|
from sys_user
|
|
<where>
|
|
user_id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 7">
|
|
dept_id as id, name
|
|
from sys_dept
|
|
<where>
|
|
dept_id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
<if test="type == 8">
|
|
role_id as id, name
|
|
from sys_role
|
|
<where>
|
|
role_id in
|
|
<foreach collection="ids" item="id" index="index" open="(" separator="," close=")">
|
|
#{id}
|
|
</foreach>
|
|
</where>
|
|
</if>
|
|
|
|
</select>
|
|
|
|
|
|
</mapper>
|