删除奖励、奖励类型门店奖励相关
This commit is contained in:
@ -1,23 +0,0 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package reward
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"server/api/reward/v1"
|
||||
)
|
||||
|
||||
type IRewardV1 interface {
|
||||
CreateSystemReward(ctx context.Context, req *v1.CreateSystemRewardReq) (res *v1.CreateSystemRewardRes, err error)
|
||||
CreateStoreReward(ctx context.Context, req *v1.CreateStoreRewardReq) (res *v1.CreateStoreRewardRes, err error)
|
||||
ListSystemReward(ctx context.Context, req *v1.ListSystemRewardReq) (res *v1.ListSystemRewardRes, err error)
|
||||
ListStoreReward(ctx context.Context, req *v1.ListStoreRewardReq) (res *v1.ListStoreRewardRes, err error)
|
||||
UpdateSystemReward(ctx context.Context, req *v1.UpdateSystemRewardReq) (res *v1.UpdateSystemRewardRes, err error)
|
||||
UpdateStoreReward(ctx context.Context, req *v1.UpdateStoreRewardReq) (res *v1.UpdateStoreRewardRes, err error)
|
||||
DeleteSystemReward(ctx context.Context, req *v1.DeleteSystemRewardReq) (res *v1.DeleteSystemRewardRes, err error)
|
||||
DeleteStoreReward(ctx context.Context, req *v1.DeleteStoreRewardReq) (res *v1.DeleteStoreRewardRes, err error)
|
||||
RewardCallback(ctx context.Context, req *v1.RewardCallbackReq) (res *v1.RewardCallbackRes, err error)
|
||||
}
|
||||
@ -1,156 +0,0 @@
|
||||
package v1
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
)
|
||||
|
||||
// CreateSystemRewardReq 创建系统奖励请求
|
||||
type CreateSystemRewardReq struct {
|
||||
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:"奖励描述,可选"`
|
||||
Status int `v:"in:1,2#状态必须为1或2" json:"status" dc:"状态:1=启用,2=禁用,默认1" d:"1"`
|
||||
Stock int `v:"min:0#库存不能为负" json:"stock" dc:"奖励库存,0表示无限制" d:"0"`
|
||||
StartAt *gtime.Time `v:"date#开始时间格式无效" json:"startAt" dc:"奖励有效开始时间,可选"`
|
||||
ExpireAt *gtime.Time `v:"date|after-equal:start_at#结束时间格式无效|结束时间必须晚于开始时间" json:"expireAt" dc:"奖励有效结束时间,可选"`
|
||||
}
|
||||
|
||||
// CreateSystemRewardRes 创建系统奖励响应
|
||||
type CreateSystemRewardRes struct {
|
||||
Id int64 `json:"id" dc:"创建的奖励ID"`
|
||||
}
|
||||
|
||||
// CreateStoreRewardReq 创建门店奖励请求
|
||||
type CreateStoreRewardReq struct {
|
||||
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:"奖励名称"`
|
||||
Description string `v:"length:0,255#奖励描述长度为0-255" json:"description" dc:"奖励描述,可选"`
|
||||
Status int `v:"in:1,2#状态必须为1或2" json:"status" dc:"状态:1=启用,2=禁用,默认1" d:"1"`
|
||||
Stock int `v:"min:0#库存不能为负" json:"stock" dc:"奖励库存,0表示无限制" d:"0"`
|
||||
StartAt *gtime.Time `v:"date#开始时间格式无效" json:"startAt" dc:"奖励有效开始时间,可选"`
|
||||
ExpireAt *gtime.Time `v:"date|after-equal:start_at#结束时间格式无效|结束时间必须晚于开始时间" json:"expireAt" dc:"奖励有效结束时间,可选"`
|
||||
}
|
||||
|
||||
// CreateStoreRewardRes 创建门店奖励响应
|
||||
type CreateStoreRewardRes struct {
|
||||
Id int64 `json:"id" dc:"创建的奖励ID"`
|
||||
}
|
||||
|
||||
// ListSystemRewardReq 查询系统奖励列表请求
|
||||
type ListSystemRewardReq struct {
|
||||
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:"奖励名称,模糊查询,可选"`
|
||||
Status int `v:"in:0,1,2#状态无效" json:"status" d:"0" dc:"状态:0=全部,1=启用,2=禁用,可选"`
|
||||
RewardTypeId int64 `v:"min:0#奖励类型ID无效" json:"rewardTypeId" d:"0" dc:"奖励类型ID,0=全部,可选"`
|
||||
}
|
||||
|
||||
// ListSystemRewardRes 查询系统奖励列表响应
|
||||
type ListSystemRewardRes struct {
|
||||
List interface{} `json:"list" dc:"奖励列表"`
|
||||
Total int `json:"total" dc:"总记录数"`
|
||||
}
|
||||
|
||||
// ListStoreRewardReq 查询门店奖励列表请求
|
||||
type ListStoreRewardReq struct {
|
||||
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:"门店ID,0=全部(管理员使用),其他值过滤该门店可见的奖励,可选"`
|
||||
Name string `json:"name" dc:"奖励名称,模糊查询,可选"`
|
||||
Status int `v:"in:0,1,2#状态无效" json:"status" d:"0" dc:"状态:0=全部,1=启用,2=禁用,可选"`
|
||||
RewardTypeId int64 `v:"min:0#奖励类型ID无效" json:"rewardTypeId" d:"0" dc:"奖励类型ID,0=全部,可选"`
|
||||
}
|
||||
|
||||
// ListStoreRewardRes 查询门店奖励列表响应
|
||||
type ListStoreRewardRes struct {
|
||||
List interface{} `json:"list" dc:"奖励列表"`
|
||||
Total int `json:"total" dc:"总记录数"`
|
||||
}
|
||||
|
||||
// UpdateSystemRewardReq 更新系统奖励请求
|
||||
type UpdateSystemRewardReq struct {
|
||||
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:"奖励名称"`
|
||||
Description string `v:"length:0,255#奖励描述长度为0-255" json:"description" dc:"奖励描述,可选"`
|
||||
Status int `v:"in:1,2#状态必须为1或2" json:"status" dc:"状态:1=启用,2=禁用"`
|
||||
Stock int `v:"min:0#库存不能为负" json:"stock" dc:"奖励库存,0表示无限制"`
|
||||
StartAt *gtime.Time `v:"date#开始时间格式无效" json:"startAt" dc:"奖励有效开始时间,可选"`
|
||||
ExpireAt *gtime.Time `v:"date|after-equal:start_at#结束时间格式无效|结束时间必须晚于开始时间" json:"expireAt" dc:"奖励有效结束时间,可选"`
|
||||
}
|
||||
|
||||
// UpdateSystemRewardRes 更新系统奖励响应
|
||||
type UpdateSystemRewardRes struct {
|
||||
Success bool `json:"success" dc:"更新成功"`
|
||||
}
|
||||
|
||||
// UpdateStoreRewardReq 更新门店奖励请求
|
||||
type UpdateStoreRewardReq struct {
|
||||
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"`
|
||||
Name string `v:"required|length:1,100#奖励名称不能为空|奖励名称长度为1-100" json:"name" dc:"奖励名称"`
|
||||
Description string `v:"length:0,255#奖励描述长度为0-255" json:"description" dc:"奖励描述,可选"`
|
||||
Status int `v:"in:1,2#状态必须为1或2" json:"status" dc:"状态:1=启用,2=禁用"`
|
||||
Stock int `v:"min:0#库存不能为负" json:"stock" dc:"奖励库存,0表示无限制"`
|
||||
StartAt *gtime.Time `v:"date#开始时间格式无效" json:"startAt" dc:"奖励有效开始时间,可选"`
|
||||
ExpireAt *gtime.Time `v:"date|after-equal:start_at#结束时间格式无效|结束时间必须晚于开始时间" json:"expireAt" dc:"奖励有效结束时间,可选"`
|
||||
}
|
||||
|
||||
// UpdateStoreRewardRes 更新门店奖励响应
|
||||
type UpdateStoreRewardRes struct {
|
||||
Success bool `json:"success" dc:"更新成功"`
|
||||
}
|
||||
|
||||
// DeleteSystemRewardReq 删除系统奖励请求
|
||||
type DeleteSystemRewardReq struct {
|
||||
g.Meta `path:"/reward/system/{id}" method:"delete" tags:"Reward" summary:"(系统)删除系统奖励"`
|
||||
Id uint64 `v:"required|min:1#奖励ID不能为空|奖励ID无效" json:"id" dc:"奖励ID"`
|
||||
}
|
||||
|
||||
// DeleteSystemRewardRes 删除系统奖励响应
|
||||
type DeleteSystemRewardRes struct {
|
||||
Success bool `json:"success" dc:"删除成功"`
|
||||
}
|
||||
|
||||
// DeleteStoreRewardReq 删除门店奖励请求
|
||||
type DeleteStoreRewardReq struct {
|
||||
g.Meta `path:"/reward/store/{id}" method:"delete" tags:"Reward" summary:"(系统、商户门店后台)删除门店奖励"`
|
||||
Id uint64 `v:"required|min:1#奖励ID不能为空|奖励ID无效" json:"id" dc:"奖励ID"`
|
||||
}
|
||||
|
||||
// DeleteStoreRewardRes 删除门店奖励响应
|
||||
type DeleteStoreRewardRes struct {
|
||||
Success bool `json:"success" dc:"删除成功"`
|
||||
}
|
||||
|
||||
type RewardCallbackReq struct {
|
||||
g.Meta `path:"/reward/callback" method:"post" tags:"Reward" summary:"(系统)奖励回调"`
|
||||
UId string `json:"uid"`
|
||||
OrderId string `json:"order_id"`
|
||||
PrizeChannelId string `json:"prize_channel_id"`
|
||||
PrizeId string `json:"prize_id" v:"required|#券ID不能为空"`
|
||||
PrizeType uint32 `json:"prize_type"`
|
||||
PrizeSubType uint32 `json:"prize_sub_type"`
|
||||
Num uint32 `json:"num"`
|
||||
CustomInfo string `json:"custom_info"`
|
||||
}
|
||||
type RewardCallbackRes struct {
|
||||
ErrCode int32 `json:"errcode"` // 必填
|
||||
ErrMsg string `json:"errmsg"`
|
||||
Appid string `json:"appid"`
|
||||
OrderId string `json:"order_id"` // 必填
|
||||
Data []RewardCallbackData `json:"data"` // 必填
|
||||
}
|
||||
type RewardCallbackData struct {
|
||||
PrizeCode string `json:"prize_code"` // 必填
|
||||
Comment string `json:"comment"`
|
||||
}
|
||||
@ -1,18 +0,0 @@
|
||||
// =================================================================================
|
||||
// Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
|
||||
// =================================================================================
|
||||
|
||||
package rewardType
|
||||
|
||||
import (
|
||||
"context"
|
||||
|
||||
"server/api/rewardType/v1"
|
||||
)
|
||||
|
||||
type IRewardTypeV1 interface {
|
||||
List(ctx context.Context, req *v1.ListReq) (res *v1.ListRes, err error)
|
||||
Create(ctx context.Context, req *v1.CreateReq) (res *v1.CreateRes, err error)
|
||||
Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error)
|
||||
Delete(ctx context.Context, req *v1.DeleteReq) (res *v1.DeleteRes, err error)
|
||||
}
|
||||
@ -1,50 +0,0 @@
|
||||
package v1
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type ListReq struct {
|
||||
g.Meta `path:"/rewardType" method:"get" tags:"奖励类型" summary:"(系统、商户门店后台)获取奖励类型列表"`
|
||||
Page int `json:"page" v:"required#页码不能为空" dc:"页码"`
|
||||
Size int `json:"size" v:"required#页大小不能为空" dc:"页大小"`
|
||||
}
|
||||
|
||||
type ListRes struct {
|
||||
List interface{} `json:"list" dc:"奖励类型列表"`
|
||||
Total int `json:"total" dc:"总条数"`
|
||||
}
|
||||
|
||||
type CreateReq struct {
|
||||
g.Meta `path:"/rewardType" method:"post" tags:"奖励类型" summary:"(系统)创建奖励类型"`
|
||||
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
||||
Code string `json:"code" v:"required#代号不能为空" dc:"代号"`
|
||||
Description string `json:"description" v:"required#描述不能为空" dc:"描述"`
|
||||
//Status int `json:"status" v:"required#状态不能为空" dc:"状态"`
|
||||
StoreId int `json:"store_id" dc:"门店ID"`
|
||||
}
|
||||
|
||||
type CreateRes struct {
|
||||
Id int64 `json:"id" dc:"ID"`
|
||||
}
|
||||
|
||||
type UpdateReq struct {
|
||||
g.Meta `path:"/rewardType" method:"put" tags:"奖励类型" summary:"(系统)更新奖励类型"`
|
||||
Id int64 `json:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
Name string `json:"name" v:"required#名称不能为空" dc:"名称"`
|
||||
Code string `json:"code" v:"required#代号不能为空" dc:"代号"`
|
||||
Description string `json:"description" v:"required#描述不能为空" dc:"描述"`
|
||||
Status int `json:"status" v:"required#状态不能为空" dc:"状态"`
|
||||
StoreId int `json:"store_id" dc:"门店ID"`
|
||||
}
|
||||
|
||||
type UpdateRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
|
||||
type DeleteReq struct {
|
||||
g.Meta `path:"/rewardType/{id}" method:"delete" tags:"奖励类型" summary:"(系统)删除奖励类型"`
|
||||
Id int64 `path:"id" v:"required#ID不能为空" dc:"ID"`
|
||||
}
|
||||
|
||||
type DeleteRes struct {
|
||||
Success bool `json:"success" dc:"是否成功"`
|
||||
}
|
||||
Reference in New Issue
Block a user