File tree 3 files changed +2
-7
lines changed
Infrastructure/Infrastructure/Web
Repository/Repository/AdminRepository
ViewModels/ViewModels/Admin
3 files changed +2
-7
lines changed Original file line number Diff line number Diff line change @@ -118,11 +118,6 @@ private static string GetIP()
118
118
result = HttpContext . Current . Connection . RemoteIpAddress . ToString ( ) ;
119
119
}
120
120
121
- if ( string . IsNullOrEmpty ( result ) || ! Regex . IsMatch ( result , @"^((2[0-4]\d|25[0-5]|[01]?\d\d?)\.){3}(2[0-4]\d|25[0-5]|[01]?\d\d?)$" ) )
122
- {
123
- return "127.0.0.1" ;
124
- }
125
-
126
121
return result ;
127
122
}
128
123
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ from role in this.Entitys.SystemRole.Where(r => r.Tid.Equals(u.RoleTid)).Default
189
189
/// <returns></returns>
190
190
public async Task < Tuple < bool , string > > UserAddRole ( UserAddRoleVm info )
191
191
{
192
- if ( info == null || info . RoleTid < 1 || ! string . IsNullOrEmpty ( info . UserTid ) )
192
+ if ( info == null || info . RoleTid < 1 || info . UserTid < 1 )
193
193
{
194
194
return new Tuple < bool , string > ( false , Tip . BadRequest ) ;
195
195
}
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ public class UserAddRoleVm
26
26
/// <summary>
27
27
/// 用户Tid
28
28
/// </summary>
29
- public string UserTid { get ; set ; }
29
+ public long UserTid { get ; set ; }
30
30
31
31
/// <summary>
32
32
/// 角色Tid
You can’t perform that action at this time.
0 commit comments