update ZR.Admin.WebApi/wwwroot/CodeGenTemplate/TplDto.txt.

代码生成时,如果字段是long类型,增加了属性[JsonConverter(typeof(ValueToStringConverter))],避免值超过js number.maxvalue出现自动截取的问题。

Signed-off-by: xbzhu <5430389+xbzhu@user.noreply.gitee.com>
This commit is contained in:
xbzhu 2023-02-01 12:02:40 +00:00 committed by Gitee
parent ec270b7df4
commit ceab8e8fd4
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -1,6 +1,7 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using Newtonsoft.Json;
using ${options.ModelsNamespace}.Dto; using ${options.ModelsNamespace}.Dto;
using ${options.ModelsNamespace}.Models; using ${options.ModelsNamespace}.Models;
$if(replaceDto.ShowBtnExport) $if(replaceDto.ShowBtnExport)
@ -43,6 +44,9 @@ $if(item.IsExport)
$else $else
[ExcelIgnore] [ExcelIgnore]
$end $end
$end
$if(item.CsharpType == "long")
[JsonConverter(typeof(ValueToStringConverter))]
$end $end
public $item.CsharpType$item.RequiredStr $item.CsharpField { get; set; } public $item.CsharpType$item.RequiredStr $item.CsharpField { get; set; }