|
@@ -49,7 +49,7 @@ public class DictDataTenantController {
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "新增租户字典数据")
|
|
|
@ApiOperationSupport(order = 1)
|
|
|
- @PreAuthorize("@ss.hasPermission('tenant:dict-data:create')")
|
|
|
+ // @PreAuthorize("@ss.hasPermission('tenant:dict-data:create')")
|
|
|
public CommonResult<Long> createDictData(@Valid @RequestBody DictDataTenantSaveReqVO createReqVO) {
|
|
|
return success(dictDataTenantService.createDictData(createReqVO));
|
|
|
}
|
|
@@ -57,7 +57,7 @@ public class DictDataTenantController {
|
|
|
@PutMapping("/update")
|
|
|
@Operation(summary = "修改租户字典数据")
|
|
|
@ApiOperationSupport(order = 2)
|
|
|
- @PreAuthorize("@ss.hasPermission('tenant:dict-data:update')")
|
|
|
+ // @PreAuthorize("@ss.hasPermission('tenant:dict-data:update')")
|
|
|
public CommonResult<Boolean> updateDictData(@Valid @RequestBody DictDataTenantUpdateReqVO updateReqVO) {
|
|
|
dictDataTenantService.updateDictData(updateReqVO);
|
|
|
return success(true);
|
|
@@ -67,7 +67,7 @@ public class DictDataTenantController {
|
|
|
@Operation(summary = "删除租户字典数据")
|
|
|
@ApiOperationSupport(order = 3)
|
|
|
@Parameter(name = "id", description = "编号", required = true)
|
|
|
- @PreAuthorize("@ss.hasPermission('tenant:dict-data:delete')")
|
|
|
+ // @PreAuthorize("@ss.hasPermission('tenant:dict-data:delete')")
|
|
|
public CommonResult<Boolean> deleteDictData(@RequestParam("id") Long id) {
|
|
|
dictDataTenantService.deleteDictData(id);
|
|
|
return success(true);
|
|
@@ -77,7 +77,7 @@ public class DictDataTenantController {
|
|
|
@Operation(summary = "获得租户字典数据")
|
|
|
@ApiOperationSupport(order = 4)
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
- @PreAuthorize("@ss.hasPermission('tenant:dict-data:query')")
|
|
|
+ // @PreAuthorize("@ss.hasPermission('tenant:dict-data:query')")
|
|
|
public CommonResult<DictDataTenantRespVO> getDictData(@RequestParam("id") Long id) {
|
|
|
DictDataTenantDO dictData = dictDataTenantService.getDictData(id);
|
|
|
return success(BeanUtils.toBean(dictData, DictDataTenantRespVO.class));
|
|
@@ -86,7 +86,7 @@ public class DictDataTenantController {
|
|
|
@GetMapping("/page")
|
|
|
@Operation(summary = "获得租户字典数据分页")
|
|
|
@ApiOperationSupport(order = 5)
|
|
|
- @PreAuthorize("@ss.hasPermission('tenant:dict-data:query')")
|
|
|
+ // @PreAuthorize("@ss.hasPermission('tenant:dict-data:query')")
|
|
|
public CommonResult<PageResult<DictDataTenantRespVO>> getDictDataPage(@Valid @ParameterObject DictDataTenantPageReqVO pageReqVO) {
|
|
|
PageResult<DictDataTenantDO> pageResult = dictDataTenantService.getDictDataPage(pageReqVO);
|
|
|
return success(BeanUtils.toBean(pageResult, DictDataTenantRespVO.class));
|
|
@@ -95,7 +95,7 @@ public class DictDataTenantController {
|
|
|
@GetMapping("/export-excel")
|
|
|
@Operation(summary = "导出租户字典数据 Excel")
|
|
|
@ApiOperationSupport(order = 6)
|
|
|
- @PreAuthorize("@ss.hasPermission('tenant:dict-data:export')")
|
|
|
+ // @PreAuthorize("@ss.hasPermission('tenant:dict-data:export')")
|
|
|
@ApiAccessLog(operateType = EXPORT)
|
|
|
public void exportDictDataExcel(@Valid @ParameterObject DictDataTenantPageReqVO pageReqVO,
|
|
|
HttpServletResponse response) throws IOException {
|
|
@@ -106,13 +106,25 @@ public class DictDataTenantController {
|
|
|
BeanUtils.toBean(list, DictDataTenantRespVO.class));
|
|
|
}
|
|
|
|
|
|
- @GetMapping(value = {"/list-all-simple", "simple-list"})
|
|
|
- @Operation(summary = "获得全部字典数据列表", description = "一般用于管理后台缓存字典数据在本地")
|
|
|
+ @GetMapping(value = {"/list-all-simple"})
|
|
|
+ @Operation(summary = "根据字典类型获取所有开启状态的数据列表", description = "用于新增和修改业务")
|
|
|
@ApiOperationSupport(order = 7)
|
|
|
+ @Parameter(name = "dictType", description = "字典类型", required = true)
|
|
|
// 无需添加权限认证,因为前端全局都需要
|
|
|
- public CommonResult<List<DictDataSimpleRespVO>> getSimpleDictDataList() {
|
|
|
+ public CommonResult<List<DictDataSimpleRespVO>> getSimpleDictDataList(@RequestParam("dictType") String dictType) {
|
|
|
List<DictDataTenantDO> list = dictDataTenantService.getDictDataList(
|
|
|
- CommonStatusEnum.ENABLE.getStatus(), null);
|
|
|
+ CommonStatusEnum.ENABLE.getStatus(), dictType);
|
|
|
+ return success(BeanUtils.toBean(list, DictDataSimpleRespVO.class));
|
|
|
+ }
|
|
|
+
|
|
|
+ @GetMapping(value = {"/list-all"})
|
|
|
+ @Operation(summary = "根据字典类型获取所有状态的数据列表", description = "用于查询业务")
|
|
|
+ @ApiOperationSupport(order = 8)
|
|
|
+ @Parameter(name = "dictType", description = "字典类型", required = true)
|
|
|
+ // 无需添加权限认证,因为前端全局都需要
|
|
|
+ public CommonResult<List<DictDataSimpleRespVO>> getAllDictDataList(@RequestParam("dictType") String dictType) {
|
|
|
+ List<DictDataTenantDO> list = dictDataTenantService.getDictDataList(
|
|
|
+ null, dictType);
|
|
|
return success(BeanUtils.toBean(list, DictDataSimpleRespVO.class));
|
|
|
}
|
|
|
|