/** * 添加计划修改日志 * * @param array $data * @return int */ public static function addPlanLog($data) { try { $oLog = Model_Log_EffectPlanLog::data_access(); foreach ($data as $field => $value) { $oLog->set_field($field, $value); } $oLog->force_master()->insert(); return $oLog->connection->lastInsertId(); } catch (Exception $e) { return 0; } }
public static function addPlanLog($type, $planId, $propIds, $option, $userId, $oldStatus, $newStatus, $mid) { $data = array('type' => $type, 'plan_id' => $planId, 'proids' => $propIds, 'option' => $option, 'user_id' => $userId, 'status_old' => $oldStatus, 'status_new' => $newStatus, 'mid' => $mid, 'create_day' => date('Ymd'), 'created' => time()); return Model_Log_EffectPlanLog::addPlanLog($data); }