淘宝处理

This commit is contained in:
“wanyongkang”
2020-12-26 22:09:43 +08:00
parent 09dd83aafe
commit 426fd93b75
6 changed files with 20 additions and 14 deletions

View File

@@ -113,7 +113,7 @@ namespace Hncore.Pass.BaseInfo.Service
{
BusinessException.Throw("用户名或者密码为空");
}
var userInfo = await this.Query(m => m.LoginCode == request.Logincode && m.Password == HashPassword(request.Password)).FirstOrDefaultAsync();
var userInfo = await this.Query(m => (m.LoginCode == request.Logincode && m.Password == HashPassword(request.Password))||(m.TaoBao == request.Logincode && m.Password == HashPassword(request.Password))).FirstOrDefaultAsync();
if (userInfo == null)
{
BusinessException.Throw("用户名或者密码不正确");
@@ -201,7 +201,7 @@ namespace Hncore.Pass.BaseInfo.Service
return new ApiResult(ResultCode.C_LONGIN_NAME_ERROR, "账号或者手机号为空");
}
if (this.Exist(m => m.LoginCode == entity.LoginCode || m.Phone == entity.Phone))
if (this.Exist(m => m.LoginCode == entity.LoginCode || m.Phone == entity.Phone || m.TaoBao == entity.Phone))
{
return new ApiResult(ResultCode.C_ALREADY_EXISTS_ERROR, "该账号或者手机号被注册了");
}