Commit f3b813eebc6d8071568cfe97960cc525b0dd6ca7

Authored by 陆恒
1 parent b339634e

提交

src/HttpServer/jsonconf/jsonconf.go
@@ -81,7 +81,7 @@ func GetJsonConf() *GameConfig { @@ -81,7 +81,7 @@ func GetJsonConf() *GameConfig {
81 } 81 }
82 82
83 func GetSignConfig(round, daynum int) *SignRewardDetail { 83 func GetSignConfig(round, daynum int) *SignRewardDetail {
84 - if round > g_jsonconf.SignConfig.Round { 84 + if round+1 > g_jsonconf.SignConfig.Round {
85 //取reward2 85 //取reward2
86 if daynum > len(g_jsonconf.SignConfig.Reward.Reward2) { 86 if daynum > len(g_jsonconf.SignConfig.Reward.Reward2) {
87 logger.Error("GetSignConfig failed") 87 logger.Error("GetSignConfig failed")
src/HttpServer/logic/datadef.go
@@ -297,3 +297,12 @@ type AddCoinDesc struct { @@ -297,3 +297,12 @@ type AddCoinDesc struct {
297 Coin int `json:"coin"` 297 Coin int `json:"coin"`
298 Typ int `json:"typ"` 298 Typ int `json:"typ"`
299 } 299 }
  300 +
  301 +type GetCoinDesc struct {
  302 + Sign string `json:"sign"`
  303 + Sign_type string `json:"sign_type"`
  304 + Time_stamp string `json:"time_stamp"`
  305 + Gameid string `json:"gameid"`
  306 + Channel string `json:"channel"`
  307 + Uid int `json:"uid"`
  308 +}
src/HttpServer/logic/function.go
@@ -785,6 +785,9 @@ func DoHttpPost(bys []byte) (string, error) { @@ -785,6 +785,9 @@ func DoHttpPost(bys []byte) (string, error) {
785 } 785 }
786 786
787 func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) { 787 func GetCoinFromSdk(uuid int, gameid string, channel string) (int, error) {
  788 +
  789 + var params GetCoinDesc
  790 + params.Sign_type = "md5"
788 return 0, nil 791 return 0, nil
789 } 792 }
790 793
@@ -818,8 +821,8 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in @@ -818,8 +821,8 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in
818 req.Gameid = gameid 821 req.Gameid = gameid
819 req.Coin = goldnum 822 req.Coin = goldnum
820 req.Sign = sign 823 req.Sign = sign
821 - req.Sign_type = sign_type  
822 - req.Time_stamp = time_stamp 824 + req.Sign_type = "md5"
  825 + req.Time_stamp = strconv.Itoa(int(time.Now().Unix()))
823 req.Typ = atype 826 req.Typ = atype
824 req.Uid = uuid 827 req.Uid = uuid
825 828
src/HttpServer/logic/logic.go
@@ -216,6 +216,7 @@ func HandlerQuerysigndata(w http.ResponseWriter, data string, uuid int) { @@ -216,6 +216,7 @@ func HandlerQuerysigndata(w http.ResponseWriter, data string, uuid int) {
216 resp.Data.IssignToday = uinfo.IsSignToday 216 resp.Data.IssignToday = uinfo.IsSignToday
217 resp.Data.Signround = uinfo.SignRound 217 resp.Data.Signround = uinfo.SignRound
218 218
  219 + logger.Info("HandlerQuerysigndata resp=%v", resp)
219 resp.Code = ERROR_OK 220 resp.Code = ERROR_OK
220 break 221 break
221 } 222 }