'ID', 'mall_id' => 'Mall ID', 'short_video_commission_item_setting_id' => 'Short Video Commission Item Setting ID', 'calculate_type' => 'Calculate Type', 'value' => 'Value', 'status' => 'Status', 'created_at' => 'Created At', 'updated_at' => 'Updated At', ]; } public static function setData($data) { $model = self::findOne(['mall_id' => $data['mall_id'], 'short_video_commission_item_setting_id' => $data['short_video_commission_item_setting_id']]); if (empty($model)) { $model = new self(); } if(!$model->load($data,'') || !$model->save()){ throw new \Exception($model->getErrorMessage()); } return true; } }