Exemple #1
0
        public MyResult ClearMyTips(MessageType par0, int par1)
        {
            DBBase.ExcuteCustom(string.Format("delete from newtips where UserID={0} and `Type`={1} and OwnerID={2}", MySession.UserID, (int)par0, par1));
            List <ENewTips> plist = DBBase.Query <ENewTips>("UserID=" + MySession.UserID);

            return(ServiceResult(plist));
        }
Exemple #2
0
        public List <EAccount> ListAllAIUser()
        {
            List <EAccount> allaiuser = DBBase.Query <EAccount>("IsAI=1");

            if (allaiuser.Count == 0)
            {
                List <EAccount> maxidlist = DBBase.QueryCustom <EAccount>("SELECT MAX(ID) as ID from account");
                int             maxid     = 1;
                if (maxidlist.Count > 0)
                {
                    EAccount maxAccount = maxidlist.FirstOrDefault();
                    maxid = maxAccount.ID + 1;
                }

                StringBuilder createBuilder = new StringBuilder();
                for (int i = 0; i < 1000; i++)
                {
                    createBuilder.Append(string.Format("INSERT INTO `account` VALUES('{0}', null, null, '{1}', '{2}', '{3}', null, '2017-06-29 09:31:47', '2017-07-06 10:28:28', '0', '9728', '9820', '0', 'WindowsPlayer', 'QQ', '106.522762', '29.505817', '重庆市九龙坡区杨家坪直港大道天鹅堡别墅旁', '0', '', '', '', '0', '2017-06-29 09:31:47', 1,0,'2017-06-29 09:31:47','2017-06-29 09:31:47','');",
                                                       maxid++, AIUserRandomAttr.getRandomName(), AIUserRandomAttr.GetRandomFace(), "aiopenid" + i));
                }
                DBBase.ExcuteCustom(createBuilder.ToString());
                allaiuser = DBBase.Query <EAccount>("IsAI=1");
            }

            return(allaiuser);
        }
Exemple #3
0
 public void ClearBattleAllState()
 {
     DBBase.ExcuteCustom("update account set BattleIP='',BattleCode='',BattlePort=''");
 }