1.棋牌采用cocos2dx 进行前端开发
2.服务端使用web-777的服务端源码
3.宣传方式采用注册送金币7天翻倍的方式。
上图仿照这个方案,开发周期3个月。
这个活动界面
– 帐号注册
CREATE PROCEDURE NET_PW_RegisterAccounts
@strAccounts NVARCHAR(31), – 用户帐号
@strNickname NVARCHAR(31), – 用户昵称
@strLogonPass NCHAR(32), – 用户密码
@strInsurePass NCHAR(32), – 用户密码
@strDynamicPass NCHAR(32), – 动态密码
@dwFaceID INT, – 头像标识
@dwGender TINYINT, – 用户性别
@strSpreader NVARCHAR(31), – 推广员名
@strCompellation NVARCHAR(16), – 真实姓名
@strPassPortID NVARCHAR(18), – 身份证号
@strClientIP NVARCHAR(15), – 连接地址
@AdID NVARCHAR(50),-- 试玩任务AdID
@strRegisterMobile NVARCHAR(18), – 手机
@strErrorDescribe NVARCHAR(127) OUTPUT
WITH ENCRYPTION AS
BEGIN
SET NOCOUNT ON
set @strAccounts = @strRegisterMobile
print @strAccounts
– 基本信息
DECLARE @UserID INT,@FaceID INT,@Accounts NVARCHAR(31),@Nickname NVARCHAR(31)
DECLARE @UnderWrite NVARCHAR(63),@GameID INT=0,@SpreaderID INT
DECLARE @Nullity TINYINT,@Gender TINYINT,@Experience INT,@Loveliness INT
DECLARE @MemberOrder INT,@MemberOverDate DATETIME,@CustomFaceVer TINYINT
DECLARE @Compellation NVARCHAR(16),@PassPortID NVARCHAR(18)
-- 辅助变量
DECLARE @EnjoinLogon INT,@EnjoinRegister INT
-- 注册暂停
SELECT @EnjoinRegister=StatusValue FROM SystemStatusInfo(NOLOCK) WHERE StatusName=N'EnjoinRegister'
IF @EnjoinRegister IS NOT NULL AND @EnjoinRegister<>0
BEGIN
SELECT @strErrorDescribe=StatusString FROM SystemStatusInfo(NOLOCK) WHERE StatusName=N'EnjoinRegister' RETURN 1
END
-- 登录暂停
SELECT @EnjoinLogon=StatusValue FROM SystemStatusInfo(NOLOCK) WHERE StatusName=N'EnjoinLogon'
IF @EnjoinLogon IS NOT NULL AND @EnjoinLogon<>0
BEGIN
SELECT @strErrorDescribe=StatusString FROM SystemStatusInfo(NOLOCK) WHERE StatusName=N'EnjoinLogon'
RETURN 2
END
-- 效验名字
IF EXISTS (SELECT [String] FROM ConfineContent(NOLOCK) WHERE CHARINDEX(String,@strAccounts)>0
AND (EnjoinOverDate>GETDATE() OR EnjoinOverDate IS NULL))
BEGIN
SET @strErrorDescribe=N'抱歉地通知您,您所输入的帐号名含有限制字符串,请更换帐号名后再次申请帐号!' RETURN 1
END
-- 效验地址
SELECT @EnjoinRegister=EnjoinRegister FROM ConfineAddress(NOLOCK) WHERE
AddrString=@strClientIP
AND (EnjoinOverDate>GETDATE() OR EnjoinOverDate IS NULL)
IF @EnjoinRegister IS NOT NULL AND @EnjoinRegister<>0
BEGIN
SET @strErrorDescribe=N’抱歉地通知您,系统禁止了您所在的 IP 地址的注册功能,请联系客户服务中心了解详细情况!’
RETURN 2
END
-- 校验IP频率
DECLARE @LimitRegisterIPCount INT = 0,@CurrRegisterCountIP INT = 0
SELECT @LimitRegisterIPCount=StatusValue FROM SystemStatusInfo(NOLOCK) WHERE StatusName=N'LimitRegisterIPCount'
SELECT @CurrRegisterCountIP = COUNT(RegisterIP) FROM AccountsInfo WITH(NOLOCK)
WHERE RegisterIP=@strClientIP AND DateDiff(hh,RegisterDate,GetDate())<24
IF @LimitRegisterIPCount <>0 AND @LimitRegisterIPCount<=@CurrRegisterCountIP
BEGIN
SET @strErrorDescribe = N'抱歉地通知您,您的IP当前注册超过次数限制!'
RETURN 10
END
-- 查询用户
IF EXISTS (SELECT UserID FROM AccountsInfo(NOLOCK) WHERE Accounts=@strAccounts)
BEGIN
SET @strErrorDescribe=N'此帐号名已被注册,请换另一帐号名字尝试再次注册!'
RETURN 3
END
-- 查询昵称
IF @strNickName>'' AND EXISTS (SELECT UserID FROM AccountsInfo(NOLOCK) WHERE NickName=@strNickName)
BEGIN
SET @strErrorDescribe=N'此昵称已被注册,请换另一昵称尝试再次注册!'
RETURN 7
END
-- 效验昵称
IF @strNickName>'' AND EXISTS (SELECT 1 FROM ConfineContent(NOLOCK) WHERE CHARINDEX(String,@strNickName)>0 AND (EnjoinOverDate>GETDATE() OR EnjoinOverDate IS NULL))
BEGIN
SET @strErrorDescribe=N'抱歉地通知您,您所输入的游戏昵称名含有限制字符串,请更换昵称名后再次申请帐号!'
RETURN 4
END
DECLARE @ParentID INT--0802 add
-- 推广人
IF ISNUMERIC(@strSpreader)=1 --AND LEN(@strSpreader)=6
BEGIN
SELECT @SpreaderID=UserID FROM AccountsInfo(NOLOCK) WHERE GameID=@strSpreader
IF @SpreaderID IS NULL
BEGIN
SET @strErrorDescribe=N'您所填写的推荐人不存在或者填写错误,请检查后再次注册!'
RETURN 4
END
END
ELSE IF @strSpreader<>''
BEGIN
SELECT @ParentID=AgentID FROM RYAgentDB.dbo.T_Acc_Agent WITH(NOLOCK)WHERE AgentAcc=@strSpreader
END
SELECT @SpreaderID=ISNULL(@SpreaderID,0),@ParentID=ISNULL(@ParentID,0)
-------------------------------------------------------------------------------------
-- IP地址描述
DECLARE @IpAddrDescribe NVARCHAR(100),@dwClientIP DECIMAL(18,2)
IF @strClientIP='127.0.0.1' or @strClientIP='0.0.0.0' SET @IpAddrDescribe='局域网'
ELSE BEGIN
SELECT @dwClientIP=dbo.ip2number(@strClientIP)
SELECT @IpAddrDescribe=Country+[Local] FROM dbo.IPAddress WHERE (@dwClientIP>=StartIPNum AND @dwClientIP<=EndIPNum)
END
IF @strClientIP='64.78.172.41' SELECT @IpAddrDescribe='美国'
-------------------------------------------------------------------------------------
-- 注册用户
INSERT AccountsInfo (Accounts,Nickname,RegAccounts,LogonPass,InsurePass,DynamicPass,SpreaderID,LastLogonIPAddress,
Gender,FaceID,WebLogonTimes,RegisterIP,LastLogonIP,Compellation,PassPortID,RegisterOrigin,
ParentID,Advertiser,AdvertPlat,RegisterMobile)
VALUES (@strAccounts,@strNickname,@strAccounts,@strLogonPass,@strInsurePass,@strDynamicPass,@SpreaderID,@IpAddrDescribe,
@dwGender,@dwFaceID,1,@strClientIP,@strClientIP,@strCompellation,@strPassPortID,0x50,@ParentID,@AdID,'',@strRegisterMobile)
-- 错误判断
IF @@ERROR<>0
BEGIN
SET @strErrorDescribe=N'帐号已存在,请换另一帐号名字尝试再次注册!'
RETURN 5
END
-- 查询用户
SELECT @UserID=UserID, @Accounts=Accounts, @Nickname=Nickname,@UnderWrite=UnderWrite,
@Gender=Gender, @FaceID=FaceID, @Experience=Experience,@MemberOrder=MemberOrder,
@MemberOverDate=MemberOverDate, @Loveliness=Loveliness,@CustomFaceVer=CustomFaceVer,
@Compellation=Compellation,@PassPortID=PassPortID
FROM AccountsInfo(NOLOCK) WHERE Accounts=@strAccounts
-- 分配标识
SELECT @GameID=GameID FROM dbo.GameIdentifier WITH(NOLOCK)WHERE UserID=@UserID
IF ISNULL(@GameID,0)=0 OR EXISTS(SELECT 1 FROM dbo.AccountsInfo WHERE GameID=@GameID AND UserID<>@UserID)
SET @strErrorDescribe=N'用户注册成功,但未成功获取游戏 ID 号码,系统稍后将给您分配!'
ELSE UPDATE dbo.AccountsInfo SET GameID=@GameID WHERE UserID=@UserID
----------------------------------------------
----------------------------------------------
IF @ParentID >0
UPDATE RYAgentDB.dbo.T_Acc_Agent SET PlayerCount=PlayerCount+1 WHERE AgentID=@ParentID
ELSE IF @SpreaderID>0
EXEC dbo.P_RegSpread @UserID,@SpreaderID
----------------------------------------------
----------------------------------------------
INSERT INTO RYTreasureDB.dbo.GameScoreInfo
( UserID ,LastLogonIP ,LastLogonMachine ,RegisterIP ,RegisterMachine )
VALUES(@UserID,@strClientIP,'',@strClientIP,'')
INSERT INTO RYTreasureDB.dbo.UserRoomCard( UserID, RoomCard )VALUES ( @UserID,0)
-- 记录日志
DECLARE @DateID INT=CAST(CAST(GETDATE() AS FLOAT) AS INT)
UPDATE SystemStreamInfo SET WebRegisterSuccess=WebRegisterSuccess+1 WHERE DateID=@DateID
IF @@ROWCOUNT=0 INSERT SystemStreamInfo (DateID, WebRegisterSuccess) VALUES (@DateID, 1)
-- 输出变量
SELECT @UserID AS UserID, @GameID AS GameID, @Accounts AS Accounts, @Nickname AS Nickname,
@UnderWrite AS UnderWrite, @FaceID AS FaceID, @Gender AS Gender, @Experience AS Experience,
@MemberOrder AS MemberOrder, @MemberOverDate AS MemberOverDate,@Loveliness AS Loveliness,
@CustomFaceVer AS CustomFaceVer,@Compellation AS Compellation,@PassPortID AS PassPortID
RETURN 0
END