|
@ -0,0 +1,37 @@ |
|
|
|
|
|
package com.storeroom.modules.dictionary.controller; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.storeroom.annotaion.rest.AnonymousPostMapping; |
|
|
|
|
|
import com.storeroom.exception.BaseException; |
|
|
|
|
|
import com.storeroom.modules.dictionary.service.ArchivesDictionaryService; |
|
|
|
|
|
import com.storeroom.modules.dictionary.service.dto.ArchivesDictionaryDTO; |
|
|
|
|
|
import com.storeroom.modules.dictionary.service.dto.ArchivesDisplaySmallDTO; |
|
|
|
|
|
import com.storeroom.utils.ApiResponse; |
|
|
|
|
|
import com.storeroom.utils.StringUtils; |
|
|
|
|
|
import com.storeroom.utils.enums.ResponseStatus; |
|
|
|
|
|
import io.swagger.annotations.Api; |
|
|
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
|
|
import lombok.RequiredArgsConstructor; |
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
|
|
|
|
@Api(tags = "列表界面设置") |
|
|
|
|
|
@RestController |
|
|
|
|
|
@RequiredArgsConstructor |
|
|
|
|
|
@RequestMapping("/api/arc-list/") |
|
|
|
|
|
public class ArchivesListSettingController { |
|
|
|
|
|
|
|
|
|
|
|
private final ArchivesDictionaryService archivesDictionaryService; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("新增列表显示设置") |
|
|
|
|
|
@AnonymousPostMapping("create") |
|
|
|
|
|
public ApiResponse<Object> create(@RequestBody ArchivesDisplaySmallDTO archivesDisplaySmallDTO){ |
|
|
|
|
|
if (!StringUtils.isEmpty(archivesDisplaySmallDTO.getId())){ |
|
|
|
|
|
archivesDictionaryService.createListDisplay(archivesDisplaySmallDTO); |
|
|
|
|
|
return ApiResponse.success(ResponseStatus.SUCCESS); |
|
|
|
|
|
} |
|
|
|
|
|
throw new BaseException("id异常"); |
|
|
|
|
|
} |
|
|
|
|
|
} |