order('id', 'desc')->select(); } /** * 检查类型 * */ public static function checkType($valueData){ $type = CouponRepository::getInstance()->getCouponTypeAll(); $type = array_column($type->toArray(), null, "id"); if (!isset($type[$valueData])) { return false; } return true; } }