package com.ruoyi.web.primary.controller;


import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.web.primary.entity.DatabaseMetadata;
import com.ruoyi.web.primary.service.IDatabaseMetadataService;
import com.ruoyi.web.v2.v1.entity.JsStockInfoRequest;
import com.ruoyi.web.v2.v1.service.IJsStockInfoService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;

import static com.ruoyi.common.core.domain.AjaxResult.error;
import static com.ruoyi.common.core.domain.AjaxResult.success;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author author
 * @since 2025-11-25
 */
@RestController
@RequestMapping("/database-metadata")
public class DatabaseMetadataController {
    @Autowired
    private IDatabaseMetadataService metadataService;
    @GetMapping("/list/list")
    public AjaxResult listVillageSpecialByPage() {
        return success(metadataService.list(new QueryWrapper<DatabaseMetadata>()
                .eq("db_status",1).select("db_name , username,version,version_name")));
    }
}
