package com.mosty.yjzl.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mosty.base.model.BasePage;
import com.mosty.base.model.entity.lzother.TAlarmYjgj;
import com.mosty.base.model.entity.yjzl.TbYjxxMxyj;
import com.mosty.common.base.domain.ResponseResult;
import com.mosty.yjzl.service.TbYjxxLzService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.*;

/**
 * 预警信息表(TbYjxx)泸州拓尔思
 *
 * @author dw
 * @since 2022-11-20
 */
@Api(tags = "预警信息相关接口(泸州拓尔思)")
@RestController
@RequestMapping("tbYjxxLz")
@AllArgsConstructor
public class TbYjxxLzController {

    private final TbYjxxLzService tbYjxxLzService;

    @ApiOperation("添加泸州拓尔思预警信息")
    @PostMapping(value = "/addYjxx")
    public ResponseResult<Void> addYjxx(@RequestBody TAlarmYjgj item) {
        this.tbYjxxLzService.addYjxx(item);
        return ResponseResult.success();
    }

    @ApiOperation("LZ模型预警查询")
    @GetMapping
    public ResponseResult<IPage<TbYjxxMxyj>> querYjmx(BasePage basePage, String ssbmdm) {
        return ResponseResult.success(this.tbYjxxLzService.querYjmx(basePage,ssbmdm));
    }




}


