实现用户领取任务接口、用户任务记录接口

This commit is contained in:
2025-06-26 20:56:41 +08:00
parent 895eca3289
commit ccaad45fed
17 changed files with 192 additions and 56 deletions

View File

@ -0,0 +1,24 @@
package model
import "github.com/gogf/gf/v2/os/gtime"
type GetUserClaimListIn struct {
UserId int64
TaskId string
NetbarAccount string
StoreId int64
}
type UserTaskReward struct {
RewardName string `json:"rewardName" orm:"reward_name"` // 奖励名称冗余字段
Source int `json:"source" orm:"source"` // 奖励来源1是系统奖励统一调用, 2是门店奖励
RewardType int `json:"rewardType" orm:"reward_type"` // 奖励类型, 实现不同的领取操作
Status int `json:"status" orm:"status"` // 状态1=待用户完成任务2=待领取3=已领取, 待兑换4=已过期5=发放失败, 6=结束、
ExpireType int `json:"expireType" orm:"expire_type"` // 过期方式1=时间段过期2=领取后过期
ValidFrom *gtime.Time `json:"validFrom" orm:"valid_from" ` // 有效期开始时间expire_type=1时
ValidTo *gtime.Time `json:"validTo" orm:"valid_to"` // 有效期结束时间expire_type=1时
ExpireDays int `json:"expireDays" orm:"expire_days"` // 领取后多少天过期expire_type=2时
}
type GetUserClaimListOut struct {
List []Reward
Total int
}