From 606f30b66865acb0f9813da8a9b65d971903512b Mon Sep 17 00:00:00 2001 From: sunkaixuan <610262374@qq.com> Date: Tue, 26 Mar 2024 12:08:10 +0800 Subject: [PATCH] =?UTF-8?q?Update=20=E8=BE=BE=E6=A2=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Realization/Dm/DbMaintenance/DmDbMaintenance.cs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs index ef4203948..b3cfac30f 100644 --- a/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs +++ b/Src/Asp.NetCore2/SqlSugar/Realization/Dm/DbMaintenance/DmDbMaintenance.cs @@ -468,6 +468,16 @@ WHERE table_name = '" + tableName + "'"); Length = row["ColumnSize"].ObjToInt(), Scale = row["numericscale"].ObjToInt() }; + if (column.DataType.EqualCase("number")|| column.DataType.EqualCase("decimal")) + { + column.Length = row["numericprecision"].ObjToInt(); + column.Scale = row["numericscale"].ObjToInt(); + column.DecimalDigits = row["numericscale"].ObjToInt(); + if (column.Length == 38 && column.Scale == 0) + { + column.Length = 22; + } + } result.Add(column); } return result;