|
|
|
@ -10457,8 +10457,9 @@ namespace Myshipping.Application
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
|
|
|
|
|
#region 临时
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 测试生成用户拼音码
|
|
|
|
|
/// 临时
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
@ -10474,6 +10475,27 @@ namespace Myshipping.Application
|
|
|
|
|
usr.UserCode = PinyinHelper.GetPinyinInitials(usr.Name);
|
|
|
|
|
await _repUser.AsUpdateable(usr).UpdateColumns(x => new { x.UserCode }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
|
/// 临时
|
|
|
|
|
/// </summary>
|
|
|
|
|
/// <param name="id"></param>
|
|
|
|
|
/// <returns></returns>
|
|
|
|
|
[HttpGet("/BookingOrder/TestGenUserCodeTenant")]
|
|
|
|
|
public async Task TestGenUserCodeTenant(long id)
|
|
|
|
|
{
|
|
|
|
|
var users = await _repUser.AsQueryable().Where(u => u.TenantId == id && !string.IsNullOrEmpty(u.Name)).ToListAsync();
|
|
|
|
|
foreach (var user in users)
|
|
|
|
|
{
|
|
|
|
|
if (string.IsNullOrEmpty(user.UserCode))
|
|
|
|
|
{
|
|
|
|
|
user.UserCode = PinyinHelper.GetPinyinInitials(user.Name);
|
|
|
|
|
await _repUser.AsUpdateable(user).UpdateColumns(x => new { x.UserCode }).ExecuteCommandAsync();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
#endregion
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|