|
@@ -91,6 +91,7 @@ class AdminLogic extends BaseLogic
|
|
|
//删除运营账号
|
|
|
public static function delete(int $id = 0): Json
|
|
|
{
|
|
|
+ if ($id == self::$uid) throw new ValidateException('不能删除当前账号');
|
|
|
|
|
|
$rs = AdminModel::where(['id' => $id, 'is_del' => CommonModel::$del_normal])
|
|
|
->save([
|
|
@@ -105,6 +106,8 @@ class AdminLogic extends BaseLogic
|
|
|
//启禁用运营账号
|
|
|
public static function status(array $data = []): Json
|
|
|
{
|
|
|
+ if ($data['id'] == self::$uid) throw new ValidateException('不能对当前账号进行操作');
|
|
|
+
|
|
|
$data = array_merge($data, ['updatetime' => date('Y-m-d H:i:s')]);
|
|
|
|
|
|
$rs = AdminModel::where(['id' => $data['id'], 'is_del' => CommonModel::$del_normal])
|