Commit c104d44535e7089b3451b657d4422b157c669037

Authored by 陆恒
1 parent 7fbe431d
Exists in ver2.3.0 and in 1 other branch ver2.2.8

提交

src/HttpServer/jsonconf/ActiveWithdrawConfig.json 0 → 100644
... ... @@ -0,0 +1,11 @@
  1 +[
  2 + {
  3 + "id": 1,
  4 + "money": 66,
  5 + "coin": 660000,
  6 + "task": 0,
  7 + "level": 100,
  8 + "new": 0,
  9 + "day": 30
  10 + }
  11 +]
0 12 \ No newline at end of file
... ...
src/HttpServer/jsonconf/WithdrawConfig.json
... ... @@ -42,7 +42,7 @@
42 42 "task": 4,
43 43 "level": 17,
44 44 "new": 0,
45   - "day": 7
  45 + "day": 8
46 46 },
47 47 {
48 48 "id": 6,
... ... @@ -51,33 +51,24 @@
51 51 "task": 5,
52 52 "level": 23,
53 53 "new": 0,
54   - "day": 10
  54 + "day": 12
55 55 },
56 56 {
57 57 "id": 7,
58   - "money": 10,
59   - "coin": 100000,
  58 + "money": 100,
  59 + "coin": 10000000,
60 60 "task": 6,
61   - "level": 68,
  61 + "level": 102,
62 62 "new": 0,
63 63 "day": 0
64 64 },
65 65 {
66 66 "id": 8,
67   - "money": 50,
68   - "coin": 500000,
  67 + "money": 200,
  68 + "coin": 20000000,
69 69 "task": 7,
70 70 "level": 150,
71 71 "new": 0,
72 72 "day": 0
73   - },
74   - {
75   - "id": 9,
76   - "money": 100,
77   - "coin": 10000000,
78   - "task": 8,
79   - "level": 150,
80   - "new": 0,
81   - "day": 0
82 73 }
83 74 ]
84 75 \ No newline at end of file
... ...
src/HttpServer/jsonconf/jsonconf.go
... ... @@ -67,14 +67,25 @@ type SignConfigDesc struct {
67 67 Reward SignReward `json:"reward"`
68 68 }
69 69  
  70 +type ActiveWithdrawConfigDesc struct {
  71 + Id int `json:"id"`
  72 + Money float32 `json:"money"`
  73 + Coin int `json:"coin"`
  74 + Task int `json:"task"`
  75 + Level int `json:"level"`
  76 + Isnew int `json:"new"`
  77 + Day int `json:"day"`
  78 +}
  79 +
