Exemple #1
0
        public ResponseContext <MyPublishMomentDetailType> MyPublishMomentDetail(Guid momentId, RequestHead head)
        {
            var moment = momentDao.GetMomentByMomentId(momentId);

            if (moment == null)
            {
                return(new ResponseContext <MyPublishMomentDetailType>(ErrCodeEnum.DataIsnotExist));
            }
            bool overCount = ApplyBuilder.IsOverCount(moment);
            var  userInfo  = uerInfoBiz.GetUserInfoByUid(moment.UId);

            return(new ResponseContext <MyPublishMomentDetailType>()
            {
                Data = new MyPublishMomentDetailType()
                {
                    MomentId = momentId,
                    State = moment.State,
                    ShareTitle = MomentContentBuilder.GetShareTitle(moment),
                    Address = moment.Address,
                    Latitude = moment.Latitude,
                    Longitude = moment.Longitude,
                    IsOffLine = moment.IsOffLine,
                    IsOverTime = MomentContentBuilder.IsOverTime(moment.StopTime),
                    ShareFlag = moment.State == MomentStateEnum.正常发布中,
                    VerifyStateDesc = MomentContentBuilder.VerifyStateMap(moment.State),
                    StateDesc = MomentContentBuilder.MomentStateMap(moment.State, moment.StopTime, overCount),
                    TextColor = MomentContentBuilder.TextColorMap(moment.State, moment.StopTime, overCount),
                    UserInfo = UserInfoBuilder.BuildUserInfo(userInfo, head),
                    ContentList = MomentContentBuilder.BuilderContent(moment, false),
                    ApplyList = ApplyBuilder.GetApplyList(momentId, false, head, moment.UId),
                    CheckList = ApplyBuilder.GetCheckDetails(moment, userInfo, head)
                }
            });
        }