BookableManageController.java 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. package thyyxxk.webserver.controller.examinations;
  2. import org.springframework.beans.factory.annotation.Autowired;
  3. import org.springframework.web.bind.annotation.*;
  4. import thyyxxk.webserver.entity.ResultVo;
  5. import thyyxxk.webserver.entity.examinations.bookablemanage.SearchParam;
  6. import thyyxxk.webserver.service.examinations.BookableManageService;
  7. import java.util.Map;
  8. /**
  9. * @author: DingJie
  10. * @create: 2021-04-25 11:32:57
  11. **/
  12. @RestController
  13. @RequestMapping("/bookableManage")
  14. public class BookableManageController {
  15. private final BookableManageService service;
  16. @Autowired
  17. public BookableManageController(BookableManageService service) {
  18. this.service = service;
  19. }
  20. @PostMapping("/searchItems")
  21. public ResultVo<Map<String, Object>> searchItems(@RequestBody SearchParam param) {
  22. return service.searchItems(param);
  23. }
  24. @GetMapping("/updateWxBookableFlag")
  25. public ResultVo<Integer> updateWxBookableFlag(@RequestParam("tableName") String tableName,
  26. @RequestParam("code") String code,
  27. @RequestParam("flag") Integer flag) {
  28. return service.updateWxBookableFlag(tableName, code, flag);
  29. }
  30. }