diff --git a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs index c04b267b3..f0518e03d 100644 --- a/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs +++ b/Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs @@ -110,6 +110,10 @@ namespace SqlSugar { this.DbType = System.Data.DbType.Byte; } + else if (type == UtilConstants.SByteType) + { + this.DbType = System.Data.DbType.SByte; + } else if (type == UtilConstants.FloatType) { this.DbType = System.Data.DbType.Single; diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs b/Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs index 46ed0dd72..b8aac2339 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs @@ -72,6 +72,10 @@ namespace SqlSugar var parameter = model.Args[0]; var parameter2 = model.Args[1]; var parameter3 = model.Args[2]; + if (parameter3.MemberValue.ObjToString() == DateType.Weekday.ObjToString()) + { + parameter3.MemberValue = "Week"; + } return string.Format(" (TIMESTAMPDIFF({2},{0},{1})=0) ", parameter.MemberName, parameter2.MemberName, parameter3.MemberValue); }