mirror of https://gitee.com/y_project/RuoYi.git
代码生成日期控件区分范围
parent
a1ec9a6508
commit
73ee7bc485
|
@ -602,7 +602,7 @@ div.ztree-border {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
.time-input {
|
.select-time .time-input {
|
||||||
display: block;
|
display: block;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
padding-left: 10px;
|
padding-left: 10px;
|
||||||
|
|
|
@ -273,6 +273,7 @@ public class VelocityUtils
|
||||||
if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType()))
|
if (!column.isSuperColumn() && GenConstants.TYPE_DATE.equals(column.getJavaType()))
|
||||||
{
|
{
|
||||||
importList.add("java.util.Date");
|
importList.add("java.util.Date");
|
||||||
|
importList.add("com.fasterxml.jackson.annotation.JsonFormat");
|
||||||
}
|
}
|
||||||
else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType()))
|
else if (!column.isSuperColumn() && GenConstants.TYPE_BIGDECIMAL.equals(column.getJavaType()))
|
||||||
{
|
{
|
||||||
|
|
|
@ -41,7 +41,12 @@
|
||||||
<option value="-1">代码生成请选择字典属性</option>
|
<option value="-1">代码生成请选择字典属性</option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
|
||||||
|
<li>
|
||||||
|
<label>${comment}:</label>
|
||||||
|
<input type="text" class="time-input" placeholder="请选择${comment}" name="${column.javaField}"/>
|
||||||
|
</li>
|
||||||
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||||
<li class="select-time">
|
<li class="select-time">
|
||||||
<label>${comment}:</label>
|
<label>${comment}:</label>
|
||||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[begin${AttrName}]"/>
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[begin${AttrName}]"/>
|
||||||
|
|
|
@ -41,7 +41,12 @@
|
||||||
<option value="-1">代码生成请选择字典属性</option>
|
<option value="-1">代码生成请选择字典属性</option>
|
||||||
</select>
|
</select>
|
||||||
</li>
|
</li>
|
||||||
#elseif($column.htmlType == "datetime")
|
#elseif($column.htmlType == "datetime" && $column.queryType != "BETWEEN")
|
||||||
|
<li>
|
||||||
|
<label>${comment}:</label>
|
||||||
|
<input type="text" class="time-input" placeholder="请选择${comment}" name="${column.javaField}"/>
|
||||||
|
</li>
|
||||||
|
#elseif($column.htmlType == "datetime" && $column.queryType == "BETWEEN")
|
||||||
<li class="select-time">
|
<li class="select-time">
|
||||||
<label>${comment}:</label>
|
<label>${comment}:</label>
|
||||||
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[begin${AttrName}]"/>
|
<input type="text" class="time-input" id="startTime" placeholder="开始时间" name="params[begin${AttrName}]"/>
|
||||||
|
|
|
@ -40,6 +40,7 @@ public class ${ClassName} extends ${Entity}
|
||||||
#if($parentheseIndex != -1)
|
#if($parentheseIndex != -1)
|
||||||
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
@Excel(name = "${comment}", readConverterExp = "$column.readConverterExp()")
|
||||||
#elseif($column.javaType == 'Date')
|
#elseif($column.javaType == 'Date')
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd")
|
||||||
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
|
@Excel(name = "${comment}", width = 30, dateFormat = "yyyy-MM-dd")
|
||||||
#else
|
#else
|
||||||
@Excel(name = "${comment}")
|
@Excel(name = "${comment}")
|
||||||
|
|
Loading…
Reference in New Issue