增加异常报警模块内容
新增服务器配置管理相关接口 新增邮箱配置管理相关接口 新增数据库配置管理相关接口 新增报警规则相关接口 新增报警日志相关接口 新增报警联系人组相关接口
This commit is contained in:
parent
b6aea4d2a9
commit
00f5c57887
22
jeecg-module-abnormal-alarm/pom.xml
Normal file
22
jeecg-module-abnormal-alarm/pom.xml
Normal file
|
@ -0,0 +1,22 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-parent</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jeecg-module-abnormal-alarm</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
</dependencies>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,42 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmContactGroup;
|
||||
import org.jeecg.modules.service.IAlarmContactGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("alarmContactGroup")
|
||||
public class AlarmContactGroupController {
|
||||
|
||||
@Autowired
|
||||
private IAlarmContactGroupService alarmContactGroupService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
public Result findPage(QueryRequest queryRequest, AlarmContactGroup alarmContactGroup){
|
||||
return alarmContactGroupService.findPage(queryRequest, alarmContactGroup);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
public Result findPage(String id){
|
||||
return alarmContactGroupService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
public Result findPage(@RequestBody AlarmContactGroup alarmContactGroup){
|
||||
return alarmContactGroupService.create(alarmContactGroup);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
public Result update(@RequestBody AlarmContactGroup alarmContactGroup){
|
||||
return alarmContactGroupService.update(alarmContactGroup);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
public Result deleteById(String id){
|
||||
return alarmContactGroupService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmContactGroup;
|
||||
import org.jeecg.modules.service.IAlarmContactGroupMemberService;
|
||||
import org.jeecg.modules.service.IAlarmContactGroupService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("alarmContactGroupMember")
|
||||
public class AlarmContactGroupMemberController {
|
||||
|
||||
@Autowired
|
||||
private IAlarmContactGroupMemberService alarmContactGroupMemberService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
public Result findPage(QueryRequest queryRequest, AlarmContactGroup alarmContactGroup){
|
||||
return alarmContactGroupMemberService.findPage(queryRequest, alarmContactGroup);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
public Result findPage(String id){
|
||||
return alarmContactGroupMemberService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
public Result findPage(@RequestBody AlarmContactGroup alarmContactGroup){
|
||||
return alarmContactGroupMemberService.create(alarmContactGroup);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
public Result update(@RequestBody AlarmContactGroup alarmContactGroup){
|
||||
return alarmContactGroupMemberService.update(alarmContactGroup);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
public Result deleteById(String id){
|
||||
return alarmContactGroupMemberService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmLog;
|
||||
import org.jeecg.modules.service.IAlarmLogService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("alarmLog")
|
||||
public class AlarmLogController {
|
||||
|
||||
@Autowired
|
||||
private IAlarmLogService alarmLogService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
public Result findPage(QueryRequest queryRequest, AlarmLog alarmLog){
|
||||
return alarmLogService.findPage(queryRequest, alarmLog);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
public Result findPage(String id){
|
||||
return alarmLogService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
public Result findPage(@RequestBody AlarmLog alarmLog){
|
||||
return alarmLogService.create(alarmLog);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
public Result update(@RequestBody AlarmLog alarmLog){
|
||||
return alarmLogService.update(alarmLog);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
public Result deleteById(String id){
|
||||
return alarmLogService.deleteById(id);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmRule;
|
||||
import org.jeecg.modules.service.IAlarmRuleService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("alarmRule")
|
||||
@Api(value = "报警规则管理", tags = "报警规则管理")
|
||||
public class AlarmRuleController {
|
||||
|
||||
@Autowired
|
||||
private IAlarmRuleService alarmRuleService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
public Result findPage(QueryRequest queryRequest, AlarmRule alarmRule){
|
||||
return alarmRuleService.findPage(queryRequest, alarmRule);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
public Result findPage(String id){
|
||||
return alarmRuleService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
public Result findPage(@RequestBody AlarmRule alarmRule){
|
||||
return alarmRuleService.create(alarmRule);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
public Result update(@RequestBody AlarmRule alarmRule){
|
||||
return alarmRuleService.update(alarmRule);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
public Result deleteById(String id){
|
||||
return alarmRuleService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,44 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.SysDatabase;
|
||||
import org.jeecg.modules.service.ISysDatabaseService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("sysDatabase")
|
||||
@Api(value = "数据库配置管理", tags = "数据库配置管理")
|
||||
public class SysDatabaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysDatabaseService sysDatabaseService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
public Result findPage(QueryRequest queryRequest, SysDatabase sysDatabase){
|
||||
return sysDatabaseService.findPage(queryRequest, sysDatabase);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
public Result findInfo(String id){
|
||||
return sysDatabaseService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
public Result create(@RequestBody SysDatabase sysDatabase){
|
||||
return sysDatabaseService.create(sysDatabase);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
public Result update(@RequestBody SysDatabase sysDatabase){
|
||||
return sysDatabaseService.update(sysDatabase);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
public Result deleteById(String id){
|
||||
return sysDatabaseService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.SysEmail;
|
||||
import org.jeecg.modules.service.ISysEmailService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("sysEmail")
|
||||
@Api(value = "邮箱配置信息管理", tags = "邮箱配置信息管理")
|
||||
public class SysEmailController {
|
||||
|
||||
@Autowired
|
||||
private ISysEmailService sysEmailService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
@ApiOperation(value = "分页查询邮箱配置信息", notes = "分页查询邮箱配置信息")
|
||||
public Result findPage(QueryRequest queryRequest, SysEmail sysEmail){
|
||||
return sysEmailService.findPage(queryRequest, sysEmail);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
@ApiOperation(value = "查询邮箱配置信息详情", notes = "查询邮箱配置信息详情")
|
||||
public Result findInfo(String id){
|
||||
return sysEmailService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
@ApiOperation(value = "新增邮箱配置信息", notes = "新增邮箱配置信息")
|
||||
public Result create(@RequestBody SysEmail sysEmail){
|
||||
return sysEmailService.create(sysEmail);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
@ApiOperation(value = "修改邮箱配置信息", notes = "修改邮箱配置信息")
|
||||
public Result update(@RequestBody SysEmail sysEmail){
|
||||
return sysEmailService.update(sysEmail);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
@ApiOperation(value = "删除邮箱配置信息", notes = "删除邮箱配置信息")
|
||||
public Result deleteById(String id){
|
||||
return sysEmailService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
public class SysEmailLogController {
|
||||
}
|
|
@ -0,0 +1,50 @@
|
|||
package org.jeecg.modules.controller;
|
||||
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.SysServer;
|
||||
import org.jeecg.modules.service.ISysServerService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("sysServer")
|
||||
@Api(value = "服务器配置信息管理", tags = "服务器配置信息管理")
|
||||
public class SysServerController {
|
||||
|
||||
@Autowired
|
||||
private ISysServerService sysServerService;
|
||||
|
||||
@GetMapping("findPage")
|
||||
@ApiOperation(value = "分页查询服务器数据", notes = "分页查询服务器数据")
|
||||
public Result findPage(QueryRequest queryRequest, SysServer sysServer){
|
||||
return sysServerService.findPage(queryRequest, sysServer);
|
||||
}
|
||||
|
||||
@GetMapping("findInfo")
|
||||
@ApiOperation(value = "服务器数据详情信息", notes = "服务器数据详情信息")
|
||||
public Result findInfo(String id){
|
||||
return sysServerService.findInfo(id);
|
||||
}
|
||||
|
||||
@PostMapping("create")
|
||||
@ApiOperation(value = "新增服务器数据信息", notes = "新增服务器数据信息")
|
||||
public Result create(@RequestBody SysServer sysServer){
|
||||
return sysServerService.create(sysServer);
|
||||
}
|
||||
|
||||
@PutMapping("update")
|
||||
@ApiOperation(value = "修改服务器数据信息", notes = "修改服务器数据信息")
|
||||
public Result update(@RequestBody SysServer sysServer){
|
||||
return sysServerService.update(sysServer);
|
||||
}
|
||||
|
||||
@DeleteMapping("deleteById")
|
||||
@ApiOperation(value = "删除服务器数据信息", notes = "删除服务器数据信息")
|
||||
public Result deleteById(String id){
|
||||
return sysServerService.deleteById(id);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "alarm_contact_group")
|
||||
public class AlarmContactGroup implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "description")
|
||||
private String description;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
@Data
|
||||
@TableName(value = "alarm_contact_group_member")
|
||||
public class AlarmContactGroupMember implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "group_id")
|
||||
private String groupId;
|
||||
|
||||
@TableField(value = "user_id")
|
||||
private String userId;
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "alarm_log")
|
||||
public class AlarmLog implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "rule_id")
|
||||
private String ruleId;
|
||||
|
||||
@TableField(value = "alarm_start_date")
|
||||
private Date alarmStartDate;
|
||||
|
||||
@TableField(value = "alarm_info")
|
||||
private String alarmInfo;
|
||||
|
||||
}
|
|
@ -0,0 +1,55 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "alarm_rule")
|
||||
public class AlarmRule implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "operator")
|
||||
private String operator;
|
||||
|
||||
@TableField(value = "silence_cycle")
|
||||
private Integer silenceCycle;
|
||||
|
||||
@TableField(value = "notification")
|
||||
private String notification;
|
||||
|
||||
@TableField(value = "enabled")
|
||||
private Integer enabled;
|
||||
|
||||
@TableField(value = "contact_id")
|
||||
private String contactId;
|
||||
|
||||
@TableField(value = "source_id")
|
||||
private String sourceId;
|
||||
|
||||
@TableField(value = "source_type")
|
||||
private String sourceType;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
}
|
|
@ -0,0 +1,52 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "sys_database")
|
||||
public class SysDatabase implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "ip_address")
|
||||
private String ipAddress;
|
||||
|
||||
@TableField(value = "port")
|
||||
private String port;
|
||||
|
||||
@TableField(value = "username")
|
||||
private String username;
|
||||
|
||||
@TableField(value = "password")
|
||||
private String password;
|
||||
|
||||
@TableField(value = "type")
|
||||
private String type;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "sys_email")
|
||||
public class SysEmail implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "username")
|
||||
private String username;
|
||||
|
||||
@TableField(value = "password")
|
||||
private String password;
|
||||
|
||||
@TableField(value = "port")
|
||||
private String port;
|
||||
|
||||
@TableField(value = "enabled")
|
||||
private Integer enabled;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "sys_email_log")
|
||||
public class SysEmailLog implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "email_id")
|
||||
private String emailId;
|
||||
|
||||
@TableField(value = "subject")
|
||||
private String subject;
|
||||
|
||||
@TableField(value = "context")
|
||||
private String context;
|
||||
|
||||
@TableField(value = "receive_time")
|
||||
private Date receiveTime;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "create_by")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "update_time")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "update_by")
|
||||
private String updateBy;
|
||||
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
package org.jeecg.modules.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.Data;
|
||||
import org.springframework.format.annotation.DateTimeFormat;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@TableName(value = "sys_server")
|
||||
public class SysServer implements Serializable {
|
||||
|
||||
@TableId(value = "id", type = IdType.ASSIGN_ID)
|
||||
private String id;
|
||||
|
||||
@TableField(value = "name")
|
||||
private String name;
|
||||
|
||||
@TableField(value = "status")
|
||||
private Integer status;
|
||||
|
||||
@TableField(value = "ip_address")
|
||||
private String ipAddress;
|
||||
|
||||
@TableField(value = "create_time")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date createTime;
|
||||
|
||||
@TableField(value = "createBy")
|
||||
private String createBy;
|
||||
|
||||
@TableField(value = "updateTime")
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date updateTime;
|
||||
|
||||
@TableField(value = "updateBy")
|
||||
private String updateBy;
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.AlarmContactGroup;
|
||||
|
||||
public interface AlarmContactGroupMapper extends BaseMapper<AlarmContactGroup> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.AlarmContactGroupMember;
|
||||
|
||||
public interface AlarmContactGroupMemberMapper extends BaseMapper<AlarmContactGroupMember> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.AlarmLog;
|
||||
|
||||
public interface AlarmLogMapper extends BaseMapper<AlarmLog> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.AlarmRule;
|
||||
|
||||
public interface AlarmRuleMapper extends BaseMapper<AlarmRule> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.SysDatabase;
|
||||
|
||||
public interface SysDatabaseMapper extends BaseMapper<SysDatabase> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.SysEmailLog;
|
||||
|
||||
public interface SysEmailLogMapper extends BaseMapper<SysEmailLog> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.SysEmail;
|
||||
|
||||
public interface SysEmailMapper extends BaseMapper<SysEmail> {
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import org.jeecg.modules.entity.SysServer;
|
||||
|
||||
public interface SysServerMapper extends BaseMapper<SysServer> {
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmContactGroupMember;
|
||||
|
||||
public interface IAlarmContactGroupMemberService extends IService<AlarmContactGroupMember> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, AlarmContactGroupMember alarmContactGroupMember);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(AlarmContactGroupMember alarmContactGroupMember);
|
||||
|
||||
Result update(AlarmContactGroupMember alarmContactGroupMember);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmContactGroup;
|
||||
|
||||
public interface IAlarmContactGroupService extends IService<AlarmContactGroup> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, AlarmContactGroup alarmContactGroup);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(AlarmContactGroup alarmContactGroup);
|
||||
|
||||
Result update(AlarmContactGroup alarmContactGroup);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmLog;
|
||||
|
||||
public interface IAlarmLogService extends IService<AlarmLog> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, AlarmLog alarmLog);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(AlarmLog alarmLog);
|
||||
|
||||
Result update(AlarmLog alarmLog);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmRule;
|
||||
|
||||
public interface IAlarmRuleService extends IService<AlarmRule> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, AlarmRule alarmRule);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(AlarmRule alarmRule);
|
||||
|
||||
Result update(AlarmRule alarmRule);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.SysDatabase;
|
||||
|
||||
public interface ISysDatabaseService extends IService<SysDatabase> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, SysDatabase sysDatabase);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(SysDatabase sysDatabase);
|
||||
|
||||
Result update(SysDatabase sysDatabase);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.modules.entity.SysEmailLog;
|
||||
|
||||
public interface ISysEmailLogService extends IService<SysEmailLog> {
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.SysEmail;
|
||||
|
||||
public interface ISysEmailService extends IService<SysEmail> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, SysEmail sysEmail);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(SysEmail sysEmail);
|
||||
|
||||
Result update(SysEmail sysEmail);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
package org.jeecg.modules.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.SysServer;
|
||||
|
||||
public interface ISysServerService extends IService<SysServer> {
|
||||
|
||||
Result findPage(QueryRequest queryRequest, SysServer sysServer);
|
||||
|
||||
Result findInfo(String id);
|
||||
|
||||
Result create(SysServer sysServer);
|
||||
|
||||
Result update(SysServer sysServer);
|
||||
|
||||
Result deleteById(String id);
|
||||
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmContactGroupMember;
|
||||
import org.jeecg.modules.mapper.AlarmContactGroupMemberMapper;
|
||||
import org.jeecg.modules.service.IAlarmContactGroupMemberService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("alarmContactGroupMemberService")
|
||||
public class AlarmContactGroupMemberServiceImpl extends ServiceImpl<AlarmContactGroupMemberMapper, AlarmContactGroupMember> implements IAlarmContactGroupMemberService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, AlarmContactGroupMember alarmContactGroupMember) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result create(AlarmContactGroupMember alarmContactGroupMember) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(AlarmContactGroupMember alarmContactGroupMember) {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteById(String id) {
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,90 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.entity.AlarmContactGroup;
|
||||
import org.jeecg.modules.mapper.AlarmContactGroupMapper;
|
||||
import org.jeecg.modules.service.IAlarmContactGroupService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("alarmContactGroupService")
|
||||
public class AlarmContactGroupServiceImpl extends ServiceImpl<AlarmContactGroupMapper, AlarmContactGroup> implements IAlarmContactGroupService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, AlarmContactGroup alarmContactGroup) {
|
||||
Result result = new Result();
|
||||
Page<AlarmContactGroup> page = new Page<>();
|
||||
LambdaQueryWrapper<AlarmContactGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<AlarmContactGroup> alarmContactGroupPage = this.baseMapper.selectPage(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(alarmContactGroupPage);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
Result result = new Result();
|
||||
LambdaQueryWrapper<AlarmContactGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlarmContactGroup::getId, id);
|
||||
AlarmContactGroup alarmContactGroup = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(alarmContactGroup)){
|
||||
result.error500("查询数据失败,对应数据不存在");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(alarmContactGroup);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result create(AlarmContactGroup alarmContactGroup) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
Long id = IdWorker.getId();
|
||||
alarmContactGroup.setId(id.toString());
|
||||
alarmContactGroup.setCreateTime(new Date());
|
||||
alarmContactGroup.setCreateBy(username);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(AlarmContactGroup alarmContactGroup) {
|
||||
Result result = new Result();
|
||||
LambdaQueryWrapper<AlarmContactGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlarmContactGroup::getId, alarmContactGroup.getId());
|
||||
AlarmContactGroup contactGroup = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(contactGroup)){
|
||||
result.error500("对应数据不存在");
|
||||
return result;
|
||||
}
|
||||
this.baseMapper.updateById(alarmContactGroup);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteById(String id) {
|
||||
Result result = new Result();
|
||||
this.baseMapper.deleteById(id);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.modules.entity.AlarmLog;
|
||||
import org.jeecg.modules.mapper.AlarmLogMapper;
|
||||
import org.jeecg.modules.service.IAlarmLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("alarmLogService")
|
||||
public class AlarmLogServiceImpl extends ServiceImpl<AlarmLogMapper, AlarmLog> implements IAlarmLogService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, AlarmLog alarmLog) {
|
||||
Result result = new Result();
|
||||
Page<AlarmLog> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||
LambdaQueryWrapper<AlarmLog> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<AlarmLog> alarmLogPage = this.baseMapper.selectPage(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(alarmLogPage);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
Result result = new Result();
|
||||
LambdaQueryWrapper<AlarmLog> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlarmLog::getId, id);
|
||||
AlarmLog alarmLog = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(alarmLog)){
|
||||
result.error500("当前查询数据不存在");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(alarmLog);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result create(AlarmLog alarmLog) {
|
||||
Result result = new Result();
|
||||
Long id = IdWorker.getId();
|
||||
alarmLog.setId(id.toString());
|
||||
this.baseMapper.insert(alarmLog);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(AlarmLog alarmLog) {
|
||||
Result result = new Result();
|
||||
LambdaQueryWrapper<AlarmLog> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlarmLog::getId, alarmLog.getId());
|
||||
AlarmLog log = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(log)){
|
||||
result.error500("对应数据不存在,修改失败");
|
||||
return result;
|
||||
}
|
||||
this.baseMapper.updateById(alarmLog);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteById(String id) {
|
||||
Result result = new Result();
|
||||
this.baseMapper.deleteById(id);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,98 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.entity.AlarmRule;
|
||||
import org.jeecg.modules.mapper.AlarmRuleMapper;
|
||||
import org.jeecg.modules.service.IAlarmRuleService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("alarmRuleService")
|
||||
public class AlarmRuleServiceImpl extends ServiceImpl<AlarmRuleMapper, AlarmRule> implements IAlarmRuleService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, AlarmRule alarmRule) {
|
||||
Result result = new Result();
|
||||
Page<AlarmRule> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||
LambdaQueryWrapper<AlarmRule> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<AlarmRule> alarmRulePage = this.baseMapper.selectPage(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(alarmRulePage);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
Result result = new Result();
|
||||
//根据id查询对应数据信息
|
||||
LambdaQueryWrapper<AlarmRule> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlarmRule::getId, id);
|
||||
AlarmRule alarmRule = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(alarmRule)){
|
||||
result.error500("查询数据不存在");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(alarmRule);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result create(AlarmRule alarmRule) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
Long id = IdWorker.getId();
|
||||
alarmRule.setId(id.toString());
|
||||
alarmRule.setCreateTime(new Date());
|
||||
alarmRule.setCreateBy(username);
|
||||
this.baseMapper.insert(alarmRule);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result update(AlarmRule alarmRule) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
LambdaQueryWrapper<AlarmRule> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AlarmRule::getId, alarmRule.getId());
|
||||
AlarmRule rule = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(rule)){
|
||||
result.error500("对应数据不存在");
|
||||
return result;
|
||||
}
|
||||
alarmRule.setUpdateTime(new Date());
|
||||
alarmRule.setUpdateBy(username);
|
||||
this.baseMapper.updateById(alarmRule);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result deleteById(String id) {
|
||||
Result result = new Result();
|
||||
this.baseMapper.deleteById(id);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,104 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.entity.SysDatabase;
|
||||
import org.jeecg.modules.mapper.SysDatabaseMapper;
|
||||
import org.jeecg.modules.service.ISysDatabaseService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("sysDatabaseService")
|
||||
public class SysDatabaseServiceImpl extends ServiceImpl<SysDatabaseMapper, SysDatabase> implements ISysDatabaseService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, SysDatabase sysDatabase) {
|
||||
Result result = new Result();
|
||||
//声明page
|
||||
Page<SysDatabase> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||
//分页查询数据库配置信息
|
||||
LambdaQueryWrapper<SysDatabase> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<SysDatabase> sysDatabasePage = this.baseMapper.selectPage(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(sysDatabasePage);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
Result result = new Result();
|
||||
LambdaQueryWrapper<SysDatabase> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysDatabase::getId, id);
|
||||
SysDatabase database = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(database)){
|
||||
result.error500("当前数据不存在");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(database);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result create(SysDatabase sysDatabase) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
//声明id
|
||||
Long id = IdWorker.getId();
|
||||
sysDatabase.setId(id.toString());
|
||||
sysDatabase.setCreateTime(new Date());
|
||||
sysDatabase.setCreateBy(username);
|
||||
this.baseMapper.insert(sysDatabase);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result update(SysDatabase sysDatabase) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
LambdaQueryWrapper<SysDatabase> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysDatabase::getId, sysDatabase.getId());
|
||||
SysDatabase database = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(database)){
|
||||
result.error500("对应数据不存在,修改失败");
|
||||
return result;
|
||||
}
|
||||
sysDatabase.setUpdateTime(new Date());
|
||||
sysDatabase.setUpdateBy(username);
|
||||
this.baseMapper.updateById(sysDatabase);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result deleteById(String id) {
|
||||
Result result = new Result();
|
||||
this.baseMapper.deleteById(id);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.modules.entity.SysEmailLog;
|
||||
import org.jeecg.modules.mapper.SysEmailLogMapper;
|
||||
import org.jeecg.modules.service.ISysEmailLogService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service("sysEmailLogService")
|
||||
public class SysEmailLogServiceImpl extends ServiceImpl<SysEmailLogMapper, SysEmailLog> implements ISysEmailLogService {
|
||||
}
|
|
@ -0,0 +1,108 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.entity.SysEmail;
|
||||
import org.jeecg.modules.mapper.SysEmailMapper;
|
||||
import org.jeecg.modules.service.ISysEmailService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("sysEmailService")
|
||||
public class SysEmailServiceImpl extends ServiceImpl<SysEmailMapper, SysEmail> implements ISysEmailService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, SysEmail sysEmail) {
|
||||
Result result = new Result();
|
||||
//声明page
|
||||
Page<SysEmail> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||
//分页查询邮箱配置数据
|
||||
LambdaQueryWrapper<SysEmail> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<SysEmail> sysEmailPage = this.baseMapper.selectPage(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(sysEmailPage);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
Result result = new Result();
|
||||
//根据id查询对应的邮箱配置信息
|
||||
LambdaQueryWrapper<SysEmail> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysEmail::getId, id);
|
||||
SysEmail sysEmail = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(sysEmail)){
|
||||
result.error500("查询数据不存在");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(sysEmail);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result create(SysEmail sysEmail) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
//声明id
|
||||
Long id = IdWorker.getId();
|
||||
sysEmail.setId(id.toString());
|
||||
//创建时间
|
||||
sysEmail.setCreateTime(new Date());
|
||||
sysEmail.setCreateBy(username);
|
||||
this.baseMapper.insert(sysEmail);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result update(SysEmail sysEmail) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
//根据id查询数据
|
||||
LambdaQueryWrapper<SysEmail> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysEmail::getId, sysEmail.getId());
|
||||
SysEmail email = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(email)){
|
||||
result.error500("对应数据不存在");
|
||||
return result;
|
||||
}
|
||||
//创建时间
|
||||
sysEmail.setUpdateTime(new Date());
|
||||
sysEmail.setUpdateBy(username);
|
||||
this.baseMapper.updateById(sysEmail);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result deleteById(String id) {
|
||||
Result result = new Result();
|
||||
this.baseMapper.deleteById(id);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,109 @@
|
|||
package org.jeecg.modules.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.jeecg.common.api.QueryRequest;
|
||||
import org.jeecg.common.api.vo.Result;
|
||||
import org.jeecg.common.system.util.JwtUtil;
|
||||
import org.jeecg.common.util.SpringContextUtils;
|
||||
import org.jeecg.modules.entity.SysServer;
|
||||
import org.jeecg.modules.mapper.SysServerMapper;
|
||||
import org.jeecg.modules.service.ISysServerService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
@Service("sysServerService")
|
||||
public class SysServerServiceImpl extends ServiceImpl<SysServerMapper, SysServer> implements ISysServerService {
|
||||
|
||||
@Override
|
||||
public Result findPage(QueryRequest queryRequest, SysServer sysServer) {
|
||||
Result result = new Result();
|
||||
Page<SysServer> page = new Page<>(queryRequest.getPageNo(), queryRequest.getPageSize());
|
||||
LambdaQueryWrapper<SysServer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
Page<SysServer> sysServerPage = this.baseMapper.selectPage(page, queryWrapper);
|
||||
result.setSuccess(true);
|
||||
result.setResult(sysServerPage);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result findInfo(String id) {
|
||||
Result result = new Result();
|
||||
if (StringUtils.isBlank(id)){
|
||||
result.error500("id信息不能为空");
|
||||
}
|
||||
//查询对应数据详情内容
|
||||
LambdaQueryWrapper<SysServer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysServer::getId, id);
|
||||
SysServer sysServer = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(sysServer)){
|
||||
result.error500("查询数据不存在");
|
||||
return result;
|
||||
}
|
||||
result.setSuccess(true);
|
||||
result.setResult(sysServer);
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result create(SysServer sysServer) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
//声明id
|
||||
Long id = IdWorker.getId();
|
||||
sysServer.setId(id.toString());
|
||||
//赋值创建时间
|
||||
sysServer.setCreateTime(new Date());
|
||||
sysServer.setCreateBy(username);
|
||||
this.baseMapper.insert(sysServer);
|
||||
result.setSuccess(true);
|
||||
result.success("新增成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result update(SysServer sysServer) {
|
||||
Result result = new Result();
|
||||
//获取request
|
||||
HttpServletRequest request = SpringContextUtils.getHttpServletRequest();
|
||||
//获取当前操作人用户名
|
||||
String username = JwtUtil.getUserNameByToken(request);
|
||||
//根据id查询对应数据是否存在
|
||||
LambdaQueryWrapper<SysServer> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(SysServer::getId, sysServer.getId());
|
||||
SysServer server = this.baseMapper.selectOne(queryWrapper);
|
||||
if (Objects.isNull(server)){
|
||||
result.error500("当前数据不存在");
|
||||
return result;
|
||||
}
|
||||
sysServer.setUpdateTime(new Date());
|
||||
sysServer.setUpdateBy(username);
|
||||
this.baseMapper.updateById(sysServer);
|
||||
result.setSuccess(true);
|
||||
result.success("修改成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public Result deleteById(String id) {
|
||||
Result result = new Result();
|
||||
this.baseMapper.deleteById(id);
|
||||
result.setSuccess(true);
|
||||
result.success("删除成功");
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
41
jeecg-server-cloud/jeecg-abnormal-alarm-start/pom.xml
Normal file
41
jeecg-server-cloud/jeecg-abnormal-alarm-start/pom.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-server-cloud</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>jeecg-abnormal-alarm-start</artifactId>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-starter-cloud</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-boot-base-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-module-abnormal-alarm</artifactId>
|
||||
<version>3.5.1</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
</project>
|
|
@ -0,0 +1,47 @@
|
|||
package org.jeecg;
|
||||
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.jeecg.common.util.oConvertUtils;
|
||||
import org.springframework.boot.CommandLineRunner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
|
||||
import org.springframework.cloud.openfeign.EnableFeignClients;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.scheduling.annotation.EnableScheduling;
|
||||
|
||||
import java.net.InetAddress;
|
||||
import java.net.UnknownHostException;
|
||||
|
||||
@Slf4j
|
||||
@SpringBootApplication
|
||||
@EnableFeignClients(basePackages = {"org.jeecg"})
|
||||
@EnableScheduling
|
||||
public class JeecgAbnormalAlarmApplication extends SpringBootServletInitializer implements CommandLineRunner {
|
||||
@Override
|
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
|
||||
return application.sources(JeecgAbnormalAlarmApplication.class);
|
||||
}
|
||||
|
||||
public static void main(String[] args) throws UnknownHostException {
|
||||
ConfigurableApplicationContext application = SpringApplication.run(JeecgAbnormalAlarmApplication.class, args);
|
||||
Environment env = application.getEnvironment();
|
||||
String ip = InetAddress.getLocalHost().getHostAddress();
|
||||
String port = env.getProperty("server.port");
|
||||
String path = oConvertUtils.getString(env.getProperty("server.servlet.context-path"));
|
||||
log.info("\n----------------------------------------------------------\n\t" +
|
||||
"Application Jeecg-Boot is running! Access URLs:\n\t" +
|
||||
"Local: \t\thttp://localhost:" + port + path + "/doc.html\n" +
|
||||
"External: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
|
||||
"Swagger文档: \thttp://" + ip + ":" + port + path + "/doc.html\n" +
|
||||
"----------------------------------------------------------");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,18 @@
|
|||
server:
|
||||
port: 7006
|
||||
|
||||
spring:
|
||||
application:
|
||||
name: jeecg-abnormal-alarm
|
||||
cloud:
|
||||
nacos:
|
||||
config:
|
||||
server-addr: @config.server-addr@
|
||||
group: @config.group@
|
||||
namespace: @config.namespace@
|
||||
discovery:
|
||||
server-addr: ${spring.cloud.nacos.config.server-addr}
|
||||
config:
|
||||
import:
|
||||
- optional:nacos:jeecg.yaml
|
||||
- optional:nacos:jeecg-@profile.name@.yaml
|
|
@ -0,0 +1,77 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration debug="false">
|
||||
<!--定义日志文件的存储地址 -->
|
||||
<property name="LOG_HOME" value="../logs" />
|
||||
|
||||
<!--<property name="COLOR_PATTERN" value="%black(%contextName-) %red(%d{yyyy-MM-dd HH:mm:ss}) %green([%thread]) %highlight(%-5level) %boldMagenta( %replace(%caller{1}){'\t|Caller.{1}0|\r\n', ''})- %gray(%msg%xEx%n)" />-->
|
||||
<!-- 控制台输出 -->
|
||||
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>-->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{50}:%L) - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_HOME}/jeecg-system-%d{yyyy-MM-dd}.%i.log</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<maxFileSize>10MB</maxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.classic.encoder.PatternLayoutEncoder">
|
||||
<!--格式化输出:%d表示日期,%thread表示线程名,%-5level:级别从左显示5个字符宽度%msg:日志消息,%n是换行符 -->
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50}:%L - %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 生成 error html格式日志开始 -->
|
||||
<appender name="HTML" class="ch.qos.logback.core.FileAppender">
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<!--设置日志级别,过滤掉info日志,只输入error日志-->
|
||||
<level>ERROR</level>
|
||||
</filter>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
<file>${LOG_HOME}/error-log.html</file>
|
||||
</appender>
|
||||
<!-- 生成 error html格式日志结束 -->
|
||||
|
||||
<!-- 每天生成一个html格式的日志开始 -->
|
||||
<appender name="FILE_HTML" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedRollingPolicy">
|
||||
<!--日志文件输出的文件名 -->
|
||||
<FileNamePattern>${LOG_HOME}/jeecg-system-%d{yyyy-MM-dd}.%i.html</FileNamePattern>
|
||||
<!--日志文件保留天数 -->
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<MaxFileSize>10MB</MaxFileSize>
|
||||
</rollingPolicy>
|
||||
<encoder class="ch.qos.logback.core.encoder.LayoutWrappingEncoder">
|
||||
<layout class="ch.qos.logback.classic.html.HTMLLayout">
|
||||
<pattern>%p%d%msg%M%F{32}%L</pattern>
|
||||
</layout>
|
||||
</encoder>
|
||||
</appender>
|
||||
<!-- 每天生成一个html格式的日志结束 -->
|
||||
|
||||
<!--myibatis log configure -->
|
||||
<logger name="com.apache.ibatis" level="TRACE" />
|
||||
<logger name="java.sql.Connection" level="DEBUG" />
|
||||
<logger name="java.sql.Statement" level="DEBUG" />
|
||||
<logger name="java.sql.PreparedStatement" level="DEBUG" />
|
||||
|
||||
<!-- 日志输出级别 -->
|
||||
<root level="INFO">
|
||||
<appender-ref ref="STDOUT" />
|
||||
<appender-ref ref="FILE" />
|
||||
<appender-ref ref="HTML" />
|
||||
<appender-ref ref="FILE_HTML" />
|
||||
</root>
|
||||
|
||||
</configuration>
|
|
@ -24,6 +24,7 @@
|
|||
<module>jeecg-station-operation-start</module>
|
||||
<module>jeecg-web-statistics-start</module>
|
||||
<module>jeecg-log-manage-start</module>
|
||||
<module>jeecg-abnormal-alarm-start</module>
|
||||
</modules>
|
||||
|
||||
</project>
|
7
pom.xml
7
pom.xml
|
@ -81,6 +81,7 @@
|
|||
<module>jeecg-module-log-manage</module>
|
||||
<module>jeecg-module-station-operation</module>
|
||||
<module>jeecg-module-web-statistics</module>
|
||||
<module>jeecg-module-abnormal-alarm</module>
|
||||
</modules>
|
||||
|
||||
<repositories>
|
||||
|
@ -186,6 +187,12 @@
|
|||
<artifactId>jeecg-module-web-statistics</artifactId>
|
||||
<version>${jeecgboot.version}</version>
|
||||
</dependency>
|
||||
<!-- jeecg-module-abnormal-alarm模块 -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
<artifactId>jeecg-module-abnormal-alarm</artifactId>
|
||||
<version>${jeecgboot.version}</version>
|
||||
</dependency>
|
||||
<!-- jeecg tools -->
|
||||
<dependency>
|
||||
<groupId>org.jeecgframework.boot</groupId>
|
||||
|
|
Loading…
Reference in New Issue
Block a user