liuyu hace 5 años
padre
commit
5f8da7c59a
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      app/service/lookuser.js

+ 3 - 0
app/service/lookuser.js

@@ -34,6 +34,9 @@ class LookuserService extends CrudService {
     if (!lookuser) {
       throw new BusinessError(ErrorCode.DATA_NOT_EXIST);
     }
+    if (switchrole === 'audience') {
+      lookuser.isonline = '0';
+    }
     lookuser.switchrole = switchrole;
     const res = await lookuser.save();
     if (res) {