| | |
| | | import com.ots.framework.web.controller.BaseController; |
| | | import com.ots.framework.web.domain.AjaxResult; |
| | | import com.ots.framework.web.page.TableDataInfo; |
| | | import com.ots.project.exam.domain.EntEmailTemplate; |
| | | import com.ots.project.exam.domain.TReportTemplate; |
| | | import com.ots.project.exam.service.IEntEmailTemplateService; |
| | | import com.ots.project.exam.service.ITReportTemplateService; |
| | | import org.apache.shiro.authz.annotation.RequiresPermissions; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | @Autowired |
| | | private ITReportTemplateService tReportTemplateService; |
| | | |
| | | @Autowired |
| | | private IEntEmailTemplateService entEmailTemplateService; |
| | | |
| | | @RequiresPermissions("exam:template:view") |
| | | @GetMapping() |
| | |
| | | public AjaxResult remove(String ids) { |
| | | return toAjax(tReportTemplateService.deleteTReportTemplateByIds(ids)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 邮件模板配置 |
| | | * @return |
| | | */ |
| | | @RequiresPermissions("exam:email:edit") |
| | | @GetMapping("/emailEdit") |
| | | public String emailEdit(ModelMap mmap) { |
| | | EntEmailTemplate eet = entEmailTemplateService.getOnly(); |
| | | mmap.put("emailTemplate",eet); |
| | | return prefix + "/emailEdit"; |
| | | } |
| | | |
| | | /** |
| | | * 新增保存邮件模板配置 |
| | | */ |
| | | @RequiresPermissions("exam:email:edit") |
| | | @Log(title = "邮件模板配置", businessType = BusinessType.INSERT) |
| | | @PostMapping("/emailEdit") |
| | | @ResponseBody |
| | | public AjaxResult emailEdit(EntEmailTemplate entEmailTemplate) { |
| | | if(entEmailTemplate.getId() == null){ |
| | | return error("未初始化模板,联系管理员!"); |
| | | } |
| | | return toAjax(entEmailTemplateService.insertEntEmailTemplate(entEmailTemplate)); |
| | | } |
| | | } |