|
@@ -363,7 +363,12 @@ module.exports = app => {
|
|
|
}
|
|
|
data.id = parseInt(id);
|
|
|
const operate = await this.db.update(this.tableName, data);
|
|
|
- return operate.affectedRows > 0;
|
|
|
+ const result = operate.affectedRows > 0;
|
|
|
+ if (result) {
|
|
|
+ // 存入session
|
|
|
+ this.ctx.session.sessionUser.name = data.name;
|
|
|
+ }
|
|
|
+ return result;
|
|
|
}
|
|
|
|
|
|
|