package cn.iocoder.yudao.module.app.tickets.controller;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.module.tickets.service.DlRepairTicketsService;
import io.swagger.v3.oas.annotations.Operation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

/**
 * 维修工单表(DlRepairTickets)表控制层
 * @author 小李
 * @date 18:21 2024/9/13
 **/
@RestController
@RequestMapping("/userClient/repair/tickets")
public class TicketsAPI {

    /**
     * 服务对象
     */
    @Resource
    private DlRepairTicketsService dlRepairTicketsService;

    /**
     * 维修工单表 查看一个工单的详细信息
     *
     * @author 小李
     * @date 11:44 2024/9/23
     * @param id 工单ID
    **/
    @GetMapping("/get")
    @Operation(summary = "维修工单表 查看一个工单的详细信息")
    public CommonResult<?> getTicketsById(@RequestParam(value = "id") String id){
        return success(dlRepairTicketsService.getTicketsById(id));
    }
}
