예제 #1
0
        public void OnUnpass()
        {
            //推送到图数据库
            var taskFactory = new TaskFactory();
            var fid         = _FootPrintService.Fid;

            taskFactory.StartNew(() =>
            {
                _FCRMAPIPushManager.DeleteFootPrint(fid, transmitToMQ: false);
            });

            var uid    = _FootPrintService.Uid;
            var remark = _FootPrintService.ExamineRemark;

            if (_FootPrintService.State == FootPrintState.UnPass)
            {
                var    pid      = _FootPrintService.Pid;
                string projName = "";
                var    proj     = _ProjSourceManager.GetSource(pid);
                if (proj != null)
                {
                    projName = proj.name;
                }
                var reason = "";
                if (!string.IsNullOrWhiteSpace(remark))
                {
                    reason = ",原因:{" + remark + "}";
                }
                var content = string.Format("您发布的#{0}#关联的足迹未通过审核,原因:{1},请重新发布,以免错失项目交流机会~", projName, reason);
                var request = new NotifyMessageRequest(ActionType.ADMIN_MESSAGE, 0, 0, new long[] { uid }, ContentType.Text, content);
                _NotifyServiceProxy.AdminNotify(request, true);
            }
        }
예제 #2
0
        public void OnProjUpdate(long pid)
        {
            var proj = _ProjSourceManager.GetSource(pid);

            if (proj != null)
            {
                var name          = proj.name;
                var focusProjUids = _FootPrintRepository.GetFollowAndFavoriteUids(pid).Distinct().ToArray();
                if (focusProjUids.Any())
                {
                    var content = string.Format("您的在跟/收藏项目{0}有新的动态/联系人,点击查看最新资料!", name);
                    var remind  = new PushRemindRequest()
                    {
                        Title       = "足聊",
                        Body        = content,
                        MessageType = MessageType.Once,
                        URL         = "http://m.fc.tgnet.com/ProjFollow/List",
                    };
                    _NotifyServiceProxy.PushRemind(remind, focusProjUids);
                }
            }
        }