gpt4 book ai didi

io.kaif.model.zone.ZoneInfo.getCreateTime()方法的使用及代码示例

转载 作者:知者 更新时间:2024-03-13 10:56:07 27 4
gpt4 key购买 nike

本文整理了Java中io.kaif.model.zone.ZoneInfo.getCreateTime()方法的一些代码示例,展示了ZoneInfo.getCreateTime()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ZoneInfo.getCreateTime()方法的具体详情如下:
包路径:io.kaif.model.zone.ZoneInfo
类名称:ZoneInfo
方法名:getCreateTime

ZoneInfo.getCreateTime介绍

暂无

代码示例

代码示例来源:origin: kaif-open/kaif

private void createZoneAdmin(ZoneInfo zoneInfo) {
 List<Object[]> batchArgs = zoneInfo.getAdminAccountIds()
   .stream()
   .map(uuid -> new Object[] { uuid, zoneInfo.getName(),
     Timestamp.from(zoneInfo.getCreateTime()) })
   .collect(toList());
 jdbc().batchUpdate(""
   + " INSERT "
   + "   INTO ZoneAdmin "
   + "        (accountId, zone, createTime) "
   + " VALUES "
   + questions(3), batchArgs);
}

代码示例来源:origin: kaif-open/kaif

@Test
public void rssFeed_no_articles() throws Exception {
 Zone z = zoneInfo.getZone();
 when(zoneService.loadZone(z)).thenReturn(zoneInfo);
 String pubDateStr = RFC1123_FORMATTER.format(zoneInfo.getCreateTime());
 when(articleService.listRssHotZoneArticlesWithCache(z)).thenReturn(Collections.emptyList());
 mockMvc.perform(get("/z/programming/hot.rss"))
   .andExpect(xpath("/rss/channel/title").string("programming kaif.io"))
   .andExpect(xpath("/rss/channel/description").string("programming-alias 熱門"))
   .andExpect(xpath("/rss/channel/pubDate").string(pubDateStr));
}

代码示例来源:origin: kaif-open/kaif

@Override
protected void buildFeedMetadata(Map<String, Object> model,
  Channel feed,
  HttpServletRequest request) {
 ZoneInfo zoneInfo = (ZoneInfo) model.get("zoneInfo");
 @SuppressWarnings("unchecked")
 List<Article> articles = (List<Article>) model.get("articles");
 if (zoneInfo != null) {
  feed.setTitle(zoneInfo.getName() + " kaif.io");
  feed.setLink(zoneUrl(zoneInfo.getZone()));
  feed.setDescription(zoneInfo.getAliasName() + " 熱門");
  feed.setPubDate(buildFeedUpdateTime(articles, zoneInfo.getCreateTime()));
 } else {
  feed.setTitle("熱門 kaif.io");
  feed.setLink(SCHEME_AND_HOST);
  feed.setDescription("綜合熱門");
  feed.setPubDate(buildFeedUpdateTime(articles, DEFAULT_INSTANT));
 }
}

代码示例来源:origin: kaif-open/kaif

@CacheEvict(value = "listAdministrators", key = "#a0.zone")
public ZoneInfo create(ZoneInfo zoneInfo) {
 jdbc().update(""
     + " INSERT "
     + "   INTO ZoneInfo "
     + "        (zone, aliasName, theme, voteAuthority, debateAuthority, writeAuthority, "
     + "         createTime, adminAccountIds, hideFromTop) "
     + " VALUES "
     + questions(9),
   zoneInfo.getZone().value(),
   zoneInfo.getAliasName(),
   zoneInfo.getTheme(),
   zoneInfo.getVoteAuthority().name(),
   zoneInfo.getDebateAuthority().name(),
   zoneInfo.getWriteAuthority().name(),
   Timestamp.from(zoneInfo.getCreateTime()),
   createUuidArray(zoneInfo.getAdminAccountIds().stream()),
   zoneInfo.isHideFromTop());
 createZoneAdmin(zoneInfo);
 return zoneInfo;
}

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com