Esempio n. 1
0
        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);
            }
        }
Esempio n. 2
0
 public MicroblogController()
 {
     microblogService = new MicroblogService();
     followService    = new FollowerService();
     visitorService   = new VisitorService();
     mfService        = new MicroblogFavoriteService();
     commentService   = new OpenCommentService();
     matService       = new MicroblogAtService();
     userTagService   = new UserTagService();
 }
Esempio n. 3
0
 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();
 }
Esempio n. 4
0
 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();
 }
Esempio n. 5
0
        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);
            }
        }
Esempio n. 6
0
        private void deleteOpenComment(OpenComment x)
        {
            OpenCommentService service = ObjectContext.Create <OpenCommentService>();

            service.Delete(x);
        }