$mainId], null, 'festId', 'festId'); // if (empty($festRise)) { // return []; // } // $festId = array_keys($festRise); // $fest = FestClass::getByIds($festId); // $today = date("Y-n-j"); // $arr = []; // foreach ($fest as $single) { // $current = date("Y") . '-' . $single['month'] . '-' . $single['day']; // $past = date("Y-n-j", (strtotime($current) - 86400)); // $arr = array_merge($arr, [$current, $past]); // } // if (in_array($today, $arr) == false) { // return []; // } $set = self::getByCondition(['mainId' => $mainId]); if (empty($set)) { util::fail('没有找到涨价需求'); } if ($set['riseSwitch'] == 0) { return []; } $riseType = $set['riseType']; $riseAmount = $set['riseAmount']; return ['riseType' => $riseType, 'riseAmount' => $riseAmount]; } }