超级签新增支付方式
parent
08a97a2f9f
commit
1ccbd03a0f
@ -0,0 +1,42 @@
|
||||
<?php
|
||||
namespace Admin\Controller;
|
||||
|
||||
/**
|
||||
* 新功能之后还未来的急跑的脚本初始化数据
|
||||
* @author chenzhi
|
||||
*/
|
||||
class OldCountController extends \Think\Controller
|
||||
{
|
||||
//超级签订单新增识别微信或者支付宝2019-12-11
|
||||
public function gameSupersignPaywayInit()
|
||||
{
|
||||
$map = array(
|
||||
"pay_status"=>1,
|
||||
"pay_way"=>0
|
||||
);
|
||||
$GameSupersign = M("GameSupersign","tab_");
|
||||
$dbres = $GameSupersign->field("id,trade_id")->where($map)->select();
|
||||
$countdb = count($dbres);
|
||||
if($countdb < 1){
|
||||
die("No initialization required");
|
||||
}
|
||||
foreach ($dbres as $key => $value) {
|
||||
$savedata = array(
|
||||
"id"=>$value['id']
|
||||
);
|
||||
$tmp = (int)substr($value['trade_id'],0,4);
|
||||
if($tmp > 3000){
|
||||
$savedata['pay_way'] = 2; //微信
|
||||
}else{
|
||||
$savedata['pay_way'] = 1;//支付宝
|
||||
}
|
||||
$tres = $GameSupersign->save($savedata);
|
||||
if($tres === false){
|
||||
die("DB ERROR");
|
||||
}
|
||||
}
|
||||
die("init ok");
|
||||
}
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue