Commit 14e9dab2 by 蒋勇

d

parent 5c0dac29
...@@ -18,9 +18,9 @@ class UserCache extends CacheBase{ ...@@ -18,9 +18,9 @@ class UserCache extends CacheBase{
async buildCacheVal(cachekey,inputkey, val, ex, ...items) { async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
const configValue = await this.userDao.model.findAll({ const configValue = await this.userDao.model.findAll({
where: { userName: inputkey, app_id: settings.pmappid }, where: { userName: inputkey, app_id: settings.pmappid },
attributes: ['id','userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin','mail'], attributes: ['id','userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin','mail','opath','ptags'],
include: [ include: [
{ model: this.db.models.company,raw:true}, { model: this.db.models.company,attributes:['id','name','companykey','appids'],raw:true},
{model:this.db.models.role,as:"Roles",attributes:["id","code"],} {model:this.db.models.role,as:"Roles",attributes:["id","code"],}
], ],
}); });
......
...@@ -84,9 +84,14 @@ class Dao { ...@@ -84,9 +84,14 @@ class Dao {
extraWhere(obj, where) { extraWhere(obj, where) {
return where; return where;
} }
orderBy() { orderBy(qobj) {
//return {"key":"include","value":{model:this.db.models.app}}; //return {"key":"include","value":{model:this.db.models.app}};
if(!qobj.orderInfo || qobj.orderInfo.length==0){
return [["created_at", "DESC"]]; return [["created_at", "DESC"]];
}else{
return qobj.orderInfo;
}
} }
buildQuery(qobj) { buildQuery(qobj) {
var linkAttrs = []; var linkAttrs = [];
......
...@@ -28,6 +28,7 @@ module.exports = (db, DataTypes) => { ...@@ -28,6 +28,7 @@ module.exports = (db, DataTypes) => {
allowNull: true, allowNull: true,
}, },
orgJson: DataTypes.TEXT,//功能清 orgJson: DataTypes.TEXT,//功能清
appids:DataTypes.STRING,
}, { }, {
paranoid: true,//假的删除 paranoid: true,//假的删除
underscored: true, underscored: true,
......
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