国通支付查询1级mcc
This commit is contained in:
parent
0a7b7c5caf
commit
9acb696c73
@ -76,6 +76,24 @@ MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAwRUsPpbQPhBWrxFhG00k9VBgnHc7dCZyTQYI
|
||||
$u = $url."?".$b;
|
||||
$result = $this->curl_get($u);
|
||||
|
||||
foreach($result as $key=>$value){
|
||||
$data['mccName'] = $value['mccName'];
|
||||
$data['update_time'] = date("Y-m-d H:i:s");
|
||||
$mcc = Db::name("gt_mcc")
|
||||
->where("parent_id",0)
|
||||
->where("state",1)
|
||||
->where("busMccId",$value['busMccId'])
|
||||
->find();
|
||||
if($mcc == null){
|
||||
$data['busMccId'] = $value['busMccId'];
|
||||
$data['dtime'] = date("Y-m-d H:i:s");
|
||||
Db::name("gt_mcc")->save($data);
|
||||
}else{
|
||||
if($mcc['mccName'] != $value['mccName'] ){
|
||||
Db::name("gt_mcc")->where("mcc_id",$mcc['mcc_id'])->update($data);
|
||||
}
|
||||
}
|
||||
}
|
||||
print("<pre>");
|
||||
var_dump($result);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user