__('Status 1'), '2' => __('Status 2')]; } public function getStatusTextAttr($value, $data) { $value = $value ? $value : (isset($data['status']) ? $data['status'] : ''); $list = $this->getStatusList(); return isset($list[$value]) ? $list[$value] : ''; } public function manystore() { return $this->belongsTo('app\admin\model\Manystore', 'store_id', 'id', [], 'LEFT')->setEagerlyType(0); } public function shop() { return $this->belongsTo(ManystoreShop::class, 'shop_id', 'id', [], 'LEFT')->setEagerlyType(0); } public static function checkBind($user_id,$check=false){ //判断是否对接了lakala进件 if(config("site.activity_price_lakala_switch") || $check){ if(config("site.activity_pay_process") == "lakala" || $check){ $lakalaBusiness = self::where("user_id",$user_id)->find(); if(!$lakalaBusiness){ throw new \Exception("当前商户未完成拉卡拉进件以及平台绑定!"); } } } } }