Преглед на файлове

fix: 报警记录id类型

jay преди 2 години
родител
ревизия
195ab6761f

+ 2 - 2
iot-common/iot-common-dao/iot-common-model/src/main/java/cc/iotkit/model/alert/AlertRecord.java

@@ -22,9 +22,9 @@ import lombok.NoArgsConstructor;
 @Builder
 @NoArgsConstructor
 @AllArgsConstructor
-public class AlertRecord implements Owned<String> {
+public class AlertRecord implements Owned<Long> {
 
-    private String id;
+    private Long id;
 
     /**
      * 配置所属用户

+ 1 - 1
iot-common/iot-common-dao/iot-data-service/src/main/java/cc/iotkit/data/manager/IAlertRecordData.java

@@ -15,7 +15,7 @@ import cc.iotkit.data.ICommonData;
 import cc.iotkit.model.alert.AlertRecord;
 
 
-public interface IAlertRecordData extends ICommonData<AlertRecord, String> {
+public interface IAlertRecordData extends ICommonData<AlertRecord, Long> {
 
 
   Paging<AlertRecord> selectAlertConfigPage(PageRequest<AlertRecord> request);

+ 1 - 1
iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/AlertConfigRepository.java

@@ -12,6 +12,6 @@ package cc.iotkit.data.dao;
 import cc.iotkit.data.model.TbAlertConfig;
 import org.springframework.data.jpa.repository.JpaRepository;
 
-public interface AlertConfigRepository extends JpaRepository<TbAlertConfig, String> {
+public interface AlertConfigRepository extends JpaRepository<TbAlertConfig, Long> {
 
 }

+ 1 - 1
iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/dao/AlertRecordRepository.java

@@ -12,6 +12,6 @@ package cc.iotkit.data.dao;
 import cc.iotkit.data.model.TbAlertRecord;
 import org.springframework.data.jpa.repository.JpaRepository;
 
-public interface AlertRecordRepository extends JpaRepository<TbAlertRecord, String> {
+public interface AlertRecordRepository extends JpaRepository<TbAlertRecord, Long> {
 
 }

+ 2 - 2
iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/model/TbAlertRecord.java

@@ -14,7 +14,7 @@ import org.hibernate.annotations.GenericGenerator;
 
 @Data
 @Entity
-@ApiModel(value = "告警记录")
+//@ApiModel(value = "告警记录")
 @Table(name = "alert_record")
 @AutoMapper(target= AlertConfig.class)
 public class TbAlertRecord {
@@ -23,7 +23,7 @@ public class TbAlertRecord {
     @GeneratedValue(generator = "SnowflakeIdGenerator")
     @GenericGenerator(name = "SnowflakeIdGenerator", strategy = "cc.iotkit.data.config.id.SnowflakeIdGenerator")
     @ApiModelProperty(value = "告警记录id")
-    private String id;
+    private Long id;
 
     /**
      * 配置所属用户

+ 1 - 1
iot-common/iot-common-dao/iot-data-serviceImpl-rdb/src/main/java/cc/iotkit/data/service/AlertRecordDataImpl.java

@@ -21,7 +21,7 @@ import org.springframework.stereotype.Service;
 
 @Primary
 @Service
-public class AlertRecordDataImpl implements IAlertRecordData, IJPACommData<AlertRecord, String> {
+public class AlertRecordDataImpl implements IAlertRecordData, IJPACommData<AlertRecord, Long> {
 
     @Autowired
     private AlertRecordRepository alertRecordRepository;