Skip to content

Commit 45f193e

Browse files
committed
代码修复 userTid的类型错误和去掉webUtil获取Ip4的正则判断
1 parent e84846e commit 45f193e

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

ant.mgr/Infrastructure/Infrastructure/Web/WebUtils.cs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -118,11 +118,6 @@ private static string GetIP()
118118
result = HttpContext.Current.Connection.RemoteIpAddress.ToString();
119119
}
120120

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-
126121
return result;
127122
}
128123

ant.mgr/Repository/Repository/AdminRepository/AccountRespository.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ from role in this.Entitys.SystemRole.Where(r => r.Tid.Equals(u.RoleTid)).Default
189189
/// <returns></returns>
190190
public async Task<Tuple<bool, string>> UserAddRole(UserAddRoleVm info)
191191
{
192-
if (info == null || info.RoleTid < 1 || !string.IsNullOrEmpty(info.UserTid))
192+
if (info == null || info.RoleTid < 1 || info.UserTid<1)
193193
{
194194
return new Tuple<bool, string>(false, Tip.BadRequest);
195195
}

ant.mgr/ViewModels/ViewModels/Admin/AccountVm.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public class UserAddRoleVm
2626
/// <summary>
2727
/// 用户Tid
2828
/// </summary>
29-
public string UserTid { get; set; }
29+
public long UserTid { get; set; }
3030

3131
/// <summary>
3232
/// 角色Tid

0 commit comments

Comments
 (0)