vue版本上线
This commit is contained in:
67
jshERP-boot/src/main/resources/mapper_xml/LogMapperEx.xml
Normal file
67
jshERP-boot/src/main/resources/mapper_xml/LogMapperEx.xml
Normal file
@@ -0,0 +1,67 @@
|
||||
<?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.jsh.erp.datasource.mappers.LogMapperEx">
|
||||
<resultMap extends="com.jsh.erp.datasource.mappers.LogMapper.BaseResultMap" id="ResultExMap" type="com.jsh.erp.datasource.vo.LogVo4List">
|
||||
<result column="userName" jdbcType="VARCHAR" property="userName" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByConditionLog" parameterType="com.jsh.erp.datasource.entities.LogExample" resultMap="ResultExMap">
|
||||
select l.*,u.username userName
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.user_id = u.id and ifnull(u.status,'0') not in('1','2')
|
||||
where 1=1
|
||||
<if test="operation != null">
|
||||
and l.operation like '%${operation}%'
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and l.user_id=${userId}
|
||||
</if>
|
||||
<if test="clientIp != null">
|
||||
and l.client_ip like '%${clientIp}%'
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and l.status=${status}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
and l.create_time >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and l.create_time <= '${endTime}'
|
||||
</if>
|
||||
<if test="content != null">
|
||||
and l.content like '%${content}%'
|
||||
</if>
|
||||
order by l.create_time desc
|
||||
<if test="offset != null and rows != null">
|
||||
limit #{offset},#{rows}
|
||||
</if>
|
||||
</select>
|
||||
<select id="countsByLog" resultType="java.lang.Long">
|
||||
SELECT
|
||||
COUNT(1)
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.user_id = u.id and ifnull(u.status,'0') not in('1','2')
|
||||
WHERE 1=1
|
||||
<if test="operation != null">
|
||||
and l.operation like '%${operation}%'
|
||||
</if>
|
||||
<if test="userId != null">
|
||||
and l.user_id=${userId}
|
||||
</if>
|
||||
<if test="clientIp != null">
|
||||
and l.client_ip like '%${clientIp}%'
|
||||
</if>
|
||||
<if test="status != null">
|
||||
and l.status = ${status}
|
||||
</if>
|
||||
<if test="beginTime != null">
|
||||
and l.create_time >= '${beginTime}'
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
and l.create_time <= '${endTime}'
|
||||
</if>
|
||||
<if test="content != null">
|
||||
and l.content like '%${content}%'
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user