Selaa lähdekoodia

通讯录关键字查询失败

临城职教中职
ndbs 2 vuotta sitten
vanhempi
commit
ae57857eb7
1 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs

+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs Näytä tiedosto

@@ -83,12 +83,19 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration
strSql.Append("SELECT ");
strSql.Append(fieldSql);
strSql.Append(" FROM AddressBook t ");
var dp = new DynamicParameters(new { });
var queryParam = queryJson.ToJObject();
var data = LoginUserInfo.Get();
if (!data.isSystem)
{
strSql.Append($" where ASaverId='{data.userId}' or AIsShare=1");
}
return this.BaseRepository().FindList<AddressBookEntity>(strSql.ToString(), pagination);
if (!queryParam["keyword"].IsEmpty())
{
dp.Add("keyword", "%" + queryParam["keyword"].ToString() + "%", DbType.String);
strSql.Append(" where 1=1 AND (t.AName Like @keyword or t.ACompany Like @keyword or t.ACTell Like @keyword or t.AMobile Like @keyword or t.AEmail Like @keyword) ");
}
return this.BaseRepository().FindList<AddressBookEntity>(strSql.ToString(), dp);
}
catch (Exception ex)
{


Ladataan…
Peruuta
Tallenna