提交 91920d7e 编写于 作者: zhouweidong's avatar zhouweidong

时间型属性精度到秒

上级 3d3c27f5
......@@ -106,7 +106,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#elseif defDataType == "DATE">
<#assign defieldano=defieldano+",fieldType=\"DATE\",format=\"yyyy-MM-dd\"">
<#elseif defDataType == "TIME">
<#assign defieldano=defieldano+",fieldType=\"TIME\",format=\"HH:mm\"">
<#assign defieldano=defieldano+",fieldType=\"TIME\",format=\"HH:mm:ss\"">
<#elseif (defDataType=='PICKUPDATA'||defDataType=='INHERIT')&& defStdType=='Timestamp'><#comment>外键值附加数据,数据类型为时间</#comment>
<#assign defieldano=defieldano+",fieldType=\"DATETIME\",format=\"yyyy-MM-dd HH:mm:ss\"">
</#if>
......@@ -154,8 +154,8 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm")
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -263,7 +263,7 @@ public class ${item.getCodeName()} extends EntityMP implements Serializable {
<#assign defieldFormatStr="yyyy-MM-dd">
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
<#assign defieldIsDate=true>
<#assign defieldFormatStr="HH:mm">
<#assign defieldFormatStr="HH:mm:ss">
</#if>
<#if defieldIsDate && defieldFormatStr != "">
/**
......@@ -389,8 +389,8 @@ public class ${item.getCodeName()} extends EntityMongo implements Serializable {
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm")
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -557,8 +557,8 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm")
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -645,7 +645,7 @@ public class ${item.getCodeName()} extends EntityClient implements Serializable
<#assign defieldFormatStr="yyyy-MM-dd">
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
<#assign defieldIsDate=true>
<#assign defieldFormatStr="HH:mm">
<#assign defieldFormatStr="HH:mm:ss">
</#if>
<#if defieldIsDate && defieldFormatStr != "">
/**
......@@ -737,8 +737,8 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm")
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......@@ -815,7 +815,7 @@ public class ${item.getCodeName()} extends EntityBase implements Serializable {
<#assign defieldFormatStr="yyyy-MM-dd">
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(defield.getStdDataType())== "DATETIME" && defield.getValueFormat()=="%1$tH:%1$tM:%1$tS")>
<#assign defieldIsDate=true>
<#assign defieldFormatStr="HH:mm">
<#assign defieldFormatStr="HH:mm:ss">
</#if>
<#if defieldIsDate && defieldFormatStr != "">
/**
......
......@@ -56,8 +56,8 @@ public class ${item.getCodeName()}DTO extends ${dtoBase} implements Serializable
@JsonFormat(pattern="yyyy-MM-dd", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="yyyy-MM-dd")
<#elseif defDataType == "TIME" || ((defDataType=='PICKUPDATA'||defDataType=='INHERIT') && srfdatatype(apifield.getStdDataType())== "DATETIME" && apifield.getPSDEField().getValueFormat()=="%1$tH:%1$tM:%1$tS")>
@JsonFormat(pattern="HH:mm", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm")
@JsonFormat(pattern="HH:mm:ss", locale = "zh" , timezone="GMT+8")
@JSONField(name = "${jsonfield}" , format="HH:mm:ss")
<#else>
@JSONField(name = "${jsonfield}")
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册