fix: 报警记录id类型

V0.5.x
jay 2023-06-18 21:30:57 +08:00
parent 832bdd3fcc
commit 195ab6761f
6 changed files with 8 additions and 8 deletions

View File

@ -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;
/**
*

View File

@ -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);

View File

@ -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> {
}

View File

@ -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> {
}

View File

@ -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;
/**
*

View File

@ -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;