This commit is contained in:
parent
2e72ae84e1
commit
fbb1ae5fd0
|
|
@ -171,18 +171,21 @@ namespace ZR.Service.Liveforum
|
|||
certification.Status = parm.Status;
|
||||
certification.ReviewerId = reviewerId;
|
||||
certification.ReviewedAt = DateTime.Now;
|
||||
int certifiedType = 0;
|
||||
if (parm.Status == 2)
|
||||
{
|
||||
certification.RejectReason = parm.RejectReason;
|
||||
}
|
||||
// 将认证类型字符串转换为整数
|
||||
if (!int.TryParse(parm.CertificationType, out int certifiedType))
|
||||
else if (parm.Status == 1)
|
||||
{
|
||||
|
||||
throw new CustomException(ResultCode.CUSTOM_ERROR, "认证类型格式错误,无法转换为数字");
|
||||
// 审核通过时才需要解析认证类型
|
||||
if (!int.TryParse(parm.CertificationType, out certifiedType))
|
||||
{
|
||||
throw new CustomException(ResultCode.CUSTOM_ERROR, "认证类型格式错误,无法转换为数字");
|
||||
}
|
||||
certification.CertificationType = certifiedType.ToString();
|
||||
}
|
||||
|
||||
certification.CertificationType = ((int)certifiedType).ToString();
|
||||
Update(certification, false);
|
||||
var user = _usersService.GetById(certification.UserId);
|
||||
if (user == null)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user