package com.example.xiaoshiweixinback.controller; import com.example.xiaoshiweixinback.business.common.Constants; import com.example.xiaoshiweixinback.business.common.Response; import com.example.xiaoshiweixinback.business.common.base.Records; import com.example.xiaoshiweixinback.entity.product.ProductDTO; import com.example.xiaoshiweixinback.entity.dto.ticket.TicketAddDTO; import com.example.xiaoshiweixinback.service.TicketService; import io.swagger.v3.oas.annotations.Operation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @Slf4j @RequestMapping(Constants.XIAOSHI_WEIXINBACK + "/ticket") @RestController @RequiredArgsConstructor public class TicketController { private final TicketService ticketService; @Operation(summary = "添加工单") @PostMapping("/addTicket") public Response addTicket(@RequestBody TicketAddDTO ticketAddDTO){ Integer id =ticketService.addorUpdateTicket(ticketAddDTO); Records records =new Records(); records.setData(id); return Response.success(records); } public Response queryHotProduct(@RequestBody ProductDTO productDTO){ // Records records =productService.queryHotProduct(productDTO); return Response.success("records"); } @Operation(summary = "更新工单进度") @PostMapping("/updateTicketProcess") public Response updateTicketProcess(@RequestBody ProductDTO productDTO){ // Records records =productService.queryHotProduct(productDTO); return Response.success("records"); } }