delete(); $data = []; foreach ($time as $k => $v) { $data[$k]['seckill_id'] = $id; $data[$k]['time_id'] = $v; } self::insertAll($data); } /** * 修改秒杀获取时间ID数组 * @param $id * @return array */ public static function getSeckillTime($id) { return self::where('seckill_id', $id)->column('time_id'); } /** * 获取时间段内秒杀活动ID数组 * @param $time_id * @return array */ public static function getSeckillId($time_id) { return self::where('time_id', $time_id)->column('seckill_id'); } }