|
|
@ -1,6 +1,7 @@ |
|
|
|
package com.storeroom.modules.dictionary.controller; |
|
|
|
|
|
|
|
|
|
|
|
import com.storeroom.annotaion.rest.AnonymousDeleteMapping; |
|
|
|
import com.storeroom.annotaion.rest.AnonymousGetMapping; |
|
|
|
import com.storeroom.annotaion.rest.AnonymousPostMapping; |
|
|
|
import com.storeroom.annotaion.rest.AnonymousPutMapping; |
|
|
@ -21,6 +22,7 @@ import lombok.RequiredArgsConstructor; |
|
|
|
import org.springframework.validation.annotation.Validated; |
|
|
|
import org.springframework.web.bind.annotation.RequestBody; |
|
|
|
import org.springframework.web.bind.annotation.RequestMapping; |
|
|
|
import org.springframework.web.bind.annotation.RequestParam; |
|
|
|
import org.springframework.web.bind.annotation.RestController; |
|
|
|
|
|
|
|
import java.util.*; |
|
|
@ -67,6 +69,27 @@ public class ArchivesTypeController { |
|
|
|
return ApiResponse.success("保存成功"); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("修改门类") |
|
|
|
@AnonymousPutMapping("updata-type") |
|
|
|
public ApiResponse<Object> updataAchivesType(@RequestBody ArchivesTypeDTO archivesTypeDTO) { |
|
|
|
if (!StringUtils.isEmpty(archivesTypeDTO.getId())) { |
|
|
|
archivesTypeService.update(archivesTypeDTO); |
|
|
|
return ApiResponse.success(ResponseStatus.SUCCESS); |
|
|
|
} |
|
|
|
throw new BaseException("id不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ApiOperation("删除门类类型") |
|
|
|
@AnonymousDeleteMapping("delete-type") |
|
|
|
public ApiResponse<Object> deleteType(@RequestParam String id) { |
|
|
|
if (!StringUtils.isEmpty(id)) { |
|
|
|
archivesTypeService.delete(id); |
|
|
|
return ApiResponse.success(ResponseStatus.SUCCESS); |
|
|
|
} |
|
|
|
throw new BaseException("id不能为空"); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("获取门类树状菜单") |
|
|
|
@AnonymousGetMapping("menu") |
|
|
|
//TODO:权限未添加 |
|
|
@ -93,9 +116,9 @@ public class ArchivesTypeController { |
|
|
|
throw new BaseException("id异常"); |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("修改数据") |
|
|
|
@ApiOperation("修改门类字段") |
|
|
|
@AnonymousPutMapping("update") |
|
|
|
public ApiResponse<Object> update(@RequestBody ArchivesDictionaryDTO arcdicDto) throws Exception { |
|
|
|
public ApiResponse<Object> updateDic(@RequestBody ArchivesDictionaryDTO arcdicDto) { |
|
|
|
if (!StringUtils.isEmpty(arcdicDto.getId())) { |
|
|
|
archivesDictionaryService.update(arcdicDto); |
|
|
|
return ApiResponse.success(ResponseStatus.SUCCESS); |
|
|
|