|
|
@@ -1042,6 +1042,15 @@ class ShopController extends AdminBaseController
|
|
|
if(empty($info)){
|
|
|
$this->error('操作数据不存在!');
|
|
|
}
|
|
|
+
|
|
|
+ // 验证商家是否有设备
|
|
|
+ $checkDevice = Devices::where('status','in',[1,2])
|
|
|
+ ->where('shop_uid','in', $userIds)
|
|
|
+ ->count('id');
|
|
|
+ if($checkDevice){
|
|
|
+ $this->error('该商家存在设备请先删除打印设备!');
|
|
|
+ }
|
|
|
+
|
|
|
// $userIds = Db::name('shop')->where(['user_id' => ['in'=> $id]])->column('user_id');
|
|
|
Db::startTrans();
|
|
|
if (Db::name('shop')->where(['user_id' => ['in'=>$userIds]])->delete()) {
|