使用Orika映射器的两个呼叫的日期格式不同

时间:2019-03-13 06:48:42

标签: java spring hybris datamapper orika

对于使用同一映射器的两个Web服务调用,我得到了不同的日期格式。

  

我是指通过映射器map:162, ConfigurableMapper (ma.glasnost.orika.impl)


用于获取订单的OTB调用即OrdersController#getOrderForUserByCode()将日期显示为"date": "2018-12-22T20:42:31+0000"

我用于获取订单的自定义调用(例如IndReportController#createAdvancedOrderSearchReport())显示与"date": 1545511351000相同的日期

我正在使用与OTB相同的代码来打印OrderWsDTO,即
getDataMapper().map(orderData, OrderWsDTO.class, fields)

有趣的是,这两个调用的堆栈跟踪也相同。

Stacktrace

setDate:186, PaymentTransactionEntryWsDTO (de.hybris.platform.commercewebservicescommons.dto.order)
mapAtoB:-1, Orika_PaymentTransactionEntryWsDTO_PaymentTransactionEntryData_Mapper103355414120758$116 (ma.glasnost.orika.generated)
map:77, UseCustomMapperStrategy (ma.glasnost.orika.impl.mapping.strategy)
map:254, MapperFacadeImpl (ma.glasnost.orika.impl)
mapElement:797, MapperFacadeImpl (ma.glasnost.orika.impl)
mapAsCollection:621, MapperFacadeImpl (ma.glasnost.orika.impl)
mapAsList:427, MapperFacadeImpl (ma.glasnost.orika.impl)
mapAtoB:-1, Orika_PaymentTransactionWsDTO_PaymentTransactionData_Mapper103354376799488$70 (ma.glasnost.orika.generated)
map:77, UseCustomMapperStrategy (ma.glasnost.orika.impl.mapping.strategy)
map:254, MapperFacadeImpl (ma.glasnost.orika.impl)
mapElement:797, MapperFacadeImpl (ma.glasnost.orika.impl)
mapAsCollection:621, MapperFacadeImpl (ma.glasnost.orika.impl)
mapAsList:427, MapperFacadeImpl (ma.glasnost.orika.impl)
mapAtoB:-1, Orika_OrderWsDTO_OrderData_Mapper103352769949289$41 (ma.glasnost.orika.generated)
map:77, UseCustomMapperStrategy (ma.glasnost.orika.impl.mapping.strategy)
map:671, MapperFacadeImpl (ma.glasnost.orika.impl)
map:162, ConfigurableMapper (ma.glasnost.orika.impl)
map:211, DefaultDataMapper (de.hybris.platform.webservicescommons.mapping.impl)
getOrder:100, OrdersController (com.myproject.core.v2.controller)

请提出如何在自定义通话中获取OTB日期格式的信息。

0 个答案:

没有答案