@@ -100,7 +100,7 @@ def SuccessOrderByLiveOpenID(live_open_id, order_type, gold, money, expr, platfo
100
100
'nonce_str' : nonce ,
101
101
'app_id' : config ().app_key ,
102
102
'uid' : live_open_id ,
103
- 'request_id' : genUniqueIDString (),
103
+ 'request_id' : genUniqueIDString (config (). app_key ),
104
104
'type' : str (order_type ),
105
105
'value' : str (gold ),
106
106
'money' : str (money ),
@@ -153,13 +153,13 @@ def SuccessOrderByLiveOpenID(live_open_id, order_type, gold, money, expr, platfo
153
153
154
154
@staticmethod
155
155
def ChangeGoldByLiveOpenID (live_open_id , order_type , gold , expr , optional_reason = '' ):
156
-
156
+ print ( genUniqueIDString ( config (). app_key ))
157
157
nonce = genRandomString ()
158
158
params = {
159
159
'nonce_str' : nonce ,
160
160
'app_id' : config ().app_key ,
161
161
'uid' : live_open_id ,
162
- 'request_id' : genUniqueIDString (),
162
+ 'request_id' : genUniqueIDString (config (). app_key ),
163
163
'type' : str (order_type ),
164
164
'value' : str (gold ),
165
165
}
@@ -278,8 +278,11 @@ def GetGoldByLiveOpenID(self, live_open_id):
278
278
return super (LvLIVE , self ).GetGoldByLiveOpenID (live_open_id )
279
279
280
280
281
- def genUniqueIDString ():
282
- return '' .join (random .sample ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' , 32 ))
281
+ def genUniqueIDString (app_key ):
282
+ return '{}-{}' .format (
283
+ app_key [2 :],
284
+ '' .join (random .sample ('abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890' , 9 )),
285
+ )
283
286
284
287
285
288
def genRandomString ():
0 commit comments