mirror of
https://github.com/continew-org/continew-admin.git
synced 2025-09-10 08:57:14 +08:00
build: continew-starter 2.13.3 => 2.13.4
1.移除 continew-starter-security-password 模块依赖及相关配置(已融合到 security-crypto 模块) 2.更新 continew-starter-security-crypto 模块配置 3.BaseController 增加跳过 DICT、DICT_TREE 接口权限处理 4.EnableCrudRestController => EnableCrudApi 5.调整 CRUD 相关 Controller API 接口配置,增加 DICT 或 DICT_TREE 接口,移除原 CommonController 接口
This commit is contained in:
@@ -22,5 +22,5 @@ import ${packageName}.service.${classNamePrefix}Service;
|
||||
*/
|
||||
@Tag(name = "${businessName}管理 API")
|
||||
@RestController
|
||||
@CrudRequestMapping(value = "/${apiModuleName}/${apiName}", api = {Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.BATCH_DELETE, Api.EXPORT})
|
||||
@CrudRequestMapping(value = "/${apiModuleName}/${apiName}", api = {Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.BATCH_DELETE, Api.EXPORT, Api.DICT})
|
||||
public class ${className} extends BaseController<${classNamePrefix}Service, ${classNamePrefix}Resp, ${classNamePrefix}DetailResp, ${classNamePrefix}Query, ${classNamePrefix}Req> {}
|
@@ -1,4 +1,5 @@
|
||||
import http from '@/utils/http'
|
||||
import type { LabelValueState } from '@/types/global'
|
||||
|
||||
const BASE_URL = '/${apiModuleName}/${apiName}'
|
||||
|
||||
@@ -64,3 +65,8 @@ export function delete${classNamePrefix}(id: string) {
|
||||
export function export${classNamePrefix}(query: ${classNamePrefix}Query) {
|
||||
return http.download(`${'$'}{BASE_URL}/export`, query)
|
||||
}
|
||||
|
||||
/** @desc 查询${businessName}字典 */
|
||||
export function list${classNamePrefix}Dict(query?: ${classNamePrefix}Query) {
|
||||
return http.get<LabelValueState[]>(`${BASE_URL}/dict`, query)
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="gi_table_page">
|
||||
<GiPageLayout>
|
||||
<GiTable
|
||||
title="${businessName}管理"
|
||||
row-key="id"
|
||||
@@ -102,7 +102,7 @@
|
||||
|
||||
<${classNamePrefix}AddModal ref="${classNamePrefix}AddModalRef" @save-success="search" />
|
||||
<${classNamePrefix}DetailDrawer ref="${classNamePrefix}DetailDrawerRef" />
|
||||
</div>
|
||||
</GiPageLayout>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
|
@@ -25,16 +25,10 @@ import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import top.continew.admin.tenant.model.query.PackageQuery;
|
||||
import top.continew.admin.tenant.service.PackageService;
|
||||
import top.continew.admin.tenant.service.TenantService;
|
||||
import top.continew.starter.extension.crud.model.query.SortQuery;
|
||||
import top.continew.starter.extension.crud.model.resp.LabelValueResp;
|
||||
import top.continew.starter.extension.tenant.annotation.TenantIgnore;
|
||||
import top.continew.starter.log.annotation.Log;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 公共 API
|
||||
*
|
||||
@@ -49,16 +43,8 @@ import java.util.List;
|
||||
@RequestMapping("/tenant/common")
|
||||
public class CommonController {
|
||||
|
||||
private final PackageService packageService;
|
||||
|
||||
private final TenantService tenantService;
|
||||
|
||||
@Operation(summary = "查询套餐字典", description = "查询套餐字典列表")
|
||||
@GetMapping("/dict/package")
|
||||
public List<LabelValueResp> listPackageDict(PackageQuery query, SortQuery sortQuery) {
|
||||
return packageService.listDict(query, sortQuery);
|
||||
}
|
||||
|
||||
@SaIgnore
|
||||
@TenantIgnore
|
||||
@Operation(summary = "根据域名查询租户 ID", description = "根据域名查询租户 ID")
|
||||
|
@@ -46,7 +46,7 @@ import java.util.List;
|
||||
@Tag(name = "套餐管理 API")
|
||||
@RestController
|
||||
@RequiredArgsConstructor
|
||||
@CrudRequestMapping(value = "/tenant/package", api = {Api.LIST, Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.DELETE})
|
||||
@CrudRequestMapping(value = "/tenant/package", api = {Api.LIST, Api.PAGE, Api.GET, Api.CREATE, Api.UPDATE, Api.DELETE, Api.DICT})
|
||||
public class PackageController extends BaseController<PackageService, PackageResp, PackageDetailResp, PackageQuery, PackageReq> {
|
||||
|
||||
private final TenantExtensionProperties tenantExtensionProperties;
|
||||
|
Reference in New Issue
Block a user