TicketController.java 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package com.example.xiaoshiweixinback.controller;
  2. import com.example.xiaoshiweixinback.business.common.Constants;
  3. import com.example.xiaoshiweixinback.business.common.Response;
  4. import com.example.xiaoshiweixinback.business.common.base.Records;
  5. import com.example.xiaoshiweixinback.entity.product.ProductDTO;
  6. import com.example.xiaoshiweixinback.entity.dto.ticket.TicketAddDTO;
  7. import com.example.xiaoshiweixinback.service.TicketService;
  8. import io.swagger.v3.oas.annotations.Operation;
  9. import lombok.RequiredArgsConstructor;
  10. import lombok.extern.slf4j.Slf4j;
  11. import org.springframework.web.bind.annotation.PostMapping;
  12. import org.springframework.web.bind.annotation.RequestBody;
  13. import org.springframework.web.bind.annotation.RequestMapping;
  14. import org.springframework.web.bind.annotation.RestController;
  15. @Slf4j
  16. @RequestMapping(Constants.XIAOSHI_WEIXINBACK + "/ticket")
  17. @RestController
  18. @RequiredArgsConstructor
  19. public class TicketController {
  20. private final TicketService ticketService;
  21. @Operation(summary = "添加工单")
  22. @PostMapping("/addTicket")
  23. public Response addTicket(@RequestBody TicketAddDTO ticketAddDTO){
  24. Integer id =ticketService.addorUpdateTicket(ticketAddDTO);
  25. Records records =new Records();
  26. records.setData(id);
  27. return Response.success(records);
  28. }
  29. public Response queryHotProduct(@RequestBody ProductDTO productDTO){
  30. // Records records =productService.queryHotProduct(productDTO);
  31. return Response.success("records");
  32. }
  33. @Operation(summary = "更新工单进度")
  34. @PostMapping("/updateTicketProcess")
  35. public Response updateTicketProcess(@RequestBody ProductDTO productDTO){
  36. // Records records =productService.queryHotProduct(productDTO);
  37. return Response.success("records");
  38. }
  39. }