1, 'deleted' => 0, 'type' => $type]; $bases = $this->where($map)->order('sort desc,id desc')->column('code,name,content', 'code'); if (count($data) > 0) foreach ($data as &$vo) $vo[$bind] = $bases[$vo[$field]] ?? []; return $bases; } /** * 格式化创建时间 * @param string $value * @return string */ public function getCreateAtAttr(string $value): string { return format_datetime($value); } }