123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262 |
- #pragma once
- #include <deque>
- #include <vector>
- #include <random>
- #include <fstream>
- #include <iostream>
- #include <boost/asio.hpp>
- #include <boost/thread.hpp>
- #include <boost/pfr.hpp>
- #include "bsoncxx/builder/stream/document.hpp"
- #include "mongocxx/instance.hpp"
- #include "mongocxx/uri.hpp"
- #include "mongocxx/client.hpp"
- #include <mongocxx/exception/exception.hpp>
- #include "bsoncxx/json.hpp"
- #include "rapidjson/document.h"
- #include "rapidjson/writer.h"
- #include "rapidjson/stringbuffer.h"
- #include <boost/filesystem.hpp>
- #include <unordered_set>
- #include <unordered_map>
- #include "funclib.hpp"
- #include "webfun.h"
- #include "resource.h"
- #include <string>
- #include <sstream>
- #include <iostream>
- #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<std::int64_t> 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<std::int64_t, vipdata> 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<std::int64_t> 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()
|