예제 #1
0
        public override bool StepExecute(int operatorUserID, string param, ref long offset, ref int totalCount, ref int finishedCount, out string title, out bool isLastStep)
        {
            FeedSearchFilter filter = FeedSearchFilter.Parse(param);

            int stepCount;

            if (FeedBO.Instance.DeleteSearchFeeds(operatorUserID, filter, stepDeleteCount, out stepCount)) // .DeleteDoingsBySearch(filter, 200);
            {
                finishedCount += stepCount;

                isLastStep = stepCount < stepDeleteCount;

                title = "正在删除动态,总数 " + totalCount + ",已删 " + finishedCount;

                return(true);
            }
            else
            {
                isLastStep = false;

                title = "发生错误";

                return(false);
            }
        }
예제 #2
0
        public override void AfterExecute(int operatorUserID, string param, bool success, int totalCount, int finishedCount, out string title)
        {
            if (success)
            {
                title = "删除动态成功,共删除 " + finishedCount + " 个动态";

                FeedSearchFilter filter = FeedSearchFilter.Parse(param);

                User operatorUser = UserBO.Instance.GetUser(operatorUserID, GetUserOption.WithAll);

                Logs.LogManager.LogOperation(
                    new Feed_DeleteFeedBySearch(operatorUserID, operatorUser.Name, IPUtil.GetCurrentIP(), filter, finishedCount)
                    );
            }
            else
            {
                title = "删除动态失败";
            }
        }
예제 #3
0
        public override bool BeforeExecute(int operatorUserID, string param, ref long offset, ref int totalCount, out string title)
        {
            FeedSearchFilter filter = FeedSearchFilter.Parse(param);

            int            tempTotalCount;
            FeedCollection feeds = FeedBO.Instance.SearchFeeds(1, filter, out tempTotalCount);

            if (feeds == null || feeds.Count == 0)
            {
                title = "没有数据可以删除";
                return(false);
            }

            totalCount = tempTotalCount;

            title = "将删除 " + totalCount + " 条动态";

            return(true);
        }