|
|
|
@ -82,7 +82,7 @@ class Create extends Controller |
|
|
|
# 判断数据是否发生变化, 发生变化及更新 |
|
|
|
$queryUpdate = $dm->find('bt_passenger_flow',$insert_arr); |
|
|
|
if (!$queryUpdate) { |
|
|
|
$dm->update('bt_passenger_flow',$queryUpdate,['id' => $query['id']]); |
|
|
|
$dm->update('bt_passenger_flow',$insert_arr,['id' => $query['id']]); |
|
|
|
} |
|
|
|
} else { |
|
|
|
$dm->insert('bt_passenger_flow',$insert_arr); |
|
|
|
@ -128,8 +128,9 @@ class Create extends Controller |
|
|
|
if ($query) { |
|
|
|
|
|
|
|
$updateQuery = $dm->find('bt_passenger_flow_all',$insert_arr); |
|
|
|
if (!$updateQuery) $dm->update('bt_passenger_flow_all',$insert_arr,['id' => $query['id']]); |
|
|
|
|
|
|
|
if (!$updateQuery) { |
|
|
|
$dm->update('bt_passenger_flow_all',$insert_arr,['id' => $query['id']]); |
|
|
|
} |
|
|
|
} else { |
|
|
|
|
|
|
|
$dm->insert('bt_passenger_flow_all',$insert_arr); |
|
|
|
|