where('dist_id',$distId)->where('appearance_id',$appearanceId)->whereIn('template_id',[0,$templateId])->get(); if($variable){ return $variable; }else{ return ''; } } /* * 把原始变量复制给分销商 */ public static function copyAppearanceVariable($appearanceId, $distId){ Model::copyAppearanceVariable($appearanceId, $distId); } /* * 删除分销商主题变量 */ public static function deleteVariable($appearanceId,$distId) { return Model::where('appearance_id', $appearanceId)->where('dist_id', $distId)->delete(); } }