opai服务管理
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.0 KiB

  1. package com.bw.translate.controller;
  2. import javax.annotation.Resource;
  3. import org.springframework.stereotype.Controller;
  4. import org.springframework.web.bind.annotation.PostMapping;
  5. import org.springframework.web.bind.annotation.RequestBody;
  6. import org.springframework.web.bind.annotation.RequestMapping;
  7. import org.springframework.web.bind.annotation.RequestMethod;
  8. import org.springframework.web.bind.annotation.ResponseBody;
  9. import com.bw.translate.service.TaskReceiveService;
  10. import lombok.extern.slf4j.Slf4j;
  11. /**
  12. * 任务接收控制层
  13. * @author jian.mao
  14. * @date 2025年1月14日
  15. * @description
  16. */
  17. @Controller
  18. @RequestMapping("/task")
  19. @Slf4j
  20. public class TaskReceiveController {
  21. @Resource
  22. private TaskReceiveService taskReceiveService;
  23. @PostMapping("/put")
  24. @ResponseBody
  25. public String put(@RequestBody String param){
  26. String response = taskReceiveService.put(param);
  27. return response;
  28. }
  29. @RequestMapping(value = "/hello", method = RequestMethod.GET)
  30. @ResponseBody
  31. public String hello(String param, String token) {
  32. return "123";
  33. }
  34. }