Search in sources :

Example 6 with Transfer

use of com.itrus.portal.db.Transfer in project portal by ixinportal.

the class TransferController method update.

// 银行汇款修改处理
@RequestMapping(method = RequestMethod.PUT, produces = "text/html")
public String update(@Valid Transfer transfer, BindingResult bindingResult, Model uiModel) throws UnsupportedEncodingException {
    if (bindingResult.hasErrors()) {
        uiModel.addAttribute("transfer", transfer);
        return "transfer/update";
    }
    Transfer transfer0 = sqlSession.selectOne("com.itrus.portal.db.TransferMapper.selectByPrimaryKey", transfer.getId());
    transfer.setCreateTime(transfer0.getCreateTime());
    transfer.setCreator(transfer0.getCreator());
    transfer.setModifyTime(new Date());
    transfer.setModifier(getAdmin().getId());
    sqlSession.update("com.itrus.portal.db.TransferMapper.updateByPrimaryKey", transfer);
    String oper = "修改汇款账号";
    String info = "汇款账号名称: " + transfer.getName();
    LogUtil.adminlog(sqlSession, oper, info);
    return "redirect:/transfer/" + transfer.getId();
}
Also used : Transfer(com.itrus.portal.db.Transfer) Date(java.util.Date) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 7 with Transfer

use of com.itrus.portal.db.Transfer in project portal by ixinportal.

the class TransferController method updateForm.

// 返回银行汇款修改页面
@RequestMapping(value = "/{id}", params = "form", produces = "text/html")
public String updateForm(@PathVariable("id") Long id, Model uiModel) {
    Transfer transfer = sqlSession.selectOne("com.itrus.portal.db.TransferMapper.selectByPrimaryKey", id);
    uiModel.addAttribute("transfer", transfer);
    return "transfer/update";
}
Also used : Transfer(com.itrus.portal.db.Transfer) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 8 with Transfer

use of com.itrus.portal.db.Transfer in project portal by ixinportal.

the class TransferController method delete.

// 删除银行汇款
@RequestMapping(value = "/{id}", method = RequestMethod.DELETE, produces = "text/html")
public String delete(@PathVariable("id") Long id, @RequestParam(value = "page", required = false) Integer page, @RequestParam(value = "size", required = false) Integer size, HttpServletRequest request, Model uiModel) {
    Transfer transfer = sqlSession.selectOne("com.itrus.portal.db.TransferMapper.selectByPrimaryKey", id);
    String retPath = getReferer(request, "redirect:/transfer", true);
    if (transfer == null) {
        uiModel.addAttribute("message", "未找到要删除汇款账号");
    } else {
        try {
            sqlSession.delete("com.itrus.portal.db.TransferMapper.deleteByPrimaryKey", id);
            String oper = "删除汇款账号";
            String info = ": " + transfer.getName();
            LogUtil.adminlog(sqlSession, oper, info);
        } catch (Exception e) {
            uiModel.addAttribute("message", "要删除汇款账号【" + transfer.getName() + "】存在关联,无法删除");
        }
    }
    return retPath;
}
Also used : Transfer(com.itrus.portal.db.Transfer) ExecutionException(java.util.concurrent.ExecutionException) UnsupportedEncodingException(java.io.UnsupportedEncodingException) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Example 9 with Transfer

use of com.itrus.portal.db.Transfer in project portal by ixinportal.

the class ExtraProductController method updateMorePage.

// 返回修改产品对应的服务信息页面:服务办理接口信息,服务应用方式,服务配置
@RequestMapping(value = "/updateMore/{id}", produces = "text/html")
public String updateMorePage(@PathVariable("id") Long id, Model uiModel) throws Exception {
    ExtraProduct extraProduct = extraProductService.selectByPrimaryKey(id);
    uiModel.addAttribute("extraProduct", extraProduct);
    List<ExtraProductSpec> extraProductSpecs = extraProductSpecService.getSpecByProductId(id);
    uiModel.addAttribute("extraProductSpecs", extraProductSpecs);
    // 服务提供商组成的map
    Map<Long, ServiceProvider> serviceProviderMap = serviceProviderService.selectMapByExample(null);
    uiModel.addAttribute("serviceProviderMap", serviceProviderMap);
    // 在线支付的map:微信和支付宝
    List<OnlinePay> onlinepays = sqlSession.selectList("com.itrus.portal.db.OnlinePayMapper.selectByExample", null);
    uiModel.addAttribute("onlinepays", onlinepays);
    // 银行付款的List
    List<Transfer> bankPays = sqlSession.selectList("com.itrus.portal.db.TransferMapper.selectByExample", null);
    uiModel.addAttribute("bankPays", bankPays);
    // 电子发票的list
    List<Ereceipt> einvoices = sqlSession.selectList("com.itrus.portal.db.EreceiptMapper.selectByExample", null);
    uiModel.addAttribute("einvoices", einvoices);
    // 附加项的list
    List<ExtraMessage> extraMessages = extraMessageService.selectByExample(null);
    uiModel.addAttribute("extraMessages", extraMessages);
    return "extraproduct/update2";
}
Also used : Ereceipt(com.itrus.portal.db.Ereceipt) ExtraProductSpec(com.itrus.portal.db.ExtraProductSpec) ExtraProduct(com.itrus.portal.db.ExtraProduct) ServiceProvider(com.itrus.portal.db.ServiceProvider) Transfer(com.itrus.portal.db.Transfer) ExtraMessage(com.itrus.portal.db.ExtraMessage) OnlinePay(com.itrus.portal.db.OnlinePay) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

Transfer (com.itrus.portal.db.Transfer)9 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)9 OnlinePay (com.itrus.portal.db.OnlinePay)5 ExtraProduct (com.itrus.portal.db.ExtraProduct)4 Ereceipt (com.itrus.portal.db.Ereceipt)3 ExtraProductSpec (com.itrus.portal.db.ExtraProductSpec)3 ServiceProvider (com.itrus.portal.db.ServiceProvider)3 ExtraMessage (com.itrus.portal.db.ExtraMessage)2 PayConfig (com.itrus.portal.db.PayConfig)2 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 HttpSession (javax.servlet.http.HttpSession)2 Bill (com.itrus.portal.db.Bill)1 DigitalCert (com.itrus.portal.db.DigitalCert)1 Enterprise (com.itrus.portal.db.Enterprise)1 EnterpriseQq (com.itrus.portal.db.EnterpriseQq)1 EnterpriseQqExample (com.itrus.portal.db.EnterpriseQqExample)1 ExtraBill (com.itrus.portal.db.ExtraBill)1 Product (com.itrus.portal.db.Product)1 UserCert (com.itrus.portal.db.UserCert)1