where($where)->select()->toArray(); } /** * 通过地区代码获取地区名 * @param type $code * @param type $isfull * @return type */ public static function getNameByCode($code, $isfull = false) { $where = []; $where[] = ["code", "=", $code]; $field = $isfull ? "fullName" : "name"; return Db::table("un_common_location")->where($where)->find()[$field]; } }