From ae57857eb7ff9f380f0b2c05c645505af749ffa9 Mon Sep 17 00:00:00 2001 From: ndbs Date: Thu, 7 Apr 2022 18:16:26 +0800 Subject: [PATCH] =?UTF-8?q?=E9=80=9A=E8=AE=AF=E5=BD=95=E5=85=B3=E9=94=AE?= =?UTF-8?q?=E5=AD=97=E6=9F=A5=E8=AF=A2=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../AddressBook/AddressBookService.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs index 4a814bffb..250219431 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/EducationalAdministration/AddressBook/AddressBookService.cs @@ -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(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(strSql.ToString(), dp); } catch (Exception ex) {