private void importPrivate(long startId, long endId) { IList clist = ndb.find(commentType, "Id>=" + startId + " and Id<=" + endId + " order by Id asc").list(); logger.Info("old comment count=" + clist.Count); foreach (IComment x in clist) { // 如果已经导入,那么就删除已有的OpenComment OpenComment oc = hasImport(x); if (oc != null) { deleteOpenComment(oc); deleteTransLog(oc); } OpenComment comment = getOpenComment(x); OpenCommentService service = ObjectContext.Create <OpenCommentService>(); service.Import(comment); logTransInfo(x, comment); } }
public MicroblogController() { microblogService = new MicroblogService(); followService = new FollowerService(); visitorService = new VisitorService(); mfService = new MicroblogFavoriteService(); commentService = new OpenCommentService(); matService = new MicroblogAtService(); userTagService = new UserTagService(); }
public HomeController() { favoriteService = new MicroblogFavoriteService(); microblogService = new MicroblogService(); followService = new FollowerService(); visitorService = new VisitorService(); mfService = new MicroblogFavoriteService(); matService = new MicroblogAtService(); videoSpider = new WojiluVideoSpider(); commentService = new OpenCommentService(); }
public HomeController() { microblogService = new MicroblogService(); followService = new FollowerService(); visitorService = new VisitorService(); mfService = new MicroblogFavoriteService(); commentService = new OpenCommentService(); photoPostService = new PhotoPostService(); friendService = new FriendService(); blogAppService = new BlogService(); photoAppService = new PhotoService(); }
public void Import() { List <TComment> clist = db.findAll <TComment>(); foreach (TComment x in clist) { // 如果已经导入,那么就删除已有的OpenComment OpenComment oc = hasImport(x); if (oc != null) { deleteOpenComment(oc); deleteTransLog(oc); } OpenComment comment = getOpenComment(x); OpenCommentService service = ObjectContext.Create <OpenCommentService>(); service.Import(comment); logTransInfo(x, comment); } }
private void deleteOpenComment(OpenComment x) { OpenCommentService service = ObjectContext.Create <OpenCommentService>(); service.Delete(x); }