前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >SAP Hybris Commerce功能介绍:Consignment tracking

SAP Hybris Commerce功能介绍:Consignment tracking

作者头像
Jerry Wang
发布2020-02-17 10:12:03
5170
发布2020-02-17 10:12:03
举报

This new feature is developed by Chengdu Hybris dev team. When a customer decides to buy a given product, in step 4 Payment Method, customer chooses the way to pay:

Once payment is done, customer could see payment detail.

A new button is added in the screen which allows our end user to check the logistics status of current good delivery once the good is purchased.

Below is a sample popup once the button is clicked. All the data you saw below is the test data prepared by Hybris dev colleague manually, since we didn’t actually purchase any good.

The test data is inserted by the following console ( internal tool which is used only for testing ) so that they could be displayed later once the tracking button is pressed.

Implementation detail go through

Please find Java classes involved in the enhancement implementation:

The mentioned Java classes are implemented in these five projects:

ConsignmentTrackingController

This controller is responsible to react on the Tracking button press event and delegate the call to the tracking detail popup page.

The logic of progress bar display is done here: ( so only three values in progress bar: 0, 50 and 100 ):

Popup view( delivery detail )

The view is implemented in file: consignmenttrackingaddon/acceleratoraddon/web/webroot/WEB-INF/views/responsive/pages/consignment/trackPackage.jsp For example, the field for “Expected delivery”:

the fields for “ORDERED”, “SHIPPED” and “ARRIVED”:

Progress bar:

ConsignmentData

This bean class holds the data to be displayed in the tracking detail popup view. You can find its detail configuration from this file via the path: consignmenttrackingfacades\resources\consignmenttrackingfacades-beans.xml

DefaultConsignmentTrackingFacade

This facade simply delegates the execution to Service layer and does some post conversion based on returned result:

EventData

The fields are modelled in file “consignmenttrackingservices\resources\consignmenttrackingservices-beans.xml”:

ConsignmentDAO

Data Access Object, generates dynamic statement to fire flexible query to get data from persistence layer:

ConsignmentService

Since customer could choose their own carrier and integrate into the scenaro via custom development, so here ConsignmentService again delegates the call to the actual CarrierAdapter:

MockAddon

In order to guide customer to integrate their specific carrier into tracking scenario, SAP delivers a mock addon containing all necessary technical implementation for implementation reference. So how customer’s specific CarrierAdapter could be used? In ConsignmentService implementation, the corresponding CarrierAdapter instance is fetched according to its code.

The code is searched against the CarrierMap, which is injected by Spring in file “consignmenttrackingservices\resources\consignmenttrackingservices-spring.xml” plus annotation org.springframework.beans.factory.annotation.Required:

So customer can simply replace the default mockCarrierAdapter into their customized Adapter to make it take effect.

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-02-06 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • Implementation detail go through
  • ConsignmentTrackingController
  • Popup view( delivery detail )
  • ConsignmentData
  • DefaultConsignmentTrackingFacade
  • EventData
  • ConsignmentDAO
  • ConsignmentService
  • MockAddon
相关产品与服务
数据库一体机 TData
数据库一体机 TData 是融合了高性能计算、热插拔闪存、Infiniband 网络、RDMA 远程直接存取数据的数据库解决方案,为用户提供高可用、易扩展、高性能的数据库服务,适用于 OLAP、 OLTP 以及混合负载等各种应用场景下的极限性能需求,支持 Oracle、SQL Server、MySQL 和 PostgreSQL 等各种主流数据库。
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档