Browse Source

新建档案配置模块

master
刘力 3 years ago
parent
commit
1b6cec5d8e
  1. 20
      archives/pom.xml
  2. 1
      pom.xml
  3. 10
      system/src/main/java/com/storeroom/modules/system/controller/DictDetailController.java

20
archives/pom.xml

@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>yxk_StoreroomSystem</artifactId>
<groupId>com.storeroom</groupId>
<version>1.0</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<artifactId>archives</artifactId>
<name>档案配置</name>
<properties>
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
</properties>
</project>

1
pom.xml

@ -12,6 +12,7 @@
<module>common</module>
<module>system</module>
<module>logging</module>
<module>archives</module>
</modules>
<name>智能库房综合管理系统</name>

10
system/src/main/java/com/storeroom/modules/system/controller/DictDetailController.java

@ -15,8 +15,6 @@ import lombok.RequiredArgsConstructor;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
import org.springframework.data.web.PageableDefault;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
@ -36,20 +34,20 @@ public class DictDetailController {
@ApiOperation("查询字典详情")
@GetMapping
public ResponseEntity<Object> queryDictDetail(DictDetailQueryCriteria criteria,
public ApiResponse<Object> queryDictDetail(DictDetailQueryCriteria criteria,
@PageableDefault(sort = {"dictSort"}, direction = Sort.Direction.ASC) Pageable pageable) {
return new ResponseEntity<>(dictDetailService.queryAll(criteria, pageable), HttpStatus.OK);
return ApiResponse.success(dictDetailService.queryAll(criteria, pageable));
}
@ApiOperation("查询多个字典详情")
@GetMapping(value = "/map")
public ResponseEntity<Object> getDictDetailMaps(@RequestParam String dictName) {
public ApiResponse<Object> getDictDetailMaps(@RequestParam String dictName) {
String[] names = dictName.split("[,,]");
Map<String, List<DictDetailDto>> dictMap = new HashMap<>(16);
for (String name : names) {
dictMap.put(name, dictDetailService.getDictByName(name));
}
return new ResponseEntity<>(dictMap, HttpStatus.OK);
return ApiResponse.success(dictMap);
}
@Log("新增字典详情")

Loading…
Cancel
Save