Browse Source

Synchronization code

pull/24/MERGE
sunkaixuan 2 years ago
parent
commit
87061b60bb
  1. 4
      Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs
  2. 4
      Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs

4
Src/Asp.NetCore2/SqlSugar/ExpressionsToSql/Common/SugarParameter.cs

@ -110,6 +110,10 @@ namespace SqlSugar
{ {
this.DbType = System.Data.DbType.Byte; this.DbType = System.Data.DbType.Byte;
} }
else if (type == UtilConstants.SByteType)
{
this.DbType = System.Data.DbType.SByte;
}
else if (type == UtilConstants.FloatType) else if (type == UtilConstants.FloatType)
{ {
this.DbType = System.Data.DbType.Single; this.DbType = System.Data.DbType.Single;

4
Src/Asp.NetCore2/SqlSugar/Realization/MySql/SqlBuilder/MySqlExpressionContext.cs

@ -72,6 +72,10 @@ namespace SqlSugar
var parameter = model.Args[0]; var parameter = model.Args[0];
var parameter2 = model.Args[1]; var parameter2 = model.Args[1];
var parameter3 = model.Args[2]; 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); return string.Format(" (TIMESTAMPDIFF({2},{0},{1})=0) ", parameter.MemberName, parameter2.MemberName, parameter3.MemberValue);
} }

Loading…
Cancel
Save