Commit 15ba7beb by 蒋勇

d

parent c97dba72
...@@ -99,7 +99,7 @@ class CtlBase { ...@@ -99,7 +99,7 @@ class CtlBase {
} catch (e) { } catch (e) {
this.logClient.log(pobj, req, null, e.stack) this.logClient.log(pobj, req, null, e.stack)
console.log(e.stack, "出现异常,请联系管理员......."); console.log(e.stack, "出现异常,请联系管理员.......");
return system.getResultFail(-200, "出现异常,请联系管理员"); return system.getResultFail(-200, e.message?e.message:"出现异常,请联系管理员");
} }
} }
} }
......
...@@ -71,7 +71,10 @@ class UserService extends ServiceBase { ...@@ -71,7 +71,10 @@ class UserService extends ServiceBase {
p.nickName = p.userName; p.nickName = p.userName;
} }
//检查是否已经存在同名账号 //检查是否已经存在同名账号
let existOne=await this.dao.model.findOne({where:{userName:p.userName}})
if(existOne){
throw new Error("平台中已存在相同的账号.");
}
return this.db.transaction(async function (t) { return this.db.transaction(async function (t) {
//对于租户类型注册,创建一个默认公司,公司名称xxxx的公司 //对于租户类型注册,创建一个默认公司,公司名称xxxx的公司
......
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