Commit c1675293 by 蒋勇

d

parent f8e82d94
......@@ -242,6 +242,19 @@ class UserService extends ServiceBase {
async findCUser(uname) {
}
//修改
async update(qobj, tm = null) {
var self=this;
return this.db.transaction(async function (t) {
let up=await self.dao.update(qobj, t);
let roles = await self.db.models.role.findAll({ where: { id: { [this.db.Op.in]: qobj.roles } } });
if(roles && roles.length>0){
await up.setRoles(roles, { transaction: t });
}
return up;
});
}
}
module.exports = UserService;
......
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