feat: 连表查询完成

This commit is contained in:
bunny 2024-10-31 10:01:58 +08:00
parent bc863932a9
commit 0c1d00d864
22 changed files with 145 additions and 93 deletions

View File

@ -15,15 +15,19 @@
</sql>
<!-- 分页查询${classTitle}内容 -->
<select id="selectListByPage" resultType="$type">
<select id="selectListByPage" resultType="${type}Vo">
select
<include refid="Base_Column_List"/>
from $tableName
base.*,
create_user.username as create_username,
update_user.username as update_username
from $tableName base
left join sys_user create_user on create_user.id = base.create_user
left join sys_user update_user on update_user.id = base.update_user
<where>
is_deleted = 0
base.is_deleted = 0
#foreach($field in $pageQueryMap)
<if test="dto.${field.property} != null and dto.${field.property} != ''">
and $field.column like CONCAT('%',#{dto.${field.property}},'%')
and base.$field.column like CONCAT('%',#{dto.${field.property}},'%')
</if>
#end
</where>

View File

@ -31,13 +31,7 @@ public class ${originalName}ServiceImpl extends ServiceImpl<${originalName}Mappe
*/
@Override
public PageResult<${originalName}Vo> get${originalName}List(Page<${originalName}> pageParams, ${originalName}Dto dto) {
IPage<${originalName}> page = baseMapper.selectListByPage(pageParams, dto);
List<${originalName}Vo> voList = page.getRecords().stream().map(${lowercaseName} -> {
${originalName}Vo ${lowercaseName}Vo = new ${originalName}Vo();
BeanUtils.copyProperties(${lowercaseName}, ${lowercaseName}Vo);
return ${lowercaseName}Vo;
}).toList();
IPage<${originalName}Vo> page = baseMapper.selectListByPage(pageParams, dto);
return PageResult.<${originalName}Vo>builder()
.list(voList)

View File

@ -1,6 +1,6 @@
package cn.bunny.dao.vo.log;
import cn.bunny.dao.common.vo.BaseVo;
import cn.bunny.dao.common.vo.BaseUserVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@ -10,7 +10,7 @@ import lombok.*;
@NoArgsConstructor
@Builder
@Schema(name = "QuartzExecuteLogVo对象", title = "调度任务执行日志返回对象", description = "调度任务执行日志返回对象")
public class QuartzExecuteLogVo extends BaseVo {
public class QuartzExecuteLogVo extends BaseUserVo {
@Schema(name = "jobName", title = "任务名称")
private String jobName;

View File

@ -0,0 +1,41 @@
package cn.bunny.dao.vo.log;
import cn.bunny.dao.common.vo.BaseVo;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@EqualsAndHashCode(callSuper = true)
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@Schema(name = "UserLoginLogLocalVo对象", title = "用户登录日志", description = "用户登录日志")
public class UserLoginLogLocalVo extends BaseVo {
@Schema(name = "userId", title = "用户Id")
private Long userId;
@Schema(name = "username", title = "用户名")
private String username;
@Schema(name = "token", title = "登录token")
private String token;
@Schema(name = "ipAddress", title = "登录Ip")
private String ipAddress;
@Schema(name = "ipRegion", title = "登录Ip归属地")
private String ipRegion;
@Schema(name = "userAgent", title = "登录时代理")
private String userAgent;
@Schema(name = "type", title = "操作类型")
private String type;
@Schema(name = "xRequestedWith", title = "标识客户端是否是通过Ajax发送请求的")
@JsonProperty("xRequestedWith")
private String xRequestedWith;
}

View File

@ -1,6 +1,6 @@
package cn.bunny.dao.vo.log;
import cn.bunny.dao.common.vo.BaseVo;
import cn.bunny.dao.common.vo.BaseUserVo;
import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@ -11,7 +11,7 @@ import lombok.*;
@NoArgsConstructor
@Builder
@Schema(name = "UserLoginLogVo对象", title = "用户登录日志", description = "用户登录日志")
public class UserLoginLogVo extends BaseVo {
public class UserLoginLogVo extends BaseUserVo {
@Schema(name = "userId", title = "用户Id")
private Long userId;

View File

@ -1,6 +1,6 @@
package cn.bunny.dao.vo.quartz;
import cn.bunny.dao.common.vo.BaseVo;
import cn.bunny.dao.common.vo.BaseUserVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@ -10,7 +10,7 @@ import lombok.*;
@NoArgsConstructor
@Builder
@Schema(name = "SchedulersGroupVo", title = "任务调度分组返回对象", description = "任务调度分组返回对象")
public class SchedulersGroupVo extends BaseVo {
public class SchedulersGroupVo extends BaseUserVo {
@Schema(name = "groupName", title = "分组名称")
private String groupName;

View File

@ -1,6 +1,6 @@
package cn.bunny.dao.vo.system.files;
import cn.bunny.dao.common.vo.BaseVo;
import cn.bunny.dao.common.vo.BaseUserVo;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.*;
@ -10,7 +10,7 @@ import lombok.*;
@NoArgsConstructor
@Builder
@Schema(name = "FilesVo对象", title = "系统文件", description = "管理端系统文件返回信息")
public class FilesVo extends BaseVo {
public class FilesVo extends BaseUserVo {
@Schema(name = "filename", title = "文件的名称")
private String filename;

View File

@ -5,6 +5,7 @@ import cn.bunny.dao.entity.log.UserLoginLog;
import cn.bunny.dao.pojo.result.PageResult;
import cn.bunny.dao.pojo.result.Result;
import cn.bunny.dao.pojo.result.ResultCodeEnum;
import cn.bunny.dao.vo.log.UserLoginLogLocalVo;
import cn.bunny.dao.vo.log.UserLoginLogVo;
import cn.bunny.services.service.UserLoginLogService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -48,13 +49,13 @@ public class UserLoginLogController {
@Operation(summary = "获取本地用户登录日志", description = "获取本地用户登录日志")
@GetMapping("noManage/getUserLoginLogListByLocalUser/{page}/{limit}")
public Mono<Result<PageResult<UserLoginLogVo>>> getUserLoginLogListByLocalUser(
public Mono<Result<PageResult<UserLoginLogLocalVo>>> getUserLoginLogListByLocalUser(
@Parameter(name = "page", description = "当前页", required = true)
@PathVariable("page") Integer page,
@Parameter(name = "limit", description = "每页记录数", required = true)
@PathVariable("limit") Integer limit) {
Page<UserLoginLog> pageParams = new Page<>(page, limit);
PageResult<UserLoginLogVo> voPageResult = userLoginLogService.getUserLoginLogListByLocalUser(pageParams);
PageResult<UserLoginLogLocalVo> voPageResult = userLoginLogService.getUserLoginLogListByLocalUser(pageParams);
return Mono.just(Result.success(voPageResult));
}

View File

@ -1,6 +1,5 @@
package cn.bunny.services.factory;
import cn.bunny.dao.entity.log.UserLoginLog;
import cn.bunny.dao.pojo.result.PageResult;
import cn.bunny.dao.vo.log.UserLoginLogVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
@ -18,7 +17,7 @@ public class UserLoginLogFactory {
* @param page 分页结果
* @return 分页用户登录日志
*/
public PageResult<UserLoginLogVo> getUserLoginLogVoPageResult(IPage<UserLoginLog> page) {
public PageResult<UserLoginLogVo> getUserLoginLogVoPageResult(IPage<UserLoginLogVo> page) {
List<UserLoginLogVo> voList = page.getRecords().stream().map(userLoginLog -> {
UserLoginLogVo userLoginLogVo = new UserLoginLogVo();
BeanUtils.copyProperties(userLoginLog, userLoginLogVo);

View File

@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
import cn.bunny.dao.dto.system.files.FilesDto;
import cn.bunny.dao.entity.system.Files;
import cn.bunny.dao.vo.system.files.FilesVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -28,7 +29,7 @@ public interface FilesMapper extends BaseMapper<Files> {
* @param dto 系统文件表查询表单
* @return 系统文件表分页结果
*/
IPage<Files> selectListByPage(@Param("page") Page<Files> pageParams, @Param("dto") FilesDto dto);
IPage<FilesVo> selectListByPage(@Param("page") Page<Files> pageParams, @Param("dto") FilesDto dto);
/**
* 物理删除系统文件表

View File

@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
import cn.bunny.dao.dto.log.ScheduleExecuteLogDto;
import cn.bunny.dao.entity.log.ScheduleExecuteLog;
import cn.bunny.dao.vo.log.QuartzExecuteLogVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -28,7 +29,7 @@ public interface ScheduleExecuteLogMapper extends BaseMapper<ScheduleExecuteLog>
* @param dto 调度任务执行日志查询表单
* @return 调度任务执行日志分页结果
*/
IPage<ScheduleExecuteLog> selectListByPage(@Param("page") Page<ScheduleExecuteLog> pageParams, @Param("dto") ScheduleExecuteLogDto dto);
IPage<QuartzExecuteLogVo> selectListByPage(@Param("page") Page<ScheduleExecuteLog> pageParams, @Param("dto") ScheduleExecuteLogDto dto);
/**
* 物理删除调度任务执行日志

View File

@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
import cn.bunny.dao.dto.quartz.group.SchedulersGroupDto;
import cn.bunny.dao.entity.quartz.SchedulersGroup;
import cn.bunny.dao.vo.quartz.SchedulersGroupVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -28,7 +29,7 @@ public interface SchedulersGroupMapper extends BaseMapper<SchedulersGroup> {
* @param dto 任务调度分组查询表单
* @return 任务调度分组分页结果
*/
IPage<SchedulersGroup> selectListByPage(@Param("page") Page<SchedulersGroup> pageParams, @Param("dto") SchedulersGroupDto dto);
IPage<SchedulersGroupVo> selectListByPage(@Param("page") Page<SchedulersGroup> pageParams, @Param("dto") SchedulersGroupDto dto);
/**
* 物理删除任务调度分组

View File

@ -2,6 +2,7 @@ package cn.bunny.services.mapper;
import cn.bunny.dao.dto.log.UserLoginLogDto;
import cn.bunny.dao.entity.log.UserLoginLog;
import cn.bunny.dao.vo.log.UserLoginLogVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
@ -28,7 +29,7 @@ public interface UserLoginLogMapper extends BaseMapper<UserLoginLog> {
* @param dto 用户登录日志查询表单
* @return 用户登录日志分页结果
*/
IPage<UserLoginLog> selectListByPage(@Param("page") Page<UserLoginLog> pageParams, @Param("dto") UserLoginLogDto dto);
IPage<UserLoginLogVo> selectListByPage(@Param("page") Page<UserLoginLog> pageParams, @Param("dto") UserLoginLogDto dto);
/**
* 物理删除用户登录日志

View File

@ -3,6 +3,7 @@ package cn.bunny.services.service;
import cn.bunny.dao.dto.log.UserLoginLogDto;
import cn.bunny.dao.entity.log.UserLoginLog;
import cn.bunny.dao.pojo.result.PageResult;
import cn.bunny.dao.vo.log.UserLoginLogLocalVo;
import cn.bunny.dao.vo.log.UserLoginLogVo;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
@ -39,5 +40,5 @@ public interface UserLoginLogService extends IService<UserLoginLog> {
* @param pageParams 分页查询内容
* @return 用户登录日志返回列表
*/
PageResult<UserLoginLogVo> getUserLoginLogListByLocalUser(Page<UserLoginLog> pageParams);
PageResult<UserLoginLogLocalVo> getUserLoginLogListByLocalUser(Page<UserLoginLog> pageParams);
}

View File

@ -74,16 +74,10 @@ public class FilesServiceImpl extends ServiceImpl<FilesMapper, Files> implements
@Override
public PageResult<FilesVo> getFilesList(Page<Files> pageParams, FilesDto dto) {
// 分页查询菜单图标
IPage<Files> page = baseMapper.selectListByPage(pageParams, dto);
List<FilesVo> voList = page.getRecords().stream().map(files -> {
FilesVo filesVo = new FilesVo();
BeanUtils.copyProperties(files, filesVo);
return filesVo;
}).toList();
IPage<FilesVo> page = baseMapper.selectListByPage(pageParams, dto);
return PageResult.<FilesVo>builder()
.list(voList)
.list(page.getRecords())
.pageNo(page.getCurrent())
.pageSize(page.getSize())
.total(page.getTotal())

View File

@ -9,7 +9,6 @@ import cn.bunny.services.service.ScheduleExecuteLogService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.util.List;
@ -35,16 +34,10 @@ public class ScheduleExecuteLogServiceImpl extends ServiceImpl<ScheduleExecuteLo
@Override
public PageResult<QuartzExecuteLogVo> getQuartzExecuteLogList(Page<ScheduleExecuteLog> pageParams, ScheduleExecuteLogDto dto) {
// 分页查询菜单图标
IPage<ScheduleExecuteLog> page = baseMapper.selectListByPage(pageParams, dto);
List<QuartzExecuteLogVo> voList = page.getRecords().stream().map(quartzExecuteLog -> {
QuartzExecuteLogVo quartzExecuteLogVo = new QuartzExecuteLogVo();
BeanUtils.copyProperties(quartzExecuteLog, quartzExecuteLogVo);
return quartzExecuteLogVo;
}).toList();
IPage<QuartzExecuteLogVo> page = baseMapper.selectListByPage(pageParams, dto);
return PageResult.<QuartzExecuteLogVo>builder()
.list(voList)
.list(page.getRecords())
.pageNo(page.getCurrent())
.pageSize(page.getSize())
.total(page.getTotal())

View File

@ -40,16 +40,10 @@ public class SchedulersGroupServiceImpl extends ServiceImpl<SchedulersGroupMappe
@Override
public PageResult<SchedulersGroupVo> getSchedulersGroupList(Page<SchedulersGroup> pageParams, SchedulersGroupDto dto) {
// 分页查询菜单图标
IPage<SchedulersGroup> page = baseMapper.selectListByPage(pageParams, dto);
List<SchedulersGroupVo> voList = page.getRecords().stream().map(schedulersGroup -> {
SchedulersGroupVo schedulersGroupVo = new SchedulersGroupVo();
BeanUtils.copyProperties(schedulersGroup, schedulersGroupVo);
return schedulersGroupVo;
}).toList();
IPage<SchedulersGroupVo> page = baseMapper.selectListByPage(pageParams, dto);
return PageResult.<SchedulersGroupVo>builder()
.list(voList)
.list(page.getRecords())
.pageNo(page.getCurrent())
.pageSize(page.getSize())
.total(page.getTotal())

View File

@ -4,6 +4,7 @@ import cn.bunny.common.service.context.BaseContext;
import cn.bunny.dao.dto.log.UserLoginLogDto;
import cn.bunny.dao.entity.log.UserLoginLog;
import cn.bunny.dao.pojo.result.PageResult;
import cn.bunny.dao.vo.log.UserLoginLogLocalVo;
import cn.bunny.dao.vo.log.UserLoginLogVo;
import cn.bunny.services.factory.UserLoginLogFactory;
import cn.bunny.services.mapper.UserLoginLogMapper;
@ -11,6 +12,7 @@ import cn.bunny.services.service.UserLoginLogService;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@ -42,7 +44,7 @@ public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, Use
@Override
public PageResult<UserLoginLogVo> getUserLoginLogList(Page<UserLoginLog> pageParams, UserLoginLogDto dto) {
// 分页查询菜单图标
IPage<UserLoginLog> page = baseMapper.selectListByPage(pageParams, dto);
IPage<UserLoginLogVo> page = baseMapper.selectListByPage(pageParams, dto);
return factory.getUserLoginLogVoPageResult(page);
}
@ -68,10 +70,21 @@ public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, Use
* @return 用户登录日志返回列表
*/
@Override
public PageResult<UserLoginLogVo> getUserLoginLogListByLocalUser(Page<UserLoginLog> pageParams) {
public PageResult<UserLoginLogLocalVo> getUserLoginLogListByLocalUser(Page<UserLoginLog> pageParams) {
Long userId = BaseContext.getUserId();
IPage<UserLoginLog> page = baseMapper.selectListByPageWithLocalUser(pageParams, userId);
return factory.getUserLoginLogVoPageResult(page);
List<UserLoginLogLocalVo> voList = page.getRecords().stream().map(userLoginLog -> {
UserLoginLogLocalVo userLoginLogVo = new UserLoginLogLocalVo();
BeanUtils.copyProperties(userLoginLog, userLoginLogVo);
return userLoginLogVo;
}).toList();
return PageResult.<UserLoginLogLocalVo>builder()
.list(voList)
.pageNo(page.getCurrent())
.pageSize(page.getSize())
.total(page.getTotal())
.build();
}
}

View File

@ -23,26 +23,29 @@
</sql>
<!-- 分页查询系统文件表内容 -->
<select id="selectListByPage" resultType="cn.bunny.dao.entity.system.Files">
<select id="selectListByPage" resultType="cn.bunny.dao.vo.system.files.FilesVo">
select
<include refid="Base_Column_List"/>
from sys_files
files.*,
create_user.username as create_username,
update_user.username as update_username
from sys_files files
left join sys_user create_user on create_user.id = files.create_user
left join sys_user update_user on update_user.id = files.update_user
<where>
is_deleted = 0
files.is_deleted = 0
<if test="dto.filename != null and dto.filename != ''">
and filename like CONCAT('%',#{dto.filename},'%')
and files.filename like CONCAT('%',#{dto.filename},'%')
</if>
<if test="dto.filepath != null and dto.filepath != ''">
and filepath like CONCAT('%',#{dto.filepath},'%')
and files.filepath like CONCAT('%',#{dto.filepath},'%')
</if>
<if test="dto.fileType != null and dto.fileType != ''">
and file_type like CONCAT('%',#{dto.fileType},'%')
and files.file_type like CONCAT('%',#{dto.fileType},'%')
</if>
<if test="dto.downloadCount != null and dto.downloadCount != ''">
and download_count like CONCAT('%',#{dto.downloadCount},'%')
and files.download_count like CONCAT('%',#{dto.downloadCount},'%')
</if>
</where>
order by update_time
</select>
<!-- 物理删除系统文件表 -->

View File

@ -25,29 +25,32 @@
</sql>
<!-- 分页查询调度任务执行日志内容 -->
<select id="selectListByPage" resultType="cn.bunny.dao.entity.log.ScheduleExecuteLog">
<select id="selectListByPage" resultType="cn.bunny.dao.vo.log.QuartzExecuteLogVo">
select
<include refid="Base_Column_List"/>
from log_quartz_execute
log.*,
create_user.username as create_username,
update_user.username as update_username
from log_quartz_execute log
left join sys_user create_user on create_user.id = log.create_user
left join sys_user update_user on update_user.id = log.update_user
<where>
is_deleted = 0
log.is_deleted = 0
<if test="dto.jobName != null and dto.jobName != ''">
and job_name like CONCAT('%',#{dto.jobName},'%')
and log.job_name like CONCAT('%',#{dto.jobName},'%')
</if>
<if test="dto.jobGroup != null and dto.jobGroup != ''">
and job_group like CONCAT('%',#{dto.jobGroup},'%')
and log.job_group like CONCAT('%',#{dto.jobGroup},'%')
</if>
<if test="dto.jobClassName != null and dto.jobClassName != ''">
and job_class_name like CONCAT('%',#{dto.jobClassName},'%')
and log.job_class_name like CONCAT('%',#{dto.jobClassName},'%')
</if>
<if test="dto.cronExpression != null and dto.cronExpression != ''">
and cron_expression like CONCAT('%',#{dto.cronExpression},'%')
and log.cron_expression like CONCAT('%',#{dto.cronExpression},'%')
</if>
<if test="dto.triggerName != null and dto.triggerName != ''">
and trigger_name like CONCAT('%',#{dto.triggerName},'%')
and log.trigger_name like CONCAT('%',#{dto.triggerName},'%')
</if>
</where>
order by update_time desc
</select>
<!-- 物理删除调度任务执行日志 -->

View File

@ -20,19 +20,23 @@
</sql>
<!-- 分页查询任务调度分组内容 -->
<select id="selectListByPage" resultType="cn.bunny.dao.entity.quartz.SchedulersGroup">
<select id="selectListByPage" resultType="cn.bunny.dao.vo.quartz.SchedulersGroupVo">
select
<include refid="Base_Column_List"/>
from qrtz_schedulers_group
schedulers_group.*,
create_user.username as create_username,
update_user.username as update_username
from qrtz_schedulers_group schedulers_group
left join sys_user create_user on create_user.id = schedulers_group.create_user
left join sys_user update_user on update_user.id = schedulers_group.update_user
<where>
schedulers_group.is_deleted = 0
<if test="dto.groupName != null and dto.groupName != ''">
and group_name like CONCAT('%',#{dto.groupName},'%')
and schedulers_group.group_name like CONCAT('%',#{dto.groupName},'%')
</if>
<if test="dto.description != null and dto.description != ''">
and description like CONCAT('%',#{dto.description},'%')
and schedulers_group.description like CONCAT('%',#{dto.description},'%')
</if>
</where>
order by update_time desc
</select>
<!-- 物理删除任务调度分组 -->

View File

@ -26,26 +26,30 @@
</sql>
<!-- 分页查询用户登录日志内容 -->
<select id="selectListByPage" resultType="cn.bunny.dao.entity.log.UserLoginLog">
<select id="selectListByPage" resultType="cn.bunny.dao.vo.log.UserLoginLogVo">
select
<include refid="Base_Column_List"/>
from log_user_login
user_login.*,
create_user.username as create_username,
update_user.username as update_username
from log_user_login user_login
left join sys_user create_user on create_user.id = user_login.create_user
left join sys_user update_user on update_user.id = user_login.update_user
<where>
is_deleted = 0
user_login.is_deleted = 0
<if test="dto.username != null and dto.username != ''">
and username like CONCAT('%',#{dto.username},'%')
and user_login.username like CONCAT('%',#{dto.username},'%')
</if>
<if test="dto.ipAddress != null and dto.ipAddress != ''">
and ip_address like CONCAT('%',#{dto.ipAddress},'%')
and user_login.ip_address like CONCAT('%',#{dto.ipAddress},'%')
</if>
<if test="dto.ipRegion != null and dto.ipRegion != ''">
and ip_region like CONCAT('%',#{dto.ipRegion},'%')
and user_login.ip_region like CONCAT('%',#{dto.ipRegion},'%')
</if>
<if test="dto.type != null and dto.type != ''">
and type like CONCAT('%',#{dto.type},'%')
and user_login.type like CONCAT('%',#{dto.type},'%')
</if>
<if test="dto.xRequestedWith != null and dto.xRequestedWith != ''">
and x_requested_with like CONCAT('%',#{dto.xRequestedWith},'%')
and user_login.x_requested_with like CONCAT('%',#{dto.xRequestedWith},'%')
</if>
</where>
</select>
@ -54,7 +58,7 @@
<select id="selectListByPageWithLocalUser" resultType="cn.bunny.dao.entity.log.UserLoginLog">
select
<include refid="Base_Column_List"/>
from log_user_login where user_id = #{id} order by create_time desc
from log_user_login where user_id = #{id}
</select>
<!-- 物理删除用户登录日志 -->