fix: 报警记录id类型
parent
832bdd3fcc
commit
195ab6761f
|
@ -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;
|
||||
|
||||
/**
|
||||
* 配置所属用户
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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> {
|
||||
|
||||
}
|
||||
|
|
|
@ -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> {
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
||||
/**
|
||||
* 配置所属用户
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue