コード例 #1
0
 protected void addCommon(final AbstractOrderModel source, final AbstractOrderData prototype) {
   prototype.setCode(source.getCode());
   if (source.getSite() != null) {
     prototype.setSite(source.getSite().getUid());
   }
   if (source.getStore() != null) {
     prototype.setStore(source.getStore().getUid());
   }
   prototype.setTotalItems(calcTotalItems(source));
   prototype.setNet(Boolean.TRUE.equals(source.getNet()));
   prototype.setGuid(source.getGuid());
   prototype.setCalculated(Boolean.TRUE.equals(source.getCalculated()));
 }
 @Override
 protected boolean shouldHandleEvent(final SendNotPickedUpConsignmentCanceledMessageEvent event) {
   final AbstractOrderModel order = event.getProcess().getConsignment().getOrder();
   ServicesUtil.validateParameterNotNullStandardMessage("event.order", order);
   final BaseSiteModel site = order.getSite();
   ServicesUtil.validateParameterNotNullStandardMessage("event.order.site", site);
   return SiteChannel.B2C.equals(site.getChannel());
 }