use of com.itrus.portal.db.ReceiptConfig in project portal by ixinportal.
the class ReceiptConfigController method delete.
// 删除
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "text/html")
@ResponseBody
public String delete(@PathVariable("id") Long id, HttpServletRequest request, Model uiModel) {
ReceiptConfig receiptConfig = sqlSession.selectOne("com.itrus.portal.db.ReceiptConfigMapper.selectByPrimaryKey", id);
if (receiptConfig == null) {
// uiModel.addAttribute("message", "未找到要删除快递");
return "未找到要删除的开票配置";
} else {
try {
sqlSession.delete("com.itrus.portal.db.ReceiptConfigMapper.deleteByPrimaryKey", id);
String oper = "删除第三方开票配置";
String info = "开票配置的ID: " + receiptConfig.getId();
LogUtil.adminlog(sqlSession, oper, info);
} catch (Exception e) {
/*uiModel.addAttribute("message", "要删除快递【" + ukey.getName()
+ "】存在关联,无法删除");*/
return "要删除的开票配置【" + receiptConfig.getPlatformName() + "】存在关联,无法删除";
}
}
return null;
}
Aggregations