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:
@@ -40,15 +40,33 @@ type CreateCustomerAccountReq struct {
|
||||
ShopID uint `json:"shop_id" validate:"required" required:"true" description:"店铺ID"`
|
||||
}
|
||||
|
||||
type UpdateCustomerAccountReq struct {
|
||||
type UpdateCustomerAccountRequest struct {
|
||||
Username *string `json:"username" validate:"omitempty,min=2,max=50" minimum:"2" maximum:"50" description:"用户名"`
|
||||
Phone *string `json:"phone" validate:"omitempty,len=11" description:"手机号"`
|
||||
}
|
||||
|
||||
type UpdateCustomerAccountPasswordReq struct {
|
||||
// UpdateCustomerAccountReq 更新客户账号请求(用于文档生成,包含路径参数)
|
||||
type UpdateCustomerAccountReq struct {
|
||||
IDReq
|
||||
UpdateCustomerAccountRequest
|
||||
}
|
||||
|
||||
type UpdateCustomerAccountPasswordRequest struct {
|
||||
Password string `json:"password" validate:"required,min=6,max=20" required:"true" minimum:"6" maximum:"20" description:"新密码"`
|
||||
}
|
||||
|
||||
type UpdateCustomerAccountStatusReq struct {
|
||||
// UpdateCustomerAccountPasswordReq 修改客户账号密码请求(用于文档生成,包含路径参数)
|
||||
type UpdateCustomerAccountPasswordReq struct {
|
||||
IDReq
|
||||
UpdateCustomerAccountPasswordRequest
|
||||
}
|
||||
|
||||
type UpdateCustomerAccountStatusRequest struct {
|
||||
Status int `json:"status" validate:"required,oneof=0 1" required:"true" enum:"0,1" description:"状态(0=禁用, 1=启用)"`
|
||||
}
|
||||
|
||||
// UpdateCustomerAccountStatusReq 修改客户账号状态请求(用于文档生成,包含路径参数)
|
||||
type UpdateCustomerAccountStatusReq struct {
|
||||
IDReq
|
||||
UpdateCustomerAccountStatusRequest
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user