| | |
| | | /** |
| | | * 每隔一分钟去处理的定时任务 |
| | | */ |
| | | @Scheduled(fixedRate = 1000 * 60) |
| | | public void taskMinute(){ |
| | | try { |
| | | String baseInfoCompany = "{\"CompanyName\":\"昭通市睿邦科技有限公司\",\"Identifier\":\"91530600MA6K70Q50D\",\"Address\":530602,\"BusinessScope\":\"网络预约出租汽车客运\"," + |
| | | "\"ContactAddress\":\"云南省昭通市昭阳区龙泉路501号\",\"EconomicType\":\"150\",\"RegCapital\":\"一千万元\",\"LegalName\":\"虎尊国\",\"LegalID\":\"53210119760928201X\"," + |
| | | "\"LegalPhone\":\"13118708883\",\"State\":0,\"Flag\":2,\"UpdateTime\":\"" +System.currentTimeMillis() + "\"}"; |
| | | String result = ministryOfTransportService.baseInfoCompany(baseInfoCompany); |
| | | HttpResult httpResult = JSON.parseObject(result, HttpResult.class); |
| | | if(httpResult.getCode() == 200 || httpResult.getCode() == 201){ |
| | | counter = 0; |
| | | } |
| | | if(null == httpResult){ |
| | | sendSms(); |
| | | System.err.println("请求接口出错!"); |
| | | return; |
| | | } |
| | | } catch (Exception e) { |
| | | sendSms(); |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | // @Scheduled(fixedRate = 1000 * 60) |
| | | // public void taskMinute(){ |
| | | // try { |
| | | // String baseInfoCompany = "{\"CompanyName\":\"昭通市睿邦科技有限公司\",\"Identifier\":\"91530600MA6K70Q50D\",\"Address\":530602,\"BusinessScope\":\"网络预约出租汽车客运\"," + |
| | | // "\"ContactAddress\":\"云南省昭通市昭阳区龙泉路501号\",\"EconomicType\":\"150\",\"RegCapital\":\"一千万元\",\"LegalName\":\"虎尊国\",\"LegalID\":\"53210119760928201X\"," + |
| | | // "\"LegalPhone\":\"13118708883\",\"State\":0,\"Flag\":2,\"UpdateTime\":\"" +System.currentTimeMillis() + "\"}"; |
| | | // String result = ministryOfTransportService.baseInfoCompany(baseInfoCompany); |
| | | // HttpResult httpResult = JSON.parseObject(result, HttpResult.class); |
| | | // if(httpResult.getCode() == 200 || httpResult.getCode() == 201){ |
| | | // counter = 0; |
| | | // } |
| | | // if(null == httpResult){ |
| | | // sendSms(); |
| | | // System.err.println("请求接口出错!"); |
| | | // return; |
| | | // } |
| | | // } catch (Exception e) { |
| | | // sendSms(); |
| | | // e.printStackTrace(); |
| | | // } |
| | | // } |
| | | |
| | | |
| | | /** |