字典类型信息查询
parent
2495bb4792
commit
47bfc55062
|
@ -1,9 +1,18 @@
|
|||
package com.muyu.source.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.source.domain.DataType;
|
||||
import com.muyu.source.service.DataTypeService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author Lenovo
|
||||
* @ Tool:IntelliJ IDEA
|
||||
|
@ -15,4 +24,23 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@RestController
|
||||
@RequestMapping("/type")
|
||||
public class DataTypeController extends BaseController {
|
||||
@Autowired
|
||||
private DataTypeService dataTypeService;
|
||||
|
||||
/**
|
||||
* 查询数据库类型所有信息
|
||||
* @return 数据库类型信息
|
||||
*/
|
||||
@GetMapping("/getDataType")
|
||||
public Result getDataType(){
|
||||
List<DataType> list = dataTypeService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
@GetMapping("/getDataTypeByType/{type}")
|
||||
public Result getDataTypeByType(@PathVariable("type") String type){
|
||||
DataType dataType = dataTypeService.getOne(new LambdaQueryWrapper<>() {{
|
||||
eq(DataType::getType, type);
|
||||
}});
|
||||
return Result.success(dataType);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,16 +32,6 @@ public class DictDataController {
|
|||
@Autowired
|
||||
private DictDataService dictDataService;
|
||||
|
||||
/**
|
||||
* 查询字典数据
|
||||
* @return 查询结果
|
||||
*/
|
||||
@GetMapping("/selectDictDataList")
|
||||
public Result<List<DictData>> selectDictDataList() {
|
||||
List<DictData> list = dictDataService.list();
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加字典数据
|
||||
*
|
||||
|
|
|
@ -26,7 +26,7 @@ import java.util.List;
|
|||
*/
|
||||
@Log4j2
|
||||
@RestController
|
||||
@RequestMapping("/dict_type")
|
||||
@RequestMapping("/dictType")
|
||||
public class DictTypeController {
|
||||
public DictTypeController() {
|
||||
log.info("forest扫描路径:{}", ForestScannerRegister.getBasePackages());
|
||||
|
|
Loading…
Reference in New Issue