'ID', 'mall_id' => '商城ID', 'counts' => '导入数量', 'success_counts' => '导入成功数量', 'fail_counts' => '导入失败数量', 'status' => '状态:1:导入成功;2导入失败;3:导入中;4:导入中断', 'updated_at' => 'Updated At', 'created_at' => 'Created At', ]; } /** * 保存数据 * @param array $params * @return bool|object */ public static function setData(array $params) { try { $model = new self(); $model->loadDefaultValues(); empty($fail_counts) ? $param['status'] = 1 : $param['status'] = 2; if (!$model->load($params, '') || !$model->save()) throw new Exception($model->getErrorMessage()); return $model; } catch (Exception $e) { self::$static_error = $e->getMessage(); return false; } } }