mirror of
https://gitee.com/dotnetchina/SqlSugar.git
synced 2025-05-03 12:18:00 +08:00
Synchronization code
This commit is contained in:
parent
2320b40c3e
commit
db3f4b97f0
@ -284,6 +284,14 @@ namespace SqlSugar
|
||||
{
|
||||
return LambdaExpressions.DbMehtods.GetDate();
|
||||
}
|
||||
else if (UtilMethods.IsErrorDecimalString() == true)
|
||||
{
|
||||
var pname = Builder.SqlParameterKeyWord + "Decimal" + GetDbColumnIndex;
|
||||
var p = new SugarParameter(pname, columnInfo.Value);
|
||||
this.Parameters.Add(p);
|
||||
GetDbColumnIndex++;
|
||||
return pname;
|
||||
}
|
||||
else if (columnInfo.InsertSql.HasValue())
|
||||
{
|
||||
return columnInfo.InsertSql;
|
||||
|
@ -426,11 +426,19 @@ namespace SqlSugar
|
||||
{
|
||||
return LambdaExpressions.DbMehtods.GetDate();
|
||||
}
|
||||
else if (IsListSetExp(columnInfo)|| IsSingleSetExp(columnInfo))
|
||||
else if (UtilMethods.IsErrorDecimalString()==true)
|
||||
{
|
||||
var pname = Builder.SqlParameterKeyWord + "Decimal" + GetDbColumnIndex;
|
||||
var p = new SugarParameter(pname, columnInfo.Value);
|
||||
this.Parameters.Add(p);
|
||||
GetDbColumnIndex++;
|
||||
return pname;
|
||||
}
|
||||
else if (IsListSetExp(columnInfo) || IsSingleSetExp(columnInfo))
|
||||
{
|
||||
if (this.ReSetValueBySqlExpList[columnInfo.PropertyName].Type == ReSetValueBySqlExpListModelType.List)
|
||||
{
|
||||
return Builder.GetTranslationColumnName(columnInfo.DbColumnName)+this.ReSetValueBySqlExpList[columnInfo.PropertyName].Sql+name;
|
||||
return Builder.GetTranslationColumnName(columnInfo.DbColumnName) + this.ReSetValueBySqlExpList[columnInfo.PropertyName].Sql + name;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -18,7 +18,16 @@ namespace SqlSugar
|
||||
{
|
||||
public class UtilMethods
|
||||
{
|
||||
|
||||
internal static bool? _IsErrorDecimalString { get; set; }
|
||||
internal static bool? IsErrorDecimalString()
|
||||
{
|
||||
if (_IsErrorDecimalString == null)
|
||||
{
|
||||
decimal dec = Convert.ToDecimal(1.1);
|
||||
_IsErrorDecimalString = dec.ToString().Contains(",");
|
||||
}
|
||||
return _IsErrorDecimalString;
|
||||
}
|
||||
internal static bool IsParameterConverter(EntityColumnInfo columnInfo)
|
||||
{
|
||||
return columnInfo != null && columnInfo.SqlParameterDbType != null && columnInfo.SqlParameterDbType is Type
|
||||
|
Loading…
Reference in New Issue
Block a user