//修改
This commit is contained in:
parent
781e6f2743
commit
7a6d9a3e03
@ -69,6 +69,7 @@ class CardService extends Service
|
||||
//开始查询时间
|
||||
$time = time();
|
||||
|
||||
print_r("停止使用!等待下次一同步数据任务!");exit;
|
||||
|
||||
//每次查询多少数量
|
||||
$limit = 100000;
|
||||
@ -145,7 +146,7 @@ print_r($count);exit;
|
||||
|
||||
//开始查询时间
|
||||
$time = time();
|
||||
|
||||
print_r("停止使用!等待下次一同步数据任务!");exit;
|
||||
|
||||
//每次查询多少数量
|
||||
$limit = 100000;
|
||||
@ -158,7 +159,7 @@ print_r($count);exit;
|
||||
$iCount = ceil($count/$limit);
|
||||
//$iCount = 62;
|
||||
$b = 0;
|
||||
for ($i = 0;$i<$iCount;$i++){
|
||||
for ($i = 48;$i<$iCount;$i++){
|
||||
//从第几天开始查询
|
||||
$page = $i*$limit;
|
||||
//分批次查询数量
|
||||
@ -206,19 +207,19 @@ print_r($count);exit;
|
||||
];
|
||||
|
||||
|
||||
//DB::connection('pgsql')->table('virtual_not_vd_card')->insert($values);
|
||||
DB::connection('pgsql')->table('virtual_not_vd_card')->insert($values);
|
||||
//判断virtual_not_vd_card中是否存在
|
||||
//不存在 则添加 存在则修改
|
||||
$not_vd_card_sql = 'SELECT * FROM virtual_not_vd_card where "cNo" ='."'$cNo'".' limit 1';
|
||||
$not_vd_card_res = DB::select($not_vd_card_sql);
|
||||
|
||||
if ($not_vd_card_res != null){
|
||||
//不为空,修改
|
||||
DB::connection('pgsql')->table('virtual_not_vd_card')->where("cNo",$value['cNo'])->update($values);
|
||||
}else{
|
||||
//为空,新增
|
||||
DB::connection('pgsql')->table('virtual_not_vd_card')->insert($values);
|
||||
}
|
||||
// $not_vd_card_sql = 'SELECT * FROM virtual_not_vd_card where "cNo" ='."'$cNo'".' limit 1';
|
||||
// $not_vd_card_res = DB::select($not_vd_card_sql);
|
||||
//
|
||||
// if ($not_vd_card_res != null){
|
||||
// //不为空,修改
|
||||
// DB::connection('pgsql')->table('virtual_not_vd_card')->where("cNo",$value['cNo'])->update($values);
|
||||
// }else{
|
||||
// //为空,新增
|
||||
// DB::connection('pgsql')->table('virtual_not_vd_card')->insert($values);
|
||||
// }
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user