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:
parent
ec270b7df4
commit
ceab8e8fd4
@ -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; }
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user