Commit 7535ff74 by 蒋勇

d

parent 354f88c9
var system = require("../../../system")
const CtlBase = require("../../ctl.base");
class AttachmentCtl extends CtlBase {
constructor() {
super("common",CtlBase.getServiceName(AttachmentCtl));
}
}
module.exports = AttachmentCtl;
module.exports = (db, DataTypes) => {
return db.define("attachment", {
name: DataTypes.STRING,
urlstr:DataTypes.STRING,
description: DataTypes.STRING,
},{
paranoid: true,//假的删除
underscored: true,
version: true,
freezeTableName: true,
//freezeTableName: true,
// define the table's name
tableName: 'p_attachments',
validate: {
}
});
}
...@@ -70,6 +70,9 @@ class UserService extends ServiceBase { ...@@ -70,6 +70,9 @@ class UserService extends ServiceBase {
if (!p.nickName) { if (!p.nickName) {
p.nickName = p.userName; p.nickName = p.userName;
} }
//检查是否已经存在同名账号
return this.db.transaction(async function (t) { return this.db.transaction(async function (t) {
//对于租户类型注册,创建一个默认公司,公司名称xxxx的公司 //对于租户类型注册,创建一个默认公司,公司名称xxxx的公司
//如果非租户类型,需要按照传递进来的公司companykey,来查询公司,按照companykey缓存到redis //如果非租户类型,需要按照传递进来的公司companykey,来查询公司,按照companykey缓存到redis
......
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