fix: 修复 OpenAPI 路径参数 path 标签缺失导致启动 panic 的问题
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m17s
All checks were successful
构建并部署到测试环境(无 SSH) / build-and-deploy (push) Successful in 4m17s
- 为 enterprise_card_authorization_dto.go 中的 DTO 添加 path 标签 - 为 customer_account_dto.go 中的 DTO 添加 path 标签并重构结构 - 为 enterprise_dto.go 中的 DTO 添加 path 标签并重构结构 - 更新 handler 和 service 层使用正确的请求体类型
This commit is contained in:
@@ -16,7 +16,7 @@ type CreateEnterpriseReq struct {
|
||||
Address string `json:"address" validate:"max=255" maximum:"255" description:"详细地址"`
|
||||
}
|
||||
|
||||
type UpdateEnterpriseReq struct {
|
||||
type UpdateEnterpriseBody struct {
|
||||
OwnerShopID *uint `json:"owner_shop_id" description:"归属店铺ID"`
|
||||
EnterpriseName *string `json:"enterprise_name" validate:"omitempty,max=100" maximum:"100" description:"企业名称"`
|
||||
EnterpriseCode *string `json:"enterprise_code" validate:"omitempty,max=50" maximum:"50" description:"企业编号"`
|
||||
@@ -30,6 +30,11 @@ type UpdateEnterpriseReq struct {
|
||||
Address *string `json:"address" validate:"omitempty,max=255" maximum:"255" description:"详细地址"`
|
||||
}
|
||||
|
||||
type UpdateEnterpriseReq struct {
|
||||
IDReq
|
||||
UpdateEnterpriseBody
|
||||
}
|
||||
|
||||
type EnterpriseListReq struct {
|
||||
Page int `json:"page" query:"page" validate:"omitempty,min=1" minimum:"1" description:"页码(默认1)"`
|
||||
PageSize int `json:"page_size" query:"page_size" validate:"omitempty,min=1,max=100" minimum:"1" maximum:"100" description:"每页数量(默认20,最大100)"`
|
||||
@@ -67,14 +72,24 @@ type EnterprisePageResult struct {
|
||||
Size int `json:"size" description:"每页数量"`
|
||||
}
|
||||
|
||||
type UpdateEnterpriseStatusReq struct {
|
||||
type UpdateEnterpriseStatusBody struct {
|
||||
Status int `json:"status" validate:"required,oneof=0 1" required:"true" enum:"0,1" description:"状态(0=禁用, 1=启用)"`
|
||||
}
|
||||
|
||||
type UpdateEnterprisePasswordReq struct {
|
||||
type UpdateEnterpriseStatusReq struct {
|
||||
IDReq
|
||||
UpdateEnterpriseStatusBody
|
||||
}
|
||||
|
||||
type UpdateEnterprisePasswordBody struct {
|
||||
Password string `json:"password" validate:"required,min=6,max=20" required:"true" minimum:"6" maximum:"20" description:"新密码"`
|
||||
}
|
||||
|
||||
type UpdateEnterprisePasswordReq struct {
|
||||
IDReq
|
||||
UpdateEnterprisePasswordBody
|
||||
}
|
||||
|
||||
type CreateEnterpriseResp struct {
|
||||
Enterprise EnterpriseItem `json:"enterprise" description:"企业信息"`
|
||||
AccountID uint `json:"account_id" description:"账号ID"`
|
||||
@@ -84,7 +99,7 @@ type CreateEnterpriseResp struct {
|
||||
type CreateEnterpriseRequest = CreateEnterpriseReq
|
||||
|
||||
// UpdateEnterpriseRequest 更新企业请求(兼容旧接口)
|
||||
type UpdateEnterpriseRequest = UpdateEnterpriseReq
|
||||
type UpdateEnterpriseRequest = UpdateEnterpriseBody
|
||||
|
||||
// EnterpriseResponse 企业响应(兼容旧接口)
|
||||
type EnterpriseResponse = EnterpriseItem
|
||||
|
||||
Reference in New Issue
Block a user