修复进销存合并
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
<?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.zsw.erp.datasource.mappers.LogMapperEx">
|
||||
<resultMap extends="com.zsw.erp.datasource.mappers.ErpLogMapper.BaseResultMap" id="ResultExMap" type="com.zsw.erp.datasource.vo.LogVo4List">
|
||||
<result column="userName" jdbcType="VARCHAR" property="userName" />
|
||||
<result column="login_name" jdbcType="VARCHAR" property="loginName" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectByConditionLog" parameterType="com.zsw.erp.datasource.entities.LogExample" resultMap="ResultExMap">
|
||||
select l.*,u.login_name,u.username userName
|
||||
FROM jsh_log l
|
||||
left join jsh_user u on l.user_id = u.id and ifnull(u.Status,'0') !='1'
|
||||
where 1=1
|
||||
<if test="operation != null">
|
||||
<bind name="bindOperation" value="'%'+operation+'%'"/>
|
||||
and l.operation like #{bindOperation}
|
||||
</if>
|
||||
<if test="userInfo != null">
|
||||
<bind name="bindUserInfo" value="'%'+userInfo+'%'"/>
|
||||
and (u.username like #{bindUserInfo} or u.login_name like #{bindUserInfo})
|
||||
</if>
|
||||
<if test="clientIp != null">
|
||||
<bind name="bindClientIp" value="'%'+clientIp+'%'"/>
|
||||
and l.client_ip like #{bindClientIp}
|
||||
</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">
|
||||
<bind name="bindContent" value="'%'+content+'%'"/>
|
||||
and l.content like #{bindContent}
|
||||
</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') !='1'
|
||||
WHERE 1=1
|
||||
<if test="operation != null">
|
||||
<bind name="bindOperation" value="'%'+operation+'%'"/>
|
||||
and l.operation like #{bindOperation}
|
||||
</if>
|
||||
<if test="userInfo != null">
|
||||
<bind name="bindUserInfo" value="'%'+userInfo+'%'"/>
|
||||
and (u.username like #{bindUserInfo} or u.login_name like #{bindUserInfo})
|
||||
</if>
|
||||
<if test="clientIp != null">
|
||||
<bind name="bindClientIp" value="'%'+clientIp+'%'"/>
|
||||
and l.client_ip like #{bindClientIp}
|
||||
</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">
|
||||
<bind name="bindContent" value="'%'+content+'%'"/>
|
||||
and l.content like #{bindContent}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getCountByIpAndDate" resultType="java.lang.Long">
|
||||
select count(1) from jsh_log where operation=#{moduleName} and client_ip=#{clientIp} and create_time=#{createTime}
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user