| | |
| | | private String orderDesc; |
| | | |
| | | @Excel(name = "申请时间", databaseFormat = "yyyyMMddHHmmss", format = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "Asia/Kolkata") |
| | | private Date addTime; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss" ,timezone = "Asia/Kolkata") |
| | | @Excel(name = "支付时间", databaseFormat = "yyyyMMddHHmmss", format = "yyyy-MM-dd HH:mm:ss") |
| | | private Date payTime; |
| | | /*支付通道主键id*/ |
| | |
| | | siteNews.setTitle(jsonObject.getString("title")); |
| | | Long showTime = jsonObject.getLong("time"); |
| | | siteNews.setShowTime(new Date(showTime * 1000)); |
| | | if(jsonObject.has("img")){ |
| | | convertBase64ToImage(jsonObject.getString("img"),PropertiesUtil.getProperty("ftp.address")+newsId+".jpg"); |
| | | siteNews.setImgurl(PropertiesUtil.getProperty("ftp.server.http.prefix")+newsId+".jpg"); |
| | | } |
| | | siteNews.setImgurl(jsonObject.getString("img")); |
| | | siteNews.setDescription(jsonObject.getString("content")); |
| | | siteNews.setContent(jsonObject.getString("content")); |
| | | siteNews.setStatus(1); |
| | |
| | | /* |
| | | * 新聞資訊抓取 |
| | | * */ |
| | | @Scheduled(cron = "0 0/30 * * * ?") |
| | | @Scheduled(cron = "0 0/5 * * * ?") |
| | | public void NewsInfoTask() { |
| | | try { |
| | | System.out.println("新闻定时任务---->开始"); |
| | |
| | | @Scheduled(cron = "0/1 * * * * ?") |
| | | public void stockConstraint(){ |
| | | if (stockConstraintLock.tryLock()) { |
| | | log.info("强制平仓任务:--------->开始"); |
| | | try { |
| | | List<UserPosition> userPositions = userPositionMapper.selectList(new LambdaQueryWrapper<UserPosition>().isNull(UserPosition::getSellOrderId)); |
| | | if(CollectionUtils.isNotEmpty(userPositions)){ |
| | |
| | | log.error("强制平仓任务错误:" + e.getMessage()); |
| | | } finally { |
| | | stockConstraintLock.unlock(); |
| | | log.info("强制平仓任务:--------->结束"); |
| | | } |
| | | } else { |
| | | log.info("强制平仓任务--------->上次任务还未执行完成,本次任务忽略"); |