Commit 14e9dab2 by 蒋勇

d

parent 5c0dac29
......@@ -18,9 +18,9 @@ class UserCache extends CacheBase{
async buildCacheVal(cachekey,inputkey, val, ex, ...items) {
const configValue = await this.userDao.model.findAll({
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: [
{ 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"],}
],
});
......
......@@ -84,9 +84,14 @@ class Dao {
extraWhere(obj, where) {
return where;
}
orderBy() {
orderBy(qobj) {
//return {"key":"include","value":{model:this.db.models.app}};
return [["created_at", "DESC"]];
if(!qobj.orderInfo || qobj.orderInfo.length==0){
return [["created_at", "DESC"]];
}else{
return qobj.orderInfo;
}
}
buildQuery(qobj) {
var linkAttrs = [];
......
......@@ -28,6 +28,7 @@ module.exports = (db, DataTypes) => {
allowNull: true,
},
orgJson: DataTypes.TEXT,//功能清
appids:DataTypes.STRING,
}, {
paranoid: 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