diff --git a/ZR.Admin.WebApi/Controllers/System/SysUserController.cs b/ZR.Admin.WebApi/Controllers/System/SysUserController.cs
index 78b8c81..5a7bde3 100644
--- a/ZR.Admin.WebApi/Controllers/System/SysUserController.cs
+++ b/ZR.Admin.WebApi/Controllers/System/SysUserController.cs
@@ -93,9 +93,10 @@ namespace ZR.Admin.WebApi.Controllers.System
}
user.Create_by = HttpContext.GetName();
+ user.Create_time = DateTime.Now;
user.Password = NETCore.Encrypt.EncryptProvider.Md5(user.Password);
- return ToResponse(UserService.InsertUser(user));
+ return SUCCESS(UserService.InsertUser(user));
}
///
diff --git a/ZR.Service/System/IService/ISysUserService.cs b/ZR.Service/System/IService/ISysUserService.cs
index eb463fb..75feef1 100644
--- a/ZR.Service/System/IService/ISysUserService.cs
+++ b/ZR.Service/System/IService/ISysUserService.cs
@@ -28,7 +28,7 @@ namespace ZR.Service.System.IService
///
///
///
- public long InsertUser(SysUser sysUser);
+ public SysUser InsertUser(SysUser sysUser);
///
/// 修改用户信息
diff --git a/ZR.Service/System/SysUserService.cs b/ZR.Service/System/SysUserService.cs
index ff31d26..940bef8 100644
--- a/ZR.Service/System/SysUserService.cs
+++ b/ZR.Service/System/SysUserService.cs
@@ -105,16 +105,14 @@ namespace ZR.Service
///
///
///
- public long InsertUser(SysUser sysUser)
+ public SysUser InsertUser(SysUser sysUser)
{
- sysUser.Create_time = DateTime.Now;
- long userId = Insertable(sysUser).ExecuteReturnIdentity();
- sysUser.UserId = userId;
+ sysUser.UserId = Insertable(sysUser).ExecuteReturnIdentity();
//新增用户角色信息
UserRoleService.InsertUserRole(sysUser);
//新增用户岗位信息
UserPostService.InsertUserPost(sysUser);
- return userId;
+ return sysUser;
}
///