|
|
@@ -180,13 +180,31 @@
|
|
|
</select>
|
|
|
<select id="findLoginLogPage" resultMap="UserLoginLogResultMap">
|
|
|
select
|
|
|
- a.`id`, a.`login_account`, a.`account_type`, a.`login_ip`, a.`login_local`, a.`from_source`, a.`device_id`,
|
|
|
- a.`login_time`, a.`state`
|
|
|
+ `id`, `login_account`, `account_type`, `login_ip`, `login_local`, `from_source`, `device_id`,
|
|
|
+ `login_time`, `state`
|
|
|
from user_login_logs a
|
|
|
- left join user_login_account b on a.`login_account`=b.`login_account`
|
|
|
<where>
|
|
|
- <if test="uid !=null">
|
|
|
- b.`uid`=#{uid}
|
|
|
+ <if test="loginAccount !=null and loginAccount !=''">
|
|
|
+ AND `login_account` like CONCAT('%',#{loginAccount},'%')
|
|
|
+ </if>
|
|
|
+ <if test="accountType !=null">
|
|
|
+ AND `account_type`=#{accountType, typeHandler=com.zhiqiyun.open.mybatis.typeHandler.IEnumTypeHandler}
|
|
|
+ </if>
|
|
|
+ <if test="loginIp !=null and loginIp !=''">
|
|
|
+ AND `login_ip`=#{loginIp}
|
|
|
+ </if>
|
|
|
+ <if test="loginLocal !=null and loginLocal !=''">
|
|
|
+ AND `login_local` like CONCAT('%',#{loginLocal},'%')
|
|
|
+ </if>
|
|
|
+ <if test="fromSource !=null and fromSource !=''">
|
|
|
+ AND `from_source` like CONCAT('%',#{fromSource},'%')
|
|
|
+ </if>
|
|
|
+ <if test="loginTime !=null">
|
|
|
+ AND `login_time` between #{loginTime.statDate, jdbcType=TIMESTAMP} and
|
|
|
+ #{loginTime.endDate, jdbcType=TIMESTAMP}
|
|
|
+ </if>
|
|
|
+ <if test="state !=null">
|
|
|
+ AND `state` = #{state, typeHandler=com.zhiqiyun.open.mybatis.typeHandler.IEnumTypeHandler}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
@@ -198,8 +216,27 @@
|
|
|
from user_operate_logs a
|
|
|
left join user_base_info b on a.`uid`=b.`id`
|
|
|
<where>
|
|
|
- <if test="uid !=null">
|
|
|
- b.`uid`=#{uid}
|
|
|
+ <if test="nickName !=null and nickName !=''">
|
|
|
+ AND b.`nick_name` like CONCAT("%",#{nickName},"%")
|
|
|
+ </if>
|
|
|
+ <if test="tags !=null and tags !=''">
|
|
|
+ AND a.`tags` like CONCAT("%",#{tags},"%")
|
|
|
+ </if>
|
|
|
+ <if test="requestIp !=null and requestIp !=''">
|
|
|
+ AND a.`request_ip` = #{requestIp}
|
|
|
+ </if>
|
|
|
+ <if test="requestUrl !=null and requestUrl !=''">
|
|
|
+ AND a.`request_url` like CONCAT("%",#{requestUrl},"%")
|
|
|
+ </if>
|
|
|
+ <if test="requestParams !=null and requestParams !=''">
|
|
|
+ AND a.`request_params` like CONCAT("%",#{requestParams},"%")
|
|
|
+ </if>
|
|
|
+ <if test="requestData !=null and requestData !=''">
|
|
|
+ AND a.`request_data` like CONCAT("%",#{requestData},"%")
|
|
|
+ </if>
|
|
|
+ <if test="requestTime !=null">
|
|
|
+ AND `request_time` between #{requestTime.statDate, jdbcType=TIMESTAMP} and
|
|
|
+ #{requestTime.endDate, jdbcType=TIMESTAMP}
|
|
|
</if>
|
|
|
</where>
|
|
|
</select>
|