Esempio n. 1
0
        public HttpResponseMessage SendWithDiffContent(List <Params_IN_Message_Send2> param)
        {
            Loger.Debug($"Message->Send2-[param]:{param.ToJson()}");

            ReturnModel result = new ReturnModel();

            if (param != null)
            {
                Params_IN_Message_Send2 tmp;
                for (int i = 0; i < param.Count; i++)
                {
                    tmp = param[i];
                    if (tmp.check())
                    {
                        InteractiveCore.SendMsgWithContacts(sessionId, tmp.contact, tmp.content);
                        Thread.Sleep(500);
                    }
                }
            }
            else
            {
                result.ErrorMessage = "参数无效";
                result.ReturnCode   = ReturnCode.Error;
            }
            return(BuildStringResult(result));
        }
Esempio n. 2
0
        public HttpResponseMessage SendWithSameContent(Params_IN_Message_Send1 param)
        {
            Loger.Debug($"Message->Send1-[param]:{param.ToJson()}");

            ReturnModel result = new ReturnModel();

            if (param != null && param.check())
            {
                if (param.createGroup && param.contacts.Length > 1)
                {
                    InteractiveCore.SendMsgWithCreateGroup(sessionId, param.contacts, param.content);
                }
                else
                {
                    for (int i = 0; i < param.contacts.Length; i++)
                    {
                        InteractiveCore.SendMsgWithContacts(sessionId, param.contacts[i], param.content);
                        Thread.Sleep(500);
                    }
                }
            }
            else
            {
                result.ErrorMessage = "参数无效";
                result.ReturnCode   = ReturnCode.Error;
            }
            return(BuildStringResult(result));
        }
Esempio n. 3
0
        public HttpResponseMessage SendWithGroup(Params_IN_Message_Send3 param)
        {
            Loger.Debug($"Message->Send3-[param]:{param.ToJson()}");

            ReturnModel result = new ReturnModel();

            if (param != null && param.check())
            {
                InteractiveCore.SendMgsWithContactsGroup(sessionId, param.group, param.content);
            }
            else
            {
                result.ErrorMessage = "参数无效";
                result.ReturnCode   = ReturnCode.Error;
            }
            return(BuildStringResult(result));
        }