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) } }); }
public ResponseContext <MomentCheckDetailType> MomentCheckDetail(RequestContext <MomentCheckDetailRequest> request) { var moment = momentDao.GetMomentByMomentId(request.Data.MomentId); if (moment == null) { return(new ResponseContext <MomentCheckDetailType>(ErrCodeEnum.DataIsnotExist)); } bool overCount = ApplyBuilder.IsOverCount(moment); var userInfo = uerInfoBiz.GetUserInfoByUid(moment.UId); return(new ResponseContext <MomentCheckDetailType>() { Data = new MomentCheckDetailType() { MomentId = moment.MomentId, State = moment.State, Address = moment.Address, IsOffLine = moment.IsOffLine, ShareTitle = MomentContentBuilder.GetShareTitle(moment), StateDesc = MomentContentBuilder.MomentStateMap(moment.State, moment.StopTime, overCount), TextColor = MomentContentBuilder.TextColorMap(moment.State, moment.StopTime, overCount), UserInfo = UserInfoBuilder.BuildUserInfo(userInfo, request.Head), ContentList = MomentContentBuilder.BuilderContent(moment, false), ApplyList = ApplyBuilder.GetCheckDetails(moment, userInfo, request.Head) } }); }