修改接口说明

This commit is contained in:
2025-06-12 09:18:25 +08:00
parent 3f5d0d7b2b
commit f7cffcae21
16 changed files with 57 additions and 55 deletions

View File

@ -7,7 +7,7 @@ import (
// CreateSystemRewardReq 创建系统奖励请求
type CreateSystemRewardReq struct {
g.Meta `path:"/reward/system" method:"post" tags:"Reward" summary:"创建系统奖励"`
g.Meta `path:"/reward/system" method:"post" tags:"Reward" summary:"(系统)创建系统奖励"`
RewardTypeId int64 `v:"required|min:1#奖励类型ID不能为空|奖励类型ID无效" json:"rewardTypeId" dc:"奖励类型ID"`
Name string `v:"required|length:1,100#奖励名称不能为空|奖励名称长度为1-100" json:"name" dc:"奖励名称"`
Description string `v:"length:0,255#奖励描述长度为0-255" json:"description" dc:"奖励描述,可选"`
@ -24,7 +24,7 @@ type CreateSystemRewardRes struct {
// CreateStoreRewardReq 创建门店奖励请求
type CreateStoreRewardReq struct {
g.Meta `path:"/reward/store" method:"post" tags:"Reward" summary:"创建门店奖励"`
g.Meta `path:"/reward/store" method:"post" tags:"Reward" summary:"(商户门店后台)创建门店奖励"`
StoreIds []int64 `v:"required|distinct|min-length:1#门店ID列表不能为空|门店ID不能重复|门店ID列表不能为空" json:"storeIds" dc:"门店ID列表"`
RewardTypeId int64 `v:"required|min:1#奖励类型ID不能为空|奖励类型ID无效" json:"rewardTypeId" dc:"奖励类型ID"`
Name string `v:"required|length:1,100#奖励名称不能为空|奖励名称长度为1-100" json:"name" dc:"奖励名称"`
@ -42,7 +42,7 @@ type CreateStoreRewardRes struct {
// ListSystemRewardReq 查询系统奖励列表请求
type ListSystemRewardReq struct {
g.Meta `path:"/reward/system" method:"get" tags:"Reward" summary:"获取系统奖励列表"`
g.Meta `path:"/reward/system" method:"get" tags:"Reward" summary:"(系统)获取系统奖励列表"`
Page int `v:"min:1#页码必须大于0" json:"page" d:"1" dc:"页码"`
PageSize int `v:"min:1|max:100#每页数量必须为1-100" json:"pageSize" d:"10" dc:"每页数量"`
Name string `json:"name" dc:"奖励名称,模糊查询,可选"`
@ -58,7 +58,7 @@ type ListSystemRewardRes struct {
// ListStoreRewardReq 查询门店奖励列表请求
type ListStoreRewardReq struct {
g.Meta `path:"/reward/store" method:"get" tags:"Reward" summary:"获取门店奖励列表"`
g.Meta `path:"/reward/store" method:"get" tags:"Reward" summary:"(系统、商户门店后台)获取门店奖励列表"`
Page int `v:"min:1#页码必须大于0" json:"page" d:"1" dc:"页码"`
PageSize int `v:"min:1|max:100#每页数量必须为1-100" json:"pageSize" d:"10" dc:"每页数量"`
StoreId int64 `v:"min:0#门店ID无效" json:"storeId" d:"0" dc:"门店ID0=全部(管理员使用),其他值过滤该门店可见的奖励,可选"`
@ -75,7 +75,7 @@ type ListStoreRewardRes struct {
// UpdateSystemRewardReq 更新系统奖励请求
type UpdateSystemRewardReq struct {
g.Meta `path:"/reward/system" method:"put" tags:"Reward" summary:"更新系统奖励"`
g.Meta `path:"/reward/system" method:"put" tags:"Reward" summary:"(系统)更新系统奖励"`
Id uint64 `v:"required|min:1#奖励ID不能为空|奖励ID无效" json:"id" dc:"奖励ID"`
RewardTypeId int64 `v:"required|min:1#奖励类型ID不能为空|奖励类型ID无效" json:"rewardTypeId" dc:"奖励类型ID"`
Name string `v:"required|length:1,100#奖励名称不能为空|奖励名称长度为1-100" json:"name" dc:"奖励名称"`
@ -93,7 +93,7 @@ type UpdateSystemRewardRes struct {
// UpdateStoreRewardReq 更新门店奖励请求
type UpdateStoreRewardReq struct {
g.Meta `path:"/reward/store/{id}" method:"put" tags:"Reward" summary:"更新门店奖励"`
g.Meta `path:"/reward/store/{id}" method:"put" tags:"Reward" summary:"(系统、商户门店后台)更新门店奖励"`
Id uint64 `v:"required|min:1#奖励ID不能为空|奖励ID无效" json:"id" dc:"奖励ID"`
StoreIds []int64 `v:"required|distinct|min-length:1#门店ID列表不能为空|门店ID不能重复|至少指定一个门店ID" json:"storeIds" dc:"关联门店ID列表"`
RewardTypeId int64 `v:"required|min:1#奖励类型ID不能为空|奖励类型ID无效" json:"rewardTypeId" dc:"奖励类型ID"`
@ -112,7 +112,7 @@ type UpdateStoreRewardRes struct {
// DeleteSystemRewardReq 删除系统奖励请求
type DeleteSystemRewardReq struct {
g.Meta `path:"/reward/system/{id}" method:"delete" tags:"Reward" summary:"删除系统奖励"`
g.Meta `path:"/reward/system/{id}" method:"delete" tags:"Reward" summary:"(系统)删除系统奖励"`
Id uint64 `v:"required|min:1#奖励ID不能为空|奖励ID无效" json:"id" dc:"奖励ID"`
}
@ -123,7 +123,7 @@ type DeleteSystemRewardRes struct {
// DeleteStoreRewardReq 删除门店奖励请求
type DeleteStoreRewardReq struct {
g.Meta `path:"/reward/store/{id}" method:"delete" tags:"Reward" summary:"删除门店奖励"`
g.Meta `path:"/reward/store/{id}" method:"delete" tags:"Reward" summary:"(系统、商户门店后台)删除门店奖励"`
Id uint64 `v:"required|min:1#奖励ID不能为空|奖励ID无效" json:"id" dc:"奖励ID"`
}