70 80 type GameConfig struct {
71   - AchieventConfig []AchieveDesc
72   - TaskConfig []AchieveDesc
73   - LevelConfig []LevelDesc
74   - MoneyBoxConfig []MoneyBoxLevelDesc
75   - MoneyBoxTimeConfig []MoneyBoxTimesDesc
76   - WithDrawConfig []WithDrawDesc
77   - SignConfig SignConfigDesc
  81 + AchieventConfig []AchieveDesc
  82 + TaskConfig []AchieveDesc
  83 + LevelConfig []LevelDesc
  84 + MoneyBoxConfig []MoneyBoxLevelDesc
  85 + MoneyBoxTimeConfig []MoneyBoxTimesDesc
  86 + WithDrawConfig []WithDrawDesc
  87 + SignConfig SignConfigDesc
  88 + ActiveWithdrawConfig []ActiveWithdrawConfigDesc
78 89 }
79 90  
80 91 func GetJsonConf() *GameConfig {
... ...
src/HttpServer/logic/datadef.go
... ... @@ -125,6 +125,7 @@ type GetcashReq struct {
125 125 Nickname string `json:"nickname"`
126 126 Headurl string `json:"headurl"`
127 127 Ver string `json:"ver"`
  128 + Ctype int `json:"ctype"`
128 129 }
129 130  
130 131 type CommReq struct {
... ... @@ -325,7 +326,8 @@ type WithDrawRecord struct {
325 326 }
326 327  
327 328 type WithDrawInfo struct {
328   - Cashdata []WithDrawDesc `json:"cashdata"`
  329 + Cashdata []WithDrawDesc `json:"cashdata"`
  330 + SpecialCashdata []WithDrawDesc `json:"specialcashdata"`
329 331 }
330 332  
331 333 type WithDrawDesc struct {
... ... @@ -339,28 +341,29 @@ type WithDrawDesc struct {
339 341  
340 342 //玩家数据
341 343 type UserData struct {
342   - Userid int //玩家id
343   - Lv int //玩家当前等级
344   - LvRewardGet int //当前等级奖励是否已经领取 1未领取 2普通领取 3双倍领取
345   - Exp int //玩家当前经验值
346   - GuanGold int //玩家存钱罐中金币数量
347   - RealGold int //玩家实际金币数量(可用于提现的)
348   - WatchAddsTime int //当天剩余红包次数 初始化50次
349   - LastLoginTime int //上次登陆时间
350   - ContinueLoginDay int //连续登录天数
351   - SumLoginDay int //累计登陆天数
352   - GetFromGuanCnt int //当天从存钱款提取金币次数
353   - SignRound int //签到轮数
354   - SignSum int //累计签到天数
355   - IsSignToday int //今日是否已经签到 1是 0否
356   - LeftFreeRB int //剩余免费红包次数
357   - UpLvCostTime int //上一个等级升级时间
358   - UpLvCostTimeSec int //上一个等级升级的时间点时刻
359   - ReadNum int //玩家微转发阅读量
360   - GetCashCnt int //当天提现次数
361   - WithDraw WithDrawInfo //提现记录信息
362   - Task TaskInfo //玩家任务完成相关信息
363   - Achieve AchieveMentInfo //玩家成就完成相关数据
  344 + Userid int //玩家id
  345 + Lv int //玩家当前等级
  346 + LvRewardGet int //当前等级奖励是否已经领取 1未领取 2普通领取 3双倍领取
  347 + Exp int //玩家当前经验值
  348 + GuanGold int //玩家存钱罐中金币数量
  349 + RealGold int //玩家实际金币数量(可用于提现的)
  350 + WatchAddsTime int //当天剩余红包次数 初始化50次
  351 + LastLoginTime int //上次登陆时间
  352 + ContinueLoginDay int //连续登录天数
  353 + SumLoginDay int //累计登陆天数
  354 + GetFromGuanCnt int //当天从存钱款提取金币次数
  355 + SignRound int //签到轮数
  356 + SignSum int //累计签到天数
  357 + IsSignToday int //今日是否已经签到 1是 0否
  358 + LeftFreeRB int //剩余免费红包次数
  359 + UpLvCostTime int //上一个等级升级时间
  360 + UpLvCostTimeSec int //上一个等级升级的时间点时刻
  361 + ReadNum int //玩家微转发阅读量
  362 + GetCashCnt int //当天提现次数
  363 + WithDraw WithDrawInfo //提现记录信息
  364 + //SpecialWithDraw WithDrawInfo //活跃提现记录信息
  365 + Task TaskInfo //玩家任务完成相关信息
  366 + Achieve AchieveMentInfo //玩家成就完成相关数据
364 367 }
365 368  
366 369 //----------------------------------------------------------------------------------------------------------------------
... ...
src/HttpServer/logic/function.go
... ... @@ -506,6 +506,23 @@ func InitUserInfo(data *UserLoginReq, resp *UserLoginResp, uuid int, uniqueuid s
506 506 tmp.Day = val.Day
507 507 initdata.WithDraw.Cashdata = append(initdata.WithDraw.Cashdata, tmp)
508 508 }
  509 + //处理活跃提现的部分
  510 + for _, val := range jsonconf.GetJsonConf().ActiveWithdrawConfig {
  511 + var tmp WithDrawDesc
  512 + tmp.Cid = val.Id
  513 + tmp.Cnum = val.Money
  514 + if val.Isnew == 1 {
  515 + tmp.Isnew = 1
  516 + } else {
  517 + tmp.Isnew = 2
  518 + }
  519 + tmp.Limitlv = val.Level
  520 + //没有前置条件
  521 + tmp.Preisfind = 1
  522 +
  523 + tmp.Day = val.Day
  524 + initdata.WithDraw.SpecialCashdata = append(initdata.WithDraw.SpecialCashdata, tmp)
  525 + }
509 526  
510 527 resp.Data.Guangold = initdata.GuanGold
511 528 resp.Data.Leftredbagcnt = initdata.WatchAddsTime
... ... @@ -784,6 +801,16 @@ func GetWithDrawList(uuid int) (*WithDrawList, error) {
784 801 return list, nil
785 802 }
786 803  
  804 +func (uinfo *UserData) GetSpecialWithDrawData(money float32) (int, *WithDrawDesc) {
  805 + //处理提现状态
  806 + for k, val := range uinfo.WithDraw.SpecialCashdata {
  807 + if val.Cnum == money {
  808 + return k, &val
  809 + }
  810 + }
  811 + return -1, nil
  812 +}
  813 +
787 814 func (uinfo *UserData) GetWithDrawData(money float32) (int, *WithDrawDesc) {
788 815 //处理提现状态
789 816 for k, val := range uinfo.WithDraw.Cashdata {
... ...
src/HttpServer/logic/logic.go
... ... @@ -141,7 +141,16 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
141 141 break
142 142 }
143 143  
144   - index, info := uinfo.GetWithDrawData(rdata.Money)
  144 + //需要处理一下提现级别
  145 +
  146 + index := 0
  147 + var info *WithDrawDesc
  148 + if rdata.Ctype == 1 {
  149 + index, info = uinfo.GetWithDrawData(rdata.Money)
  150 + } else {
  151 + index, info = uinfo.GetSpecialWithDrawData(rdata.Money)
  152 + }
  153 +
145 154 if index == -1 || info == nil {
146 155 logger.Error("AddWithDrawList failed err=%v", err)
147 156 resp.Message = "网络错误"
... ... @@ -170,12 +179,15 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
170 179 break
171 180 }
172 181  
173   - //判断一下前置条件的下一档
174   - if index == len(uinfo.WithDraw.Cashdata)-1 {
175   - //最后一档了不用处理
176   - } else {
177   - if index < len(uinfo.WithDraw.Cashdata)-1 {
178   - uinfo.WithDraw.Cashdata[index+1].Preisfind = 1
  182 + //普通提现需要判断前置条件
  183 + if rdata.Ctype == 1 {
  184 + //判断一下前置条件的下一档
  185 + if index == len(uinfo.WithDraw.Cashdata)-1 {
  186 + //最后一档了不用处理
  187 + } else {
  188 + if index < len(uinfo.WithDraw.Cashdata)-1 {
  189 + uinfo.WithDraw.Cashdata[index+1].Preisfind = 1
  190 + }
179 191 }
180 192 }
181 193  
... ... @@ -196,7 +208,7 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
196 208  
197 209 //2.2.5版本开启自动审核
198 210 checkcoin := 2
199   - if rdata.Ver == "2.2.5" {
  211 + if rdata.Ver == "2.2.5" || rdata.Ver == "2.2.6" || rdata.Ver == "2.2.7" {
200 212 logger.Info("HandlerGetcash autocheckcoin")
201 213 if drawnum <= 150 {
202 214 //1.5挡位以下不需要审核
... ... @@ -870,6 +882,7 @@ func HandlerQuerdrawinfo(w http.ResponseWriter, data string, uuid int) {
870 882  
871 883 //返回
872 884 resp.Data.Cashdata = append(resp.Data.Cashdata, uinfo.WithDraw.Cashdata...)
  885 + resp.Data.SpecialCashdata = append(resp.Data.SpecialCashdata, uinfo.WithDraw.SpecialCashdata...)
873 886  
874 887 resp.Code = ERROR_OK
875 888 break
... ...