小付博客

无话可说...

您现在的位置是:首页>技术分享>velocity 时间格式化,map取值

velocity 时间格式化,map取值

发布时间:2017-05-12 编辑:小付 浏览(1088) 评论(0)

    日期格式化:

    #if($or.orderTime)$!date.format('yyyy-MM-dd HH:mm:ss ',$!or.orderTime)#end


    map取值:

    #if($firPayMentMap && $firPayMentMap.get($or.id) && $firPayMentMap.get($or.id).name)
        $firPayMentMap.get($or.id).name
    #end


    数字小数点保留:

    $number.format("#0.00",$or.sum)


    数字变量相加:

    #set($totalSaleReturnTotal=$math.add($totalSaleReturnTotal,$or.saleReturnTotal))

    其它见:http://www.java2s.com/Code/Java/Velocity/ReferenceClassmethodinMathtool.htm

关键字词:velocity,,date,格式化,map,数字