/** 修改仓库接口 */ @Override public DeliveryResponse execute(RequestContext context) throws DeliveryException { // 获取参数 StorageDTO storageDTO = (StorageDTO) context.getRequest().getParam("storageDTO"); storageManager.updateStorage(storageDTO); // 返回response对象 return ResponseUtil.getResponse(true); }
/** 删除快递接口 */ @Override public DeliveryResponse doTransaction(RequestContext context) throws DeliveryException { // 获取参数 Integer id = (Integer) context.getRequest().getParam("id"); // 根据ID查询快递属性 List<ExpressPropertyDTO> expressPropertyDTOList = expressPropertyManager.queryByExpressId(id); List<Integer> proeprtyIdList = new ArrayList(); for (ExpressPropertyDTO expressPropertyDTO : expressPropertyDTOList) { proeprtyIdList.add(expressPropertyDTO.getId()); } // 批量删除快递属性 expressPropertyManager.deleteExpressProperty(proeprtyIdList); // 删除快递 expressManager.deleteExpress(id); // 返回response对象 return ResponseUtil.getResponse(true); }