Commit 7381eed6 by 蒋勇

d

parent 8d52fe62
...@@ -19,8 +19,7 @@ class UserCache extends CacheBase{ ...@@ -19,8 +19,7 @@ class UserCache extends CacheBase{
const configValue = await this.userDao.model.findOne({ const configValue = await this.userDao.model.findOne({
where: { userName: inputkey, app_id: settings.pmappid }, where: { userName: inputkey, app_id: settings.pmappid },
attributes: ['userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin'], attributes: ['userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin'],
include: [{ model: this.db.models.company, raw: true, attributes: ["companykey"] }], include: [{ model: this.db.models.company,raw:true}],
raw:true
}); });
if (configValue) { if (configValue) {
......
...@@ -11,6 +11,22 @@ module.exports = (db, DataTypes) => { ...@@ -11,6 +11,22 @@ module.exports = (db, DataTypes) => {
type: DataTypes.STRING, type: DataTypes.STRING,
allowNull: false, allowNull: false,
},//和user的from },//和user的from
address: {
type: DataTypes.STRING,
allowNull: true,
},//和user的from
mail: {
type: DataTypes.STRING,
allowNull: true,
},//和user的from
phone: {
type: DataTypes.STRING,
allowNull: true,
},
licenseUrl: {
type: DataTypes.STRING,
allowNull: true,
},
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
...@@ -62,12 +62,12 @@ class System { ...@@ -62,12 +62,12 @@ class System {
}) })
return promise; return promise;
} }
static async postJsonTypeReq(url,data){ static async postJsonTypeReq(url,data,md="POST"){
let rtn={} let rtn={}
let promise=new Promise(function(resv,rej){ let promise=new Promise(function(resv,rej){
request({ request({
url: url, url: url,
method: "POST", method: md,
json: true, json: true,
headers: { headers: {
"content-type": "application/json", "content-type": "application/json",
......
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