对比新文件 |
| | |
| | | // |
| | | // Source code recreated from a .class file by IntelliJ IDEA |
| | | // (powered by FernFlower decompiler) |
| | | // |
| | | |
| | | package com.flow.controller; |
| | | |
| | | import com.flow.pojo.Mail; |
| | | import com.flow.service.mailService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | @RestController |
| | | @RequestMapping({"/hxzk"}) |
| | | public class mailController { |
| | | @Autowired |
| | | mailService mailService; |
| | | |
| | | public mailController() { |
| | | } |
| | | |
| | | @PostMapping({"findMail"}) |
| | | public int findMail(String company) { |
| | | return this.mailService.findMail(company); |
| | | } |
| | | |
| | | @PostMapping({"findMailUser"}) |
| | | public Mail findMailUser(String company) { |
| | | return this.mailService.findMailUser(company); |
| | | } |
| | | |
| | | @GetMapping({"addMail"}) |
| | | @ResponseBody |
| | | public int findMail(Mail mail) { |
| | | int exits = this.mailService.findMail(mail.getCompany()); |
| | | int pod; |
| | | if (exits == 1) { |
| | | pod = this.mailService.updateMail(mail); |
| | | } else { |
| | | pod = this.mailService.addMail(mail); |
| | | } |
| | | |
| | | return pod; |
| | | } |
| | | } |