Exemplo n.º 1
0
 // @Test
 public void test3() {
   TopicEntity e = topicService.get(1);
   e.setLastReplyerId(33l);
   e.setLastReplyer("lastReplyer");
   e.setLastReplyTime(new Date());
   topicService.update(e);
 }
Exemplo n.º 2
0
 @Test
 public void test1() {
   TopicEntity topic = new TopicEntity();
   topic.setCategoryId(17);
   topic.setTitle("title");
   topic.setSummary("summary");
   topic.setThumbnail("thumbnail");
   topic.setContent("content");
   topic.setKeywords("keywords");
   topic.setAuthorId(1l);
   topic.setAuthor("author");
   topic.setSource("source");
   topic.setStatus(TopicStatus.DRAFT.getValue());
   topic.setLinkOut(YesOrNo.NO.getCode());
   topic.setLinkUrl("linkUrl");
   topic.setAllowReply(YesOrNo.NO.getCode());
   topic.setPlaceTop(YesOrNo.NO.getCode());
   topic.setViewCount(0);
   topic.setReplyCount(0);
   topic.setPraiseCount(0);
   topic.setCreateTime(new Date());
   topic.setPublishTime(new Date());
   topic.setLastReplyerId(2l);
   topic.setLastReplyer("lastReplyer");
   topic.setLastReplyTime(new Date());
   TopicEntity te = topicService.add(topic);
   System.out.println(topicService.get(te.getId()));
 }