From 3b30cddec7b74a8471dd8e66bda8d0858c9be8bb Mon Sep 17 00:00:00 2001 From: yang_shj <1069818635@QQ.com> Date: Wed, 17 Jan 2024 17:16:52 +0800 Subject: [PATCH] =?UTF-8?q?#=E4=B8=9A=E5=8A=A1=E9=A2=84=E8=AD=A6=E5=8A=9F?= =?UTF-8?q?=E8=83=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hzims/business/entity/BusinessEarlyEntity.java | 4 +-- .../hnac/hzims/business/vo/BusinessEarlyVo.java | 20 +++++++++++ .../early/controller/BusinessEarlyController.java | 41 ++++++++++++++++++++++ .../early/service/BusinessEarlyService.java | 4 +++ .../service/impl/BusinessEarlyServiceImpl.java | 6 ++++ 5 files changed, 73 insertions(+), 2 deletions(-) create mode 100644 hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/vo/BusinessEarlyVo.java create mode 100644 hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/controller/BusinessEarlyController.java diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/entity/BusinessEarlyEntity.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/entity/BusinessEarlyEntity.java index 13719eb..c0b0596 100644 --- a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/entity/BusinessEarlyEntity.java +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/entity/BusinessEarlyEntity.java @@ -14,9 +14,9 @@ import javax.validation.constraints.NotNull; * @author ysj */ @Data -@TableName("hzims_alarm") +@TableName("hzims_business_early") @EqualsAndHashCode(callSuper = true) -@ApiModel(value = "告警对象", description = "各告警数据源保存对象") +@ApiModel(value = "业务预警", description = "业务预警对象") public class BusinessEarlyEntity extends TenantEntity { private static final long serialVersionUID = 1L; diff --git a/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/vo/BusinessEarlyVo.java b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/vo/BusinessEarlyVo.java new file mode 100644 index 0000000..7cda295 --- /dev/null +++ b/hzims-service-api/alarm-api/src/main/java/com/hnac/hzims/business/vo/BusinessEarlyVo.java @@ -0,0 +1,20 @@ +package com.hnac.hzims.business.vo; + +import com.hnac.hzims.business.entity.BusinessEarlyEntity; +import io.swagger.annotations.ApiModel; +import lombok.Data; +import lombok.EqualsAndHashCode; + + +/** + * @author ysj + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "告警对象", description = "各告警数据源保存对象") +public class BusinessEarlyVo extends BusinessEarlyEntity { + + private static final long serialVersionUID = 1L; + + +} \ No newline at end of file diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/controller/BusinessEarlyController.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/controller/BusinessEarlyController.java new file mode 100644 index 0000000..f696b61 --- /dev/null +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/controller/BusinessEarlyController.java @@ -0,0 +1,41 @@ +package com.hnac.hzims.business.early.controller; + + +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; +import com.hnac.hzims.business.early.service.BusinessEarlyService; +import com.hnac.hzims.business.entity.BusinessEarlyEntity; +import com.hnac.hzims.business.vo.BusinessEarlyVo; +import com.hnac.hzims.common.logs.annotation.OperationAnnotation; +import com.hnac.hzims.common.logs.enums.BusinessType; +import com.hnac.hzims.common.logs.enums.OperatorType; +import com.hnac.hzims.operational.access.vo.ConstructionVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +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.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * @author ysj + */ +@Api(tags = {"业务预警"}) +@RestController +@AllArgsConstructor +@RequestMapping("/business/early") +public class BusinessEarlyController extends BladeController { + + private final BusinessEarlyService businessEarlyService; + + @GetMapping("/list") + @ApiOperationSupport(order = 4) + @ApiOperation(value = "分页查询") + public R> list(BusinessEarlyVo early, Query query) { + return R.data(businessEarlyService.pageCondition(Condition.getPage(query), early)); + } +} diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/BusinessEarlyService.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/BusinessEarlyService.java index 6d31eda..507af9d 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/BusinessEarlyService.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/BusinessEarlyService.java @@ -1,6 +1,9 @@ package com.hnac.hzims.business.early.service; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.business.entity.BusinessEarlyEntity; +import com.hnac.hzims.business.vo.BusinessEarlyVo; +import com.hnac.hzims.operational.access.vo.ConstructionVo; import org.springblade.core.mp.base.BaseService; /** @@ -8,4 +11,5 @@ import org.springblade.core.mp.base.BaseService; */ public interface BusinessEarlyService extends BaseService { + IPage pageCondition(IPage page, BusinessEarlyVo early); } diff --git a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/impl/BusinessEarlyServiceImpl.java b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/impl/BusinessEarlyServiceImpl.java index 7281828..de0f0ad 100644 --- a/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/impl/BusinessEarlyServiceImpl.java +++ b/hzims-service/hzims-alarm/src/main/java/com/hnac/hzims/business/early/service/impl/BusinessEarlyServiceImpl.java @@ -1,8 +1,10 @@ package com.hnac.hzims.business.early.service.impl; +import com.baomidou.mybatisplus.core.metadata.IPage; import com.hnac.hzims.business.early.mapper.BusinessEarlyMapper; import com.hnac.hzims.business.early.service.BusinessEarlyService; import com.hnac.hzims.business.entity.BusinessEarlyEntity; +import com.hnac.hzims.business.vo.BusinessEarlyVo; import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springblade.core.mp.base.BaseServiceImpl; @@ -16,4 +18,8 @@ import org.springframework.stereotype.Service; @Slf4j public class BusinessEarlyServiceImpl extends BaseServiceImpl implements BusinessEarlyService { + @Override + public IPage pageCondition(IPage page, BusinessEarlyVo early) { + return null; + } } \ No newline at end of file