Jenkins自动合并
commit
9c6c862a59
@ -0,0 +1,133 @@
|
|||||||
|
package cn.estsh.i3plus.core.api.iservice.base;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
|
import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogException;
|
||||||
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogOperate;
|
||||||
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
||||||
|
import cn.estsh.i3plus.pojo.platform.platbean.SysLogTaskTime;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description :
|
||||||
|
* @Reference :
|
||||||
|
* @Author : wei.peng
|
||||||
|
* @CreateDate : 20-2-13 下午3:43
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
public interface ISysLogService {
|
||||||
|
|
||||||
|
/********************************************************* 系统异常日志 Start *********************************************************/
|
||||||
|
|
||||||
|
@ApiOperation(value = "系统异常日志复杂查询,分页,排序")
|
||||||
|
ListPager<SysLogException> querySysLogExceptionByPager(SysLogException sysLogException, Pager pager);
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除指定日期之后的日志")
|
||||||
|
long deleteSysLogExceptionByDateTimeAfter(String dateTime);
|
||||||
|
|
||||||
|
/******************************************************* 系统异常日志 End *********************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************* 操作日志 Start *********************************************************/
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加操作日志",notes = "添加操作日志")
|
||||||
|
SysLogOperate insertSysLogOperate(SysLogOperate logOperate);
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据id删除日志",notes = "根据id删除日志")
|
||||||
|
void deleteSysLogOperateById(Long id);
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询全部操作日志",notes = "查询全部操作日志")
|
||||||
|
List listSysLogOperate();
|
||||||
|
|
||||||
|
@ApiOperation(value = "批量删除日志",notes = "批量删除日志")
|
||||||
|
void deleteSysLogOperateByIds(Long[] ids);
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据id查询操作日志",notes = "根据id查询操作日志")
|
||||||
|
SysLogOperate getSysLogOperateById(Long id);
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据操作人姓名模糊查询日志",notes = "根据操作人姓名模糊查询日志")
|
||||||
|
List<SysLogOperate> listSysLogOperateByOperateUserName(String operateUserName);
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询所有日志数量")
|
||||||
|
long countAllSysLogOperate();
|
||||||
|
|
||||||
|
@ApiOperation(value = "操作日志复杂查询,分页,排序",notes = "操作日志复杂查询,分页,排序")
|
||||||
|
ListPager<SysLogOperate> querySysLogOperateByPager(SysLogOperate logOperate, Pager pager);
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询最新的操作日志")
|
||||||
|
List<SysLogOperate> findNewSysLogOperate(Integer num);
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除指定日期之后的日志")
|
||||||
|
long deleteSysLogOperateByDateTimeAfter(String dateTime);
|
||||||
|
|
||||||
|
@ApiOperation(value = "操作日志数量")
|
||||||
|
long countSysLogOperate();
|
||||||
|
|
||||||
|
/******************************************************* 操作日志 End *********************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************* 系统日志 Start *********************************************************/
|
||||||
|
|
||||||
|
@ApiOperation(value = "添加系统日志",notes = "添加系统日志")
|
||||||
|
void insertSysLogSystem(SysLogSystem logSystem);
|
||||||
|
|
||||||
|
@ApiOperation(value = "造数据系统日志",notes = "造数据")
|
||||||
|
void insertSysLogBatch(int num,int waitTime);
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除日志",notes = "删除日志")
|
||||||
|
long deleteSysLogSystemById(Long id);
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询全部日志",notes = "查询全部日志")
|
||||||
|
List<SysLogSystem> listSysLogSystem();
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据id查询系统日志",notes = "根据id查询系统日志")
|
||||||
|
SysLogSystem getSysLogSystemById(long id);
|
||||||
|
|
||||||
|
@ApiOperation(value = "系统日志分页复杂查询",notes = "系统日志分页复杂查询")
|
||||||
|
ListPager querySysLogSystemByPager(SysLogSystem logSystem, Pager pager);
|
||||||
|
|
||||||
|
@ApiOperation(value = "系统日志批量删除",notes = "系统日志批量删除")
|
||||||
|
long deleteSysLogSystemByIds(Long[] ids);
|
||||||
|
|
||||||
|
@ApiOperation(value = "系统日志按id区间查询",notes = "系统日志按id区间查询")
|
||||||
|
List<SysLogSystem> findSysLogSystemByIdInterval(long min, long max);
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除指定日期之后的日志",notes = "系统日志按id区间查询")
|
||||||
|
long deleteSysLogSystemByDateTimeAfter(String dateTime);
|
||||||
|
|
||||||
|
/******************************************************* 系统日志 End *********************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/******************************************************* 定时任务日志 Start *********************************************************/
|
||||||
|
@ApiOperation(value = "添加定时任务日志",notes = "添加定时任务日志")
|
||||||
|
void insertSysLogTaskTime(SysLogTaskTime sysLogTaskTime);
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除定时任务日志",notes = "删除定时任务日志")
|
||||||
|
void deleteSysLogTaskTimeById(Long id);
|
||||||
|
|
||||||
|
@ApiOperation(value = "根据id查询定时任务日志",notes = "根据id查询定时任务日志")
|
||||||
|
SysLogTaskTime getSysLogTaskTimeById(Long id);
|
||||||
|
|
||||||
|
@ApiOperation(value = "定时任务日志分页复杂查询",notes = "定时任务日志分页复杂查询")
|
||||||
|
ListPager querySysLogTaskTimeByPager(SysLogTaskTime sysLogTaskTime, Pager pager);
|
||||||
|
|
||||||
|
@ApiOperation(value = "删除指定日期之后的日志",notes = "删除指定日期之后的日志")
|
||||||
|
long deleteSysLogTaskTimeByDateTimeAfter(String dateTime);
|
||||||
|
|
||||||
|
/******************************************************* 定时任务日志 End *********************************************************/
|
||||||
|
|
||||||
|
|
||||||
|
/********************************************************* 操作日志 Start *********************************************************/
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询时间段内平均请求耗时",notes = "查询时间段内平均请求耗时")
|
||||||
|
Map<String, Object> querySysLogSystemAvgExecuteTime(String startTime, String endTime);
|
||||||
|
|
||||||
|
@ApiOperation(value = "查询时间段内各等级日志数量",notes = "查询时间段内各等级日志数量")
|
||||||
|
Map<String, Object> querySysLogSystemByLevel(String startTime, String endTime);
|
||||||
|
|
||||||
|
/******************************************************* 系统异常日志 End *********************************************************/
|
||||||
|
|
||||||
|
}
|
@ -1,54 +1,54 @@
|
|||||||
package cn.estsh.i3plus.core.api.iservice.busi;
|
//package cn.estsh.i3plus.core.api.iservice.busi;
|
||||||
|
//
|
||||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
//import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
//import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description : 系统日志服务接口
|
// * @Description : 系统日志服务接口
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @Date : 2018-10-25 10:36
|
// * @Date : 2018-10-25 10:36
|
||||||
* @Modify :
|
// * @Modify :
|
||||||
**/
|
// **/
|
||||||
public interface ISysLogSystemService {
|
//public interface ISysLogSystemService {
|
||||||
|
//
|
||||||
@ApiOperation(value = "添加系统日志",notes = "添加系统日志")
|
// @ApiOperation(value = "添加系统日志",notes = "添加系统日志")
|
||||||
void insertSysLogSystem(SysLogSystem logSystem);
|
// void insertSysLogSystem(SysLogSystem logSystem);
|
||||||
|
//
|
||||||
@ApiOperation(value = "造数据系统日志",notes = "造数据")
|
// @ApiOperation(value = "造数据系统日志",notes = "造数据")
|
||||||
void insertSysLogBatch(int num,int waitTime);
|
// void insertSysLogBatch(int num,int waitTime);
|
||||||
|
//
|
||||||
@ApiOperation(value = "删除日志",notes = "删除日志")
|
// @ApiOperation(value = "删除日志",notes = "删除日志")
|
||||||
long deleteSysLogSystemById(Long id);
|
// long deleteSysLogSystemById(Long id);
|
||||||
|
//
|
||||||
@ApiOperation(value = "查询全部日志",notes = "查询全部日志")
|
// @ApiOperation(value = "查询全部日志",notes = "查询全部日志")
|
||||||
List<SysLogSystem> listSysLogSystem();
|
// List<SysLogSystem> listSysLogSystem();
|
||||||
|
//
|
||||||
@ApiOperation(value = "根据id查询系统日志",notes = "根据id查询系统日志")
|
// @ApiOperation(value = "根据id查询系统日志",notes = "根据id查询系统日志")
|
||||||
SysLogSystem getSysLogSystemById(long id);
|
// SysLogSystem getSysLogSystemById(long id);
|
||||||
|
//
|
||||||
@ApiOperation(value = "系统日志分页复杂查询",notes = "系统日志分页复杂查询")
|
// @ApiOperation(value = "系统日志分页复杂查询",notes = "系统日志分页复杂查询")
|
||||||
ListPager querySysLogSystemByPager(SysLogSystem logSystem, Pager pager);
|
// ListPager querySysLogSystemByPager(SysLogSystem logSystem, Pager pager);
|
||||||
|
//
|
||||||
@ApiOperation(value = "系统日志批量删除",notes = "系统日志批量删除")
|
// @ApiOperation(value = "系统日志批量删除",notes = "系统日志批量删除")
|
||||||
long deleteSysLogSystemByIds(Long[] ids);
|
// long deleteSysLogSystemByIds(Long[] ids);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 压力测试
|
// * 压力测试
|
||||||
* @param min
|
// * @param min
|
||||||
* @param max
|
// * @param max
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "系统日志按id区间查询",notes = "系统日志按id区间查询")
|
// @ApiOperation(value = "系统日志按id区间查询",notes = "系统日志按id区间查询")
|
||||||
List<SysLogSystem> findSysLogSystemByIdInterval(long min, long max);
|
// List<SysLogSystem> findSysLogSystemByIdInterval(long min, long max);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除指定日期之后的日志
|
// * 删除指定日期之后的日志
|
||||||
* @param dateTime 日期
|
// * @param dateTime 日期
|
||||||
*/
|
// */
|
||||||
long deleteSysLogSystemByDateTimeAfter(String dateTime);
|
// long deleteSysLogSystemByDateTimeAfter(String dateTime);
|
||||||
}
|
//}
|
||||||
|
@ -1,53 +1,53 @@
|
|||||||
package cn.estsh.i3plus.core.api.iservice.busi;
|
//package cn.estsh.i3plus.core.api.iservice.busi;
|
||||||
|
//
|
||||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
//import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
//import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogTaskTime;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogTaskTime;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description : 定时任务日志服务接口
|
// * @Description : 定时任务日志服务接口
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @CreateDate : 2019-01-04 15:06
|
// * @CreateDate : 2019-01-04 15:06
|
||||||
* @Modify:
|
// * @Modify:
|
||||||
**/
|
// **/
|
||||||
public interface ISysLogTaskTimeService {
|
//public interface ISysLogTaskTimeService {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 添加定时任务日志
|
// * 添加定时任务日志
|
||||||
* @param sysLogTaskTime
|
// * @param sysLogTaskTime
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "添加定时任务日志",notes = "添加定时任务日志")
|
// @ApiOperation(value = "添加定时任务日志",notes = "添加定时任务日志")
|
||||||
void insertSysLogTaskTime(SysLogTaskTime sysLogTaskTime);
|
// void insertSysLogTaskTime(SysLogTaskTime sysLogTaskTime);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据id删除定时任务日志
|
// * 根据id删除定时任务日志
|
||||||
* @param id
|
// * @param id
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "删除定时任务日志",notes = "删除定时任务日志")
|
// @ApiOperation(value = "删除定时任务日志",notes = "删除定时任务日志")
|
||||||
void deleteSysLogTaskTimeById(Long id);
|
// void deleteSysLogTaskTimeById(Long id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 根据id查询定时任务日志
|
// * 根据id查询定时任务日志
|
||||||
* @param id
|
// * @param id
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "根据id查询定时任务日志",notes = "根据id查询定时任务日志")
|
// @ApiOperation(value = "根据id查询定时任务日志",notes = "根据id查询定时任务日志")
|
||||||
SysLogTaskTime getSysLogTaskTimeById(Long id);
|
// SysLogTaskTime getSysLogTaskTimeById(Long id);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 定时任务日志复杂查询
|
// * 定时任务日志复杂查询
|
||||||
* @param sysLogTaskTime
|
// * @param sysLogTaskTime
|
||||||
* @param pager
|
// * @param pager
|
||||||
* @return
|
// * @return
|
||||||
*/
|
// */
|
||||||
@ApiOperation(value = "定时任务日志分页复杂查询",notes = "定时任务日志分页复杂查询")
|
// @ApiOperation(value = "定时任务日志分页复杂查询",notes = "定时任务日志分页复杂查询")
|
||||||
ListPager querySysLogTaskTimeByPager(SysLogTaskTime sysLogTaskTime, Pager pager);
|
// ListPager querySysLogTaskTimeByPager(SysLogTaskTime sysLogTaskTime, Pager pager);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 删除指定日期之后的日志
|
// * 删除指定日期之后的日志
|
||||||
* @param dateTime 日期
|
// * @param dateTime 日期
|
||||||
*/
|
// */
|
||||||
long deleteSysLogTaskTimeByDateTimeAfter(String dateTime);
|
// long deleteSysLogTaskTimeByDateTimeAfter(String dateTime);
|
||||||
}
|
//}
|
||||||
|
@ -0,0 +1,34 @@
|
|||||||
|
package cn.estsh.i3plus.core.apiservice.configuration;
|
||||||
|
|
||||||
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.factory.BaseMongoRepositoryFactoryBean;
|
||||||
|
import cn.estsh.i3plus.pojo.base.jpa.factory.BaseRepositoryFactoryBean;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
|
||||||
|
import org.springframework.boot.autoconfigure.domain.EntityScan;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
|
||||||
|
import org.springframework.data.mongodb.repository.config.EnableMongoRepositories;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Description : 需要扫描其他包的配置文件
|
||||||
|
* 此类专门添加需要单独加载的其他模块的包
|
||||||
|
* @Reference :
|
||||||
|
* @Author : alwaysfrin
|
||||||
|
* @CreateDate : 2018-12-12 20:49
|
||||||
|
* @Modify:
|
||||||
|
**/
|
||||||
|
@Configuration
|
||||||
|
@ConditionalOnExpression("'${" + CommonConstWords.PROP_SWITCH_MONGO + ":false}' == 'true'")
|
||||||
|
//扫描需要单独处理的持久化包
|
||||||
|
@EnableMongoRepositories(basePackages = {
|
||||||
|
"cn.estsh.i3plus.**.platrepositorymongo"
|
||||||
|
},repositoryFactoryBeanClass = BaseMongoRepositoryFactoryBean.class)
|
||||||
|
public class ScanMongoPackageConfiguration {
|
||||||
|
public static final Logger LOGGER = LoggerFactory.getLogger(CommonConstWords.SYSTEM_LOG);
|
||||||
|
|
||||||
|
public ScanMongoPackageConfiguration(){
|
||||||
|
LOGGER.info("【扫描关联包...】");
|
||||||
|
}
|
||||||
|
}
|
@ -1,31 +1,31 @@
|
|||||||
package cn.estsh.i3plus.core.apiservice.dao;
|
//package cn.estsh.i3plus.core.apiservice.dao;
|
||||||
|
//
|
||||||
import java.util.Map;
|
//import java.util.Map;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description : 操作日志
|
// * @Description : 操作日志
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @CreateDate : 2018-12-11 13:22
|
// * @CreateDate : 2018-12-11 13:22
|
||||||
* @Modify:
|
// * @Modify:
|
||||||
**/
|
// **/
|
||||||
public interface ISysLogSystemDao {
|
//public interface ISysLogSystemDao {
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询时间段内平均请求耗时
|
// * 查询时间段内平均请求耗时
|
||||||
*
|
// *
|
||||||
* @param startTime 开始时间
|
// * @param startTime 开始时间
|
||||||
* @param endTime 结束时间
|
// * @param endTime 结束时间
|
||||||
* @return 查询结果
|
// * @return 查询结果
|
||||||
*/
|
// */
|
||||||
Map<String, Object> querySysLogSystemAvgExecuteTime(String startTime, String endTime);
|
// Map<String, Object> querySysLogSystemAvgExecuteTime(String startTime, String endTime);
|
||||||
|
//
|
||||||
/**
|
// /**
|
||||||
* 查询时间段内各等级日志数量
|
// * 查询时间段内各等级日志数量
|
||||||
*
|
// *
|
||||||
* @param startTime 开始时间
|
// * @param startTime 开始时间
|
||||||
* @param endTime 结束时间
|
// * @param endTime 结束时间
|
||||||
* @return 查询结果
|
// * @return 查询结果
|
||||||
*/
|
// */
|
||||||
Map<String, Object> querySysLogSystemByLevel(String startTime, String endTime);
|
// Map<String, Object> querySysLogSystemByLevel(String startTime, String endTime);
|
||||||
}
|
//}
|
||||||
|
@ -1,100 +1,102 @@
|
|||||||
package cn.estsh.i3plus.core.apiservice.daoimpl;
|
//package cn.estsh.i3plus.core.apiservice.daoimpl;
|
||||||
|
//
|
||||||
import cn.estsh.i3plus.core.apiservice.dao.ISysLogSystemDao;
|
//import cn.estsh.i3plus.core.apiservice.dao.ISysLogSystemDao;
|
||||||
import cn.estsh.i3plus.platform.common.tool.MathOperation;
|
//import cn.estsh.i3plus.platform.common.tool.MathOperation;
|
||||||
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
//import cn.estsh.i3plus.platform.common.tool.StringTool;
|
||||||
import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
//import cn.estsh.i3plus.pojo.base.enumutil.ImppEnumUtil;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
||||||
import com.mongodb.client.AggregateIterable;
|
//import com.mongodb.client.AggregateIterable;
|
||||||
import com.mongodb.client.MongoCursor;
|
//import com.mongodb.client.MongoCursor;
|
||||||
import org.bson.Document;
|
//import org.bson.Document;
|
||||||
import org.slf4j.Logger;
|
//import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
//import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.data.mongodb.MongoDbFactory;
|
//import org.springframework.data.mongodb.MongoDbFactory;
|
||||||
import org.springframework.stereotype.Service;
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
import java.util.*;
|
//import java.util.*;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description :
|
// * @Description :
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @CreateDate : 2018-12-11 13:24
|
// * @CreateDate : 2018-12-11 13:24
|
||||||
* @Modify:
|
// * @Modify:
|
||||||
**/
|
// **/
|
||||||
@Service
|
//@Service
|
||||||
public class SysLogSystemDaoImpl implements ISysLogSystemDao {
|
//public class SysLogSystemDaoImpl implements ISysLogSystemDao {
|
||||||
|
//
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger(SysLogSystemDaoImpl.class);
|
// public static final Logger LOGGER = LoggerFactory.getLogger(SysLogSystemDaoImpl.class);
|
||||||
|
//
|
||||||
@Autowired
|
//// @Autowired
|
||||||
private MongoDbFactory mongoDbFactory;
|
//// private MongoDbFactory mongoDbFactory;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
public Map<String, Object> querySysLogSystemAvgExecuteTime(String startTime, String endTime) {
|
// public Map<String, Object> querySysLogSystemAvgExecuteTime(String startTime, String endTime) {
|
||||||
// 筛选
|
// // 筛选
|
||||||
Document sub_match = new Document();
|
//// Document sub_match = new Document();
|
||||||
sub_match.put("createDatetime", new Document("$gte", startTime).append("$lte", endTime));
|
//// sub_match.put("createDatetime", new Document("$gte", startTime).append("$lte", endTime));
|
||||||
// 分组
|
//// // 分组
|
||||||
Document sub_group = new Document();
|
//// Document sub_group = new Document();
|
||||||
sub_group.put("_id", "$createDatetime");
|
//// sub_group.put("_id", "$createDatetime");
|
||||||
sub_group.put("avg", new Document("$avg", "$executeTime"));
|
//// sub_group.put("avg", new Document("$avg", "$executeTime"));
|
||||||
|
////
|
||||||
|
////
|
||||||
Document match = new Document("$match", sub_match);
|
//// Document match = new Document("$match", sub_match);
|
||||||
Document group = new Document("$group", sub_group);
|
//// Document group = new Document("$group", sub_group);
|
||||||
Document sort = new Document("$sort", new Document("_id", -1));
|
//// Document sort = new Document("$sort", new Document("_id", -1));
|
||||||
|
////
|
||||||
List<Document> aggregateList = new ArrayList<>();
|
//// List<Document> aggregateList = new ArrayList<>();
|
||||||
aggregateList.add(match);
|
//// aggregateList.add(match);
|
||||||
aggregateList.add(group);
|
//// aggregateList.add(group);
|
||||||
aggregateList.add(sort);
|
//// aggregateList.add(sort);
|
||||||
|
////
|
||||||
AggregateIterable<Document> findIter = mongoDbFactory.getDb()
|
//// AggregateIterable<Document> findIter = mongoDbFactory.getDb()
|
||||||
.getCollection(StringTool.toLowerCaseFirstOne(SysLogSystem.class.getSimpleName()))
|
//// .getCollection(StringTool.toLowerCaseFirstOne(SysLogSystem.class.getSimpleName()))
|
||||||
.aggregate(aggregateList);
|
//// .aggregate(aggregateList);
|
||||||
MongoCursor<Document> cursor = findIter.iterator();
|
//// MongoCursor<Document> cursor = findIter.iterator();
|
||||||
|
////
|
||||||
Map resultData = new LinkedHashMap();
|
//// Map resultData = new LinkedHashMap();
|
||||||
Document item_doc;
|
//// Document item_doc;
|
||||||
while (cursor.hasNext()) {
|
//// while (cursor.hasNext()) {
|
||||||
item_doc = cursor.next();
|
//// item_doc = cursor.next();
|
||||||
resultData.put(item_doc.getString("_id"),MathOperation.round(item_doc.getDouble("avg"),0));
|
//// resultData.put(item_doc.getString("_id"),MathOperation.round(item_doc.getDouble("avg"),0));
|
||||||
}
|
//// }
|
||||||
return resultData;
|
//// return resultData;
|
||||||
}
|
// return null;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public Map<String,Object> querySysLogSystemByLevel(String startTime, String endTime){
|
// @Override
|
||||||
// 筛选
|
// public Map<String,Object> querySysLogSystemByLevel(String startTime, String endTime){
|
||||||
Document sub_match = new Document();
|
//// // 筛选
|
||||||
sub_match.put("createDatetime", new Document("$gte", startTime).append("$lte", endTime));
|
//// Document sub_match = new Document();
|
||||||
// 分组
|
//// sub_match.put("createDatetime", new Document("$gte", startTime).append("$lte", endTime));
|
||||||
Document sub_group = new Document();
|
//// // 分组
|
||||||
sub_group.put("_id", "$logLevel");
|
//// Document sub_group = new Document();
|
||||||
sub_group.put("count", new Document("$sum", 1));
|
//// sub_group.put("_id", "$logLevel");
|
||||||
|
//// sub_group.put("count", new Document("$sum", 1));
|
||||||
Document match = new Document("$match", sub_match);
|
////
|
||||||
Document group = new Document("$group", sub_group);
|
//// Document match = new Document("$match", sub_match);
|
||||||
|
//// Document group = new Document("$group", sub_group);
|
||||||
List<Document> aggregateList = new ArrayList<>();
|
////
|
||||||
aggregateList.add(match);
|
//// List<Document> aggregateList = new ArrayList<>();
|
||||||
aggregateList.add(group);
|
//// aggregateList.add(match);
|
||||||
|
//// aggregateList.add(group);
|
||||||
AggregateIterable<Document> findIter = mongoDbFactory.getDb()
|
////
|
||||||
.getCollection(StringTool.toLowerCaseFirstOne(SysLogSystem.class.getSimpleName()))
|
//// AggregateIterable<Document> findIter = mongoDbFactory.getDb()
|
||||||
.aggregate(aggregateList);
|
//// .getCollection(StringTool.toLowerCaseFirstOne(SysLogSystem.class.getSimpleName()))
|
||||||
MongoCursor<Document> cursor = findIter.iterator();
|
//// .aggregate(aggregateList);
|
||||||
|
//// MongoCursor<Document> cursor = findIter.iterator();
|
||||||
Map resultData = new LinkedHashMap();
|
////
|
||||||
Document item_doc;
|
//// Map resultData = new LinkedHashMap();
|
||||||
while (cursor.hasNext()) {
|
//// Document item_doc;
|
||||||
item_doc = cursor.next();
|
//// while (cursor.hasNext()) {
|
||||||
resultData.put(ImppEnumUtil.LOG_LEVEL.valueOfName(item_doc.getInteger("_id")),MathOperation.round(item_doc.getInteger("count"),0));
|
//// item_doc = cursor.next();
|
||||||
}
|
//// resultData.put(ImppEnumUtil.LOG_LEVEL.valueOfName(item_doc.getInteger("_id")),MathOperation.round(item_doc.getInteger("count"),0));
|
||||||
|
//// }
|
||||||
return resultData;
|
////
|
||||||
}
|
//// return resultData;
|
||||||
|
// return null;
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
|
//}
|
||||||
|
@ -1,50 +1,52 @@
|
|||||||
package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
//package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
||||||
|
//
|
||||||
import cn.estsh.i3plus.core.api.iservice.busi.ISysLogExceptionService;
|
//import cn.estsh.i3plus.core.api.iservice.busi.ISysLogExceptionService;
|
||||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
//import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
//import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
//import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogException;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogException;
|
||||||
import cn.estsh.i3plus.pojo.platform.platrepositorymongo.SysLogExceptionRepository;
|
//import cn.estsh.i3plus.pojo.platform.platrepositorymongo.SysLogExceptionRepository;
|
||||||
import cn.estsh.i3plus.pojo.platform.sqlpack.CoreBsonPack;
|
//import cn.estsh.i3plus.pojo.platform.sqlpack.CoreBsonPack;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import org.bson.conversions.Bson;
|
//import org.bson.conversions.Bson;
|
||||||
import org.slf4j.Logger;
|
//import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
//import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description :异常日志服务接口实现
|
// * @Description :异常日志服务接口实现
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @CreateDate : 2018-11-19 17:30
|
// * @CreateDate : 2018-11-19 17:30
|
||||||
* @Modify:
|
// * @Modify:
|
||||||
**/
|
// **/
|
||||||
@Service
|
//@Service
|
||||||
public class SysLogExceptionService implements ISysLogExceptionService {
|
//public class SysLogExceptionService implements ISysLogExceptionService {
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger(SysLogExceptionService.class);
|
// public static final Logger LOGGER = LoggerFactory.getLogger(SysLogExceptionService.class);
|
||||||
|
//
|
||||||
@Autowired
|
//// @Autowired
|
||||||
private SysLogExceptionRepository sysLogExceptionRDao;
|
//// private SysLogExceptionRepository sysLogExceptionRDao;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@ApiOperation(value = "系统异常日志复杂查询,分页,排序")
|
// @ApiOperation(value = "系统异常日志复杂查询,分页,排序")
|
||||||
public ListPager<SysLogException> querySysLogExceptionByPager(SysLogException sysLogException, Pager pager) {
|
// public ListPager<SysLogException> querySysLogExceptionByPager(SysLogException sysLogException, Pager pager) {
|
||||||
if(sysLogException == null) {
|
//// if(sysLogException == null) {
|
||||||
pager = PagerHelper.getPager(pager, (int) sysLogExceptionRDao.count());
|
//// pager = PagerHelper.getPager(pager, (int) sysLogExceptionRDao.count());
|
||||||
return new ListPager(sysLogExceptionRDao.findAll(),pager);
|
//// return new ListPager(sysLogExceptionRDao.findAll(),pager);
|
||||||
}else{
|
//// }else{
|
||||||
Bson bson = CoreBsonPack.packBsonBySysLogException(sysLogException);
|
//// Bson bson = CoreBsonPack.packBsonBySysLogException(sysLogException);
|
||||||
pager = PagerHelper.getPager(pager,sysLogExceptionRDao.findByBsonCount(bson));
|
//// pager = PagerHelper.getPager(pager,sysLogExceptionRDao.findByBsonCount(bson));
|
||||||
//分页,排序
|
//// //分页,排序
|
||||||
return new ListPager(sysLogExceptionRDao.findByBsonPager(bson,pager,sysLogException.getOrderByParam()
|
//// return new ListPager(sysLogExceptionRDao.findByBsonPager(bson,pager,sysLogException.getOrderByParam()
|
||||||
,sysLogException.getAscOrDesc()),pager);
|
//// ,sysLogException.getAscOrDesc()),pager);
|
||||||
}
|
//// }
|
||||||
}
|
// return null;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
public long deleteSysLogExceptionByDateTimeAfter(String dateTime) {
|
// @Override
|
||||||
return sysLogExceptionRDao.deleteByProperty(CoreBsonPack.packBsonByDateTimeAfter(dateTime));
|
// public long deleteSysLogExceptionByDateTimeAfter(String dateTime) {
|
||||||
}
|
//// return sysLogExceptionRDao.deleteByProperty(CoreBsonPack.packBsonByDateTimeAfter(dateTime));
|
||||||
}
|
// return 0;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
@ -1,107 +1,115 @@
|
|||||||
package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
//package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
||||||
|
//
|
||||||
import cn.estsh.i3plus.core.api.iservice.busi.ISysLogOperateService;
|
//import cn.estsh.i3plus.core.api.iservice.busi.ISysLogOperateService;
|
||||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
//import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
//import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
//import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
||||||
import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
//import cn.estsh.i3plus.pojo.base.enumutil.CommonEnumUtil;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogOperate;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogOperate;
|
||||||
import cn.estsh.i3plus.pojo.platform.platrepositorymongo.SysLogOperateRepository;
|
//import cn.estsh.i3plus.pojo.platform.platrepositorymongo.SysLogOperateRepository;
|
||||||
import cn.estsh.i3plus.pojo.platform.sqlpack.CoreBsonPack;
|
//import cn.estsh.i3plus.pojo.platform.sqlpack.CoreBsonPack;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import org.bson.conversions.Bson;
|
//import org.bson.conversions.Bson;
|
||||||
import org.slf4j.Logger;
|
//import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
//import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
import java.util.List;
|
//import java.util.List;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description : 操作日志服务接口实现
|
// * @Description : 操作日志服务接口实现
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @Date : 2018-10-25 13:54
|
// * @Date : 2018-10-25 13:54
|
||||||
* @Modify :
|
// * @Modify :
|
||||||
**/
|
// **/
|
||||||
@Service
|
//@Service
|
||||||
public class SysLogOperateService implements ISysLogOperateService {
|
//public class SysLogOperateService implements ISysLogOperateService {
|
||||||
|
//
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger(SysLogOperateService.class);
|
// public static final Logger LOGGER = LoggerFactory.getLogger(SysLogOperateService.class);
|
||||||
|
//
|
||||||
@Autowired
|
//// @Autowired
|
||||||
public SysLogOperateRepository logOperateRDao;
|
//// public SysLogOperateRepository logOperateRDao;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@ApiOperation(value = "添加操作日志",notes = "添加操作日志")
|
// @ApiOperation(value = "添加操作日志",notes = "添加操作日志")
|
||||||
public SysLogOperate insertSysLogOperate(SysLogOperate logOperate) {
|
// public SysLogOperate insertSysLogOperate(SysLogOperate logOperate) {
|
||||||
return logOperateRDao.insert(logOperate);
|
//// return logOperateRDao.insert(logOperate);
|
||||||
}
|
// return null;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
@ApiOperation(value = "根据id删除日志",notes = "根据id删除日志")
|
// @Override
|
||||||
public void deleteSysLogOperateById(Long id) {
|
// @ApiOperation(value = "根据id删除日志",notes = "根据id删除日志")
|
||||||
logOperateRDao.deleteById(id);
|
// public void deleteSysLogOperateById(Long id) {
|
||||||
}
|
//// logOperateRDao.deleteById(id);
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
@ApiOperation(value = "查询全部操作日志",notes = "查询全部操作日志")
|
// @Override
|
||||||
public List listSysLogOperate() {
|
// @ApiOperation(value = "查询全部操作日志",notes = "查询全部操作日志")
|
||||||
return logOperateRDao.listPager(null);
|
// public List listSysLogOperate() {
|
||||||
}
|
//// return logOperateRDao.listPager(null);
|
||||||
|
// return null;
|
||||||
@Override
|
// }
|
||||||
public void deleteSysLogOperateByIds(Long[] ids) {
|
//
|
||||||
for(Long id : ids){
|
// @Override
|
||||||
logOperateRDao.deleteById(id);
|
// public void deleteSysLogOperateByIds(Long[] ids) {
|
||||||
}
|
// for(Long id : ids){
|
||||||
}
|
//// logOperateRDao.deleteById(id);
|
||||||
|
// }
|
||||||
@Override
|
// }
|
||||||
@ApiOperation(value = "根据id查询操作日志",notes = "根据id查询操作日志")
|
//
|
||||||
public SysLogOperate getSysLogOperateById(Long id) {
|
// @Override
|
||||||
return logOperateRDao.getById(id);
|
// @ApiOperation(value = "根据id查询操作日志",notes = "根据id查询操作日志")
|
||||||
}
|
// public SysLogOperate getSysLogOperateById(Long id) {
|
||||||
|
//// return logOperateRDao.getById(id);
|
||||||
@Override
|
// return null;
|
||||||
@ApiOperation(value = "根据操作人姓名模糊查询日志",notes = "根据操作人姓名模糊查询日志")
|
// }
|
||||||
public List<SysLogOperate> listSysLogOperateByOperateUserName(String operateUserName) {
|
//
|
||||||
return logOperateRDao.findByProperty("operateUserName",operateUserName);
|
// @Override
|
||||||
}
|
// @ApiOperation(value = "根据操作人姓名模糊查询日志",notes = "根据操作人姓名模糊查询日志")
|
||||||
|
// public List<SysLogOperate> listSysLogOperateByOperateUserName(String operateUserName) {
|
||||||
@Override
|
//// return logOperateRDao.findByProperty("operateUserName",operateUserName);
|
||||||
@ApiOperation(value = "查询所有日志数量")
|
// return null;
|
||||||
public long countAllSysLogOperate() {
|
// }
|
||||||
return logOperateRDao.listCount();
|
//
|
||||||
}
|
// @Override
|
||||||
|
// @ApiOperation(value = "查询所有日志数量")
|
||||||
@Override
|
// public long countAllSysLogOperate() {
|
||||||
@ApiOperation(value = "操作日志复杂查询,分页,排序",notes = "操作日志复杂查询,分页,排序")
|
//// return logOperateRDao.listCount();
|
||||||
public ListPager<SysLogOperate> querySysLogOperateByPager(SysLogOperate logOperate, Pager pager) {
|
// return 0;
|
||||||
if(logOperate == null) {
|
// }
|
||||||
pager = PagerHelper.getPager(pager, (int) logOperateRDao.count());
|
//
|
||||||
return new ListPager(logOperateRDao.findAll(),pager);
|
// @Override
|
||||||
}else{
|
// @ApiOperation(value = "操作日志复杂查询,分页,排序",notes = "操作日志复杂查询,分页,排序")
|
||||||
Bson bson = CoreBsonPack.packBsonByLogOperate(logOperate);
|
// public ListPager<SysLogOperate> querySysLogOperateByPager(SysLogOperate logOperate, Pager pager) {
|
||||||
pager = PagerHelper.getPager(pager,logOperateRDao.findByBsonCount(bson));
|
//// if(logOperate == null) {
|
||||||
//分页,排序
|
//// pager = PagerHelper.getPager(pager, (int) logOperateRDao.count());
|
||||||
return new ListPager(logOperateRDao.findByBsonPager(bson,pager,logOperate.getOrderByParam(),logOperate.getAscOrDesc()),pager);
|
//// return new ListPager(logOperateRDao.findAll(),pager);
|
||||||
}
|
//// }else{
|
||||||
}
|
//// Bson bson = CoreBsonPack.packBsonByLogOperate(logOperate);
|
||||||
|
//// pager = PagerHelper.getPager(pager,logOperateRDao.findByBsonCount(bson));
|
||||||
@Override
|
//// //分页,排序
|
||||||
public List<SysLogOperate> findNewSysLogOperate(Integer num) {
|
//// return new ListPager(logOperateRDao.findByBsonPager(bson,pager,logOperate.getOrderByParam(),logOperate.getAscOrDesc()),pager);
|
||||||
Pager page = new Pager();
|
//// }
|
||||||
page.setCurrentPage(1);
|
// return null;
|
||||||
page.setPageSize(num);
|
// }
|
||||||
SysLogOperate sysLogOperate = new SysLogOperate();
|
//
|
||||||
sysLogOperate.setOrderByParam("createDatetime");
|
// @Override
|
||||||
sysLogOperate.setAscOrDesc(CommonEnumUtil.ASC_OR_DESC.DESC.getValue());
|
// public List<SysLogOperate> findNewSysLogOperate(Integer num) {
|
||||||
return logOperateRDao.findByBsonPager(null,page,sysLogOperate.getOrderByParam(),sysLogOperate.getAscOrDesc());
|
// Pager page = new Pager();
|
||||||
}
|
// page.setCurrentPage(1);
|
||||||
|
// page.setPageSize(num);
|
||||||
@Override
|
// SysLogOperate sysLogOperate = new SysLogOperate();
|
||||||
public long deleteSysLogOperateByDateTimeAfter(String dateTime) {
|
// sysLogOperate.setOrderByParam("createDatetime");
|
||||||
return logOperateRDao.deleteByProperty(CoreBsonPack.packBsonByDateTimeAfter(dateTime));
|
// sysLogOperate.setAscOrDesc(CommonEnumUtil.ASC_OR_DESC.DESC.getValue());
|
||||||
}
|
//// return logOperateRDao.findByBsonPager(null,page,sysLogOperate.getOrderByParam(),sysLogOperate.getAscOrDesc());
|
||||||
}
|
// return null;
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// @Override
|
||||||
|
// public long deleteSysLogOperateByDateTimeAfter(String dateTime) {
|
||||||
|
//// return logOperateRDao.deleteByProperty(CoreBsonPack.packBsonByDateTimeAfter(dateTime));
|
||||||
|
// return 0;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
@ -1,68 +1,71 @@
|
|||||||
package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
//package cn.estsh.i3plus.core.apiservice.serviceimpl.busi;
|
||||||
|
//
|
||||||
import cn.estsh.i3plus.core.api.iservice.busi.ISysLogTaskTimeService;
|
//import cn.estsh.i3plus.core.api.iservice.busi.ISysLogTaskTimeService;
|
||||||
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
//import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.Pager;
|
//import cn.estsh.i3plus.pojo.base.common.Pager;
|
||||||
import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
//import cn.estsh.i3plus.pojo.base.common.PagerHelper;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogSystem;
|
||||||
import cn.estsh.i3plus.pojo.platform.platbean.SysLogTaskTime;
|
//import cn.estsh.i3plus.pojo.platform.platbean.SysLogTaskTime;
|
||||||
import cn.estsh.i3plus.pojo.platform.platrepositorymongo.SysLogTaskTimeRepository;
|
//import cn.estsh.i3plus.pojo.platform.platrepositorymongo.SysLogTaskTimeRepository;
|
||||||
import cn.estsh.i3plus.pojo.platform.sqlpack.CoreBsonPack;
|
//import cn.estsh.i3plus.pojo.platform.sqlpack.CoreBsonPack;
|
||||||
import io.swagger.annotations.ApiOperation;
|
//import io.swagger.annotations.ApiOperation;
|
||||||
import org.bson.conversions.Bson;
|
//import org.bson.conversions.Bson;
|
||||||
import org.slf4j.Logger;
|
//import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
//import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
//import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
//import org.springframework.stereotype.Service;
|
||||||
|
//
|
||||||
/**
|
///**
|
||||||
* @Description : 定时任务服务接口实现
|
// * @Description : 定时任务服务接口实现
|
||||||
* @Reference :
|
// * @Reference :
|
||||||
* @Author : yunhao
|
// * @Author : yunhao
|
||||||
* @CreateDate : 2019-01-04 15:10
|
// * @CreateDate : 2019-01-04 15:10
|
||||||
* @Modify:
|
// * @Modify:
|
||||||
**/
|
// **/
|
||||||
@Service
|
//@Service
|
||||||
public class SysLogTaskTimeService implements ISysLogTaskTimeService {
|
//public class SysLogTaskTimeService implements ISysLogTaskTimeService {
|
||||||
public static final Logger LOGGER = LoggerFactory.getLogger(SysLogTaskTimeService.class);
|
// public static final Logger LOGGER = LoggerFactory.getLogger(SysLogTaskTimeService.class);
|
||||||
|
//
|
||||||
@Autowired
|
//// @Autowired
|
||||||
private SysLogTaskTimeRepository sysLogTaskTimeRDao;
|
//// private SysLogTaskTimeRepository sysLogTaskTimeRDao;
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@ApiOperation(value = "添加定时任务日志",notes = "添加定时任务日志")
|
// @ApiOperation(value = "添加定时任务日志",notes = "添加定时任务日志")
|
||||||
public void insertSysLogTaskTime(SysLogTaskTime sysLogTaskTime) {
|
// public void insertSysLogTaskTime(SysLogTaskTime sysLogTaskTime) {
|
||||||
sysLogTaskTimeRDao.insert(sysLogTaskTime);
|
//// sysLogTaskTimeRDao.insert(sysLogTaskTime);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@ApiOperation(value = "删除定时任务日志",notes = "删除定时任务日志")
|
// @ApiOperation(value = "删除定时任务日志",notes = "删除定时任务日志")
|
||||||
public void deleteSysLogTaskTimeById(Long id) {
|
// public void deleteSysLogTaskTimeById(Long id) {
|
||||||
sysLogTaskTimeRDao.deleteById(id);
|
//// sysLogTaskTimeRDao.deleteById(id);
|
||||||
}
|
// }
|
||||||
|
//
|
||||||
@Override
|
// @Override
|
||||||
@ApiOperation(value = "根据id查询定时任务日志",notes = "根据id查询定时任务日志")
|
// @ApiOperation(value = "根据id查询定时任务日志",notes = "根据id查询定时任务日志")
|
||||||
public SysLogTaskTime getSysLogTaskTimeById(Long id) {
|
// public SysLogTaskTime getSysLogTaskTimeById(Long id) {
|
||||||
return sysLogTaskTimeRDao.getById(id);
|
//// return sysLogTaskTimeRDao.getById(id);
|
||||||
}
|
// return null;
|
||||||
|
// }
|
||||||
@Override
|
//
|
||||||
@ApiOperation(value = "定时任务日志分页复杂查询",notes = "定时任务日志分页复杂查询")
|
// @Override
|
||||||
public ListPager querySysLogTaskTimeByPager(SysLogTaskTime sysLogTaskTime, Pager pager) {
|
// @ApiOperation(value = "定时任务日志分页复杂查询",notes = "定时任务日志分页复杂查询")
|
||||||
if (sysLogTaskTime == null) {
|
// public ListPager querySysLogTaskTimeByPager(SysLogTaskTime sysLogTaskTime, Pager pager) {
|
||||||
pager = PagerHelper.getPager(pager,sysLogTaskTimeRDao.listCount());
|
//// if (sysLogTaskTime == null) {
|
||||||
return new ListPager(sysLogTaskTimeRDao.listPager(pager),pager);
|
//// pager = PagerHelper.getPager(pager,sysLogTaskTimeRDao.listCount());
|
||||||
} else {
|
//// return new ListPager(sysLogTaskTimeRDao.listPager(pager),pager);
|
||||||
Bson bson = CoreBsonPack.packBsonByLogTaskTime(sysLogTaskTime);
|
//// } else {
|
||||||
pager = PagerHelper.getPager(pager,sysLogTaskTimeRDao.findByBsonCount(bson));
|
//// Bson bson = CoreBsonPack.packBsonByLogTaskTime(sysLogTaskTime);
|
||||||
return new ListPager(sysLogTaskTimeRDao.findByBsonPager(bson,pager,sysLogTaskTime.getOrderByParam()
|
//// pager = PagerHelper.getPager(pager,sysLogTaskTimeRDao.findByBsonCount(bson));
|
||||||
,sysLogTaskTime.getAscOrDesc()),pager);
|
//// return new ListPager(sysLogTaskTimeRDao.findByBsonPager(bson,pager,sysLogTaskTime.getOrderByParam()
|
||||||
}
|
//// ,sysLogTaskTime.getAscOrDesc()),pager);
|
||||||
}
|
//// }
|
||||||
|
// return null;
|
||||||
@Override
|
// }
|
||||||
public long deleteSysLogTaskTimeByDateTimeAfter(String dateTime) {
|
//
|
||||||
return sysLogTaskTimeRDao.deleteByProperty(CoreBsonPack.packBsonByDateTimeAfter(dateTime));
|
// @Override
|
||||||
}
|
// public long deleteSysLogTaskTimeByDateTimeAfter(String dateTime) {
|
||||||
}
|
//// return sysLogTaskTimeRDao.deleteByProperty(CoreBsonPack.packBsonByDateTimeAfter(dateTime));
|
||||||
|
// return 0;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
|
Loading…
Reference in New Issue