package com.fjhx.victoriatourist.controller.abnormal;

import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.fjhx.victoriatourist.entity.abnormal.vo.AbnormalDetailsVo;
import com.fjhx.victoriatourist.entity.abnormal.dto.AbnormalDetailsSelectDto;
import com.fjhx.victoriatourist.entity.abnormal.dto.AbnormalDetailsDto;
import com.fjhx.victoriatourist.service.abnormal.AbnormalDetailsService;
import org.springframework.beans.factory.annotation.Autowired;


/**
 * <p>
 * 异常处理详情 前端控制器
 * </p>
 *
 * @author 
 * @since 2023-04-11
 */
@RestController
@RequestMapping("/abnormalDetails")
public class AbnormalDetailsController {

    @Autowired
    private AbnormalDetailsService abnormalDetailsService;

    /**
     * 异常处理详情分页
     */
    @PostMapping("/page")
    public Page<AbnormalDetailsVo> page(@RequestBody AbnormalDetailsSelectDto dto) {
        return abnormalDetailsService.getPage(dto);
    }

    /**
     * 异常处理详情新增
     */
    @PostMapping("/add")
    public void add(@RequestBody AbnormalDetailsDto abnormalDetailsDto) {
        abnormalDetailsService.add(abnormalDetailsDto);
    }

}
