where('del_time', '=', 0); else return $query->where($name, '=', 0); } const type_zero = 0; const type_one = 1; const type_two = 2; const type_three = 3; public static $type = [ self::type_zero => "无", self::type_one => "全检", self::type_two => "抽检", self::type_three => "过程检验", ]; }