request->get('id'); $shopAdmin = ShopAdminClass::getAdminInfo($id); if (empty($shopAdmin)) { util::fail('没有找到员工'); } if (getenv('YII_ENV', 'local') == 'production') { util::fail('生产环境不能执行删除操作'); } $adminId = $shopAdmin['adminId'] ?? 0; $sjId = $shopAdmin['merchantId'] ?? 0; SjClass::deleteById($sjId); ApplyClass::deleteByCondition(['sjId' => $sjId]); AdminClass::deleteById($adminId); ShopAdminClass::deleteById($id); util::complete(); } }