diff --git a/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs b/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs index 1304fb93..1cb65a33 100644 --- a/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs +++ b/ds-wms-service/DS.WMS.Core/Code/Method/ColumnSetService.cs @@ -9,6 +9,7 @@ using DS.WMS.Core.Code.Interface; using DS.WMS.Core.Invoice.Dtos; using DS.WMS.Core.Sys.Dtos; using Mapster; +using MathNet.Numerics; using Microsoft.Extensions.DependencyInjection; using Newtonsoft.Json; using SqlSugar; @@ -131,8 +132,13 @@ namespace DS.WMS.Core.Code.Method { item.Width = req.Width; } - } - var columnStr = JsonConvert.SerializeObject( new ColumnSetContent { Columns = columns } ); + } + var serializerSettings = new JsonSerializerSettings + { + // 设置为驼峰命名 + ContractResolver = new Newtonsoft.Json.Serialization.CamelCasePropertyNamesContractResolver() + }; + var columnStr = JsonConvert.SerializeObject( new ColumnSetContent { Columns = columns }, Formatting.None, serializerSettings); columnSet.Content = columnStr;