| | |
| | | package com.ruoyi.web.controller.monitor; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | import com.ruoyi.system.service.ISysLogininforService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 系统访问记录 |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysLogininfor logininfor) |
| | | { |
| | | startPage(); |
| | | List<SysLogininfor> list = logininforService.selectLogininforList(logininfor); |
| | | return getDataTable(list); |
| | | return logininforService.selectPageLogininforList(logininfor); |
| | | } |
| | | |
| | | @Log(title = "登录日志", businessType = BusinessType.EXPORT) |
| | |
| | | package com.ruoyi.web.controller.monitor; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import com.ruoyi.system.service.ISysOperLogService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 操作日志记录 |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysOperLog operLog) |
| | | { |
| | | startPage(); |
| | | List<SysOperLog> list = operLogService.selectOperLogList(operLog); |
| | | return getDataTable(list); |
| | | return operLogService.selectPageOperLogList(operLog); |
| | | } |
| | | |
| | | @Log(title = "操作日志", businessType = BusinessType.EXPORT) |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysUserOnline; |
| | | import com.ruoyi.system.service.ISysUserOnlineService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | } |
| | | Collections.reverse(userOnlineList); |
| | | userOnlineList.removeAll(Collections.singleton(null)); |
| | | return getDataTable(userOnlineList); |
| | | return PageUtils.buildDataInfo(userOnlineList); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.annotation.RepeatSubmit; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 参数配置 信息操作处理 |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysConfig config) |
| | | { |
| | | startPage(); |
| | | List<SysConfig> list = configService.selectConfigList(config); |
| | | return getDataTable(list); |
| | | return configService.selectPageConfigList(config); |
| | | } |
| | | |
| | | @Log(title = "参数管理", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictData dictData) |
| | | { |
| | | startPage(); |
| | | List<SysDictData> list = dictDataService.selectDictDataList(dictData); |
| | | return getDataTable(list); |
| | | return dictDataService.selectPageDictDataList(dictData); |
| | | } |
| | | |
| | | @Log(title = "字典数据", businessType = BusinessType.EXPORT) |
| | |
| | | package com.ruoyi.web.controller.system; |
| | | |
| | | import java.util.List; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.poi.ExcelUtil; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 数据字典信息 |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysDictType dictType) |
| | | { |
| | | startPage(); |
| | | List<SysDictType> list = dictTypeService.selectDictTypeList(dictType); |
| | | return getDataTable(list); |
| | | return dictTypeService.selectPageDictTypeList(dictType); |
| | | } |
| | | |
| | | @Log(title = "字典类型", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysNotice notice) |
| | | { |
| | | startPage(); |
| | | List<SysNotice> list = noticeService.selectNoticeList(notice); |
| | | return getDataTable(list); |
| | | return noticeService.selectPageNoticeList(notice); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysPost post) |
| | | { |
| | | startPage(); |
| | | List<SysPost> list = postService.selectPostList(post); |
| | | return getDataTable(list); |
| | | return postService.selectPagePostList(post); |
| | | } |
| | | |
| | | @Log(title = "岗位管理", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysRole role) |
| | | { |
| | | startPage(); |
| | | List<SysRole> list = roleService.selectRoleList(role); |
| | | return getDataTable(list); |
| | | return roleService.selectPageRoleList(role); |
| | | } |
| | | |
| | | @Log(title = "角色管理", businessType = BusinessType.EXPORT) |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo list(SysUser user) |
| | | { |
| | | startPage(); |
| | | List<SysUser> list = userService.selectUserList(user); |
| | | return getDataTable(list); |
| | | return userService.selectPageUserList(user); |
| | | } |
| | | |
| | | @Log(title = "用户管理", businessType = BusinessType.EXPORT) |
| | |
| | | package com.ruoyi.generator.controller; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.DeleteMapping; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.PutMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.ruoyi.common.annotation.Log; |
| | | import com.ruoyi.common.core.controller.BaseController; |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import cn.hutool.core.convert.Convert; |
| | | import com.ruoyi.common.enums.BusinessType; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | import com.ruoyi.generator.service.IGenTableColumnService; |
| | | import com.ruoyi.generator.service.IGenTableService; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.security.access.prepost.PreAuthorize; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 代码生成 操作处理 |
| | |
| | | @GetMapping("/list") |
| | | public TableDataInfo genList(GenTable genTable) |
| | | { |
| | | startPage(); |
| | | List<GenTable> list = genTableService.selectGenTableList(genTable); |
| | | return getDataTable(list); |
| | | return genTableService.selectPageGenTableList(genTable); |
| | | } |
| | | |
| | | /** |
| | |
| | | @GetMapping("/db/list") |
| | | public TableDataInfo dataList(GenTable genTable) |
| | | { |
| | | startPage(); |
| | | List<GenTable> list = genTableService.selectDbTableList(genTable); |
| | | return getDataTable(list); |
| | | return genTableService.selectPageDbTableList(genTable); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.generator.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | |
| | | import java.util.List; |
| | |
| | | * @author ruoyi |
| | | */ |
| | | public interface GenTableMapper extends BaseMapper<GenTable> { |
| | | |
| | | |
| | | Page<GenTable> selectPageGenTableList(Page<GenTable> page, GenTable genTable); |
| | | |
| | | Page<GenTable> selectPageDbTableList(Page<GenTable> page, GenTable genTable); |
| | | |
| | | /** |
| | | * 查询业务列表 |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.GenConstants; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | |
| | | return genTable; |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageGenTableList(PageUtils.buildPage(), genTable)); |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageDbTableList(PageUtils.buildPage(), genTable)); |
| | | } |
| | | |
| | | /** |
| | | * 查询业务列表 |
| | | * |
| | |
| | | package com.ruoyi.generator.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.generator.domain.GenTableColumn; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface IGenTableColumnService extends IService<GenTableColumn> { |
| | | public interface IGenTableColumnService extends IServicePlus<GenTableColumn> { |
| | | /** |
| | | * 查询业务字段列表 |
| | | * |
| | |
| | | package com.ruoyi.generator.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.generator.domain.GenTable; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface IGenTableService extends IService<GenTable> { |
| | | public interface IGenTableService extends IServicePlus<GenTable> { |
| | | |
| | | |
| | | TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable); |
| | | |
| | | |
| | | TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable); |
| | | |
| | | /** |
| | | * 查询业务列表 |
| | | * |
| | |
| | | <sql id="selectGenTableVo"> |
| | | select table_id, table_name, table_comment, sub_table_name, sub_table_fk_name, class_name, tpl_category, package_name, module_name, business_name, function_name, function_author, gen_type, gen_path, options, create_by, create_time, update_by, update_time, remark from gen_table |
| | | </sql> |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | |
| | | <select id="selectPageGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="selectPageDbTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | select table_name, table_comment, create_time, update_time from information_schema.tables |
| | | where table_schema = (select database()) |
| | | AND table_name NOT LIKE 'qrtz_%' AND table_name NOT LIKE 'gen_%' |
| | | AND table_name NOT IN (select table_name from gen_table) |
| | | <if test="tableName != null and tableName != ''"> |
| | | AND lower(table_name) like lower(concat('%', #{tableName}, '%')) |
| | | </if> |
| | | <if test="tableComment != null and tableComment != ''"> |
| | | AND lower(table_comment) like lower(concat('%', #{tableComment}, '%')) |
| | | </if> |
| | | <if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="params.endTime != null and params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(create_time,'%y%m%d') <= date_format(#{params.endTime},'%y%m%d') |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | | <select id="selectGenTableList" parameterType="GenTable" resultMap="GenTableResult"> |
| | | <include refid="selectGenTableVo"/> |
| | | <where> |
| | | <if test="tableName != null and tableName != ''"> |
| | |
| | | package com.ruoyi.quartz.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import org.quartz.SchedulerException;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.PostMapping;
|
| | | import org.springframework.web.bind.annotation.PutMapping;
|
| | | import org.springframework.web.bind.annotation.RequestBody;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.annotation.Log;
|
| | | import com.ruoyi.common.core.controller.BaseController;
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | |
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | | import com.ruoyi.quartz.service.ISysJobService;
|
| | | import com.ruoyi.quartz.util.CronUtils;
|
| | | import org.quartz.SchedulerException;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 调度任务信息操作处理
|
| | |
| | | @GetMapping("/list")
|
| | | public TableDataInfo list(SysJob sysJob)
|
| | | {
|
| | | startPage();
|
| | | List<SysJob> list = jobService.selectJobList(sysJob);
|
| | | return getDataTable(list);
|
| | | return jobService.selectPageJobList(sysJob);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.quartz.controller;
|
| | |
|
| | | import java.util.List;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.DeleteMapping;
|
| | | import org.springframework.web.bind.annotation.GetMapping;
|
| | | import org.springframework.web.bind.annotation.PathVariable;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | | import org.springframework.web.bind.annotation.RestController;
|
| | | import com.ruoyi.common.annotation.Log;
|
| | | import com.ruoyi.common.core.controller.BaseController;
|
| | | import com.ruoyi.common.core.domain.AjaxResult;
|
| | |
| | | import com.ruoyi.common.utils.poi.ExcelUtil;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | | import com.ruoyi.quartz.service.ISysJobLogService;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.security.access.prepost.PreAuthorize;
|
| | | import org.springframework.web.bind.annotation.*;
|
| | |
|
| | | import java.util.List;
|
| | |
|
| | | /**
|
| | | * 调度日志操作处理
|
| | |
| | | @GetMapping("/list")
|
| | | public TableDataInfo list(SysJobLog sysJobLog)
|
| | | {
|
| | | startPage();
|
| | | List<SysJobLog> list = jobLogService.selectJobLogList(sysJobLog);
|
| | | return getDataTable(list);
|
| | | return jobLogService.selectPageJobLogList(sysJobLog);
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | package com.ruoyi.quartz.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.ruoyi.common.core.page.IServicePlus;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | |
|
| | | import java.util.List;
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public interface ISysJobLogService extends IService<SysJobLog> {
|
| | | public interface ISysJobLogService extends IServicePlus<SysJobLog> {
|
| | |
|
| | |
|
| | | TableDataInfo<SysJobLog> selectPageJobLogList(SysJobLog jobLog);
|
| | |
|
| | | /**
|
| | | * 获取quartz调度器日志的计划任务
|
| | | *
|
| | |
| | | package com.ruoyi.quartz.service;
|
| | |
|
| | | import com.baomidou.mybatisplus.extension.service.IService;
|
| | | import com.ruoyi.common.core.page.IServicePlus;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.exception.job.TaskException;
|
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | | import org.quartz.SchedulerException;
|
| | |
| | | *
|
| | | * @author ruoyi
|
| | | */
|
| | | public interface ISysJobService extends IService<SysJob> {
|
| | | public interface ISysJobService extends IServicePlus<SysJob> {
|
| | | /**
|
| | | * 获取quartz调度器的计划任务
|
| | | *
|
| | | * @param job 调度信息
|
| | | * @return 调度任务集合
|
| | | */
|
| | | public TableDataInfo<SysJob> selectPageJobList(SysJob job);
|
| | |
|
| | | public List<SysJob> selectJobList(SysJob job);
|
| | |
|
| | | /**
|
| | |
| | | import cn.hutool.core.util.StrUtil;
|
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.utils.PageUtils;
|
| | | import com.ruoyi.quartz.domain.SysJobLog;
|
| | | import com.ruoyi.quartz.mapper.SysJobLogMapper;
|
| | | import com.ruoyi.quartz.service.ISysJobLogService;
|
| | |
| | | @Service
|
| | | public class SysJobLogServiceImpl extends ServiceImpl<SysJobLogMapper, SysJobLog> implements ISysJobLogService {
|
| | |
|
| | | @Override
|
| | | public TableDataInfo<SysJobLog> selectPageJobLogList(SysJobLog jobLog) {
|
| | | Map<String, Object> params = jobLog.getParams();
|
| | | LambdaQueryWrapper<SysJobLog> lqw = new LambdaQueryWrapper<SysJobLog>()
|
| | | .like(StrUtil.isNotBlank(jobLog.getJobName()), SysJobLog::getJobName, jobLog.getJobName())
|
| | | .eq(StrUtil.isNotBlank(jobLog.getJobGroup()), SysJobLog::getJobGroup, jobLog.getJobGroup())
|
| | | .eq(StrUtil.isNotBlank(jobLog.getStatus()), SysJobLog::getStatus, jobLog.getStatus())
|
| | | .like(StrUtil.isNotBlank(jobLog.getInvokeTarget()), SysJobLog::getInvokeTarget, jobLog.getInvokeTarget())
|
| | | .apply(Validator.isNotEmpty(params.get("beginTime")),
|
| | | "date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')",
|
| | | params.get("beginTime"))
|
| | | .apply(Validator.isNotEmpty(params.get("endTime")),
|
| | | "date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')",
|
| | | params.get("endTime"));
|
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取quartz调度器日志的计划任务
|
| | | *
|
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
| | | import com.ruoyi.common.constant.ScheduleConstants;
|
| | | import com.ruoyi.common.core.page.TableDataInfo;
|
| | | import com.ruoyi.common.exception.job.TaskException;
|
| | | import com.ruoyi.common.utils.PageUtils;
|
| | | import com.ruoyi.quartz.domain.SysJob;
|
| | | import com.ruoyi.quartz.mapper.SysJobMapper;
|
| | | import com.ruoyi.quartz.service.ISysJobService;
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | @Override
|
| | | public TableDataInfo<SysJob> selectPageJobList(SysJob job) {
|
| | | LambdaQueryWrapper<SysJob> lqw = new LambdaQueryWrapper<SysJob>()
|
| | | .like(StrUtil.isNotBlank(job.getJobName()), SysJob::getJobName, job.getJobName())
|
| | | .eq(StrUtil.isNotBlank(job.getJobGroup()), SysJob::getJobGroup, job.getJobGroup())
|
| | | .eq(StrUtil.isNotBlank(job.getStatus()), SysJob::getStatus, job.getStatus())
|
| | | .like(StrUtil.isNotBlank(job.getInvokeTarget()), SysJob::getInvokeTarget, job.getInvokeTarget());
|
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw));
|
| | | }
|
| | |
|
| | | /**
|
| | | * 获取quartz调度器的计划任务列表
|
| | | *
|
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | */ |
| | | public interface SysRoleMapper extends BaseMapper<SysRole> { |
| | | |
| | | Page<SysRole> selectPageRoleList(@Param("page") Page<SysRole> page, @Param("role") SysRole role); |
| | | |
| | | /** |
| | | * 根据条件分页查询角色数据 |
| | | * |
| | |
| | | package com.ruoyi.system.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * @author ruoyi |
| | | */ |
| | | public interface SysUserMapper extends BaseMapper<SysUser> { |
| | | |
| | | Page<SysUser> selectPageUserList(@Param("page") Page<SysUser> page, @Param("user") SysUser user); |
| | | |
| | | /** |
| | | * 根据条件分页查询用户列表 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysConfigService extends IService<SysConfig> { |
| | | public interface ISysConfigService extends IServicePlus<SysConfig> { |
| | | |
| | | |
| | | TableDataInfo<SysConfig> selectPageConfigList(SysConfig config); |
| | | |
| | | /** |
| | | * 查询参数配置信息 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.TreeSelect; |
| | | import com.ruoyi.common.core.domain.entity.SysDept; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDeptService extends IService<SysDept> { |
| | | public interface ISysDeptService extends IServicePlus<SysDept> { |
| | | /** |
| | | * 查询部门管理数据 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDictDataService extends IService<SysDictData> { |
| | | public interface ISysDictDataService extends IServicePlus<SysDictData> { |
| | | |
| | | |
| | | TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData); |
| | | |
| | | /** |
| | | * 根据条件分页查询字典数据 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysDictTypeService extends IService<SysDictType> { |
| | | public interface ISysDictTypeService extends IServicePlus<SysDictType> { |
| | | |
| | | |
| | | TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType); |
| | | |
| | | /** |
| | | * 根据条件分页查询字典类型 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysLogininforService extends IService<SysLogininfor> { |
| | | public interface ISysLogininforService extends IServicePlus<SysLogininfor> { |
| | | |
| | | |
| | | TableDataInfo<SysLogininfor> selectPageLogininforList(SysLogininfor logininfor); |
| | | |
| | | /** |
| | | * 新增系统登录日志 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.TreeSelect; |
| | | import com.ruoyi.common.core.domain.entity.SysMenu; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.system.domain.vo.RouterVo; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysMenuService extends IService<SysMenu> { |
| | | public interface ISysMenuService extends IServicePlus<SysMenu> { |
| | | /** |
| | | * 根据用户查询系统菜单列表 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysNoticeService extends IService<SysNotice> { |
| | | public interface ISysNoticeService extends IServicePlus<SysNotice> { |
| | | |
| | | |
| | | TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice); |
| | | |
| | | /** |
| | | * 查询公告信息 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysOperLogService extends IService<SysOperLog> { |
| | | public interface ISysOperLogService extends IServicePlus<SysOperLog> { |
| | | |
| | | TableDataInfo<SysOperLog> selectPageOperLogList(SysOperLog operLog); |
| | | |
| | | /** |
| | | * 新增操作日志 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | |
| | | import java.util.List; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysPostService extends IService<SysPost> { |
| | | public interface ISysPostService extends IServicePlus<SysPost> { |
| | | |
| | | |
| | | TableDataInfo<SysPost> selectPagePostList(SysPost post); |
| | | |
| | | /** |
| | | * 查询岗位信息集合 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysRoleService extends IService<SysRole> { |
| | | public interface ISysRoleService extends IServicePlus<SysRole> { |
| | | |
| | | |
| | | TableDataInfo<SysRole> selectPageRoleList(SysRole role); |
| | | |
| | | /** |
| | | * 根据条件分页查询角色数据 |
| | | * |
| | |
| | | package com.ruoyi.system.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.IServicePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | public interface ISysUserService extends IService<SysUser> { |
| | | public interface ISysUserService extends IServicePlus<SysUser> { |
| | | |
| | | |
| | | TableDataInfo<SysUser> selectPageUserList(SysUser user); |
| | | |
| | | /** |
| | | * 根据条件分页查询用户列表 |
| | | * |
| | |
| | | import com.ruoyi.common.annotation.DataSource; |
| | | import com.ruoyi.common.constant.Constants; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.redis.RedisCache; |
| | | import com.ruoyi.common.enums.DataSourceType; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | | import com.ruoyi.system.mapper.SysConfigMapper; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | |
| | | for (SysConfig config : configsList) { |
| | | redisCache.setCacheObject(getCacheKey(config.getConfigKey()), config.getConfigValue()); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<SysConfig> selectPageConfigList(SysConfig config) { |
| | | Map<String, Object> params = config.getParams(); |
| | | LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>() |
| | | .like(StrUtil.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName()) |
| | | .eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType()) |
| | | .like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw)); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public List<SysConfig> selectConfigList(SysConfig config) { |
| | | LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<>(); |
| | | lqw.like(StrUtil.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName()); |
| | | lqw.eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType()); |
| | | lqw.like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()); |
| | | Map<String, Object> params = config.getParams(); |
| | | lqw.apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("beginTime")); |
| | | lqw.apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | LambdaQueryWrapper<SysConfig> lqw = new LambdaQueryWrapper<SysConfig>() |
| | | .like(StrUtil.isNotBlank(config.getConfigName()), SysConfig::getConfigName, config.getConfigName()) |
| | | .eq(StrUtil.isNotBlank(config.getConfigType()), SysConfig::getConfigType, config.getConfigType()) |
| | | .like(StrUtil.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format(#{0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | return baseMapper.selectList(lqw); |
| | | } |
| | | |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | | import com.ruoyi.system.service.ISysDictDataService; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | @Service |
| | | public class SysDictDataServiceImpl extends ServiceImpl<SysDictDataMapper, SysDictData> implements ISysDictDataService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysDictData> selectPageDictDataList(SysDictData dictData) { |
| | | LambdaQueryWrapper<SysDictData> lqw = new LambdaQueryWrapper<SysDictData>() |
| | | .eq(StrUtil.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType()) |
| | | .like(StrUtil.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel()) |
| | | .eq(StrUtil.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus()) |
| | | .orderByAsc(SysDictData::getDictSort); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件分页查询字典数据 |
| | | * |
| | |
| | | */ |
| | | @Override |
| | | public List<SysDictData> selectDictDataList(SysDictData dictData) { |
| | | return list(new LambdaQueryWrapper<SysDictData>().eq(StrUtil.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType()) |
| | | return list(new LambdaQueryWrapper<SysDictData>() |
| | | .eq(StrUtil.isNotBlank(dictData.getDictType()), SysDictData::getDictType, dictData.getDictType()) |
| | | .like(StrUtil.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel()) |
| | | .eq(StrUtil.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus()) |
| | | .orderByAsc(SysDictData::getDictSort)); |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.domain.entity.SysDictType; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.DictUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | | import com.ruoyi.system.mapper.SysDictTypeMapper; |
| | | import com.ruoyi.system.service.ISysDictTypeService; |
| | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<SysDictType> selectPageDictTypeList(SysDictType dictType) { |
| | | Map<String, Object> params = dictType.getParams(); |
| | | LambdaQueryWrapper<SysDictType> lqw = new LambdaQueryWrapper<SysDictType>() |
| | | .like(StrUtil.isNotBlank(dictType.getDictName()), SysDictType::getDictName, dictType.getDictName()) |
| | | .eq(StrUtil.isNotBlank(dictType.getStatus()), SysDictType::getStatus, dictType.getStatus()) |
| | | .like(StrUtil.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(create_time,'%y%m%d') >= date_format({0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(create_time,'%y%m%d') <= date_format({0},'%y%m%d')", |
| | | params.get("endTime")); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件分页查询字典类型 |
| | | * |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysLogininfor; |
| | | import com.ruoyi.system.mapper.SysLogininforMapper; |
| | | import com.ruoyi.system.service.ISysLogininforService; |
| | |
| | | @Service |
| | | public class SysLogininforServiceImpl extends ServiceImpl<SysLogininforMapper, SysLogininfor> implements ISysLogininforService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysLogininfor> selectPageLogininforList(SysLogininfor logininfor) { |
| | | Map<String, Object> params = logininfor.getParams(); |
| | | LambdaQueryWrapper<SysLogininfor> lqw = new LambdaQueryWrapper<SysLogininfor>() |
| | | .like(StrUtil.isNotBlank(logininfor.getIpaddr()), SysLogininfor::getIpaddr, logininfor.getIpaddr()) |
| | | .eq(StrUtil.isNotBlank(logininfor.getStatus()), SysLogininfor::getStatus, logininfor.getStatus()) |
| | | .like(StrUtil.isNotBlank(logininfor.getUserName()), SysLogininfor::getUserName, logininfor.getUserName()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(login_time,'%y%m%d') >= date_format({0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(login_time,'%y%m%d') <= date_format({0},'%y%m%d')", |
| | | params.get("endTime")) |
| | | .orderByDesc(SysLogininfor::getInfoId); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw)); |
| | | } |
| | | |
| | | /** |
| | | * 新增系统登录日志 |
| | | * |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | import com.ruoyi.system.mapper.SysNoticeMapper; |
| | | import com.ruoyi.system.service.ISysNoticeService; |
| | |
| | | @Service |
| | | public class SysNoticeServiceImpl extends ServiceImpl<SysNoticeMapper, SysNotice> implements ISysNoticeService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysNotice> selectPageNoticeList(SysNotice notice) { |
| | | LambdaQueryWrapper<SysNotice> lqw = new LambdaQueryWrapper<SysNotice>() |
| | | .like(StrUtil.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle()) |
| | | .eq(StrUtil.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType()) |
| | | .like(StrUtil.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * 查询公告信息 |
| | | * |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | | import com.ruoyi.system.mapper.SysOperLogMapper; |
| | | import com.ruoyi.system.service.ISysOperLogService; |
| | |
| | | @Service |
| | | public class SysOperLogServiceImpl extends ServiceImpl<SysOperLogMapper, SysOperLog> implements ISysOperLogService { |
| | | |
| | | @Override |
| | | public TableDataInfo<SysOperLog> selectPageOperLogList(SysOperLog operLog) { |
| | | Map<String, Object> params = operLog.getParams(); |
| | | LambdaQueryWrapper<SysOperLog> lqw = new LambdaQueryWrapper<SysOperLog>() |
| | | .like(StrUtil.isNotBlank(operLog.getTitle()), SysOperLog::getTitle, operLog.getTitle()) |
| | | .eq(operLog.getBusinessType() != null && operLog.getBusinessType() > 0, |
| | | SysOperLog::getBusinessType, operLog.getBusinessType()) |
| | | .func(f -> { |
| | | if (ArrayUtil.isNotEmpty(operLog.getBusinessTypes())) { |
| | | f.in(SysOperLog::getBusinessType, Arrays.asList(operLog.getBusinessTypes())); |
| | | } |
| | | }) |
| | | .eq(operLog.getStatus() != null && operLog.getStatus() > 0, |
| | | SysOperLog::getStatus, operLog.getStatus()) |
| | | .like(StrUtil.isNotBlank(operLog.getOperName()), SysOperLog::getOperName, operLog.getOperName()) |
| | | .apply(Validator.isNotEmpty(params.get("beginTime")), |
| | | "date_format(oper_time,'%y%m%d') >= date_format({0},'%y%m%d')", |
| | | params.get("beginTime")) |
| | | .apply(Validator.isNotEmpty(params.get("endTime")), |
| | | "date_format(oper_time,'%y%m%d') <= date_format({0},'%y%m%d')", |
| | | params.get("endTime")) |
| | | .orderByDesc(SysOperLog::getOperId); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(), lqw)); |
| | | } |
| | | |
| | | /** |
| | | * 新增操作日志 |
| | | * |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | | import com.ruoyi.system.mapper.SysPostMapper; |
| | |
| | | @Autowired |
| | | private SysUserPostMapper userPostMapper; |
| | | |
| | | @Override |
| | | public TableDataInfo<SysPost> selectPagePostList(SysPost post) { |
| | | LambdaQueryWrapper<SysPost> lqw = new LambdaQueryWrapper<SysPost>() |
| | | .like(StrUtil.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode()) |
| | | .eq(StrUtil.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus()) |
| | | .like(StrUtil.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName()); |
| | | return PageUtils.buildDataInfo(page(PageUtils.buildPage(),lqw)); |
| | | } |
| | | |
| | | /** |
| | | * 查询岗位信息集合 |
| | | * |
| | |
| | | package com.ruoyi.system.service.impl; |
| | | |
| | | import cn.hutool.core.lang.Validator; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.common.annotation.DataScope; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.domain.SysRoleDept; |
| | | import com.ruoyi.system.domain.SysRoleMenu; |
| | |
| | | @Autowired |
| | | private SysRoleDeptMapper roleDeptMapper; |
| | | |
| | | @Override |
| | | @DataScope(deptAlias = "d") |
| | | public TableDataInfo<SysRole> selectPageRoleList(SysRole role) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageRoleList(PageUtils.buildPage(), role)); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件分页查询角色数据 |
| | | * |
| | |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.entity.SysRole; |
| | | import com.ruoyi.common.core.domain.entity.SysUser; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.CustomException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | |
| | | @Autowired |
| | | private ISysConfigService configService; |
| | | |
| | | @Override |
| | | @DataScope(deptAlias = "d", userAlias = "u") |
| | | public TableDataInfo<SysUser> selectPageUserList(SysUser user) { |
| | | return PageUtils.buildDataInfo(baseMapper.selectPageUserList(PageUtils.buildPage(), user)); |
| | | } |
| | | |
| | | /** |
| | | * 根据条件分页查询用户列表 |
| | | * |
| | |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | </sql> |
| | | |
| | | <select id="selectPageRoleList" parameterType="SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.del_flag = '0' |
| | | <if test="role.roleName != null and role.roleName != ''"> |
| | | AND r.role_name like concat('%', #{role.roleName}, '%') |
| | | </if> |
| | | <if test="role.status != null and role.status != ''"> |
| | | AND r.status = #{role.status} |
| | | </if> |
| | | <if test="role.roleKey != null and role.roleKey != ''"> |
| | | AND r.role_key like concat('%', #{role.roleKey}, '%') |
| | | </if> |
| | | <if test="role.params.beginTime != null and role.params.beginTime != ''"><!-- 开始时间检索 --> |
| | | and date_format(r.create_time,'%y%m%d') >= date_format(#{role.params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="role.params.endTime != null and role.params.endTime != ''"><!-- 结束时间检索 --> |
| | | and date_format(r.create_time,'%y%m%d') <= date_format(#{role.params.endTime},'%y%m%d') |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${role.params.dataScope} |
| | | order by r.role_sort |
| | | </select> |
| | | |
| | | <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult"> |
| | | <include refid="selectRoleVo"/> |
| | | where r.del_flag = '0' |
| | |
| | | left join sys_role r on r.role_id = ur.role_id |
| | | </sql> |
| | | |
| | | <select id="selectPageUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, |
| | | u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from |
| | | sys_user u |
| | | left join sys_dept d on u.dept_id = d.dept_id |
| | | where u.del_flag = '0' |
| | | <if test="user.userName != null and user.userName != ''"> |
| | | AND u.user_name like concat('%', #{user.userName}, '%') |
| | | </if> |
| | | <if test="user.status != null and user.status != ''"> |
| | | AND u.status = #{user.status} |
| | | </if> |
| | | <if test="user.phonenumber != null and user.phonenumber != ''"> |
| | | AND u.phonenumber like concat('%', #{user.phonenumber}, '%') |
| | | </if> |
| | | <if test="user.params.beginTime != null and user.params.beginTime != ''"><!-- 开始时间检索 --> |
| | | AND date_format(u.create_time,'%y%m%d') >= date_format(#{user.params.beginTime},'%y%m%d') |
| | | </if> |
| | | <if test="user.params.endTime != null and user.params.endTime != ''"><!-- 结束时间检索 --> |
| | | AND date_format(u.create_time,'%y%m%d') <= date_format(#{user.params.endTime},'%y%m%d') |
| | | </if> |
| | | <if test="user.deptId != null and user.deptId != 0"> |
| | | AND (u.dept_id = #{user.deptId} OR u.dept_id IN ( SELECT t.dept_id FROM sys_dept t WHERE find_in_set(#{user.deptId}, |
| | | ancestors) )) |
| | | </if> |
| | | <!-- 数据范围过滤 --> |
| | | ${user.params.dataScope} |
| | | </select> |
| | | |
| | | <select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult"> |
| | | select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.password, u.sex, |
| | | u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from |