#pragma once #include #include #include #include #include #include #include #include #include "bsoncxx/builder/stream/document.hpp" #include "mongocxx/instance.hpp" #include "mongocxx/uri.hpp" #include "mongocxx/client.hpp" #include #include "bsoncxx/json.hpp" #include "rapidjson/document.h" #include "rapidjson/writer.h" #include "rapidjson/stringbuffer.h" #include #include #include #include "funclib.hpp" #include "webfun.h" #include "resource.h" #include #include #include #pragma pack(1) //data define #define MSG_NUM 20 #define HTTPLEN 30000 #define HTTPSENDLEN 300000 #define RECLEN 5000 #define LEN_ACCOUNTS 32 #define LEN_PASSWORD 33 #define LEN_SEAT_PHONE 33 //固定电话或移动电话 #define LEN_INFO 128 #define LEN_IP 16 //IP长度 #define LEN_ACTION 100 //操作行动 #define LEN_ACTIONINFO 400 //操作描述 #define LEN_AUTHCODE 32 //授权码 #define LEN_AUTHKEY 32 //授权密码 #define LEN_MD5 33 //加密密码 #define LEN_PERMS 200 //msg define #define HTTPREGUSER 1 //注册玩家账号 #define HTTPUPDATEUSERSCORE 2 //更新玩家分数 #define HTTPREGADMIN 3 //注册管理员 #define HTTPUPDATEADMINSCORE 4 //更新管理员分数 #define HTTPADMINKICKUSER 5 //管理员把玩家踢出房价 #define HTTPADMINPROHIBITADMIN 6 //上级管理员禁止下级管理员 #define HTTPADMINPROHIBITUSER 7 //管理员禁止管理员所属玩家 #define HTTPGETUSERACCOUNT 8 //获取用户账号 #define HTTPADMINLOGIN 9 //账号登录 #define HTTPMODIFYADMINPWD 10 //修改登录密码 #define HTTPMODIFYADMINPWD2 11 //修改二级密码 #define HTTPMODIFYADMININFO 12 //修改管理信息 #define HTTPOPERATIONLOG 15 //操作日志 #define HTTPMODIFYUSERPWD 16 //修改玩家登录密码 #define HTTPADDADMINPWD2 17 //添加二级密码 #define HTTPCHANGEADMINPWD2 19 //更改二级密码 #define HTTPADMINPROHIBITMYUSER 20 //管理员禁止直属玩家 #define HTTPMAKEUSERMANY 21 //创建多玩家 #define HTTPMAKESUBADMIN 22 //创建子代理账号 #define HTTPMODIFYSUBADMIN 23 //修改子代理账号 #define HTTPCREATEAPI 25 //创建代理api #define HTTPDOWNGAMEINFO 26 //下载游戏信息 #define HTTPSETADMINSHOWAREAID 27 //代理给代理设置不显示的地区列表 #define HTTPGAMELOGDATA 28 //获取历史数据统计 #define LEN_AUTHKEY 32 //授权密码 #define HTTPSETTASK 33 //设置任务 #define HTTPSETVIP 35 //设置VIP #define HTTPSETROLE 36 //设置角色 #define HTTPSETWHEEL 37 //设置轮盘 #define HTTPSETGASECRET 38 //设置google密钥 #define HTTPSETSHOWGAME 39 //代理给玩家不显示的游戏列表 #define HTTP_FREEGAME_CREATE 40 //向玩家赠送游戏免费旋转(创建活动) #define HTTP_FREEGAME_ENABLE 41 //向玩家赠送游戏免费旋转(启用) #define HTTP_FREEGAME_CANCEL 42 //向玩家赠送游戏免费旋转(取消) #define HTTPSETGASECRET_SUBUSER 43 //设置子账号google密钥 #define HTTP_FREEGAME_EXPIRED 44 //向玩家赠送游戏免费旋转(设置过期) #define HTTP_FREEGAME_BETCONFIG 45 //游戏下注配置 #define HTTPSERVERLOGDATA 50 //获取游戏房间数据 #define HTTPUSERLOGDATA 51 //获取玩家排行数据 #define HTTPMODIFYAPPLYAPI 53 //修改申请的信息 #define HTTPAPPLYAPI 54 //申请开通无缝或者转账 #define HTTPAGREEAPPLYAPI 55 //审核开通无缝或者转账 #define HTTPMODIFYLEVEMSG 56 //留言修改 #define HTTPJPTLOG 57 //jpt日志 #define HTTPSPEJPTREVLOG 58 //specail revenue日志 #define HTTPGAMELOGCNT 59 //game log cnt #define HTTPQUICKAPPLYAPI 60 //测试服快捷开通转账 #define HTTP_CREDITAGENT_CUSTOMER 65 // 信用代理设置联系客服 #define HTTP_CREDITAGENT_DELMARQUEE 66 // 信用代理跑马灯功能(删除) #define HTTP_CREDITAGENT_MARQUEE 67 // 信用代理跑马灯功能(设置) #define HTTP_CREDITAGENT_SITINFO 68 // 设置信用站点 #define HTTP_CREDITAGENT_INIT 69 // 设置信用代理功能 #define HTTP_PERMIT_API 70 // 设置账号权限 #define HTTP_PERMIT_BONUSLMITI 71 // admin设置限红类型 #define HTTP_PERMIT_REGISTER 72 // admin设置代理注册玩家的权限 #define HTTP_PERMIT_ADDPOPULARIZE 73 // 代理添加推广网站权限 #define HTTP_PERMIT_RETURNHALL 74 // 代理下玩家返回大厅开关 #define HTTP_SET_REGION_GAMES 75 // 设置货币下属游戏 #define HTTP_SET_ACTIVE_REGION 76 // 设置货币开放国家 #define HTTP_AGENT_ACTIVE_REGION 77 // 设置代理开放国家 #define HTTP_SORT_REGIONGAMES 78 // 排序货币下属游戏 #define HTTP_DELETE_SORT_REGIONGAMES 79 // 删除货币下属游戏排序 #define HTTP_MODIFY_GAMELIST 80 // 修改gamelist版本、排序 #define HTTP_SET_WEBSIT_INFO 85 // 商户设置推广网站信息 #define HTTP_SET_RESENDORDER 86 // 手动设置订单重发 #define HTTP_SET_ORDERSTATUS 87 // 修改订单状态 #define HTTP_CREDITAGENT_TOPWINNER 100 // 信用代理设置topwinner #define HTTP_SET_PLAYRECORDINI 105 // 后台设置platform.playrecordini #define HTTP_SET_ACTIVEINI 106 // 后台设置webdata.activeini #define HTTP_SET_NEWURLS 107 // 后台设置url变更 #define HTTP_SET_Platfromini 108 // 后台设置platform.platfromini #define HTTP_CREDIT_GETUSERACCOUNT 150 // 信用代理创建账号 #define HTTP_CREDIT_MULTIGETUSER 151 // 信用代理创建多个玩家 #define HTTP_DEVELOPER_CREATE 160 // 新增厂商管理 #define HTTP_UPDATE_GAMELIST 161 // 厂商管理-获取游戏列表 #define HTTP_DEVELOPER_EDITGAME 162 // 编辑厂商游戏 #define HTTP_DEVELOPER_SORTGAME 163 // 排序厂商游戏 #define HTTP_REDEEMCODE_GENERATE 170 // 生成兑换码 #define HTTP_REDEEMCODE_ACTIVE 171 // 生成兑换码 #define HTTP_SETUSER_EXCHANGEMAX 172 //设置玩家兑换码兑换上限 //game msg define #define MDM_CS_REGISTER 1 #define MDM_CS_SERVICE_INFO 2 #define SUB_CS_C_SERVER_UPDATESCORE 4 #define SUB_CS_C_SERVER_DELUSER 6 #define SUB_CS_C_REGISTER_WEB 103 #define FlowType_Prize_mini 13 #define FlowType_Prize_minor 14 #define FlowType_Prize_major 15 #define FlowType_Prize_grand 16 #define FlowType_Prize_special 17 enum EAgentLevel { EA_LEVEL1 = 1, //公司,admin EA_LEVEL2, //超级管理员, EA_LEVEL3, //管理 EA_LEVEL4, //高级总代理 EA_LEVEL5, //总代理, EA_LEVEL6 //商家 }; static std::string g_chars( "abcdefghijklmnopqrstuvwxyz" "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "1234567890"); static std::string g_redeemcodechars( "abcdefghijkmnpqrstuvwxyz" "ABCDEFGHIJKLMNPQRSTUVWXYZ" "23456789"); //msg data typedef struct tagMsgBuffer { std::int32_t itype{0}; std::int32_t idatasize{0}; void* pdata{nullptr}; }MsgBuffer; typedef struct tagwritedata { std::int64_t sendallsize{0}; //发送总长度 std::int64_t completesize{0}; //发送完成长度 }writedata; typedef struct tag_socketmsg { std::int32_t isize{0}; void* pbuffer{nullptr}; }socketmsg; struct activemsg { std::int64_t activecode{0}; //激活码 char activekey[LEN_AUTHKEY]{0}; }; //game msg data struct CMD_CS_C_RegisterWeb { TCHAR szServerAddr[32]{0}; //服务地址 }; struct CMD_CS_C_UpdateScoreEx { DWORD dwUserID{0}; //用户标识 LONGLONG addscore{0}; WORD wgameserverid{0}; DWORD dwGameContextID{0}; DWORD dwLoginContextID{0}; }; //提出玩家 struct CMD_CS_C_DelOnlineUser { DWORD dwUserID; WORD wserverid; DWORD dwGameContextID; }; struct reguser { std::int64_t spreaderid{0}; //玩家对应推广id std::int64_t score{0}; //获取分数 std::string account; //玩家账号 LEN_ACCOUNTS std::string pwd; //玩家密码 LEN_PASSWORD std::string name; //玩家姓名 LEN_ACCOUNTS std::string phone; //玩家电话 LEN_SEAT_PHONE std::string info; //玩家备注 LEN_INFO std::int32_t accprefix{1}; //玩家账号是否加上品牌前缀 0:不加 1:加 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "score", "account", "pwd", "name", "phone", "info", "accprefix"}; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); pwd = pwd.substr(0, LEN_PASSWORD); name = name.substr(0, LEN_ACCOUNTS); phone = phone.substr(0, LEN_SEAT_PHONE); info = info.substr(0, LEN_SEAT_PHONE); } }; struct userscore { std::int64_t spreaderid{0}; //玩家对应推广id std::int64_t userid{0}; //玩家个人id std::int64_t score{0}; //玩家分数 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "userid", "score" }; return value[index]; } void getdata() { } }; struct outuser { std::int64_t userid{ 0 }; //玩家个人id public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid" }; return value[index]; } void getdata() { } }; struct regadmin { std::int64_t spreaderid = 0; //玩家对应推广id std::int64_t score = 0; //获取分数 std::int32_t isjpt = 0; //是否显示大奖池 std::int32_t iareaid = 0; //区域id std::int32_t ilevel = 0; //代理类型 1是公司,2是超级管理,3是管理,4是高级总代,5是总代,6是商户 std::int32_t betindex = 0; std::int64_t imin_bonus_buy = -1; // bonus_buy 最小倍数 std::int64_t imax_bonus_buy = -1; // bonus_buy 最大倍数 std::string strpfx{}; //只有商户才有前缀 std::string stracc{}; //玩家账号 std::string strpwd{}; //玩家密码 std::string strname{}; //玩家姓名 std::string strphone{}; //玩家电话 std::string strkindidauth{}; //开放游戏列表 std::string strareaidauth{}; //开放货币区域列表 std::string strinfo{}; //info std::int32_t decimalnum = 2; //货币显示几位小数 std::string currencyratio = "1"; //货币显示比例 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "score", "sjpt", "areaid", "level", "betindex","imin_bonus_buy", "imax_bonus_buy", "pfx", "account", "pwd" ,\ "name", "phone", "kindidauth", "areaidauth", "info", "decimalnum", "currencyratio" }; return value[index]; } void getdata() { strpfx = strpfx.substr(0, LEN_ACCOUNTS); stracc = stracc.substr(0, LEN_ACCOUNTS); strpwd = strpwd.substr(0, LEN_PASSWORD); strname = strname.substr(0, LEN_ACCOUNTS); strphone = strphone.substr(0, LEN_SEAT_PHONE); strkindidauth = strkindidauth.substr(0, 10000); strareaidauth = strareaidauth.substr(0, 10000); strinfo = strinfo.substr(0, LEN_INFO); } }; struct prohibitadmin { std::int64_t spreaderid{0}; //下级管理员id std::int64_t userid{0}; //管理员本人id std::int32_t state{0}; //-1是封号,0是解封 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "userid", "state" }; return value[index]; } void getdata() { } }; // 用一个bit来表示一种权限 enum EAuthorityBit { EAFB_Api = 0, // 使用api (int32 第0 bit位) (0:允许,1:禁止) EAFB_CanSetBonusLimit = 1, // 下级是否有限红编辑权限 (0:允许,1:禁止) EAFB_RegisterPlayer = 2, // 代理添加玩家权限(0:禁止 1:允许) EAFB_AddPopularize = 3, // 代理添加推广网站权限(0:禁止 1:允许) EAFB_ReturnHallSwitch = 4, // 代理下玩家返回大厅开关 (0:允许,1:禁止) EAFB_Max, }; struct proSetAuthority { std::int64_t spreaderid{ 0 }; //管理员本人id std::int64_t userid{ 0 }; //被修改的代理id //std::int32_t authoritybit{ 0 }; //权限类型(枚举: EAuthorityBit)。 保险起见,不做统一接口。 std::int32_t state{ 0 }; //各类型自己定义0表示禁止或开启 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "userid", "state" }; return value[index]; } void getdata() { } }; struct prohibituser { std::int64_t spreaderid{}; //管理员id std::int64_t userid{}; //管理员所属玩家id std::int32_t state{}; //-1是封号,0是解封 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "userid", "state" }; return value[index]; } void getdata() { } }; struct getaccount { std::int64_t ispreaderid{}; //代理id public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid" }; return value[index]; } void getdata() { } }; struct adminlogin { std::string account{}; //玩家账号 LEN_ACCOUNTS std::string pwd{}; //玩家密码 LEN_PASSWORD std::string ip{}; //登录IP地址 LEN_IP public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "account", "pwd", "ip" }; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); pwd = pwd.substr(0, LEN_PASSWORD); ip = ip.substr(0, LEN_IP); } }; struct adminnewloginpwd { std::string account{}; //要修改代理账号 std::int64_t iuserid{0}; //当前登录代理id std::string pwdold{}; //旧密码 std::string pwdnew{}; //新密码 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "account", "userid", "pwdold", "pwdnew" }; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); pwdold = pwdold.substr(0, LEN_PASSWORD); pwdnew = pwdnew.substr(0, LEN_PASSWORD); } }; struct adminnewpwd2 { std::int64_t iuserid{0}; std::string pwdold{}; //旧密码 std::string pwdnew{}; //新密码 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "pwdold", "pwdnew" }; return value[index]; } void getdata() { pwdold = pwdold.substr(0, LEN_PASSWORD); pwdnew = pwdnew.substr(0, LEN_PASSWORD); } }; struct admininfo { std::int64_t userid{0}; //当前后台的userid std::int32_t isjpt{0}; //是否显示大奖池 std::int32_t betindex{0}; std::int64_t imin_bonus_buy = -1; // bonus_buy 最小倍数 std::int64_t imax_bonus_buy = -1; // bonus_buy 最大倍数 std::string account{}; //代理账号 std::string name{}; //代理姓名 std::string pwd{}; //代理密码 std::string phone{}; //代理电话 std::string info{}; //代理备注 std::string regiongames{}; //商户游戏列表 std::int32_t decimalnum=2; //货币显示几位小数 std::string currencyratio = "1"; //货币显示比例 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "sjpt", "betindex", "imin_bonus_buy", "imax_bonus_buy", "account", "name", "pwdnew", "phone", "info", "regiongames", "decimalnum", "currencyratio" }; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); name = name.substr(0, LEN_ACCOUNTS); pwd = pwd.substr(0, LEN_PASSWORD); phone = phone.substr(0, LEN_SEAT_PHONE); info = info.substr(0, LEN_INFO); regiongames = regiongames.substr(0, 3000); } }; struct operatinfo { std::string doaction{}; //操作行动 std::string account{}; //操作者 std::string doaccount{}; //被操作者 std::string ip{}; //操作者ip std::string info{}; //操作描述 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "doaction", "account", "doaccount", "ip", "info" }; return value[index]; } void getdata() { doaction = doaction.substr(0, LEN_ACCOUNTS); account = account.substr(0, LEN_ACCOUNTS); doaccount = doaccount.substr(0, LEN_ACCOUNTS); ip = ip.substr(0, LEN_IP); info = info.substr(0, LEN_ACTIONINFO); } }; struct userinfo { std::int64_t userid{0}; //当前后台的userid std::string account{}; //玩家账号 std::string pwd{}; //玩家密码 std::string name{}; //玩家姓名 std::string phone{}; //玩家电话 std::string info{}; //玩家备注 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "account", "pwdnew", "name", "phone", "info" }; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); pwd = pwd.substr(0, LEN_PASSWORD); name = name.substr(0, LEN_ACCOUNTS); phone = phone.substr(0, LEN_IP); info = info.substr(0, LEN_ACTIONINFO); } }; struct adminaddpwd2 { std::int64_t iuserid{0}; std::string pwd2new{}; //新二级密码 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "pwd2new" }; return value[index]; } void getdata() { pwd2new = pwd2new.substr(0, LEN_PASSWORD); } }; struct adminchangepwd2 { std::int64_t iuserid{0}; std::string account{}; //代理账号 __int32 iacctype{ 0 }; // 账号类型0主账号 1子账号 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "account" ,"acctype"}; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); } }; struct adminprohibituser { std::int64_t spreaderid{0}; //管理员id std::int32_t state{0}; //-1是封号,0是解封 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "state" }; return value[index]; } void getdata() { } }; struct makeusermany { std::int64_t spreaderid{ 0 }; //玩家对应推广id std::int64_t score{ 0 }; //获取分数 std::int32_t iareaid{ 0 }; //地区id std::int32_t iusernum{ 0 }; //设置用户个数 std::string pwd{}; //玩家密码 std::string info{}; //玩家备注 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "score", "areaid", "usernum", "pwd", "info" }; return value[index]; } void getdata() { pwd = pwd.substr(0, LEN_PASSWORD); info = info.substr(0, LEN_INFO); } }; struct makesbadmin { std::int64_t userid{0}; //对应的主账号id std::string account{}; //子代理账号 std::string pwd{}; //子账号密码 std::string pwd2{}; //子账号二级密码 std::string perms{}; //玩家备注 std::string info{}; //玩家备注 std::string menuperms{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "account", "pwd", "pwd2", "perms", "info", "menuperms" }; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); pwd = pwd.substr(0, LEN_PASSWORD); pwd2 = pwd2.substr(0, LEN_PASSWORD); perms = perms.substr(0, LEN_PERMS); info = info.substr(0, LEN_INFO); menuperms = menuperms.substr(0, 1000); } }; struct modsubadmin { std::int64_t usid{0}; //子账号id std::int32_t state{-1}; //状态0是正常状态1是禁止,-1是没有传递参数 std::string pwd{}; //子账号密码 std::string pwd2{}; //子账号二级密码 std::string perms{}; //玩家备注 std::string info{}; //玩家备注 std::string menuperms{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "usid", "state", "pwd", "pwd2", "perms", "info", "menuperms" }; return value[index]; } void getdata() { pwd = pwd.substr(0, LEN_PASSWORD); pwd2 = pwd2.substr(0, LEN_PASSWORD); perms = perms.substr(0, LEN_PERMS); info = info.substr(0, LEN_INFO); menuperms = menuperms.substr(0, 1000); } }; struct hidekindid { std::int32_t ihide{0}; //hide为0是显示hide为1是隐藏 std::int32_t ikindid{0}; //游戏类型 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "hide", "kindid" }; return value[index]; } void getdata() { } }; struct makeapi { std::int64_t userid{0}; //对应的主账号id std::string account{}; //代理的账号 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "account" }; return value[index]; } void getdata() { account = account.substr(0, LEN_ACCOUNTS); } }; struct downgameinfo { std::int32_t itypeid{0}; //1是打开官网,2是点击下载 std::int32_t idevicetype{0}; //1是pc电脑,2是安卓,3是ios std::string ip{}; //操作IP地址 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "typeid", "devicetype", "ip"}; return value[index]; } void getdata() { ip = ip.substr(0, LEN_IP); } }; struct vipdata { std::string strarea{}; //货币代码 std::string stracc{}; //代理账号 std::int64_t ispreaderid{0}; //代理id std::int64_t iuserid{0}; //代理名下的商户 std::int64_t ibet{0}; std::int64_t iwin{0}; std::int64_t ispebet{0}; std::int64_t ispewin{0}; std::int64_t isperev{0}; std::int64_t isptcnt{0}; std::int64_t roundcnt{0}; //代理名下玩家玩次数 std::unordered_set playuser; //玩家人数去重 }; struct userdata { std::int64_t ispreaderid{0}; std::string struseracc{}; std::int64_t ibet{0}; std::int64_t iwin{0}; std::int64_t ispebet{ 0 }; std::int64_t ispewin{ 0 }; std::int64_t isperev{ 0 }; std::int64_t isptcnt{ 0 }; std::int64_t iroundcnt{0}; //玩家玩的次数 std::int64_t inserttime{0}; }; struct vipareaid { std::map mapspreaderdata; //代理数据 }; struct gamelogdata { std::int64_t ispreaderid{0}; std::int64_t ibegintime{0}; std::int64_t iendtime{0}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "begintime", "endtime" }; return value[index]; } void getdata() { } }; struct showareaid { std::int64_t userid{0}; //操作商户的userid std::string strareaid{}; //操作的地区 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "areaid"}; return value[index]; } void getdata() { strareaid = funclib::urlDecode(strareaid); } }; struct taskprize { std::int32_t iprizetype = 0; //奖励类型:0转盘,1金币,2rpscore,3promotionscore std::int32_t iprizenum = 0; //奖励数量 }; struct settaskinfo { std::int32_t updatetype{-1}; //0增加,1删除,2修改 std::int64_t itaskid{-1}; //任务id std::int32_t ibigid{-1}; //大任务id std::int32_t ismallid{-1}; //小任务id std::int32_t itype{-1}; //任务类型:0每日任务,1成长任务,2循环任务 std::int32_t itargetid{-1}; //任务说明id:0累计旋转,1累计投注 std::int64_t itasknum{-1}; //任务目标值 std::int32_t iprizetype0{-1}; //奖励类型:0转盘,1金币,2rpscore,3promotionscore std::int32_t iprizenum0{-1}; //奖励数量 std::int32_t iprizetype1{-1}; //奖励类型:0转盘,1金币,2rpscore,3promotionscore std::int32_t iprizenum1{-1}; //奖励数量 std::int32_t iprizetype2{-1}; //奖励类型:0转盘,1金币,2rpscore,3promotionscore std::int32_t iprizenum2{-1}; //奖励数量 std::int32_t iprizetype3{-1}; //奖励类型:0转盘,1金币,2rpscore,3promotionscore std::int32_t iprizenum3{-1}; //奖励数量 std::int64_t iaddprizepro{-1}; //奖励加成 std::int32_t iprizecount{0}; //奖励数组个数 taskprize tprize[4]; public: std::string getfieldvalue(std::int32_t index) { if (index > 15) { return ""; } const char* value[] = { "updatetype", "taskid", "bigid", "smallid", "tasktype", "targetid", "tasknum", \ "prizetype0","prizenum0", "prizetype1", "prizenum1", "prizetype2", "prizenum2", "prizetype3", "prizenum3" \ "addprizepro" }; return value[index]; } void getdata() { if (iprizetype0 != -1 && iprizenum0 != -1) { tprize[iprizecount].iprizetype = iprizetype0; tprize[iprizecount].iprizenum = iprizenum0; iprizecount++; } if (iprizetype1 != -1 && iprizenum1 != -1) { tprize[iprizecount].iprizetype = iprizetype1; tprize[iprizecount].iprizenum = iprizenum1; iprizecount++; } if (iprizetype2 != -1 && iprizenum2 != -1) { tprize[iprizecount].iprizetype = iprizetype2; tprize[iprizecount].iprizenum = iprizenum2; iprizecount++; } if (iprizetype3 != -1 && iprizenum3 != -1) { tprize[iprizecount].iprizetype = iprizetype3; tprize[iprizecount].iprizenum = iprizenum3; iprizecount++; } } }; struct setvipinfo { std::int32_t updatetype{-1}; //0增加,1删除,2修改 std::int32_t id{-1}; //vip等级 std::int64_t expscore{-1}; //经验值 std::int32_t chessexppro{-1}; //棋牌下注戏码奖励比例 std::int32_t slotsexppro{-1}; //老虎机下注戏码奖励比例 std::int32_t fishexppro{-1}; //捕鱼下注戏码奖励比例 std::int32_t reelexppro{-1}; //真人下注戏码奖励比例 std::int32_t lotexppro{-1}; //彩票下注戏码奖励比例 std::int32_t chessprizepro{-1}; //棋牌经验值衰减比例 std::int32_t slotsprizepro{-1}; //老虎机经验值衰减比例 std::int32_t fishprizepro{-1}; //捕鱼经验值衰减比例 std::int32_t reelprizepro{-1}; //真人经验值衰减比例 std::int32_t lotprizepro{-1}; //彩票经验值衰减比例 std::int64_t prizescoremax{-1}; //返利上限 std::int32_t promotewheelnum{-1}; //晋升奖励:周奖励旋转次数 std::int32_t wheelprizepro{-1}; //转盘奖励比例 std::int32_t addprizescorepro{-1}; //奖金加成 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "updatetype", "vipid", "expscore", "chessexppro", "slotsexppro", "fishexppro", "reelexppro", "lotexppro", "chessprizepro" \ , "slotsprizepro", "fishprizepro", "reelprizepro", "lotprizepro", "prizescoremax", "promotewheelnum", "wheelprizepro", "addprizescorepro" }; return value[index]; } void getdata() { } bool datavalue() { if (updatetype == -1 || id == -1 || expscore == -1 || chessexppro == -1 || slotsexppro == -1 || fishexppro == -1 || reelexppro == -1 || lotexppro == -1 || chessprizepro == -1 || slotsprizepro == -1 || fishprizepro == -1 || reelprizepro == -1 || lotprizepro == -1 || prizescoremax == -1 || promotewheelnum == -1 || wheelprizepro == -1 || addprizescorepro == -1) { return false; } return true; } }; struct room { std::int32_t roomtype{-1}; //0增加,1删除,2修改 std::int32_t roomid{-1}; //场次id std::int64_t expnum{-1}; //经验值 std::int64_t exppro{-1}; //经验系数 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "roomtype", "roomid", "expnum", "exppro" }; return value[index]; } void getdata() { } bool datavalue() { if (roomtype == -1 || roomid == -1 || expnum == -1 || exppro == -1) { return false; } return true; } }; struct roleparam { std::int32_t roletype{-1}; //0增加,1删除,2修改 std::int32_t id{-1}; //role等级 std::int64_t needexp{-1}; //对应经验值 std::int64_t promoteprizescore{-1}; //晋升奖励分数 std::int64_t freewheelnum{-1}; //获取免费转盘次数 std::int32_t wheelprizepro{-1}; //转盘奖励比例 std::int32_t wheelconsumepro{-1}; //转盘消耗比例 std::int32_t addprizescorepro{-1}; //奖金加成 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "roletype", "roleid", "needexp", "promoteprizescore", "freewheelnum", "wheelprizepro", "wheelconsumepro", "addprizescorepro" }; return value[index]; } void getdata() { } bool datavalue() { if (roletype == -1 || id == -1 || needexp == -1 || promoteprizescore == -1 || freewheelnum == -1 || wheelprizepro == -1 || wheelconsumepro == -1 || addprizescorepro == -1) { return false; } return true; } }; struct tagweight { std::int32_t updatetype{-1}; //0增加,1删除,2修改 std::int32_t id{-1}; std::int64_t weightnum{-1}; std::int32_t itemid{-1}; //奖励类型:0转盘,1金币,2rpscore,3promotionscore std::int64_t prizepro{-1}; std::int64_t itemcount{-1}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "updatewheel", "weightid", "weightnum", "itemid", "prizepro", "itemcount" }; return value[index]; } void getdata() { } bool datavalue() { if (updatetype != 0 && updatetype != 1 && updatetype != 2) { return false; } if (id < 0 || itemid < 0 || weightnum < 0 || prizepro < 0 || itemcount < 0) { return false; } return true; } }; struct tagwheel { std::int32_t count{-1}; std::int64_t activetimebegin{-1}; std::int64_t activetimeend{-1}; std::int32_t vipwheel{-1}; std::int32_t rolewheel{-1}; std::int64_t consumepro{-1}; std::int64_t consumescore{-1}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "updatewheel", "weightid", "weightnum", "itemid", "prizepro", "itemcount" }; return value[index]; } void getdata() { } bool datavalue() { if (vipwheel != 0 && vipwheel != 1) { return false; } if (rolewheel != 0 && rolewheel != 1) { return false; } if (consumepro < 0 || consumescore < 0) { return false; } if (count == -1 || activetimebegin == -1 || activetimeend == -1) { return false; } return true; } }; struct setsecret { std::int64_t iuserid{-1}; //设置google密钥 std::string gasecret{}; //密钥 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "gasecret" }; return value[index]; } void getdata() { gasecret = gasecret.substr(0, 64); } bool datavalue() { if (iuserid == -1 || gasecret.empty()) { return false; } return true; } }; struct gameserverdata { std::string strservername{}; std::string areacode{}; std::string strgid{}; std::int64_t areaid{0}; std::int64_t ibet{0}; std::int64_t iwin{0}; std::int64_t iroundcnt{0}; //玩家玩的次数 std::int64_t ispebet{ 0 }; std::int64_t ispewin{ 0 }; std::int64_t isjptrev{ 0 }; std::int64_t isptcnt{ 0 }; std::unordered_set playuser; //玩家人数去重 }; struct serverdata { std::int64_t ispreaderid{-1}; std::int64_t ibegintime{-1}; std::int64_t iendtime{-1}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "begintime", "endtime" }; return value[index]; } void getdata() { } bool datavalue() { if (ibegintime > iendtime) { return false; } if (ispreaderid <= 0 || ibegintime <= 0 || iendtime <= 0) { return false; } return true; } }; struct userlosewininfo { std::string strspreaderidacc{}; std::string struseracc{}; std::int64_t ibet{0}; std::int64_t iwin{0}; std::int64_t iroundcnt{0}; std::int64_t iscore{0}; }; struct userlosewindata { std::int64_t ispreaderid{-1}; std::int64_t ibegintime{-1}; std::int64_t iendtime{-1}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "begintime", "endtime" }; return value[index]; } void getdata() { } bool datavalue() { if (ibegintime > iendtime) { return false; } if (ispreaderid <= 0 || ibegintime <= 0 || iendtime <= 0) { return false; } return true; } }; struct httpmodifyapplyapi { std::string strtoken{}; std::int64_t iuserid{ -1 }; //申请代理的uesrid std::int32_t iapitype{ -1 }; //1是无缝;2是转账 std::string strcburl{}; //api回调url std::string strwhiteips{}; //ip白名单 std::string strsiteurl{}; //网站url std::string strsiteusername{}; //账号 std::string strsitepassword{}; //密码 std::string strhost{}; std::string strport{}; std::int32_t issl{ 1 }; std::string strtarget{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = {"strtoken", "userid", "apitype", "cburl", "whiteips", "siteurl", "siteusername", "sitepassword", \ "cburlhost", "cburlport", "cburlssl", "cburltarget" }; return value[index]; } void getdata() { strtoken = strtoken.substr(0, 1000); strcburl = strcburl.substr(0, 1000); strwhiteips = strwhiteips.substr(0, 1000); strsiteurl = strsiteurl.substr(0, 1000); strsiteusername = strsiteusername.substr(0, LEN_ACCOUNTS); strsitepassword = strsitepassword.substr(0, LEN_PASSWORD); strport = strport.substr(0, 1000); strtarget = strtarget.substr(0, 100); } }; struct httpapplyapi { std::int64_t iuserid{-1}; //申请代理的uesrid std::int32_t iapitype{-1}; //1是无缝;2是转账 std::string strcburl{}; //api回调url std::string strwhiteips{}; //ip白名单 std::string strsiteurl{}; //网站url std::string strsiteusername{}; //账号 std::string strsitepassword{}; //密码 std::string strhost{}; std::string strport{}; std::int32_t issl{1}; std::string strtarget{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "apitype", "cburl", "whiteips", "siteurl", "siteusername", "sitepassword", \ "cburlhost", "cburlport", "cburlssl", "cburltarget" }; return value[index]; } void getdata() { strcburl = strcburl.substr(0, 1000); strwhiteips = strwhiteips.substr(0, 1000); strsiteurl = strsiteurl.substr(0, 1000); strsiteusername = strsiteusername.substr(0, LEN_ACCOUNTS); strsitepassword = strsitepassword.substr(0, LEN_PASSWORD); strport = strport.substr(0, 1000); strtarget = strtarget.substr(0, 100); } }; struct httpagreeapplyapi { std::int64_t iuserid{ -1 }; //当前登录代理的uesrid std::string strid{}; //审核的id std::int32_t iagree{-1}; //0是拒绝,1是同意 std::string strinfo{}; //生成的附加信息 std::int32_t iapitype{ -1 }; //1是无缝;2是转账 std::int32_t isjpt = {-1}; //是否显示大奖池 std::string strcburl{}; //api回调url std::string strwhiteips{}; //ip白名单 std::string strsiteurl{}; //网站url std::string strsiteusername{}; //账号 std::string strsitepassword{}; //密码 std::string strhost{}; std::string strport{}; std::int32_t issl{ 1 }; std::string strtarget{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "id", "agree", "info", "apitype", "isjpt", "cburl", "whiteips", "siteurl", "siteusername", "sitepassword", \ "cburlhost", "cburlport", "cburlssl", "cburltarget" }; return value[index]; } void getdata() { strcburl = strcburl.substr(0, 1000); strwhiteips = strwhiteips.substr(0, 1000); strsiteurl = strsiteurl.substr(0, 1000); strsiteusername = strsiteusername.substr(0, LEN_ACCOUNTS); strsitepassword = strsitepassword.substr(0, LEN_PASSWORD); strport = strport.substr(0, 1000); strtarget = strtarget.substr(0, 100); strinfo = strinfo.substr(0, 2000); } }; struct httpquickapplyapi { std::int64_t iuserid{ -1 }; //申请代理的uesrid public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid" }; return value[index]; } void getdata() { } }; struct modifyleavemsg { std::string strid{}; //唯一id std::int32_t istatus{-1}; //0是未读,1是已读 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "id", "status" }; return value[index]; } void getdata() { strid = strid.substr(0, 100); } bool datavalue() { if (strid.empty() || (istatus != 0 && istatus != 1)) { return false; } return true; } }; struct jptlogdata { std::int64_t ispreaderid{ -1 }; std::int64_t ibegintime{ -1 }; std::int64_t iendtime{ -1 }; std::string stracc{}; std::int32_t iareaid{ -1 }; std::int32_t ijpttype{ -1 }; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "begintime", "endtime", "acc", "areaid", "jpttype"}; return value[index]; } void getdata() { } bool datavalue() { if (ibegintime > iendtime) { return false; } if (ispreaderid <= 0 || ibegintime <= 0 || iendtime <= 0) { return false; } return true; } }; struct spejptrevdata { std::int64_t ispreaderid{ -1 }; std::int64_t ibegintime{ -1 }; std::int64_t iendtime{ -1 }; std::string stracc{}; std::int32_t iareaid{ -1 }; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "begintime", "endtime", "acc", "areaid" }; return value[index]; } void getdata() { } bool datavalue() { if (ibegintime > iendtime) { return false; } if (ispreaderid <= 0 || ibegintime <= 0 || iendtime <= 0) { return false; } return true; } }; struct gamelogcntdata { std::int64_t ispreaderid{ -1 }; std::int64_t ibegintime{ -1 }; std::int64_t iendtime{ -1 }; std::string strgid{}; std::int64_t iuserid{ -1 }; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "begintime", "endtime", "gid", "userid"}; return value[index]; } void getdata() { } bool datavalue() { if (ibegintime > iendtime) { return false; } if (ispreaderid <= 0 || ibegintime <= 0 || iendtime <= 0) { return false; } return true; } }; struct proAdminSetRegionGames { std::int64_t userid{ -1 }; std::int32_t regionid{ -1 }; //货币id std::string regiongames{}; //游戏列表 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "regionid", "regiongames" }; return value[index]; } void getdata() { } bool datavalue() { if (regionid <= 0) { return false; } return true; } }; struct taggamelist { std::string KindID = ""; std::string KindName = ""; std::string GID = ""; std::string ModuleName = ""; std::string ClientVersion = ""; std::string SortID = ""; std::string ResVersion = ""; std::string gametype = ""; }; struct SGameData { std::string sSortId; std::string sResVersion; std::string sBrand; std::string sSubLogo; __int32 iHot; __int32 iNew; }; struct SRegionGameData { std::string sSortId; std::string sGid; __int32 iHot; __int32 iNew; }; struct SAdminModifyGameList { std::int64_t userid{ -1 }; std::string resversion; std::string baseversion; std::string gamelist; /* json格式字符串 { "ac0107":{"SortID": "11", "ResVersion" : "245"}, "ac0106" : {"SortID": "11", "ResVersion" : "245"} }*/ public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "resversion", "baseversion", "gamelist" }; return value[index]; } void getdata() { } bool datavalue() { return true; } }; struct SSetWebSitInfo { std::int64_t userid{ -1 }; std::string websitlogo; std::string websitjump; std::string websitbanner; std::string websitmeta; std::string websitepop; std::string webdomainname; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "websitlogo", "websitjump", "websitbanner", "websitmeta", "websitepop", "webdomainname"}; return value[index]; } void getdata() { } bool datavalue() { return true; } }; enum EFreeGameActivityType { EFGAT_SIMPLE = 1, EFGAT_VARIABLE, }; enum EFreeGameGiftType { EFGGT_FREEGAME_COUNT = 1, // 免费旋转,玩家被授予一定数量的免费旋转 }; enum EFreeGameStatus { EFGS_CREATE = 1, // 创建 EFGS_INPROGRESS, // 进行中 EFGS_GIVE, // 给予 EFGS_CANCEL, // 取消 }; enum EFreeGamePlayerType { EFGAT_All = 1, // 所有玩家 EFGAT_PlAYERLIST, // 玩家列表 }; enum EFreeGamePlayerState { EFGPS_READY = 0, // 未领取 EFGPS_ACCEPT, // 进行中 EFGPS_DONE, // 已完成 EFGPS_EXPIRED, // 已过期 EFGPS_DELETE, // 系统删除 }; struct SysGiftFreeGameCreate { std::int64_t createrid{ -1 }; // 创建者id std::string bonuscode; //奖励代码 std::string name; //名称 std::string brand; // 品牌 std::int32_t fsbtype{}; // 简单/多变 类型 std::int32_t gifttype{}; // 免费旋转次数/限时 std::int32_t freespinsnumber{}; // 免费旋转次数 std::int64_t score{}; // 分数上限 std::int64_t startdata{}; // 开始日期 std::int64_t enddata{}; // 结束日期 std::int64_t validitydata{}; // 有效日期 std::int32_t playertype{}; // 赠送玩家对象类型 std::string playerlist; // 玩家列表(赠送所有对象时为空) std::string games; // json格式 std::string filepath; // 玩家列表文件路径 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = {"createrid", "bonuscode", "name", "brand", "fsbtype", "gifttype", "freespinsnumber", "score", "startdata", "enddata", "validitydata", "playertype", "playerlist", "games", "filepath"}; return value[index]; } void getdata() { } bool datavalue() { if (createrid <= 0 || name.empty() || brand.empty() || fsbtype <= 0) { return false; } return true; } }; struct SysGiftFreeGameChange { std::int64_t userid{ -1 }; // 创建者id std::string bonuscode; //奖励代码 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "bonuscode"}; return value[index]; } void getdata() { } bool datavalue() { if (userid <= 0 || bonuscode.empty()) { return false; } return true; } }; struct proCreditAgent { std::int64_t spreaderid{ 0 }; //管理员本人id std::int64_t userid{ 0 }; //被修改的代理id public: std::string getfieldvalue(std::int32_t index) { const char* value[] = {"spreaderid", "userid"}; return value[index]; } void getdata() { } }; struct SCreditAgentSitInfo { std::int64_t userid{ -1 }; std::string websitmeta; std::string websitbanner; std::string websitertp; std::string customerLink; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "websitmeta", "websitbanner", "websitertp", "customerLink"}; return value[index]; } void getdata() { } bool datavalue() { return true; } }; // 信用代理-跑马灯 struct SCreditAgentMarquee { std::int64_t userid{ -1 }; std::string strtext; __int64 ibegintime; __int64 iendtime; __int64 iinterval; __int32 istate; std::string sonlyid; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "strtext", "ibegintime", "iendtime", "iinterval", "istate", "onlyid"}; return value[index]; } void getdata() { } bool datavalue() { if(!userid || strtext.empty() || ibegintime > iendtime || iinterval<=0) return false; return true; } }; struct resendorderinfo { std::string stronlyid{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "onlyid" }; return value[index]; } void getdata() { stronlyid = stronlyid.substr(0, 100); } bool datavalue() { if (stronlyid.empty()) return false; return true; } }; // 信用代理-topwinner struct SCreditAgentTopWinner { std::string strtopwinners; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "strtopwinners"}; return value[index]; } void getdata() { } bool datavalue() { return true; } }; struct proAdminSetActiveRegion { std::int64_t userid{ -1 }; std::int32_t regionid{ -1 }; //货币id std::string country{}; //地区列表 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "regionid", "country" }; return value[index]; } void getdata() { } bool datavalue() { if (userid <= 0 || regionid <= 0) { return false; } return true; } }; struct proSetAgentActiveRegion { std::int64_t userid{ -1 }; std::int64_t agentid{ -1 }; std::string country{}; //地区列表 public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "userid", "agentid", "country" }; return value[index]; } void getdata() { } bool datavalue() { if (userid <= 0 || agentid <= 0) { return false; } return true; } }; struct proModifyOrderStatus { std::int64_t agentid{ 0 }; //管理员本人id std::int64_t userid{ 0 }; //订单用户id std::string stronlyid{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "agentid", "userid" , "onlyid"}; return value[index]; } void getdata() { } bool datavalue() { if ( agentid <= 0 || userid <= 0 || stronlyid.empty()) { return false; } return true; } }; struct tagSetPlayRecordini { std::int32_t datatype{}; std::int32_t uid{ 0 }; std::string data{}; //json data public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "datatype","uid", "data"}; return value[index]; } void getdata() { } bool datavalue() { if (uid <= 0 || data.empty()) { return false; } return true; } }; struct SysGiftFreeGameBetConfig { std::int64_t agentid{ 0 }; //管理员本人id std::string gamesbet{}; //json data public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "agentid", "gamesbet"}; return value[index]; } void getdata() { } bool datavalue() { if (agentid < 0 || gamesbet.empty()) { return false; } return true; } }; // activity ini 设置 struct tagSetActivityini { std::int32_t datatype{}; std::int32_t name{ 0 }; std::string data{}; //json data public: std::string getfieldvalue(std::int32_t index) { const char* value[] = {"datatype", "name", "data" }; return value[index]; } void getdata() { } bool datavalue() { if (name <= 0 || data.empty()) { return false; } return true; } }; struct proModifyUrls { std::int64_t agentid{ 0 }; //管理员本人id std::string struploadurl{}; std::string strlogurl{}; std::string strgameicourl{}; std::string strreturnurl{}; std::string strgameurl{}; std::string strwebapiurl{}; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "agentid", "uploadurl" , "logurl", "gameicourl", "returnurl", "gameurl", "webapiurl"}; return value[index]; } void getdata() { } bool datavalue() { if (agentid <= 0) { return false; } return true; } }; struct proSetPlatformini { std::int64_t agentid{ 0 }; //管理员本人id std::int32_t id{0}; std::int32_t open{ 0 }; std::string desc{}; //json data public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "agentid", "id", "open", "desc" }; return value[index]; } void getdata() { } bool datavalue() { if (agentid <=0 || id <= 0 || open < 0) { return false; } return true; } }; enum EThirdPlatform { EMega = 1, // 黑金 EZhenRenShiXun = 2, // iconic21 }; enum ECurrencyType { ECase = 1, // 现金 EBonus = 2, // 彩金 EFree = 3, // 免费币 ECurrMax, }; enum GameTypeEnum { ETABLETOP = 0, // 棋牌 ESLOT = 1, // 老虎机 EFISH = 2, // 捕鱼 ELIVE = 3, //真人视讯 }; struct sThirdgamelist { std::int64_t spreaderid = 0; //玩家对应推广id __int32 ideveloper = 0; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "developer" }; return value[index]; } void getdata() { } }; struct sCreatDeveloper { std::int64_t spreaderid = 0; //玩家对应推广id __int32 ideveloper = 0; //厂商id std::string strbrand = ""; std::string strcurrency = ""; __int32 open = -1; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "developer", "brand", "currency", "open"}; return value[index]; } void getdata() { } }; struct sDeveloperGamesEdit { std::int64_t spreaderid = 0; //玩家对应推广id __int32 ideveloper = 0; //厂商id std::string strgid = ""; __int32 open = -1; std::string strcurrency = ""; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "developer", "gid", "open", "currency" }; return value[index]; } void getdata() { } }; struct sDeveloperGamesSort { std::int64_t spreaderid = 0; //玩家对应推广id __int32 ideveloper = 0; //厂商id std::string strgames = ""; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "developer", "games" }; return value[index]; } void getdata() { } }; enum ERedeemCodeType { ERCT_ONLY = 1, // 唯一码 ERCT_SHRE = 2, // 共享码 ERCT_MAX, }; struct sRedeemCodeGenerate { std::int64_t spreaderid = 0; //玩家对应推广id std::string info = ""; // lable __int32 iquantity = 0; // 生成数量 __int32 icodetype = 1; // ERedeemCodeType __int32 iexchangelimit = 1; // 兑换次数 __int32 iaccountlimit = 1; // 账号兑换次数 __int64 iscore = 0; __int64 istarttime = 0; __int64 iendtime = 0; __int32 iopen = 0; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "info", "quantity", "type","exchangelimit", "accountlimit", "score", "st", "et", "open" }; return value[index]; } bool datavalue() { if (info.empty() || (icodetype==2 && iexchangelimit < 2) || istarttime > iendtime || iscore < 1 || iaccountlimit < 1 || iquantity < 1) { return false; } return true; } void getdata() { } }; struct sRedeemCodeActive { std::int64_t spreaderid = 0; //玩家对应推广id std::string strcodelist = ""; __int32 iopen = 0; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "codelist", "open"}; return value[index]; } bool datavalue() { if (strcodelist.empty()) { return false; } return true; } void getdata() { } }; struct sRedeemCodeUserMax { std::int64_t spreaderid = 0; //玩家对应推广id __int64 iuserid = 0; __int32 iuserlimit = 0; public: std::string getfieldvalue(std::int32_t index) { const char* value[] = { "spreaderid", "userid", "userlimit" }; return value[index]; } bool datavalue() { if (iuserid<=0 || iuserlimit <= 0) { return false; } return true; } void getdata() { } }; #pragma pack()