Commit 7381eed6 by 蒋勇

d

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