Commit 20e8e5d9d940f04ac3dde0e8765d28520393bada

Authored by 陆恒
1 parent 586c39d6

体现增加自动审核

src/HttpServer/logic/constdef.go
@@ -42,10 +42,10 @@ const ( @@ -42,10 +42,10 @@ const (
42 ) 42 )
43 43
44 const ( 44 const (
45 - //XIAOXINGXING_SERVERKEYTEST = "e2cd22102143cdcd9c181f962d031685"  
46 - XIAOXINGXING_SERVERKEYTEST = "33e0c3238c108a36d87025544c6a2d2f"  
47 - //XIAOXINGXING_SDKURLOFFICAL = "https://testapi-gamesdk.d3games.com/"  
48 - XIAOXINGXING_SDKURLOFFICAL = "https://api.gamesdk.hmjoy.cn/" 45 + XIAOXINGXING_SERVERKEYTEST = "e2cd22102143cdcd9c181f962d031685"
  46 + //XIAOXINGXING_SERVERKEYTEST = "33e0c3238c108a36d87025544c6a2d2f"
  47 + XIAOXINGXING_SDKURLOFFICAL = "https://testapi-gamesdk.d3games.com/"
  48 + //XIAOXINGXING_SDKURLOFFICAL = "https://api.gamesdk.hmjoy.cn/"
49 ) 49 )
50 50
51 const ( 51 const (
src/HttpServer/logic/datadef.go
@@ -327,6 +327,7 @@ type TixianDesc struct { @@ -327,6 +327,7 @@ type TixianDesc struct {
327 Headurl string `json:"headurl"` 327 Headurl string `json:"headurl"`
328 Editcoin int `json:"editcoin"` 328 Editcoin int `json:"editcoin"`
329 Ver string `json:"ver"` 329 Ver string `json:"ver"`
  330 + Checkcoin int `json:"checkcoin"`
330 } 331 }
331 332
332 type AddCoinDesc struct { 333 type AddCoinDesc struct {
src/HttpServer/logic/function.go
@@ -1001,7 +1001,7 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in @@ -1001,7 +1001,7 @@ func AddCoinToSdk(uuid int, goldnum int, gameid string, channel string, atype in
1001 return resp.Data.Mycoin, nil 1001 return resp.Data.Mycoin, nil
1002 } 1002 }
1003 1003
1004 -func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string) (int, error) { 1004 +func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, headurl, ver string, checkcoin int) (int, error) {
1005 if goldnum == 0 || uuid == 0 || gameid == "" || channel == "" || openid == "" || ver == "" { 1005 if goldnum == 0 || uuid == 0 || gameid == "" || channel == "" || openid == "" || ver == "" {
1006 logger.Error("GetCashFromSDK param empty") 1006 logger.Error("GetCashFromSDK param empty")
1007 return 0, errors.New("param empty") 1007 return 0, errors.New("param empty")
@@ -1020,6 +1020,7 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he @@ -1020,6 +1020,7 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he
1020 params.Typ = 6 1020 params.Typ = 6
1021 params.Ver = ver 1021 params.Ver = ver
1022 params.Editcoin = 1 1022 params.Editcoin = 1
  1023 + params.Checkcoin = checkcoin
1023 signtypestr := "sign_type=" + params.Sign_type 1024 signtypestr := "sign_type=" + params.Sign_type
1024 timestampstr := "time_stamp=" + strconv.Itoa(int(time.Now().Unix())) 1025 timestampstr := "time_stamp=" + strconv.Itoa(int(time.Now().Unix()))
1025 paramgameid := "gameid=" + gameid 1026 paramgameid := "gameid=" + gameid
@@ -1031,6 +1032,7 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he @@ -1031,6 +1032,7 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he
1031 pmoney := "money=" + strconv.Itoa(goldnum) 1032 pmoney := "money=" + strconv.Itoa(goldnum)
1032 ptype := "typ=" + "6" //微信 1033 ptype := "typ=" + "6" //微信
1033 ped := "editcoin=1" 1034 ped := "editcoin=1"
  1035 + pcheco := "checkcoin=" + strconv.Itoa(checkcoin)
1034 //pver := "ver=" + params.Ver 1036 //pver := "ver=" + params.Ver
1035 paramlist = append(paramlist, signtypestr) 1037 paramlist = append(paramlist, signtypestr)
1036 paramlist = append(paramlist, timestampstr) 1038 paramlist = append(paramlist, timestampstr)
@@ -1047,6 +1049,7 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he @@ -1047,6 +1049,7 @@ func GetCashFromSDK(uuid int, goldnum int, gameid, channel, openid, nickname, he
1047 paramlist = append(paramlist, pmoney) 1049 paramlist = append(paramlist, pmoney)
1048 paramlist = append(paramlist, ptype) 1050 paramlist = append(paramlist, ptype)
1049 paramlist = append(paramlist, ped) 1051 paramlist = append(paramlist, ped)
  1052 + paramlist = append(paramlist, pcheco)
1050 //paramlist = append(paramlist, pver) 1053 //paramlist = append(paramlist, pver)
1051 1054
1052 sumparam := GettotalParam(paramlist) 1055 sumparam := GettotalParam(paramlist)
src/HttpServer/logic/logic.go
@@ -166,7 +166,12 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) { @@ -166,7 +166,12 @@ func HandlerGetcash(w http.ResponseWriter, data string, uuid int) {
166 } 166 }
167 } 167 }
168 168
169 - gold, err := GetCashFromSDK(uuid, drawnum, rdata.Gameid, rdata.Channel, rdata.Openid, rdata.Nickname, rdata.Headurl, rdata.Ver) 169 + checkcoin := 2
  170 + if drawnum <= 150 {
  171 + //1.5挡位以下不需要审核
  172 + checkcoin = 1
  173 + }
  174 + gold, err := GetCashFromSDK(uuid, drawnum, rdata.Gameid, rdata.Channel, rdata.Openid, rdata.Nickname, rdata.Headurl, rdata.Ver, checkcoin)
170 if err != nil { 175 if err != nil {
171 logger.Error("GetCashFromSDK failed err=%v", err) 176 logger.Error("GetCashFromSDK failed err=%v", err)
172 resp.Message = "从后台提现失败了" 177 resp.Message = "从后台提现失败了"