Esempio n. 1
0
  @Override
  public int insertQQVideo(Map<String, String> map) throws SQLException {
    for (Entry<String, String> en : map.entrySet()) {
      // 如果是今天的才加入
      if (!String.valueOf(en.getValue()).contains(TimeUtil.getTodayTimeRex(DateRex.YMD_))) {
        map.remove(en.getKey());
      }
    }

    return 0;
  }
Esempio n. 2
0
 @Override
 public int insertQQNews(Map<String, String> map) {
   // 存放SQLs
   List<String> sqlList = new ArrayList<String>();
   String sql = "";
   for (Entry<String, String> en : map.entrySet()) {
     // 如果是今天的才加入
     if (String.valueOf(en.getKey()).contains(TimeUtil.getTodayTimeRex(DateRex.YMD_))) {
       String currentTime = TimeUtil.getTodayTimeRex(DateRex.YMDhhmmss_);
       sql =
           "insert into tab_news(url,new_name,add_time) values ( '"
               + en.getKey()
               + "', '"
               + en.getValue()
               + "','"
               + currentTime
               + "')";
       sqlList.add(sql);
     }
   }
   DBOperation.getOperation().update(sqlList);
   return 0;
 }