调整包路径
This commit is contained in:
@@ -10,8 +10,10 @@ import org.springframework.boot.CommandLineRunner;
|
||||
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.dao.CmoutmsgDao;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entity.Cmoutmsg;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entiy.msg.rqfd.RefdMsg;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entiy.msg.rqfd.RefdMsgBody;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entity.msg.rqfd.RefdMsg;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.primary.entity.msg.rqfd.RefdMsgBody;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.secondary.dao.ContextDao;
|
||||
import com.gzzn.omms.msgexchangeapi.domain.secondary.entity.Context;
|
||||
import com.gzzn.omms.msgexchangeapi.service.IExchangeService;
|
||||
import com.gzzn.omms.msgexchangeapi.utils.DateTimeUtil;
|
||||
|
||||
@@ -24,29 +26,47 @@ public class AppRunner implements CommandLineRunner {
|
||||
@Autowired
|
||||
private CmoutmsgDao cmoutmsgDao;
|
||||
|
||||
@Autowired
|
||||
private ContextDao contextDao;
|
||||
|
||||
@Autowired
|
||||
private IExchangeService exchangeService;
|
||||
|
||||
@Override
|
||||
public void run(String... args) throws Exception {
|
||||
//构造消息
|
||||
Date nowDate = new Date();
|
||||
Cmoutmsg cmoutmsg = new Cmoutmsg();
|
||||
|
||||
|
||||
RefdMsgBody body = new RefdMsgBody();
|
||||
body.setStdb(
|
||||
DateTimeUtil.gtFormatStr(
|
||||
new Date(),
|
||||
nowDate,
|
||||
"ddMMMyyHHmm",
|
||||
Locale.ENGLISH)
|
||||
.toUpperCase()
|
||||
);
|
||||
RefdMsg msg = new RefdMsg();
|
||||
msg.setRefd(body);
|
||||
|
||||
|
||||
cmoutmsg.setCminmsgsClobMsg(exchangeService.objectToXmlstr(msg));
|
||||
cmoutmsg.setCminmsgsStatus("VALID");
|
||||
|
||||
cmoutmsgDao.save(cmoutmsg);
|
||||
|
||||
|
||||
//
|
||||
Context isWaitSchd = new Context();
|
||||
isWaitSchd.setKey(Context.KEY_ISWAITSCHD); //等待返回日计划状态
|
||||
isWaitSchd.setValue("true");
|
||||
contextDao.save(isWaitSchd);
|
||||
|
||||
//初始化消息进度
|
||||
Context msgProgress = new Context();
|
||||
msgProgress.setKey(Context.KEY_MSGPROGRESS);
|
||||
msgProgress.setValue( DateTimeUtil.gtFormatStr(
|
||||
nowDate,
|
||||
"yyyy-MM-dd hh:mm:ss",
|
||||
Locale.ENGLISH)
|
||||
);
|
||||
contextDao.save(msgProgress);
|
||||
}//end function run
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user