|
@@ -8,7 +8,7 @@ class DistributionSelfDefineConfig extends Model
|
|
|
{
|
|
|
protected $tables = 'distribution_self_define_configs';
|
|
|
|
|
|
- protected $fillable = ['distribution_channel_id','company_id','desc','status','type','created_at','updated_at'];
|
|
|
+ protected $fillable = ['distribution_channel_id','company_id','account','content','desc','status','type','created_at','updated_at'];
|
|
|
|
|
|
|
|
|
static function getDistributionSelfDefineConfig($distribution_channel_id,$type)
|
|
@@ -20,6 +20,10 @@ class DistributionSelfDefineConfig extends Model
|
|
|
{
|
|
|
return self::where(['company_id'=>$company_id,'type'=>$type,'status'=>1])->first();
|
|
|
}
|
|
|
+
|
|
|
+ static function getDistributionChannelSwitchByCategoryAndAccount($account,$type){
|
|
|
+ return self::where(['account'=>$account,'type'=>$type,'status'=>1])->first();
|
|
|
+ }
|
|
|
|
|
|
static function getDistributionsByType($type)
|
|
|
{
|