HistoryController.java 804 B

12345678910111213141516171819202122232425
  1. package com.ym.controller;
  2. import com.ym.service.MessageService;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.web.bind.annotation.RequestMapping;
  5. import org.springframework.web.bind.annotation.RequestMethod;
  6. import org.springframework.web.bind.annotation.RestController;
  7. @RestController
  8. @RequestMapping("/history")
  9. public class HistoryController{
  10. @Autowired
  11. MessageService messageService;
  12. @RequestMapping(value = "/get", method = RequestMethod.POST)
  13. public Object get(String date) throws Exception {
  14. return messageService.historyGet(date);
  15. }
  16. @RequestMapping(value = "/remove", method = RequestMethod.POST)
  17. public Object remove(String date) throws Exception {
  18. return messageService.historyRemove(date);
  19. }
  20. }