Commit 5dbe1ca8 by 蒋勇

d

parent 3c64dfae
......@@ -18,7 +18,7 @@ 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,isEnabled:true},
attributes: ['id','userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin','mail','opath','ptags'],
attributes: ['id','userName', 'nickName','headUrl','jwtkey','jwtsecret','created_at','isSuper','isAdmin','isAllocated','mail','opath','ptags'],
include: [
{ model: this.db.models.company,attributes:['id','name','companykey','appids'],raw:true},
{model:this.db.models.role,as:"Roles",attributes:["id","code"],}
......
......@@ -161,11 +161,11 @@ class Dao {
var aggsinfos = [];
if (qobj.aggsinfo) {
qobj.aggsinfo.sum.forEach(aggitem => {
var t1 = [this.db.fn('SUM', this.db.col(aggitem.field)), aggitem.field + "_" + "sum"];
var t1 = [this.db.fn('SUM', this.db.col(aggitem.field)), aggitem.field + "~" + "sum"];
aggsinfos.push(t1);
});
qobj.aggsinfo.avg.forEach(aggitem => {
var t2 = [this.db.fn('AVG', this.db.col(aggitem.field)), aggitem.field + "_" + "avg"];
var t2 = [this.db.fn('AVG', this.db.col(aggitem.field)), aggitem.field + "~" + "avg"];
aggsinfos.push(t2);
});
}
......
......@@ -30,6 +30,10 @@ module.exports = (db, DataTypes) => {
type:DataTypes.BOOLEAN,
defaultValue: false
},
isAllocated:{
type:DataTypes.BOOLEAN,
defaultValue: false
},
isSuper:{
type:DataTypes.BOOLEAN,
defaultValue: false
......@@ -47,6 +51,7 @@ module.exports = (db, DataTypes) => {
},
opath:DataTypes.STRING,//作业务时,需要在业务表冗余当前处理人的opath
ptags:DataTypes.STRING,//权限标签,逗号分隔,可以按照标签查看opath中含有标签的数据
skilltags: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