Commit fe07a617 authored by 黄奎's avatar 黄奎

页面修改

parent 267ac48f
......@@ -1797,23 +1797,25 @@ namespace Edu.WebApi.Controllers.User
#endregion
var oldModel = employeeModule.GetEmployeeModule(0, extModel.AccountId, extModel.AccountType.ToInt());
if (oldModel.IsTenCccUser == 0 && extModel.IsTenCccUser == 1)
if (oldModel != null)
{
var cccResult = await new TenCloudCCCHelper().SetUserToCCCUser(extModel);
if (!cccResult.result)
if (oldModel.IsTenCccUser == 0 && extModel.IsTenCccUser == 1)
{
return ApiResult.Failed($"同步电话坐席失败,{cccResult.message}");
var cccResult = await new TenCloudCCCHelper().SetUserToCCCUser(extModel);
if (!cccResult.result)
{
return ApiResult.Failed($"同步电话坐席失败,{cccResult.message}");
}
}
}
else if (oldModel.IsTenCccUser == 1 && extModel.IsTenCccUser == 0)
{
var cccResult = await new TenCloudCCCHelper().DelUserToCCCUser(extModel);
if (!cccResult.result)
else if (oldModel.IsTenCccUser == 1 && extModel.IsTenCccUser == 0)
{
return ApiResult.Failed($"电话客服功能关闭失败,请联系管理员");
var cccResult = await new TenCloudCCCHelper().DelUserToCCCUser(extModel);
if (!cccResult.result)
{
return ApiResult.Failed($"电话客服功能关闭失败,请联系管理员");
}
}
}
bool flag = employeeModule.SetEmployeeModule(extModel, TXLToken);
return flag ? ApiResult.Success() : ApiResult.Failed();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment