Commit a9282b17 authored by liudong1993's avatar liudong1993

Merge branch 'master' of http://gitlab.oytour.com/Kui2/education

parents 083143c4 fe500809
......@@ -903,13 +903,13 @@ namespace Edu.Module.Customer
decimal CurWeekAgFollow = 0;
if (curWeekList != null && curWeekList.Where(qitem => qitem.CurWeekAgFollow > 0).Count() > 0)
{
CurWeekAgFollow = Math.Round(yesDataList?.Average(qitem => qitem.CurWeekAgFollow) ?? 0, 2);
CurWeekAgFollow = Math.Round(curWeekList?.Average(qitem => qitem.CurWeekAgFollow) ?? 0, 2);
}
decimal LastWeekAgFollow = 0;
if (curWeekList != null && yesDataList.Where(qitem => qitem.LastWeekAgFollow > 0).Count() > 0)
if (curWeekList != null && curWeekList.Where(qitem => qitem.LastWeekAgFollow > 0).Count() > 0)
{
LastWeekAgFollow= Math.Round(yesDataList?.Average(qitem => qitem.LastWeekAgFollow) ?? 0, 2);
LastWeekAgFollow= Math.Round(curWeekList?.Average(qitem => qitem.LastWeekAgFollow) ?? 0, 2);
}
decimal CurMonthAgFollow = 0;
......
......@@ -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