package com.ruoyi.ibs.task.controller;

import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.ibs.task.domain.dto.VisitErrorLogDTO;
import com.ruoyi.ibs.task.service.VisitErrorLogService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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;

import javax.annotation.Resource;

/**
 * @Author 吴凯程
 * @Date 2025/3/3
 **/
@Api(tags = "任务管理-触达接口")
@RestController
@RequestMapping("/task/visit")
public class VisitErrorLogController {

    @Resource
    private VisitErrorLogService visitErrorLogService;

    @ApiOperation("新增无法触发日志")
    @Log(title = "走访-新增无法触发日志")
    @PostMapping("/error/add")
    public R<String> addVisitErrorLog(@RequestBody VisitErrorLogDTO visitErrorLogDTO) {
        return R.ok(visitErrorLogService.addVisitErrorLog(visitErrorLogDTO));
    }
}
