yang_shj
1 year ago
37 changed files with 829 additions and 58 deletions
@ -0,0 +1,13 @@
|
||||
<?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"> |
||||
<parent> |
||||
<artifactId>hzims-service-api</artifactId> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<artifactId>alarm-api</artifactId> |
||||
<packaging>jar</packaging> |
||||
</project> |
@ -0,0 +1,9 @@
|
||||
package com.hnac.hzims.alarm.constants; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmConstants { |
||||
|
||||
public final static String APP_NAME = "hzims-alarm"; |
||||
} |
@ -0,0 +1,60 @@
|
||||
package com.hnac.hzims.alarm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@TableName("hzimsalarmconfigdetail") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "站点告警配置详情对象", description = "站点告警配置详情对象") |
||||
public class AlarmConfigDetailEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "告警配置ID") |
||||
private Long strategyId; |
||||
|
||||
@ApiModelProperty(value = "告警大类") |
||||
private String alarmType; |
||||
|
||||
@ApiModelProperty(value = "告警子类") |
||||
private String alarmChiledType; |
||||
|
||||
@ApiModelProperty(value = "告警内容") |
||||
private String alarmContext; |
||||
|
||||
@ApiModelProperty(value = "告警监测点") |
||||
private String alarmPoint; |
||||
|
||||
@ApiModelProperty(value = "是否集中监控右侧列表展示 : 0-展示 1-不展示") |
||||
private Integer isRightTabulation; |
||||
|
||||
@ApiModelProperty(value = "是否集中监控弹窗展示 : 0-展示 1-不展示") |
||||
private Integer isShowAlert; |
||||
|
||||
@ApiModelProperty(value = "是否集中监控铃铛展示 : 0-展示 1-不展示") |
||||
private Integer isSmallBell; |
||||
|
||||
@ApiModelProperty(value = "是否集中监控遮罩展示 : 0-展示 1-不展示") |
||||
private Integer isMask; |
||||
|
||||
@ApiModelProperty(value = "是否语音播报 : 0-播报 1-不播报") |
||||
private Integer isBroadcast; |
||||
|
||||
@ApiModelProperty(value = "是否进行平台消息推送 : 0-推送 1-不推送") |
||||
private Integer isPlatformMessage; |
||||
|
||||
@ApiModelProperty(value = "是否短信推送 :0-推送 1-不推送") |
||||
private Integer isShortMessage; |
||||
|
||||
@ApiModelProperty(value = "是否微信公众号消息推送 :0-推送 1-不推送") |
||||
private Integer isWxMessage; |
||||
} |
@ -0,0 +1,29 @@
|
||||
package com.hnac.hzims.alarm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@TableName("hzims_alarm_config") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "告警配置对象", description = "告警配置") |
||||
public class AlarmConfigEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
@ApiModelProperty(value = "站点编号") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty(value = "站点名称") |
||||
private String stationName; |
||||
|
||||
@ApiModelProperty(value = "是否启用 :0-启用 1-不启用") |
||||
private Integer isEnable; |
||||
} |
@ -0,0 +1,68 @@
|
||||
package com.hnac.hzims.alarm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
import org.springblade.core.tenant.mp.TenantEntity; |
||||
|
||||
import java.util.Date; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@TableName("hzims_alarm") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "告警对象", description = "各告警数据源保存对象") |
||||
public class AlarmEntity extends TenantEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
@ApiModelProperty(value = "站点编号") |
||||
private String stationId; |
||||
|
||||
@ApiModelProperty(value = "站点名称") |
||||
private String stationName; |
||||
|
||||
@ApiModelProperty(value = "设备编码") |
||||
private String deviceCode; |
||||
|
||||
@ApiModelProperty(value = "设备名称") |
||||
private String deviceName; |
||||
|
||||
@ApiModelProperty(value = "告警ID") |
||||
private String alarmId; |
||||
|
||||
@ApiModelProperty(value = "告警类型 :0- HZ3000告警 1 -等级告警 2 -条件告警 3-FDP智能预警") |
||||
private Integer alarmSource; |
||||
|
||||
@ApiModelProperty(value = "告警子类") |
||||
private Integer alarmType; |
||||
|
||||
@ApiModelProperty(value = "告警属性标识") |
||||
private String alarmSignage; |
||||
|
||||
@ApiModelProperty(value = "告警内容") |
||||
private String alarmContext; |
||||
|
||||
@ApiModelProperty(value = "告警状态") |
||||
private Integer alarmStatus; |
||||
|
||||
@ApiModelProperty(value = "告警等级") |
||||
private Integer alarmLevel; |
||||
|
||||
@ApiModelProperty(value = "告警动作数值") |
||||
private String alarmValue; |
||||
|
||||
@ApiModelProperty(value = "告警数量") |
||||
private Integer alarmCount; |
||||
|
||||
@ApiModelProperty(value = "告警时间") |
||||
private Date alarmTime; |
||||
|
||||
@ApiModelProperty(value = "监测点") |
||||
private Date realId; |
||||
} |
@ -0,0 +1,20 @@
|
||||
package com.hnac.hzims.alarm.entity; |
||||
|
||||
import com.baomidou.mybatisplus.annotation.TableName; |
||||
import io.swagger.annotations.ApiModel; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@Data |
||||
@TableName("hzims_alarm_history") |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@ApiModel(value = "告警对象", description = "各告警数据源保存对象") |
||||
public class AlarmHistoryEntity extends AlarmEntity { |
||||
|
||||
private static final long serialVersionUID = 1L; |
||||
|
||||
} |
@ -0,0 +1,134 @@
|
||||
<?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"> |
||||
<parent> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>hzims-service</artifactId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
</parent> |
||||
<modelVersion>4.0.0</modelVersion> |
||||
<artifactId>hzims-alarm</artifactId> |
||||
<packaging>jar</packaging> |
||||
|
||||
<properties> |
||||
<java.version>1.8</java.version> |
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||
<spring-boot.version>2.6.13</spring-boot.version> |
||||
<swagger-bootstrap-ui.version>1.9.6</swagger-bootstrap-ui.version> |
||||
</properties> |
||||
|
||||
<dependencies> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-common</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-boot</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-redis</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
|
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-redis</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-data-redis</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
|
||||
<dependency> |
||||
<groupId>org.springframework.boot</groupId> |
||||
<artifactId>spring-boot-starter-data-redis</artifactId> |
||||
<exclusions> |
||||
<exclusion> |
||||
<groupId>io.lettuce</groupId> |
||||
<artifactId>lettuce-core</artifactId> |
||||
</exclusion> |
||||
</exclusions> |
||||
</dependency> |
||||
|
||||
|
||||
<dependency> |
||||
<groupId>redis.clients</groupId> |
||||
<artifactId>jedis</artifactId> |
||||
</dependency> |
||||
|
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-starter-swagger</artifactId> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-test</artifactId> |
||||
<scope>test</scope> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>org.springblade</groupId> |
||||
<artifactId>blade-core-auto</artifactId> |
||||
<scope>provided</scope> |
||||
</dependency> |
||||
|
||||
|
||||
<!--生成代码--> |
||||
<dependency> |
||||
<groupId>com.baomidou</groupId> |
||||
<artifactId>mybatis-plus-generator</artifactId> |
||||
</dependency> |
||||
|
||||
<!-- velocity 模板引擎, Mybatis Plus 代码生成器需要--> |
||||
<dependency> |
||||
<groupId>org.apache.velocity</groupId> |
||||
<artifactId>velocity-engine-core</artifactId> |
||||
<version>2.2</version> |
||||
</dependency> |
||||
|
||||
|
||||
<!--swagger-bootstrap-ui--> |
||||
<dependency> |
||||
<groupId>com.github.xiaoymin</groupId> |
||||
<artifactId>swagger-bootstrap-ui</artifactId> |
||||
<version>${swagger-bootstrap-ui.version}</version> |
||||
</dependency> |
||||
<dependency> |
||||
<groupId>com.hnac.hzims</groupId> |
||||
<artifactId>alarm-api</artifactId> |
||||
<version>4.0.0-SNAPSHOT</version> |
||||
<scope>compile</scope> |
||||
</dependency> |
||||
|
||||
</dependencies> |
||||
|
||||
<build> |
||||
<finalName>${project.name}-${project.version}</finalName> |
||||
<plugins> |
||||
<plugin> |
||||
<groupId>com.spotify</groupId> |
||||
<artifactId>dockerfile-maven-plugin</artifactId> |
||||
<configuration> |
||||
<username>${docker.username}</username> |
||||
<password>${docker.password}</password> |
||||
<repository>${docker.registry.url}/${docker.namespace}/${project.artifactId}</repository> |
||||
<tag>${project.version}</tag> |
||||
<useMavenSettingsForAuth>true</useMavenSettingsForAuth> |
||||
<buildArgs> |
||||
<JAR_FILE>target/${project.build.finalName}.jar</JAR_FILE> |
||||
</buildArgs> |
||||
<skip>false</skip> |
||||
</configuration> |
||||
</plugin> |
||||
</plugins> |
||||
</build> |
||||
</project> |
@ -0,0 +1,30 @@
|
||||
package com.hnac.hzims.alarm; |
||||
|
||||
import com.hnac.hzims.alarm.constants.AlarmConstants; |
||||
import org.springblade.core.cloud.feign.EnableBladeFeign; |
||||
import org.springblade.core.launch.BladeApplication; |
||||
import org.springframework.boot.builder.SpringApplicationBuilder; |
||||
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer; |
||||
import org.springframework.cloud.client.SpringCloudApplication; |
||||
import org.springframework.context.annotation.ComponentScan; |
||||
|
||||
import javax.annotation.Resource; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@EnableBladeFeign |
||||
@SpringCloudApplication |
||||
@ComponentScan(basePackages = {"com.hnac.hzims.alarm.*"}) |
||||
@Resource |
||||
public class AlarmApplication extends SpringBootServletInitializer { |
||||
public static void main(String[] args) { |
||||
BladeApplication.run(AlarmConstants.APP_NAME, AlarmApplication.class, args); |
||||
} |
||||
|
||||
@Override |
||||
protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) { |
||||
return BladeApplication.createSpringApplicationBuilder(builder, AlarmConstants.APP_NAME, AlarmApplication.class); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,73 @@
|
||||
package com.hnac.hzims.alarm.config.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.alarm.entity.AlarmConfigEntity; |
||||
import com.hnac.hzims.alarm.config.service.AlarmConfigService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/alarm/config") |
||||
@Api(value = "告警配置", tags = "告警配置") |
||||
public class AlarmConfigController extends BladeController { |
||||
|
||||
private final AlarmConfigService alarmConfigService; |
||||
|
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "新增", notes = "传入AlarmConfigEntity对象") |
||||
public R save(@Valid @RequestBody AlarmConfigEntity entity) { |
||||
return R.status(alarmConfigService.save(entity)); |
||||
} |
||||
|
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "修改", notes = "传入AlarmConfigEntity对象") |
||||
public R update(@Valid @RequestBody AlarmConfigEntity entity) { |
||||
return R.status(alarmConfigService.updateById(entity)); |
||||
} |
||||
|
||||
|
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(alarmConfigService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "分页", notes = "传入em_model_param") |
||||
public R<IPage<AlarmConfigEntity>> list(@ApiIgnore @RequestParam Map<String,Object> params, Query query) { |
||||
QueryWrapper<AlarmConfigEntity> queryWrapper = Condition.getQueryWrapper( params, AlarmConfigEntity.class); |
||||
IPage<AlarmConfigEntity> pages = alarmConfigService.page(Condition.getPage(query), queryWrapper); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "详情", notes = "传入em_model_param") |
||||
public R<AlarmConfigEntity> detail(AlarmConfigEntity entity) { |
||||
AlarmConfigEntity detail = alarmConfigService.getOne(Condition.getQueryWrapper(entity)); |
||||
return R.data(detail); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,73 @@
|
||||
package com.hnac.hzims.alarm.config.controller; |
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
||||
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity; |
||||
import com.hnac.hzims.alarm.config.service.AlarmConfigDetailService; |
||||
import io.swagger.annotations.Api; |
||||
import io.swagger.annotations.ApiOperation; |
||||
import io.swagger.annotations.ApiParam; |
||||
import lombok.AllArgsConstructor; |
||||
import org.springblade.core.boot.ctrl.BladeController; |
||||
import org.springblade.core.mp.support.Condition; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
import org.springblade.core.tool.utils.Func; |
||||
import org.springframework.web.bind.annotation.*; |
||||
import springfox.documentation.annotations.ApiIgnore; |
||||
|
||||
import javax.validation.Valid; |
||||
import java.util.Map; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@RestController |
||||
@AllArgsConstructor |
||||
@RequestMapping("/alarm/configDetail") |
||||
@Api(value = "告警配置", tags = "告警配置") |
||||
public class AlarmConfigDetailController extends BladeController { |
||||
|
||||
private final AlarmConfigDetailService detailService; |
||||
|
||||
@PostMapping("/save") |
||||
@ApiOperationSupport(order = 1) |
||||
@ApiOperation(value = "新增", notes = "传入AlarmConfigEntity对象") |
||||
public R save(@Valid @RequestBody AlarmConfigDetailEntity entity) { |
||||
return R.status(detailService.save(entity)); |
||||
} |
||||
|
||||
@PostMapping("/update") |
||||
@ApiOperationSupport(order = 2) |
||||
@ApiOperation(value = "修改", notes = "传入AlarmConfigEntity对象") |
||||
public R update(@Valid @RequestBody AlarmConfigDetailEntity entity) { |
||||
return R.status(detailService.updateById(entity)); |
||||
} |
||||
|
||||
|
||||
@PostMapping("/remove") |
||||
@ApiOperationSupport(order = 3) |
||||
@ApiOperation(value = "逻辑删除", notes = "传入ids") |
||||
public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
||||
return R.status(detailService.deleteLogic(Func.toLongList(ids))); |
||||
} |
||||
|
||||
@GetMapping("/list") |
||||
@ApiOperationSupport(order = 4) |
||||
@ApiOperation(value = "分页", notes = "传入em_model_param") |
||||
public R<IPage<AlarmConfigDetailEntity>> list(@ApiIgnore @RequestParam Map<String,Object> params, Query query) { |
||||
QueryWrapper<AlarmConfigDetailEntity> queryWrapper = Condition.getQueryWrapper( params, AlarmConfigDetailEntity.class); |
||||
IPage<AlarmConfigDetailEntity> pages = detailService.page(Condition.getPage(query), queryWrapper); |
||||
return R.data(pages); |
||||
} |
||||
|
||||
@GetMapping("/detail") |
||||
@ApiOperationSupport(order = 5) |
||||
@ApiOperation(value = "详情", notes = "传入em_model_param") |
||||
public R<AlarmConfigDetailEntity> detail(AlarmConfigDetailEntity entity) { |
||||
AlarmConfigDetailEntity detail = detailService.getOne(Condition.getQueryWrapper(entity)); |
||||
return R.data(detail); |
||||
} |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.hnac.hzims.alarm.config.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmConfigDetailMapper extends BaseMapper<AlarmConfigDetailEntity> { |
||||
|
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.hnac.hzims.alarm.config.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.alarm.entity.AlarmConfigEntity; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmConfigMapper extends BaseMapper<AlarmConfigEntity> { |
||||
|
||||
|
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.alarm.config.service; |
||||
|
||||
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmConfigDetailService extends BaseService<AlarmConfigDetailEntity> { |
||||
|
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.alarm.config.service; |
||||
|
||||
import com.hnac.hzims.alarm.entity.AlarmConfigEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmConfigService extends BaseService<AlarmConfigEntity> { |
||||
|
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.hnac.hzims.alarm.config.service.impl; |
||||
|
||||
import com.hnac.hzims.alarm.config.mapper.AlarmConfigDetailMapper; |
||||
import com.hnac.hzims.alarm.config.service.AlarmConfigDetailService; |
||||
import com.hnac.hzims.alarm.entity.AlarmConfigDetailEntity; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@AllArgsConstructor |
||||
@Service |
||||
@Slf4j |
||||
public class AlarmConfigDetailServiceImpl extends BaseServiceImpl<AlarmConfigDetailMapper, AlarmConfigDetailEntity> implements AlarmConfigDetailService { |
||||
|
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.hnac.hzims.alarm.config.service.impl; |
||||
|
||||
import com.hnac.hzims.alarm.config.mapper.AlarmConfigMapper; |
||||
import com.hnac.hzims.alarm.config.service.AlarmConfigService; |
||||
import com.hnac.hzims.alarm.entity.AlarmConfigEntity; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@AllArgsConstructor |
||||
@Service |
||||
@Slf4j |
||||
public class AlarmConfigServiceImpl extends BaseServiceImpl<AlarmConfigMapper, AlarmConfigEntity> implements AlarmConfigService { |
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.hnac.hzims.alarm.show.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.alarm.entity.AlarmHistoryEntity; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmHistoryMapper extends BaseMapper<AlarmHistoryEntity> { |
||||
|
||||
|
||||
} |
@ -0,0 +1,12 @@
|
||||
package com.hnac.hzims.alarm.show.mapper; |
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
import com.hnac.hzims.alarm.entity.AlarmEntity; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmMapper extends BaseMapper<AlarmEntity> { |
||||
|
||||
|
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.alarm.show.service; |
||||
|
||||
import com.hnac.hzims.alarm.entity.AlarmHistoryEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmHistoryService extends BaseService<AlarmHistoryEntity> { |
||||
|
||||
} |
@ -0,0 +1,11 @@
|
||||
package com.hnac.hzims.alarm.show.service; |
||||
|
||||
import com.hnac.hzims.alarm.entity.AlarmEntity; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AlarmService extends BaseService<AlarmEntity> { |
||||
|
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.hnac.hzims.alarm.show.service.impl; |
||||
|
||||
import com.hnac.hzims.alarm.entity.AlarmHistoryEntity; |
||||
import com.hnac.hzims.alarm.show.mapper.AlarmHistoryMapper; |
||||
import com.hnac.hzims.alarm.show.service.AlarmHistoryService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@AllArgsConstructor |
||||
@Service |
||||
@Slf4j |
||||
public class AlarmHistoryServiceImpl extends BaseServiceImpl<AlarmHistoryMapper, AlarmHistoryEntity> implements AlarmHistoryService { |
||||
|
||||
} |
@ -0,0 +1,19 @@
|
||||
package com.hnac.hzims.alarm.show.service.impl; |
||||
|
||||
import com.hnac.hzims.alarm.entity.AlarmEntity; |
||||
import com.hnac.hzims.alarm.show.mapper.AlarmMapper; |
||||
import com.hnac.hzims.alarm.show.service.AlarmService; |
||||
import lombok.AllArgsConstructor; |
||||
import lombok.extern.slf4j.Slf4j; |
||||
import org.springblade.core.mp.base.BaseServiceImpl; |
||||
import org.springframework.stereotype.Service; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@AllArgsConstructor |
||||
@Service |
||||
@Slf4j |
||||
public class AlarmServiceImpl extends BaseServiceImpl<AlarmMapper, AlarmEntity> implements AlarmService { |
||||
|
||||
} |
@ -0,0 +1,41 @@
|
||||
#服务器端口 |
||||
server: |
||||
port: 8400 |
||||
|
||||
|
||||
#数据源配置 |
||||
spring: |
||||
main: |
||||
allow-bean-definition-overriding: true |
||||
#排除DruidDataSourceAutoConfigure |
||||
autoconfigure: |
||||
exclude: com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure |
||||
datasource: |
||||
url: jdbc:mysql://192.168.1.20:3576/dev_hzims_middle?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&tinyInt1isBit=false&allowMultiQueries=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true |
||||
username: root |
||||
password: 123 |
||||
|
||||
|
||||
#mybatis-plus配置 |
||||
mybatis-plus: |
||||
mapper-locations: classpath:com/hnac/hzims/**/mapper/*Mapper.xml |
||||
#实体扫描,多个package用逗号或者分号分隔 |
||||
typeAliasesPackage: com.hnac.hzims.**.entity |
||||
configuration: |
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl |
||||
|
||||
#swagger扫描路径配置 |
||||
swagger: |
||||
base-packages: |
||||
- org.springbalde |
||||
- com.hnac |
||||
|
||||
blade: |
||||
data-scope: |
||||
enabled: false |
||||
lock: |
||||
enabled: true |
||||
address: redis://192.168.1.20:3577 |
||||
password: 1qaz2WSX@redis |
||||
database: 0 |
||||
ssl: false |
@ -0,0 +1,7 @@
|
||||
spring: |
||||
cloud: |
||||
nacos: |
||||
discovery: |
||||
server-addr: 175.6.40.67:10042 |
||||
|
||||
|
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.alarm.config.mapper.AlarmConfigDetailMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.alarm.config.mapper.AlarmConfigMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.alarm.show.mapper.AlarmHistoryMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?> |
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
<mapper namespace="com.hnac.hzims.alarm.show.mapper.AlarmMapper"> |
||||
|
||||
</mapper> |
@ -0,0 +1,15 @@
|
||||
package com.hnac.hzims.alarm; |
||||
|
||||
import org.junit.jupiter.api.Test; |
||||
import org.springframework.boot.test.context.SpringBootTest; |
||||
|
||||
@SpringBootTest(classes = AlarmApplication.class) |
||||
class AlarmApplicationTests { |
||||
|
||||
@Test |
||||
void contextLoads() { |
||||
|
||||
System.out.println("1"); |
||||
} |
||||
|
||||
} |
Loading…
Reference in new issue