package com.highdatas.mdm.controller;
|
|
|
import com.baomidou.mybatisplus.mapper.EntityWrapper;
|
import com.highdatas.mdm.entity.SysDbtype;
|
import com.highdatas.mdm.pojo.CodeMsg;
|
import com.highdatas.mdm.pojo.Result;
|
import com.highdatas.mdm.service.ISysDbtypeService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMethod;
|
import org.springframework.web.bind.annotation.RestController;
|
|
import java.util.List;
|
|
/**
|
* <p>
|
* 前端控制器
|
* </p>
|
*
|
* @author kimi
|
* @since 2020-02-15
|
*/
|
@RestController
|
@RequestMapping("/sysDbtype")
|
public class SysDbtypeController {
|
@Autowired
|
ISysDbtypeService dbtypeService;
|
|
/**
|
*
|
* @description: 获取允许的db类型
|
* @return: 配置信息
|
*
|
*/
|
@RequestMapping(value = "/all", method = RequestMethod.GET)
|
public Result all() {
|
List<SysDbtype> sysDbtypes = dbtypeService.selectList(new EntityWrapper<SysDbtype>().eq("active", true));
|
if (sysDbtypes != null) {
|
return Result.success(sysDbtypes);
|
}else {
|
return Result.error(CodeMsg.SELECT_ERROR);
|
}
|
}
|
}
|