where(['id' => $id])->find(); if (!empty($detail)) { $detail['create_time'] = date('Y-m-d H:i:s', $detail['create_time']); $detail['customer'] = Db::name('Customer')->where(['id' => $detail['cid']])->value('name'); } return $detail; } }