新增航班计划返回消息处理SCHD , RESP
This commit is contained in:
@@ -0,0 +1,34 @@
|
||||
package com.gzzn.omms.msgexchangeapi.msghandler.schd;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.entity.Cminmsg;
|
||||
import com.gzzn.omms.msgexchangeapi.msghandler.HandlerResult;
|
||||
import com.gzzn.omms.msgexchangeapi.msghandler.schd.base.SchdBaseHandler;
|
||||
|
||||
/**
|
||||
* 处理请求返回的日航班计划,一般用于日航班计划同步
|
||||
* @author zhouxiunai
|
||||
*
|
||||
*/
|
||||
public class RESPHandler extends SchdBaseHandler {
|
||||
private static Logger logger = LoggerFactory.getLogger(RESPHandler.class);
|
||||
|
||||
@Override
|
||||
public HandlerResult run(Cminmsg cminmsg) {
|
||||
Boolean updateResult = flightInfoService.updateByDaySchd(cminmsg);
|
||||
if(false == updateResult)
|
||||
{
|
||||
//航班计划更新失败
|
||||
logger.error("航班计划更新失败");
|
||||
return HandlerResult.failure();
|
||||
}
|
||||
|
||||
//发送日计划到kafka队列
|
||||
this.sendDschd(cminmsg);
|
||||
|
||||
this.updateCminmsgToProcessed(cminmsg);
|
||||
return HandlerResult.success();
|
||||
} //end function
|
||||
}
|
||||
Reference in New Issue
Block a user