diff --git a/src/main/java/com/bellmann/controller/FttrInfoController.java b/src/main/java/com/bellmann/controller/FttrInfoController.java new file mode 100644 index 0000000..09f97b5 --- /dev/null +++ b/src/main/java/com/bellmann/controller/FttrInfoController.java @@ -0,0 +1,36 @@ +package com.bellmann.controller; + + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.bellmann.common.base.BasePageQuery; +import com.bellmann.common.result.PageResult; +import com.bellmann.model.vo.FttrTableVO; +import com.bellmann.service.FttrInfoService; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.RequiredArgsConstructor; +import org.springframework.web.bind.annotation.*; + +/** + *
+ * 前端控制器 + *
+ * + * @author 李小林 + * @since 2024-09-26 + */ +@Tag(name = "37.FTTR从网关生命周期记录") +@RestController +@RequiredArgsConstructor +@RequestMapping("/api/fttr_info/v1") +public class FttrInfoController { + private final FttrInfoService fttrInfoService; + + @PostMapping("fttr-info-page/{devId}") + @Operation(summary = "历史查询分页接口") + public PageResult+ * Mapper 接口 + *
+ * + * @author 李小林 + * @since 2024-09-26 + */ +@Mapper +public interface FttrInfoMapper extends BaseMapper+ * + *
+ * + * @author 李小林 + * @since 2024-09-26 + */ +@Data +@EqualsAndHashCode(callSuper = false) +@TableName("itms_fttr_info") +public class FttrInfo implements Serializable { + + private static final long serialVersionUID = 1L; + + @TableId(value = "fttr_info_id", type = IdType.AUTO) + private Long fttrInfoId; + + private String loId; + + private Long devId; + + private String devSno; + + private String productClass; + + private String manufacturer; + + private String swVersion; + + private String hdVersion; + + private String optTemperature; + + private String optCurrent; + + private String optVoltage; + + private String optTxPower; + + private String processorLoad; + + private String memoryLoad; + + private String subFttrInfo; + + private Date createTime; + + private Date updateTime; + + private String informType; + + private String node; + + +} diff --git a/src/main/java/com/bellmann/model/vo/FttrTableVO.java b/src/main/java/com/bellmann/model/vo/FttrTableVO.java new file mode 100644 index 0000000..38f83bd --- /dev/null +++ b/src/main/java/com/bellmann/model/vo/FttrTableVO.java @@ -0,0 +1,61 @@ +package com.bellmann.model.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.v3.oas.annotations.media.Schema; +import lombok.Data; + +import java.util.Date; + +@Data +@Schema(description = "FTTR从网关生命周期记录") +public class FttrTableVO { + @Schema(description = "id") + private Long fttrInfoId; + + @Schema(description = "设备ID") + private Long devId; + + @Schema(description = "设备序列号") + private String devSno; + + @Schema(description = "设备型号") + private String productClass; + + @Schema(description = "设备厂商") + private String manufacturer; + + @Schema(description = "软件版本") + private String swVersion; + + @Schema(description = "硬件版本") + private String hdVersion; + + @Schema(description = "光模块温度") + private String optTemperature; + + @Schema(description = "偏置电流") + private String optCurrent; + + @Schema(description = "光模块电压") + private String optVoltage; + + @Schema(description = "发射光功率") + private String optTxPower; + @Schema(description = "cpu使用率") + private String processorLoad; + + @Schema(description = "memoryLoad") + private String memoryLoad; + + @Schema(description = "子网关信息") + private String subFttrInfo; + + @Schema(description = "inform上报时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Date createTime; + + @Schema(description = "inform类型") + private String informType; + @Schema(description = "子网关节点") + private String node; +} diff --git a/src/main/java/com/bellmann/service/FttrInfoService.java b/src/main/java/com/bellmann/service/FttrInfoService.java new file mode 100644 index 0000000..962d160 --- /dev/null +++ b/src/main/java/com/bellmann/service/FttrInfoService.java @@ -0,0 +1,18 @@ +package com.bellmann.service; + +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.bellmann.common.base.BasePageQuery; +import com.bellmann.model.vo.FttrTableVO; + +/** + *+ * 服务类 + *
+ * + * @author 李小林 + * @since 2024-09-26 + */ +public interface FttrInfoService { + + Page+ * 服务实现类 + *
+ * + * @author 李小林 + * @since 2024-09-26 + */ +@Service +@RequiredArgsConstructor +public class FttrInfoServiceImpl implements FttrInfoService { + + private final FttrInfoMapper fttrInfoMapper; + @Override + public Page