代码如下
/* //@Scheduled(cron="0/5 * * * * ? ") public void sendSystemAdver() { LOG.info("-----------------------------启动系统小喇叭进程------------------------"); Timer timer = AdverMG.TInstance.timerI; int flag = Integer.parseInt(HornerMG.getSysValByKey("system.adver.flag").getValue()); SysValMapper strOne = HornerMG.getSysValByKey("system.one.Text"); SysValMapper strTwo = HornerMG.getSysValByKey("system.two.Text"); SysValMapper strThree = HornerMG.getSysValByKey("system.three.Text"); SysValMapper strFour = HornerMG.getSysValByKey("system.four.Text"); SysValMapper sysStr = HornerMG.getSysValByKey("system.tag"); long time = 5000l; if (flag > 0) { timer.schedule(new TimeEvent(strOne.getDescription(),sysStr.getDescription(),Integer.parseInt(sysStr.getValue())), time, Long.parseLong(strOne.getValue())*1000); timer.schedule(new TimeEvent(strTwo.getDescription(),sysStr.getDescription(),Integer.parseInt(sysStr.getValue())), time, Long.parseLong(strTwo.getValue())*1000); timer.schedule(new TimeEvent(strThree.getDescription(),sysStr.getDescription(),Integer.parseInt(sysStr.getValue())), time, Long.parseLong(strThree.getValue())*1000); timer.schedule(new TimeEvent(strFour.getDescription(),sysStr.getDescription(),Integer.parseInt(sysStr.getValue())), time, Long.parseLong(strFour.getValue())*1000); } else { LOG.info("----------------------------取消系统小喇叭进程------------------------"); timer.cancel(); AdverMG.TInstance.timerI = new Timer(); } }*//* private class TimeEvent extends TimerTask {
private String content;
private String sysStr;
private Integer sysCode;
public TimeEvent(String _content,String _sysStr,Integer _sysCode){
this.content = _content;
this.sysCode = _sysCode;
this.sysStr = _sysStr;
}
@Override
public void run() {
sendFlashAdver(content,sysStr,sysCode);
}}*/
欢迎来到这里!
我们正在构建一个小众社区,大家在这里相互信任,以平等 • 自由 • 奔放的价值观进行分享交流。最终,希望大家能够找到与自己志同道合的伙伴,共同成长。
注册 关于