package com.base.biz.controller;

import com.base.biz.service.CheckService;
import com.base.orbit.web.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "验重接口")
@RestController
@RequestMapping("/api/v1/check")
public class CheckController {

    @Resource
    CheckService checkService;

    @ApiOperation("字段验重")
    @GetMapping
    public Result<Boolean> check(@ApiParam(name = "tableName", value = "表名")String tableName, @ApiParam(name = "field", value = "字段名") String field, @ApiParam(name = "value", value = "字段值") String value){
        return Result.success(checkService.check(tableName,field,value));
    }

}
