|
@@ -1,8 +1,10 @@
|
|
|
package cn.reghao.autodop.dmaster.notification.controller;
|
|
package cn.reghao.autodop.dmaster.notification.controller;
|
|
|
|
|
|
|
|
|
|
+import cn.reghao.autodop.dmaster.notification.entity.DingAccount;
|
|
|
import cn.reghao.autodop.dmaster.notification.entity.EmailAccount;
|
|
import cn.reghao.autodop.dmaster.notification.entity.EmailAccount;
|
|
|
import cn.reghao.autodop.dmaster.notification.entity.NotifyGroup;
|
|
import cn.reghao.autodop.dmaster.notification.entity.NotifyGroup;
|
|
|
import cn.reghao.autodop.dmaster.notification.entity.SmsAccount;
|
|
import cn.reghao.autodop.dmaster.notification.entity.SmsAccount;
|
|
|
|
|
+import cn.reghao.autodop.dmaster.notification.repository.DingAccountRepository;
|
|
|
import cn.reghao.autodop.dmaster.notification.repository.NotifyGroupRepository;
|
|
import cn.reghao.autodop.dmaster.notification.repository.NotifyGroupRepository;
|
|
|
import cn.reghao.autodop.dmaster.notification.repository.EmailAccountRepository;
|
|
import cn.reghao.autodop.dmaster.notification.repository.EmailAccountRepository;
|
|
|
import cn.reghao.autodop.dmaster.notification.repository.SmsAccountRepository;
|
|
import cn.reghao.autodop.dmaster.notification.repository.SmsAccountRepository;
|
|
@@ -26,13 +28,16 @@ import org.springframework.web.bind.annotation.*;
|
|
|
public class NotificationPageController {
|
|
public class NotificationPageController {
|
|
|
private EmailAccountRepository emailRepository;
|
|
private EmailAccountRepository emailRepository;
|
|
|
private SmsAccountRepository smsRepository;
|
|
private SmsAccountRepository smsRepository;
|
|
|
|
|
+ private DingAccountRepository dingRepository;
|
|
|
private NotifyGroupRepository receiverRepository;
|
|
private NotifyGroupRepository receiverRepository;
|
|
|
|
|
|
|
|
public NotificationPageController(EmailAccountRepository emailRepository,
|
|
public NotificationPageController(EmailAccountRepository emailRepository,
|
|
|
SmsAccountRepository smsRepository,
|
|
SmsAccountRepository smsRepository,
|
|
|
|
|
+ DingAccountRepository dingRepository,
|
|
|
NotifyGroupRepository receiverRepository) {
|
|
NotifyGroupRepository receiverRepository) {
|
|
|
this.emailRepository = emailRepository;
|
|
this.emailRepository = emailRepository;
|
|
|
this.smsRepository = smsRepository;
|
|
this.smsRepository = smsRepository;
|
|
|
|
|
+ this.dingRepository = dingRepository;
|
|
|
this.receiverRepository = receiverRepository;
|
|
this.receiverRepository = receiverRepository;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -82,6 +87,29 @@ public class NotificationPageController {
|
|
|
return "/sys/notify/smsadd";
|
|
return "/sys/notify/smsadd";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ @ApiOperation(value = "钉钉通知配置页面")
|
|
|
|
|
+ @GetMapping("/notify/ding")
|
|
|
|
|
+ public String dingNotifyConfigPage(Model model) {
|
|
|
|
|
+ PageRequest pageRequest = PageSort.pageRequest();
|
|
|
|
|
+ Page<DingAccount> page = dingRepository.findAll(pageRequest);
|
|
|
|
|
+ PageList<DingAccount> pageList = PageList.pageList(page);
|
|
|
|
|
+
|
|
|
|
|
+ model.addAttribute("page", page);
|
|
|
|
|
+ model.addAttribute("list", pageList.getList());
|
|
|
|
|
+ return "/sys/notify/ding";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/notify/ding/add")
|
|
|
|
|
+ public String dingNotifyConfigAddPage(Model model) {
|
|
|
|
|
+ return "/sys/notify/dingadd";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ @GetMapping("/notify/ding/edit/{id}")
|
|
|
|
|
+ public String dingNotifyConfigEditPage(@PathVariable("id") DingAccount dingAccount, Model model) {
|
|
|
|
|
+ model.addAttribute("dingAccount", dingAccount);
|
|
|
|
|
+ return "/sys/notify/dingadd";
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
@ApiOperation(value = "全局通知接收配置页面")
|
|
@ApiOperation(value = "全局通知接收配置页面")
|
|
|
@GetMapping("/notify/receiver")
|
|
@GetMapping("/notify/receiver")
|
|
|
public String receiverConfigPage(Model model) {
|
|
public String receiverConfigPage(Model model) {
|