Commit 192807ca by 王昆

gsb

parent 515715bf
...@@ -116,6 +116,9 @@ class AuthService extends ServiceBase { ...@@ -116,6 +116,9 @@ class AuthService extends ServiceBase {
for(var item of all) { for(var item of all) {
item.childs = pmap[item.id] || []; item.childs = pmap[item.id] || [];
} }
if(pmap.length == 0) {
return system.getResultSuccess({});
}
return system.getResultSuccess(pmap[0][0]); return system.getResultSuccess(pmap[0][0]);
} }
......
...@@ -176,7 +176,7 @@ class UserService extends ServiceBase { ...@@ -176,7 +176,7 @@ class UserService extends ServiceBase {
} }
if (user.uctype === 1) { if (user.uctype === 1) {
orgpath = isMain ? orgpath : orgpath + "/" + user.id; orgpath = (isMain ? orgpath : orgpath + "/" + user.id) + "/";
await self.dao.update({ await self.dao.update({
id: user.id, id: user.id,
orgpath: orgpath orgpath: orgpath
...@@ -209,7 +209,7 @@ class UserService extends ServiceBase { ...@@ -209,7 +209,7 @@ class UserService extends ServiceBase {
} }
if (Number(this.trim(user.uctype)) === 1) { if (Number(this.trim(user.uctype)) === 1) {
user.orgpath = isMain ? org.path : org.path + "/" + id; user.orgpath = (isMain ? org.path : org.path + "/" + id) + "/";
} }
var info = { var info = {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment