optimize
wanghaomei 12 months ago
parent d4c2e5265a
commit da53139915

@ -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
}
}

@ -340,7 +340,7 @@ namespace Myshipping.Application
}
[NonAction]
[SqlSugarUnitOfWork]
//[SqlSugarUnitOfWork]
public async Task ExecuteYGT(string rtn)
{
JObject jobjRtn = JObject.Parse(rtn);

Loading…
Cancel
Save