|
@@ -0,0 +1,46 @@
|
|
|
+package com.jpsoft.picc.modules.auth.controller;
|
|
|
+
|
|
|
+import com.jpsoft.picc.modules.common.dto.MessageResult;
|
|
|
+import com.jpsoft.picc.modules.sys.entity.DataDictionary;
|
|
|
+import com.jpsoft.picc.modules.sys.service.DataDictionaryService;
|
|
|
+import io.swagger.annotations.Api;
|
|
|
+import io.swagger.annotations.ApiImplicitParam;
|
|
|
+import io.swagger.annotations.ApiImplicitParams;
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.web.bind.annotation.PostMapping;
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
+
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
+@Api(description = "数据字典")
|
|
|
+@RestController
|
|
|
+@RequestMapping("/auth/dataDictionary")
|
|
|
+public class DataDictionaryController {
|
|
|
+ @Autowired
|
|
|
+ private DataDictionaryService dataDictionaryService;
|
|
|
+
|
|
|
+ @PostMapping("findByCatalogName")
|
|
|
+ @ApiOperation(value = "根据目录名称查询数据列表")
|
|
|
+ @ApiImplicitParams({
|
|
|
+ @ApiImplicitParam(name = "catalogName",value = "数据目录名称", required = true, paramType = "form",dataType = "String"),
|
|
|
+ })
|
|
|
+ public MessageResult<List> findByCatalogName(String catalogName){
|
|
|
+ MessageResult<List> messageResult = new MessageResult<>();
|
|
|
+
|
|
|
+ try {
|
|
|
+ //todo
|
|
|
+ List<DataDictionary> list = dataDictionaryService.findByCatalogName(catalogName);
|
|
|
+ messageResult.setData(list);
|
|
|
+
|
|
|
+ messageResult.setResult(true);
|
|
|
+ }
|
|
|
+ catch (Exception ex){
|
|
|
+ messageResult.setResult(false);
|
|
|
+ messageResult.setMessage(ex.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ return messageResult;
|
|
|
+ }
|
|
|
+}
|