Search in sources :

Example 6 with ReceiptConfig

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;
}
Also used : ServiceNullException(com.itrus.portal.exception.ServiceNullException) ReceiptConfig(com.itrus.portal.db.ReceiptConfig)

Aggregations

ReceiptConfig (com.itrus.portal.db.ReceiptConfig)6 ServiceNullException (com.itrus.portal.exception.ServiceNullException)2 Date (java.util.Date)2 ApplicationInfo (com.itrus.portal.db.ApplicationInfo)1 ApplicationInfoExample (com.itrus.portal.db.ApplicationInfoExample)1 Bill (com.itrus.portal.db.Bill)1 Einvoice (com.itrus.portal.db.Einvoice)1 Ereceipt (com.itrus.portal.db.Ereceipt)1 ReceiptConfigExample (com.itrus.portal.db.ReceiptConfigExample)1 URL (java.net.URL)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 HostnameVerifier (javax.net.ssl.HostnameVerifier)1 SSLSession (javax.net.ssl.SSLSession)1 Call (org.apache.axis.client.Call)1 TransactionStatus (org.springframework.transaction.TransactionStatus)1 DefaultTransactionDefinition (org.springframework.transaction.support.DefaultTransactionDefinition)1 PostMapping (org.springframework.web.bind.annotation.PostMapping)1 ResponseBody (org.springframework.web.bind.annotation.ResponseBody)1 BASE64Decoder (sun.misc.BASE64Decoder)1