移除操作日志记录到数据库功能
This commit is contained in:
@@ -1,34 +0,0 @@
|
||||
package com.genersoft.iot.vmp.service;
|
||||
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.LogDto;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
|
||||
/**
|
||||
* 系统日志
|
||||
*/
|
||||
public interface ILogService {
|
||||
|
||||
/**
|
||||
* 查询日志
|
||||
* @param page 当前页
|
||||
* @param count 每页数量
|
||||
* @param query 搜索内容
|
||||
* @param type 类型
|
||||
* @param startTime 开始时间
|
||||
* @param endTime 结束时间
|
||||
* @return 日志列表
|
||||
*/
|
||||
PageInfo<LogDto> getAll(int page, int count, String query, String type, String startTime, String endTime);
|
||||
|
||||
/**
|
||||
* 添加日志
|
||||
* @param logDto 日志
|
||||
*/
|
||||
void add(LogDto logDto);
|
||||
|
||||
/**
|
||||
* 清空
|
||||
*/
|
||||
int clear();
|
||||
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
package com.genersoft.iot.vmp.service.impl;
|
||||
|
||||
import com.baomidou.dynamic.datasource.annotation.DS;
|
||||
import com.genersoft.iot.vmp.gb28181.bean.DeviceAlarm;
|
||||
import com.genersoft.iot.vmp.service.ILogService;
|
||||
import com.genersoft.iot.vmp.storager.dao.LogMapper;
|
||||
import com.genersoft.iot.vmp.storager.dao.dto.LogDto;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@DS("master")
|
||||
public class LogServiceImpl implements ILogService {
|
||||
|
||||
@Autowired
|
||||
private LogMapper logMapper;
|
||||
|
||||
@Override
|
||||
public PageInfo<LogDto> getAll(int page, int count, String query, String type, String startTime, String endTime) {
|
||||
PageHelper.startPage(page, count);
|
||||
List<LogDto> all = logMapper.query(query, type, startTime, endTime);
|
||||
return new PageInfo<>(all);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void add(LogDto logDto) {
|
||||
logMapper.add(logDto);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int clear() {
|
||||
return logMapper.clear();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user