|
@ -226,6 +226,7 @@ async function creatUser (ctx, next) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await models.User.create({ |
|
|
await models.User.create({ |
|
|
|
|
|
role: data.role, |
|
|
name: data.name, |
|
|
name: data.name, |
|
|
username: data.phone, |
|
|
username: data.phone, |
|
|
password: Hex.stringify(MD5(data.password)), |
|
|
password: Hex.stringify(MD5(data.password)), |
|
@ -268,6 +269,7 @@ async function updateUser (ctx, next) { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
await models.User.update({ |
|
|
await models.User.update({ |
|
|
|
|
|
role: data.role, |
|
|
name: data.name, |
|
|
name: data.name, |
|
|
username: data.phone, |
|
|
username: data.phone, |
|
|
departmentId: data.departmentId, |
|
|
departmentId: data.departmentId, |
|
|