Пример #1
0
        /// <summary>
        /// 关注
        /// </summary>
        /// <param name="activeUserId"></param>
        /// <param name="passiveUserId"></param>
        public void Attention_AfterTranCommit(string activeUserId, string passiveUserId)
        {
            if (string.IsNullOrEmpty(activeUserId) || string.IsNullOrEmpty(passiveUserId))
            {
                return;
            }
            UserBalanceManager userBalanceManger = new UserBalanceManager();
            var activeUserInfo = userBalanceManger.GetUserRegister(activeUserId);

            if (activeUserInfo == null)
            {
                return;
            }
            var paasiveUserInfo = userBalanceManger.GetUserRegister(passiveUserId);

            if (paasiveUserInfo == null)
            {
                return;
            }

            SiteMessageControllBusiness siteMsgBusiness = new SiteMessageControllBusiness();
            var array = new string[] { "[UserName]=" + activeUserInfo.DisplayName + "", "[AttentionUser]=" + paasiveUserInfo.DisplayName + "" };

            siteMsgBusiness.DoSendSiteMessage(activeUserInfo.UserId, string.Empty, "ON_User_Attention", array);
        }
Пример #2
0
 /// <summary>
 /// 某场景触发的发送站内消息
 /// </summary>
 public CommonActionResult DoSendSiteMessage(string userId, string mobile, string sceneKey, string msgTemplateParams)
 {
     try
     {
         var siteBiz = new SiteMessageControllBusiness();
         siteBiz.DoSendSiteMessage(userId, mobile, sceneKey, msgTemplateParams.Split('|'));
         return(new CommonActionResult(true, "发送完成"));
     }
     catch (Exception ex)
     {
         return(new CommonActionResult(false, ex.Message));
     }
 }
Пример #3
0
        /// <summary>
        /// 定制跟单
        /// </summary>
        /// <param name="info"></param>
        public void TogetherFollow_AfterTranCommit(TogetherFollowerRuleInfo info)
        {
            if (info == null)
            {
                return;
            }
            else if (string.IsNullOrEmpty(info.CreaterUserId) || string.IsNullOrEmpty(info.FollowerUserId))
            {
                return;
            }
            UserBalanceManager userBalanceManger = new UserBalanceManager();
            var createUserInfo = userBalanceManger.GetUserRegister(info.CreaterUserId);

            if (createUserInfo == null)
            {
                return;
            }
            var followUserInfo = userBalanceManger.GetUserRegister(info.FollowerUserId);

            if (followUserInfo == null)
            {
                return;
            }
            var gameCodeName = string.Empty;
            var gameTypeName = string.Empty;

            gameCodeName = BusinessHelper.FormatGameCode(info.GameCode);
            if (!string.IsNullOrEmpty(info.GameType))
            {
                gameTypeName = BusinessHelper.FormatGameType_Each(info.GameCode, info.GameType);
            }
            SiteMessageControllBusiness siteMsgBusiness = new SiteMessageControllBusiness();
            var array = new string[] { "[UserName]=" + followUserInfo.DisplayName + "", "[CreateUser]=" + createUserInfo.DisplayName + "", "[GameCodeName]=" + gameCodeName + "", "[GameTypeName]=" + gameTypeName + "" };

            siteMsgBusiness.DoSendSiteMessage(info.FollowerUserId, string.Empty, "ON_User_Scheme_Together_FollowerRule", array);
        }