/** * 处理逻辑. * * @param systemParameter the system parameter */ @Override public void process(SystemParameter systemParameter) { ShopDetailView shopDetail = shopService.getShopDetailView(systemParameter.getValue()); if (shopDetail == null) { throw new NotFoundException("找不到默认商城 " + systemParameter.getValue()); } if (!Constants.ONLINE.equals(shopDetail.getStatus())) { throw new ConflictException("商城 '" + systemParameter.getValue() + "'处于下线状态,不能作为默认商城"); } }
/* * (non-Javadoc) * * @see * com.legendshop.event.processor.AbstractProcessor#isSupport(java.lang. * Object) */ @Override public boolean isSupport(SystemParameter systemParameter) { boolean result = systemParameter != null && SysParameterEnum.DEFAULT_SHOP.name().equals(systemParameter.getName()); return result; }