diff --git a/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs b/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs index e707a2181..b13cb3911 100644 --- a/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs +++ b/SqlSugar/Abstract/DbBindProvider/IDataReaderEntityBuilder.cs @@ -96,7 +96,7 @@ namespace SqlSugar string fileName = propertyInfo.Name; if (mappingColumns != null) { - var mappInfo = mappingColumns.SingleOrDefault(it => it.EntityName.Equals(propertyInfo.Name)); + var mappInfo = mappingColumns.SingleOrDefault(it => it.EntityName==type.Name&&it.PropertyName.Equals(propertyInfo.Name)); if (mappInfo != null) { fileName = mappInfo.DbColumnName; diff --git a/SqlSugar/Common/CommonExtensions.cs b/SqlSugar/Common/CommonExtensions.cs deleted file mode 100644 index 7bce95f04..000000000 --- a/SqlSugar/Common/CommonExtensions.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -using System.Text; - -namespace SqlSugar -{ - public static class CommonExtensions - { - - } -} diff --git a/SqlSugar/ExpressionsToSql/Method/SqlFunc.cs b/SqlSugar/ExpressionsToSql/Method/SqlFunc.cs index f01a054e5..1b1d8d290 100644 --- a/SqlSugar/ExpressionsToSql/Method/SqlFunc.cs +++ b/SqlSugar/ExpressionsToSql/Method/SqlFunc.cs @@ -8,24 +8,30 @@ namespace SqlSugar { public class SqlFunc { - public static bool HasNumber(object thisValue) { throw new NotImplementedException(); } - public static bool HasValue(object thisValue){ throw new NotImplementedException(); } + public static bool HasNumber(object thisValue) + { + return thisValue.ObjToInt() > 0; + } + public static bool HasValue(object thisValue) + { + return thisValue.IsValuable(); + } public static bool IsNullOrEmpty(object thisValue) { throw new NotImplementedException(); } public static string ToLower(object thisValue) { throw new NotImplementedException(); } public static string ToUpper(object thisValue) { throw new NotImplementedException(); } public static string Trim(object thisValue) { throw new NotImplementedException(); } - public static bool Contains(string thisValue, string parameterValue) { throw new NotImplementedException();} - public static bool ContainsArray(T [] thisValue, object parameterValue) { throw new NotImplementedException(); } + public static bool Contains(string thisValue, string parameterValue) { throw new NotImplementedException(); } + public static bool ContainsArray(T[] thisValue, object parameterValue) { throw new NotImplementedException(); } public static bool StartsWith(object thisValue, string parameterValue) { throw new NotImplementedException(); } public static bool EndsWith(object thisValue, string parameterValue) { throw new NotImplementedException(); } public new static bool Equals(object thisValue, object parameterValue) { throw new NotImplementedException(); } - public static bool DateIsSame(DateTime date1, DateTime date2) { throw new NotImplementedException();} + public static bool DateIsSame(DateTime date1, DateTime date2) { throw new NotImplementedException(); } public static bool DateIsSame(DateTime? date1, DateTime? date2) { throw new NotImplementedException(); } - public static bool DateIsSame(DateTime date1, DateTime date2, DateType da