$sql = "select order_id from orderlamps a where a.ifdelete = 0 '
union select order_id from orderlampszm b where b.ifdelete = 0 ";
$dbs = \Phalcon\DI::getDefault()->get('db');
$stmt = $dbs->prepare($sql);
$stmt->execute([]);
$oneResult = $stmt->fetchAll(\PDO::FETCH_ASSOC);
$dbs = \Phalcon\DI::getDefault()->get('db'); //前面定义的数据库di
$di->set('db', function () use ($config) {});