freeMarker数字类型数据超三位自动添加逗号分割问题

原始获取类型

<select name="provinceId" lay-filter="province">
                <option value="">请选择省</option>
                <#if province?exists>
                    <#list province as model>
                       <option value="${model.id?if_exists}" <#if user?exists><#if user.provinceId== model.id>selected</#if></#if>>${model.areaName}</option>
                    </#list>
                </#if>
            </select>

上面获取的province数据的id在select列表中超过三位数的会自动添加逗号进行分割

这样

在所属的数据后面添加?c进行转换即可

<select name="provinceId" lay-filter="province">
                <option value="">请选择省</option>
                <#if province?exists>
                    <#list province as model>
                       <option value="${model.id?c}" <#if user?exists><#if user.provinceId== model.id>selected</#if></#if>>${model.areaName}</option>
                    </#list>
                </#if>
            </select>
原文地址:https://www.cnblogs.com/G-yong/p/9855340.html