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();
}
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";
}
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;
}
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";
}
Aggregations