crm: fixed bug with crash app for contacts list more than 25 and fixed bug with always infoType set 0
This commit is contained in:
parent
1268a436ca
commit
923db85ca1
@ -136,11 +136,6 @@ namespace ASC.CRM.ApiModels
|
||||
Data = "support@onlyoffice.com",
|
||||
InfoType = ContactInfoType.Email
|
||||
};
|
||||
}
|
||||
|
||||
public void Mapping(Profile profile)
|
||||
{
|
||||
profile.CreateMap<ContactInfo, ContactInfoDto>();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -390,7 +390,7 @@ namespace ASC.CRM.Core.Dao
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
_cache.Insert(cacheKey, result, TimeSpan.FromSeconds(30));
|
||||
_cache.Insert(cacheKey, result.ToString(), TimeSpan.FromSeconds(30));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -326,7 +326,7 @@ namespace ASC.CRM.Core.Dao
|
||||
}
|
||||
if (result > 0)
|
||||
{
|
||||
_cache.Insert(cacheKey, result, TimeSpan.FromMinutes(1));
|
||||
_cache.Insert(cacheKey, result.ToString(), TimeSpan.FromMinutes(1));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -544,7 +544,7 @@ namespace ASC.CRM.Core.Dao
|
||||
}
|
||||
if (result > 0)
|
||||
{
|
||||
_cache.Insert(cacheKey, result, TimeSpan.FromSeconds(30));
|
||||
_cache.Insert(cacheKey, result.ToString(), TimeSpan.FromSeconds(30));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -397,7 +397,7 @@ namespace ASC.CRM.Core.Dao
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
_cache.Insert(cacheKey, result, TimeSpan.FromSeconds(30));
|
||||
_cache.Insert(cacheKey, result.ToString(), TimeSpan.FromSeconds(30));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -232,7 +232,7 @@ namespace ASC.CRM.Core.Dao
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
_cache.Insert(cacheKey, result, TimeSpan.FromSeconds(30));
|
||||
_cache.Insert(cacheKey, result.ToString(), TimeSpan.FromSeconds(30));
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
@ -512,7 +512,7 @@ namespace ASC.CRM.Core.Dao
|
||||
|
||||
if (result > 0)
|
||||
{
|
||||
_cache.Insert(cacheKey, result, TimeSpan.FromMinutes(1));
|
||||
_cache.Insert(cacheKey, result.ToString(), TimeSpan.FromMinutes(1));
|
||||
}
|
||||
|
||||
return result;
|
||||
|
@ -27,10 +27,13 @@
|
||||
using System;
|
||||
|
||||
using ASC.Common.Mapping;
|
||||
using ASC.CRM.ApiModels;
|
||||
using ASC.CRM.Classes;
|
||||
using ASC.CRM.Core.EF;
|
||||
using ASC.CRM.Core.Enums;
|
||||
|
||||
using AutoMapper;
|
||||
|
||||
namespace ASC.CRM.Core
|
||||
{
|
||||
public class ContactInfo : DomainObject, IMapFrom<DbContactInfo>
|
||||
@ -78,5 +81,12 @@ namespace ASC.CRM.Core
|
||||
return typeof(ContactInfoBaseCategory);
|
||||
}
|
||||
}
|
||||
|
||||
public void Mapping(Profile profile)
|
||||
{
|
||||
profile.CreateMap<DbContactInfo, ContactInfo>()
|
||||
.ForMember(x => x.InfoType, opt => opt.MapFrom(x => x.Type));
|
||||
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user