@Post("save") public String save(@Validation(errorPath = "a:errorCreateTel") Sms sms, Invocation inv) throws IllegalStateException, IOException { sms.setCreateTime(new Date()); sms.setStatus(String.valueOf(0)); telService.addTel(sms); return "r:/email_sms/emailSms/list"; }
@Get("delete/{id}") public String delete(@Param("id") String id, Invocation inv) { telService.deleteSms(id); inv.addFlash("message", "删除手机成功"); return "r:/email_sms/emailSms/list"; }
@Get("list") public String smsView(Invocation invocation) { List<Sms> smsList = telService.findAllTels(); invocation.addModel("smsList", smsList); return "smsWindow"; }