重构消息处理框架ExchangeTask 只做新消息获取和分发
This commit is contained in:
-24
@@ -10,7 +10,6 @@ import org.springframework.stereotype.Service;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.Cminmsg;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.schd.dnld.DNLDMsg;
|
||||
import com.gzzn.omms.msgexchangeapi.entity.msg.schd.dnld.FLTR;
|
||||
import com.gzzn.omms.msgexchangeapi.msghandler.HandlerResult;
|
||||
import com.gzzn.omms.msgexchangeapi.msghandler.MsgHandlerDispatcher;
|
||||
import com.gzzn.omms.msgexchangeapi.redis.RedisService;
|
||||
import com.gzzn.omms.msgexchangeapi.service.IExchangeService;
|
||||
@@ -51,29 +50,6 @@ public class FlightInfoServiceImpl implements IFlightInfoService {
|
||||
|
||||
return true;
|
||||
} //end function
|
||||
|
||||
|
||||
@Override
|
||||
public List<UpdateByCminmsgsResult> updateByCminmsgs(List<Cminmsg> lsCminmsgs) {
|
||||
List<UpdateByCminmsgsResult> resultUpdated = new ArrayList();//更新结果
|
||||
|
||||
for (Cminmsg cminmsg : lsCminmsgs) {
|
||||
//更新动态航班消息
|
||||
String strClobMsg = cminmsg.getCminmsgsClobMsg();
|
||||
HandlerResult handlerResult = msgHandlerDispatcher.dispatch(strClobMsg);
|
||||
UpdateByCminmsgsResult updateResult = null;
|
||||
if(handlerResult.getIsSuccess())
|
||||
{
|
||||
updateResult = UpdateByCminmsgsResult.success(cminmsg, handlerResult.getFltrs());
|
||||
}
|
||||
else {
|
||||
updateResult = UpdateByCminmsgsResult.failure(cminmsg);
|
||||
}
|
||||
resultUpdated.add(updateResult);
|
||||
}//end for
|
||||
|
||||
return resultUpdated;
|
||||
}//end function
|
||||
|
||||
|
||||
@Override
|
||||
|
||||
@@ -19,13 +19,6 @@ public interface IFlightInfoService {
|
||||
*/
|
||||
public Boolean updateByDaySchd(Cminmsg cminmsg);
|
||||
|
||||
/**
|
||||
* 根据消息更新航班信息
|
||||
* @param lsCminmsgs
|
||||
* @return 返回被更新了的动态航班信息
|
||||
*/
|
||||
public List<UpdateByCminmsgsResult> updateByCminmsgs(List<Cminmsg> lsCminmsgs);
|
||||
|
||||
/**
|
||||
* 通过航班id获取航班动态
|
||||
* @param flid
|
||||
|
||||
Reference in New Issue
Block a user