package logic type QuerytaskinfoReq struct { //Tasktype int `json:"tasktype"` //Gameid string `json:"gameid"` //Channel string `json:"channel"` } type QuerytaskinfoResp struct { Code int `json:"code"` Message string `json:"message"` Data TaskList `json:"data"` } type TaskListDesc struct { Taskid int `json:"taskid"` Taskstatus int `json:"taskstatus"` Taskprogress int `json:"taskprogress"` } type TaskList struct { Taskdata []TaskListDesc `json:"taskdata"` Fetchrdnum int `json:"fetchrdnum"` } type DosignData struct { Curday int `json:"curday"` Issigntaday int `json:"issigntaday"` Walletgold int `json:"walletgold"` Getgold int `json:"getgold"` } type DosignReq struct { Gameid string `json:"gameid"` Channel string `json:"channel"` Stype int `json:"stype"` } type DosignResp struct { Code int `json:"code"` Message string `json:"message"` Data DosignData `json:"data"` } type QueregginfoData struct { Freecnt int `json:"freecnt"` Costcnt int `json:"costcnt"` Leftaddtime int `json:"leftaddtime"` } type QueregginfoResp struct { Code int `json:"code"` Message string `json:"message"` Data QueregginfoData `json:"data"` } type TwisteggData struct { Freecnt int `json:"freecnt"` Costcnt int `json:"costcnt"` Getrednum int `json:"getrednum"` Totalredbag int `json:"totalredbag"` Getgold int64 `json:"getgold"` Leftaddtime int `json:"leftaddtime"` } type TwisteggResp struct { Code int `json:"code"` Message string `json:"message"` Data TwisteggData `json:"data"` } type AddfreeeggtimeData struct { Lefttime int `json:"lefttime"` } type AddfreeeggtimeResp struct { Code int `json:"code"` Message string `json:"message"` Data AddfreeeggtimeData `json:"data"` } type DoubletwisteggData struct { Getrednum int `json:"getrednum"` Totalredbag int `json:"totalredbag"` Getgold int64 `json:"getgold"` } type DoubletwisteggResp struct { Code int `json:"code"` Message string `json:"message"` Data DoubletwisteggData `json:"data"` } type QuersigndataData struct { Curday int `json:"curday"` Issigntaday int `json:"issigntaday"` } type QuersigndataResp struct { Code int `json:"code"` Message string `json:"message"` Data QuersigndataData `json:"data"` } type RecoveryReq struct { Position int `json:"position"` } type RecoveryData struct { Coin DoBuyCatCoin `json:"coin"` } type RecoveryResp struct { Code int `json:"code"` Message string `json:"message"` Data RecoveryData `json:"data"` } type UploadusercostReq struct { Rtype int `json:"rtype"` Value int `json:"value"` } type UploadusercostData struct { Lefttime int `json:"lefttime"` } type UploadusercostResp struct { Code int `json:"code"` Message string `json:"message"` Data UploadusercostData `json:"data"` } type ShakeaddgoldData struct { Goldnum int64 `json:"goldnum"` Goldsumnum int64 `json:"goldsumnum"` } type ShakeaddgoldResp struct { Code int `json:"code"` Message string `json:"message"` Data ShakeaddgoldData `json:"data"` } type AddcatgoldData struct { Getgold int64 `json:"getgold"` Totalgold int64 `json:"totalgold"` } type AddcatgoldResp struct { Code int `json:"code"` Message string `json:"message"` Data AddcatgoldData `json:"data"` } type CommReq struct { Gameid string `json:"gameid"` Channel string `json:"channel"` } type GetCashListDesc struct { Sign string `json:"sign"` Sign_type string `json:"sign_type"` Time_stamp string `json:"time_stamp"` Gameid string `json:"gameid"` Channel string `json:"channel"` Uid int `json:"uid"` Start int `json:"start"` Number int `json:"number"` } type GetCashListResp struct { Code string `json:"code"` Msg string `json:"msg"` Data []WithDrawRecord `json:"data"` } type WithDrawRecord struct { Coin int `json:"coin"` Create_time int `json:"create_time"` Money int `json:"money"` No string `json:"no"` Status int `json:"status"` Statusmsg string `json:"statusmsg"` Typ int `json:"typ"` } type WithDrawList struct { Withdata []WithDrawRecord `json:"withdata"` } type GetcashrecordResp struct { Code int `json:"code"` Message string `json:"message"` Data WithDrawList `json:"data"` } type GetCashResp struct { Code string `json:"code"` Msg string `json:"msg"` } type TixianDesc struct { Sign string `json:"sign"` Sign_type string `json:"sign_type"` Time_stamp string `json:"time_stamp"` Gameid string `json:"gameid"` Channel string `json:"channel"` Uid int `json:"uid"` Typ int `json:"typ"` Money int `json:"money"` Openid string `json:"openid"` Nickname string `json:"nickname"` Headurl string `json:"headurl"` Editcoin int `json:"editcoin"` Ver string `json:"ver"` Checkcoin int `json:"checkcoin"` } type GetcashReq struct { Money float32 `json:"money"` Openid string `json:"openid"` Ver string `json:"ver"` Channel string `json:"channel"` Gameid string `json:"gameid"` } type GetcashData struct { Redbag float32 `json:"redbag"` } type GetcashResp struct { Code int `json:"code"` Message string `json:"message"` Data GetcashData `json:"data"` } type QuerygetcashinfoData struct { Logindaysum int `json:"logindaysum"` Logindaycontinue int `json:"logindaycontinue"` Cashdata []WithDrawDesc `json:"cashdata"` } type QuerygetcashinfoResp struct { Code int `json:"code"` Message string `json:"message"` Data QuerygetcashinfoData `json:"data"` } const ( XIAOXINGXING_SDKURLOFFICAL = "https://api.gamesdk.hmjoy.cn/" RANDGIFTLIMIT = 15 //每日随机红包上线次数 SHAKETIMELIMIT = 20 SHAKEGOLDMULT = 300 //摇一摇金币秒数 CATADDGOLD = 600 //增加的金币 FREETWIEST = 1 //免费扭蛋次数 NOFREETWIEST = 9 //不免费扭蛋次数 ) //任务类型 对应表 const ( DAILY_TASKTYPE_1 = 1 //1 在线分钟 DAILY_TASKTYPE_2 = 2 //合成猫 DAILY_TASKTYPE_3 = 3 //观看广告 DAILY_TASKTYPE_4 = 4 //扭蛋 ) type GetworkrewardData struct { Getrednum int `json:"getrednum"` Totalrednum int `json:"totalrednum"` Goldnum int64 `json:"goldnum"` } type GetworkrewardResp struct { Code int `json:"code"` Message string `json:"message"` Data GetworkrewardData `json:"data"` } type StartworkReq struct { Workid int `json:"workid"` } type StartworkData struct { Lefttime int `json:"lefttime"` } type StartworkResp struct { Code int `json:"code"` Message string `json:"message"` Data StartworkData `json:"data"` } type GettaskrewardReq struct { //Tasktype int `json:"tasktype"` Taskid int `json:"taskid"` Gameid string `json:"gameid"` Channel string `json:"channel"` Ttype int `json:"ttype"` } type GettaskrewardData struct { Getrednum int `json:"getrednum"` Totalrednum int `json:"totalrednum"` Goldnum int64 `json:"goldnum"` } type GettaskrewardResp struct { Code int `json:"code"` Message string `json:"message"` Data GettaskrewardData `json:"data"` } type QueryvideoloveprocessData struct { Curprocess int `json:"curprocess"` } type QueryvideoloveprocessResp struct { Code int `json:"code"` Message string `json:"message"` Data QueryvideoloveprocessData `json:"data"` } type GetvideoloveData struct { Curprocess int `json:"curprocess"` Getlove int `json:"getlove"` Sumlove int64 `json:"sumlove"` } type GetvideoloveResp struct { Code int `json:"code"` Message string `json:"message"` Data GetvideoloveData `json:"data"` } type QueryworkinfoData struct { Curprogram int `json:"curprogram"` Lefttime int `json:"lefttime"` } type QueryworkinfoResp struct { Code int `json:"code"` Message string `json:"message"` Data QueryworkinfoData `json:"data"` } type GetrandredbagReq struct { Optype int `json:"optype"` Gameid string `json:"gameid"` Channel string `json:"channel"` } type GetrandredbagData struct { Getnum float32 `json:"getnum"` } type GetrandredbagResp struct { Code int `json:"code"` Message string `json:"message"` Data GetrandredbagData `json:"data"` } type AddCoinResultData struct { Mycoin int `json:"mycoin"` } type AddCoinResp struct { Code string `json:"code"` Msg string `json:"msg"` Data AddCoinResultData `json:"data"` } type GetCoinDesc struct { Sign string `json:"sign"` Sign_type string `json:"sign_type"` Time_stamp string `json:"time_stamp"` Gameid string `json:"gameid"` Channel string `json:"channel"` Uid int `json:"uid"` } type AddCoinDesc struct { Sign string `json:"sign"` Sign_type string `json:"sign_type"` Time_stamp string `json:"time_stamp"` Gameid string `json:"gameid"` Channel string `json:"channel"` Uid int `json:"uid"` Coin int `json:"coin"` Typ int `json:"typ"` } type FetchlvredbagReq struct { Catlv int `json:"catlv"` Gameid string `json:"gameid"` Channel string `json:"channel"` } type QuertlvredbagData struct { Catlv int `json:"catlv"` Redbag float32 `json:"redbag"` Canfetch int `json:"canfetch"` } type QuertlvredbagResp struct { Code int `json:"code"` Message string `json:"message"` Data QuertlvredbagData `json:"data"` } type FetchlvredbagData struct { Redbag float32 `json:"redbag"` } type FetchlvredbagResp struct { Code int `json:"code"` Message string `json:"message"` Data FetchlvredbagData `json:"data"` } type UserLoginData struct { //Uuid int `json:"uuid"` Fromid int `json:"fromid"` Sharetype int `json:"sharetype"` } type UserLoginResp struct { Code int `json:"code"` Message string `json:"message"` Gold int64 `json:"gold"` Love int64 `json:"love"` Goldrate int64 `json:"goldrate"` Loverate float32 `json:"loverate"` Highestlv int `json:"highestlv"` Curboxlv int `json:"curboxlv"` Isdoublegold int `json:"isdoublegold"` Isauto int `json:"isauto"` Offlinegold int64 `json:"offlinegold"` Offlinelove int64 `json:"offlinelove"` Issignshow int `json:"issignshow"` Isnew int `json:"isnew"` Data []DataDesc `json:"data"` } type GetUserDataReq struct { Isauto int `json:"isauto"` //0不自动合成 1自动合成 } type ChangeCoinReq struct { Type int `json:"type"` Coin int64 `json:"coin"` } type DoBuyCatCoin struct { UserId int `json:"userId"` UpdateTime int `json:"updateTime"` Coin string `json:"coin"` IcomeRate string `json:"icomeRate"` } type ChangeCoinData struct { Coin DoBuyCatCoin `json:"coin"` } type ChangeCoinResp struct { Code int `json:"code"` Data ChangeCoinData `json:"data"` Message string `json:"message"` } type GetUserDataResp struct { Code int `json:"code"` Message string `json:"message"` Gold int64 `json:"gold"` Love int64 `json:"love"` Goldrate int64 `json:"goldrate"` Loverate float32 `json:"loverate"` Dougoldlefttime int `json:"dougoldlefttime"` Automlefttime int `json:"automlefttime"` Acclcteboxlefttime int `json:"acclcteboxlefttime"` Israndgift int `json:"israndgift"` Leftredbagnum int `json:"leftredbagnum"` Redbagnum int `json:"redbagnum"` Shakeleftcnt int `json:"shakeleftcnt"` Data []DataDesc `json:"data"` } type DataDesc struct { Pos int `json:"pos"` Catlv int `json:"cat_lv"` Countdown int `json:"countdown"` } type ExchangePosReq struct { //Uuid int `json:"uuid"` Pos_1 int `json:"pos_1"` Pos_2 int `json:"pos_2"` } type ExchangePosResp struct { Code int `json:"code"` Message string `json:"message"` Pos1_lv int `json:"pos1_lv"` Pos2_lv int `json:"pos2_lv"` Highest_lv int `json:"highest_lv"` Add_num int `json:"add_num"` } type ClickBoxReq struct { //Uuid int `json:"uuid"` Pos int `json:"pos"` } type ClickBoxResp struct { Code int `json:"code"` Message string `json:"message"` Pos int `json:"pos"` Lv int `json:"lv"` } type UpgradeBoxReq struct { //Uuid int `json:"uuid"` } type UpgradeBoxResp struct { Code int `json:"code"` Message string `json:"message"` Boxlv int `json:"boxlv"` } type GenerateBoxReq struct { //Uuid int `json:"uuid"` Pos int `json:"pos"` } type GenerateBoxResp struct { Code int `json:"code"` Message string `json:"message"` } type AcclecteReq struct { //Uuid int `json:"uuid"` } type AcclecteResp struct { Code int `json:"code"` Message string `json:"message"` } type AcclecteBoxResp struct { Code int `json:"code"` Message string `json:"message"` } type AutomergeReq struct { //Uuid int `json:"uuid"` } type AutomergeResp struct { Code int `json:"code"` Message string `json:"message"` } type QueryBuyCatReq struct { //Uuid int `json:"uuid"` } type QueryBuyCatResp struct { Code int `json:"code"` Message string `json:"message"` Maxcatlv int `json:"maxcatlv"` Data []BuyCatDesc `json:"data"` } type BuyCatDesc struct { Lv int `json:"lv"` Goldnum int64 `json:"goldnum"` } type ClickRandGiftReq struct { //Uuid int `json:"uuid"` } type ClickRandGiftResp struct { Code int `json:"code"` Message string `json:"message"` Gold int64 `json:"gold"` Lefttime int `json:"lefttime"` } type DoBuyCatReq struct { Lv int `json:"lv"` } type DoBuyCatResp struct { Code int `json:"code"` Message string `json:"message"` Pos int `json:"pos"` Nextprice int64 `json:"nextprice"` } type QueryWareHouseResp struct { Code int `json:"code"` Message string `json:"message"` Data []DataDesc `json:"data"` } type QueryAutomergeResp struct { Code int `json:"code"` Message string `json:"message"` Goldrate int64 `json:"goldrate"` Higestlv int `json:"higestlv"` Curcatjianum int `json:"curcatjianum"` Data []DataDesc `json:"data"` } type PutWareHouseReq struct { Pos int `json:"pos"` } type PutWareHouseResp struct { Code int `json:"code"` Message string `json:"message"` Warepos int `json:"warepos"` } type TakeWareHouseReq struct { Warepos int `json:"warepos"` } type TakeWareHouseResp struct { Code int `json:"code"` Message string `json:"message"` Pos int `json:"pos"` } type CatRoomDesc struct { Pos int `json:"pos"` Catlv int `json:"cat_lv"` } type QueryCatRoomInfoResp struct { Code int `json:"code"` Message string `json:"message"` Data []CatRoomDesc `json:"data"` } type OnlinentfResp struct { Code int `json:"code"` Message string `json:"message"` } type UpdatetaskReq struct { Tasktype int `json:"tasktype"` Value int `json:"value"` } type BuyCatRoomReq struct { Lv int `json:"lv"` } type BuyCatRoomResp struct { Code int `json:"code"` Message string `json:"message"` } type UpCattoRoomReq struct { Roompos int `json:"roompos"` Callv int `json:"callv"` Optype int `json:"optype"` } type UpCattoRoommResp struct { Code int `json:"code"` Message string `json:"message"` } type QueryCatShopInfoResp struct { Code int `json:"code"` Message string `json:"message"` Chapter int `json:"chapter"` Section int `json:"section"` Lefttime int `json:"lefttime"` Canwatch int `json:"canwatch"` Storyhappen int `json:"storyhappen"` } type CatShoPlayReq struct { Catlv int `json:"catlv"` } type CatShoPlayResp struct { Code int `json:"code"` Message string `json:"message"` Lefttime int `json:"lefttime"` Canwatch int `json:"canwatch"` } type GetCatShopRewardReq struct { Optype int `json:"optype"` } type GetCatShopRewardResp struct { Code int `json:"code"` Message string `json:"message"` Love int64 `json:"love"` } type AcclecteCatStoryResp struct { Code int `json:"code"` Message string `json:"message"` } type UpdateUserInfoReq struct { Headurl string `json:"headImg"` Nickname string `json:"nickname"` Realname string `json:"realname"` } type UpdateUserInfoResp struct { Code int `json:"code"` Message string `json:"message"` } type RankInfoDesc struct { Rank int `json:"rank"` Headurl string `json:"headurl"` Nickname string `json:"nickname"` Catlv int `json:"catlv"` Goldnum int64 `json:"goldnum"` Uuid int `json:"uuid"` } type QueryPlayerRankResp struct { Code int `json:"code"` Message string `json:"message"` Data []RankInfoDesc `json:"data"` Selfdata RankInfoDesc `json:"selfdata"` } type QueryCompleteTaskDesc struct { Taskid int `json:"taskid"` } type QueryOnlienTaskDesc struct { Taskid int `json:"taskid"` Lefttime int64 `json:"lefttime"` } type QueryCompleteTaskResp struct { Code int `json:"code"` Message string `json:"message"` Data []QueryCompleteTaskDesc `json:"data"` Online []QueryOnlienTaskDesc `json:"online"` } type QueryCompleteAchievementDesc struct { Achieveid int `json:"achieveid"` } type QueryCompleteAchievementResp struct { Code int `json:"code"` Message string `json:"message"` Data []QueryCompleteAchievementDesc `json:"data"` } type GetTaskRewardReq struct { Taskid int `json:"taskid"` } type GetTaskRewardResp struct { Code int `json:"code"` Message string `json:"message"` } type GetAchieveRewardReq struct { Achieveid int `json:"achieveid"` } type GetAchieveRewardResp struct { Code int `json:"code"` Message string `json:"message"` } type StartOnlineTaskReq struct { Taskid int `json:"taskid"` } type StartOnlineTaskResp struct { Code int `json:"code"` Message string `json:"message"` Lefttime int `json:"lefttime"` } type GetOfflineRewardReq struct { Optype int `json:"optype"` } type GetOfflineRewardResp struct { Code int `json:"code"` Message string `json:"message"` Gold int64 `json:"gold"` Love int64 `json:"love"` } //********************************************************************************************************** type PosData struct { Pos int Catlv int Countdown int //倒计时 为0表示没有 //UpPos int //上阵的位置 0表示未上阵 } //玩家购买猫详情 type BuyCatInfoData struct { Buytime int //购买次数 IsMaxBuytime int //是否达到涨价上线 1是0否 CurPrice int64 //当前价格 } //猫咖店家具数据 type CatRoomData struct { LvCatlv int //入住猫的等级 BuildId int //家具等级 } //猫咖门店数据 type CatShopData struct { Chapter int //当前所处进度 对应shopcaofig的id Section int //当前小节进度 ,即当前大章节第几次故事 IsPlaying int //是否处于探险模式 1是0否 LeftTime int //探险剩余时间 PlayTimes int //当前为第几次探险 DayNum int //当天日期,用于判断跨天 TotalWatchNumLeft int //当天剩余看视频次数 ThisIsWatch int //本次探险是否已经看过视频 IsMax int //是否已经通关 1是0否 CurCatLv int //参加探险的猫等级 IsStoryHappen int //此次是否触发故事 } //玩家排行榜数据 type UserRankInfo struct { Gold int64 //金币 Head string //头像地址 NickName string //昵称 Highestlv int //当前最高猫等级 Uuid int //uuid } //玩家任务数据 每日清零 type TaskData struct { //StartOnline int //开始计算在线时间 StartOnline map[int]int64 //记录对应takid 和开始计时的时间 BuyCatTime int //商店购买猫次数 MergeTime int //合成猫次数 PlayWithTime int //陪玩次数 WatchAddTime int //看广告次数 CompleteId map[int]int //已经完成的任务的id,对应task表的id value无用 HaveComplete map[int]int //记录当日已完成的任务,已完成则不再完成 } //玩家成就数据 type AchieveMentData struct { GetNewCatTime int //累计解锁新猫次数 GetAllJia int //累计获得猫爬架次数 GetRoomJu int //累计解锁新家具次数 StoryTime int //累计解锁故事 ShopTime int //累计解锁店铺 CompleteId map[int]int //已经完成的任务的id,对应achievement表id value为无用 HaveComplete map[int]int //记录已完成成就已完成则不再触发 } type WithDrawDesc struct { Cid int `json:"cid"` Cnum float32 `json:"cnum"` Isnew int `json:"isnew"` Limitlv int `json:"limitlv"` LoginDayLimit int `json:"loginDayLimit"` Preisfind int `json:"preisfind"` IsFit int `json:"isfit"` } type WithDrawInfo struct { Cashdata []WithDrawDesc `json:"cashdata"` } type TaskInfo struct { OnlineMin int //在线分钟数 MergeCat int //合成猫 WatchAds int //看广告次数 TwistEgg int //扭蛋次数 } //玩家数据 type UserData struct { Gold int64 //金币 Love int64 //爱心值 Goldrate int64 //金币生成速率 Loverate float32 //爱心生产速率 Highestlv int //当前最高猫等级 InviteId int //邀请者uid CurBoxLv int //当前猫箱子等级 IsDouble int //当前加速标签 1表示双倍收益 0表示正常 IsAuto int //当前是否自动合成 IsBoxAcc int //是否处于加速生成箱子状态 RandGiftNum int //当前剩余空投猫粮次数 RandGiftDay int //记录当前猫粮日期,当日期变化则重置RandGiftNum RandGiftTime int //记录上一次空投猫粮时间 Redbag int //红包值 单位为分 Head string //头像地址 NickName string //昵称 RealName string //实名 IsFirstRedBgCat int //是否合成过红包猫 0表示否1表示是 OfflineGold int64 //离线金币 OfflineLove int64 //离线爱心 Leftrednum int //倒计时红包次数 RandRedBagLeftTime int //剩余随机红包次数 SumRandRedBagTimes int //已领取的随机红包总次数 StoreRandRedBag int //存储的随机红包个数 LastLoginTime int //上次登陆时间 IsResetToday int //当天中午十二点是否重置 0表示未 1表示已重置 ContinueLoginDay int //连续登陆天数 SumLoginDay int //累计登录天数 FetchRdBagNum int //当天已领的红包 ShakeTime int //摇一摇次数 SignShow int //是否弹出签到 SignSum int //累计签到天数 IsSignToday int //今日是否已经签到 1是 0否 FreeEggTime int //免费扭蛋次数 EggTime int //非免费扭蛋次数 EggBonusId int //上一次抽奖奖励ID 用于领取双倍奖励用 FELcnt int //免费增加扭蛋次数剩余次数 EggTimeReset int //当日是否已经重置 EggTimeResetTime int //当日重置时间点 CurLoveVideo int //当前看视频领取爱心进度 WaitFetchLv []int //当前可领取的等级红包等级 WorkProgramId int //打工项目id WorkLeftTime int //打工剩余时间(秒) WorkStartTime int //打工开始时间 IsNew int // 新手引导 Task TaskInfo //玩家任务完成相关信息 CatShopInfo CatShopData //猫咖门店数据 Taskinfo TaskData //任务数据 AchieveMent AchieveMentData //成就数据 PosInfo []PosData //位置信息 从0开始 BuyCatInfo []BuyCatInfoData //商店购买猫数据 第一个元素为1级猫 第二个为2级猫以此类推 CatRoomInfo []CatRoomData //猫咖店数据 WithDraw WithDrawInfo //提现记录信息 } //仓库数据详情 type WareHouseDesc struct { Warelv int //红包猫等级 对应表id } //玩家仓库数据 type UserWareHouseData struct { Info []WareHouseDesc //下标表示位置 } const ( TASK_TYPE_ONLINE = 1 //在线 TASK_TYPE_BUYCAT = 2 //商店购买猫 TASK_TYPE_MERGE = 3 //合成猫 TASK_TYPE_PLAYWITHCAT = 4 //猫咪陪玩 TASK_TYPE_WATCHADD = 5 //观看广告 ACH_TYPE_GETCAT = 6 //累计解锁猫 ACH_TYPE_GETCATJIA = 7 //累计获得猫爬架 ACH_TYPE_GETCATROOMJIA = 8 //累计解锁新家具 ACH_TYPE_GETSTORY = 9 //累计解锁新故事 ACH_TYPE_GBESHOP = 10 //累计用于新店铺 ) const ( TASK_TYPE_1 = 1 //看视频次数 ) type TestAddCatReq struct { Position int `json:"position"` CatId int `json:"catId"` } type TestAddCatData struct { } type TestAddCatResp struct { Code int `json:"code"` Data TestAddCatData `json:"data"` Message string `json:"message"` }