修改多数据源为单数据源。将动态航班信息存储到redis
This commit is contained in:
@@ -0,0 +1,9 @@
|
||||
package com.gzzn.omms.msgexchangeapi.redis.dao;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.redis.entity.Context;
|
||||
|
||||
public interface ContextDao extends CrudRepository<Context, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.gzzn.omms.msgexchangeapi.redis.dao;
|
||||
|
||||
import org.springframework.data.repository.CrudRepository;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.redis.entity.FlightInfo;
|
||||
|
||||
public interface FlightInfoDao extends CrudRepository<FlightInfo, String>{
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.gzzn.omms.msgexchangeapi.redis.entity;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 应用上下文
|
||||
* @author Administrator
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="context")
|
||||
public class Context {
|
||||
public static String KEY_ISWAITSCHD="isWaitSchd";
|
||||
public static String KEY_MSGPROGRESS="msgProgress";
|
||||
|
||||
|
||||
@Id
|
||||
private String key;
|
||||
private String value;
|
||||
public String getKey() {
|
||||
return key;
|
||||
}
|
||||
public void setKey(String key) {
|
||||
this.key = key;
|
||||
}
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.gzzn.omms.msgexchangeapi.redis.entity;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import javax.persistence.Table;
|
||||
|
||||
/**
|
||||
* 航班计划信息
|
||||
* @author
|
||||
*
|
||||
*/
|
||||
@Entity
|
||||
@Table(name="flightInfo")
|
||||
public class FlightInfo {
|
||||
|
||||
@Id
|
||||
private String flightId;//航班id,用于索引
|
||||
|
||||
private String context;//内容
|
||||
|
||||
|
||||
public String getFlightId() {
|
||||
return flightId;
|
||||
}
|
||||
public void setFlightId(String flightId) {
|
||||
this.flightId = flightId;
|
||||
}
|
||||
public String getContext() {
|
||||
return context;
|
||||
}
|
||||
public void setContext(String context) {
|
||||
this.context = context;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user