|
|
@@ -55,7 +55,7 @@ class Index extends Api
|
|
|
];
|
|
|
|
|
|
//查询记录是否存在
|
|
|
- $bool = db()->table('gather_txt_gc')->where('remak',$res['remak'])->find();
|
|
|
+ $bool = db()->name('gather_txt_gc')->where('remak',$res['remak'])->find();
|
|
|
if($bool){
|
|
|
return '已存在';
|
|
|
}
|
|
|
@@ -63,7 +63,7 @@ class Index extends Api
|
|
|
db()->startTrans();
|
|
|
try {
|
|
|
//连接数据库, 将数据插入主表vocs_gather_txt_gc取得pid
|
|
|
- $pid = db()->table('gather_txt_gc')->insertGetId($res);
|
|
|
+ $pid = db()->name('gather_txt_gc')->insertGetId($res);
|
|
|
|
|
|
$row = [];
|
|
|
$j = 0;
|
|
|
@@ -94,7 +94,7 @@ class Index extends Api
|
|
|
}
|
|
|
|
|
|
//将检测数据插入子表vocs_gather_txt_check_gc
|
|
|
- db()->table('gather_txt_check_gc')->insertAll($row);
|
|
|
+ db()->name('gather_txt_check_gc')->insertAll($row);
|
|
|
|
|
|
//提交事务
|
|
|
db()->commit();
|
|
|
@@ -134,7 +134,7 @@ class Index extends Api
|
|
|
];
|
|
|
|
|
|
//查询记录是否存在
|
|
|
- $bool = db()->table('gather_txt_gcms')->where('gather_time',$res['gather_time'])->find();
|
|
|
+ $bool = db()->name('gather_txt_gcms')->where('gather_time',$res['gather_time'])->find();
|
|
|
if($bool){
|
|
|
return '已存在';
|
|
|
}
|
|
|
@@ -142,7 +142,7 @@ class Index extends Api
|
|
|
db()->startTrans();
|
|
|
try {
|
|
|
//连接数据库, 将数据插入主表vocs_gather_txt_gc取得pid
|
|
|
- $pid = db()->table('gather_txt_gcms')->insertGetId($res);
|
|
|
+ $pid = db()->name('gather_txt_gcms')->insertGetId($res);
|
|
|
|
|
|
$row = [];
|
|
|
$j = 0;
|
|
|
@@ -173,7 +173,7 @@ class Index extends Api
|
|
|
$j++;
|
|
|
}
|
|
|
//将检测数据插入子表vocs_gather_txt_check_gc
|
|
|
- $id = db()->table('gather_txt_check_gcms')->insertAll($row);
|
|
|
+ $id = db()->name('gather_txt_check_gcms')->insertAll($row);
|
|
|
//提交事务
|
|
|
db()->commit();
|
|
|
|