feat: 角色默认信用与店铺实际额度管理
All checks were successful
构建并部署前端到测试环境 / build-and-deploy (push) Successful in 6m12s

This commit is contained in:
luo
2026-07-23 14:10:48 +08:00
parent d5fd8ac564
commit d7c2c146fe
14 changed files with 669 additions and 21 deletions

View File

@@ -8,7 +8,7 @@ import type {
PlatformRole,
RoleQueryParams,
PlatformRoleFormData,
PermissionTreeNode,
UpdateRoleDefaultCreditRequest,
BaseResponse,
PaginationResponse
} from '@/types/api'
@@ -51,6 +51,19 @@ export class RoleService extends BaseService {
return this.update(`/api/admin/roles/${id}`, data)
}
/**
* 更新客户角色默认信用
* PUT /api/admin/roles/{id}/default-credit
* @param id 角色ID
* @param data 默认信用配置
*/
static updateRoleDefaultCredit(
id: number,
data: UpdateRoleDefaultCreditRequest
): Promise<BaseResponse> {
return this.put<BaseResponse>(`/api/admin/roles/${id}/default-credit`, data)
}
/**
* 删除角色
* DELETE /api/admin/roles/{id}

View File

@@ -10,6 +10,7 @@ import type {
UpdateShopParams,
ShopRolesResponse,
AssignShopRolesRequest,
UpdateShopCreditLimitRequest,
BaseResponse,
PaginationResponse
} from '@/types/api'
@@ -114,4 +115,17 @@ export class ShopService extends BaseService {
static deleteShopRole(shopId: number, roleId: number): Promise<BaseResponse> {
return this.delete<BaseResponse>(`/api/admin/shops/${shopId}/roles/${roleId}`)
}
/**
* 更新店铺实际信用额度
* PUT /api/admin/shops/{id}/credit-limit
* @param shopId 店铺ID
* @param data 实际信用额度配置
*/
static updateShopCreditLimit(
shopId: number,
data: UpdateShopCreditLimitRequest
): Promise<BaseResponse> {
return this.put<BaseResponse>(`/api/admin/shops/${shopId}/credit-limit`, data)
}
}