调整任务查询,回调,奖励类型查询

This commit is contained in:
chy
2025-07-02 09:52:40 +08:00
parent 05510d53d2
commit 75d6c8cbfd
19 changed files with 295 additions and 104 deletions

View File

@ -20,4 +20,5 @@ type RewardTypes struct {
UpdatedAt *gtime.Time // 更新时间
DeletedAt *gtime.Time // 软删除时间
TencentTypeId interface{} // 腾讯类型 id
Source interface{} // 来源1系统 2门店
}

View File

@ -24,4 +24,5 @@ type UserTasks struct {
StoreId interface{} // 门店 id
TaskName interface{} // 任务名称
GameId interface{} // 游戏 id
TaskType interface{} // 1: 每日任务 3: 周期任务
}

View File

@ -10,12 +10,13 @@ import (
// RewardTypes is the golang structure for table reward_types.
type RewardTypes struct {
Id int64 `json:"id" orm:"id" description:"奖励类型ID"` // 奖励类型ID
Name string `json:"name" orm:"name" description:"类型名称"` // 类型名称
Code string `json:"code" orm:"code" description:"唯一编码"` // 唯一编码
IconUrl string `json:"iconUrl" orm:"icon_url" description:"图标链接地址"` // 图标链接地址
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
TencentTypeId int `json:"tencentTypeId" orm:"tencent_type_id" description:"腾讯类型 id"` // 腾讯类型 id
Id int64 `json:"id" orm:"id" description:"奖励类型ID"` // 奖励类型ID
Name string `json:"name" orm:"name" description:"类型名称"` // 类型名称
Code string `json:"code" orm:"code" description:"唯一编码"` // 唯一编码
IconUrl string `json:"iconUrl" orm:"icon_url" description:"图标链接地址"` // 图标链接地址
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
TencentTypeId int `json:"tencentTypeId" orm:"tencent_type_id" description:"腾讯类型 id"` // 腾讯类型 id
Source int64 `json:"source" orm:"source" description:"来源1系统 2门店"` // 来源1系统 2门店
}

View File

@ -22,4 +22,5 @@ type UserTasks struct {
StoreId int64 `json:"storeId" orm:"store_id" description:"门店 id"` // 门店 id
TaskName string `json:"taskName" orm:"task_name" description:"任务名称"` // 任务名称
GameId int64 `json:"gameId" orm:"game_id" description:"游戏 id"` // 游戏 id
TaskType int64 `json:"taskType" orm:"task_type" description:"1: 每日任务 3: 周期任务"` // 1: 每日任务 3: 周期任务
}

View File

@ -38,11 +38,11 @@ type GameTask struct {
CycleEnd int64 `json:"cycle_end"`
TargetName string `json:"target_name"`
TargetTimes int `json:"target_times"`
Status int `json:"status,omitempty"`
UserTimes int64 `json:"user_times,omitempty"`
Status int `json:"status"`
UserTimes int64 `json:"user_times"`
GameTaskConfig GameTaskConfig `json:"game_task_config"`
GameTaskConfigParse GameTaskConfigParse `json:"game_task_config_parse"`
Reward []SimpleReward `json:"reward,omitempty"`
Reward []SimpleReward `json:"reward"`
}
type GameTaskResponse struct {

View File

@ -34,18 +34,23 @@ type Reward struct {
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"删除时间(软删除)"` // 删除时间(软删除)
}
type SimpleReward struct {
g.Meta `orm:"table:rewards"`
Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID
Name string `json:"name" orm:"name" description:"奖励名称"` // 奖励名称
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID关联 reward_types 表"` // 奖励类型ID关联 reward_types 表
Source int `json:"source" orm:"source" description:"奖励来源,1=系统奖励对接腾讯2=门店追加"` // 奖励来源,1=系统奖励对接腾讯2=门店追加
GameId int64 `json:"gameId" orm:"game_id" description:"游戏ID"` // 游戏ID
ImageUrl string `json:"imageUrl" orm:"image_url" description:"奖励图片链接"` // 奖励图片链接
ExpireType int `json:"expireType" orm:"expire_type" description:"过期方式1=时间段过期2=领取后过期"` // 过期方式1=时间段过期2=领取后过期
ValidFrom *gtime.Time `json:"validFrom" orm:"valid_from" description:"有效期开始时间expire_type=1时"` // 有效期开始时间expire_type=1时
ValidTo *gtime.Time `json:"validTo" orm:"valid_to" description:"有效期结束时间expire_type=1时"` // 有效期结束时间expire_type=1时
ExpireDays int `json:"expireDays" orm:"expire_days" description:"领取后多少天过期expire_type=2时"` // 领取后多少天过期expire_type=2时
g.Meta `orm:"table:rewards"`
Id int64 `json:"id" orm:"id" description:"奖励ID"` // 奖励ID
Name string `json:"name" orm:"name" description:"奖励名称"` // 奖励名称
RewardTypeId int64 `json:"rewardTypeId" orm:"reward_type_id" description:"奖励类型ID关联 reward_types 表"` // 奖励类型ID关联 reward_types 表
Source int `json:"source" orm:"source" description:"奖励来源,1=系统奖励对接腾讯2=门店追加"` // 奖励来源,1=系统奖励对接腾讯2=门店追加
GameId int64 `json:"gameId" orm:"game_id" description:"游戏ID"` // 游戏ID
ImageUrl string `json:"imageUrl" orm:"image_url" description:"奖励图片链接"` // 奖励图片链接
ExpireType int `json:"expireType" orm:"expire_type" description:"过期方式1=时间段过期2=领取后过期"` // 过期方式1=时间段过期2=领取后过期
ValidFrom *gtime.Time `json:"validFrom" orm:"valid_from" description:"有效期开始时间expire_type=1时"` // 有效期开始时间expire_type=1时
ValidTo *gtime.Time `json:"validTo" orm:"valid_to" description:"有效期结束时间expire_type=1时"` // 有效期结束时间expire_type=1时
ExpireDays int `json:"expireDays" orm:"expire_days" description:"领取后多少天过期expire_type=2时"` // 领取后多少天过期expire_type=2时
DailyTotalLimit uint64 `json:"dailyTotalLimit" orm:"daily_total_limit" description:"每日发放总限NULL表示不限制"` // 每日发放总限NULL表示不限制
TotalLimit uint64 `json:"totalLimit" orm:"total_limit" description:"奖励总限NULL表示不限制"` // 奖励总限NULL表示不限制
UserDailyLimit uint64 `json:"userDailyLimit" orm:"user_daily_limit" description:"用户每日领取限制NULL表示不限制"` // 用户每日领取限制NULL表示不限制
UserTotalLimit uint64 `json:"userTotalLimit" orm:"user_total_limit" description:"用户领取总次数限制NULL表示不限制"` // 用户领取总次数限制NULL表示不限制
ReceivedNum uint64 `json:"receivedNum" orm:"received_num" description:"已领取数量"` // 已领取数量
//GrantQuantity uint64 `json:"grantQuantity" orm:"grant_quantity" description:"每次发放个数"` // 每次发放个数
}
// RewardCreateIn 创建奖励入参

View File

@ -6,13 +6,14 @@ import (
// RewardType 奖励类型表
type RewardType struct {
Id int64 `json:"id" orm:"id" description:"奖励类型ID"` // 奖励类型ID
Name string `json:"name" orm:"name" description:"类型名称"` // 类型名称
Code string `json:"code" orm:"code" description:"唯一编码"` // 唯一编码
IconUrl string `json:"iconUrl" orm:"icon_url" description:"图标链接地址"` // 图标链接地址
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
Id int64 `json:"id" orm:"id" description:"奖励类型ID"` // 奖励类型ID
Name string `json:"name" orm:"name" description:"类型名称"` // 类型名称
Code string `json:"code" orm:"code" description:"唯一编码"` // 唯一编码
IconUrl string `json:"iconUrl" orm:"icon_url" description:"图标链接地址"` // 图标链接地址
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间"` // 软删除时间
TencentTypeId int `json:"tencentTypeId" orm:"tencent_type_id" description:"腾讯奖励类型ID"`
}
// RewardTypeCreateIn 创建奖励类型入参

View File

@ -26,9 +26,9 @@ type UserTask struct {
type TaskReward struct {
g.Meta `orm:"table:task_rewards"`
TaskId string `json:"-" orm:"task_id"`
RewardId int64 `json:"-" orm:"reward_id"`
Rewards Reward `json:"reward" orm:"with:id=reward_id"`
TaskId string `json:"-" orm:"task_id"`
RewardId int64 `json:"-" orm:"reward_id"`
Rewards SimpleReward `json:"reward" orm:"with:id=reward_id"`
}
type UserTask2 struct {
@ -88,6 +88,7 @@ type GetTaskIn struct {
UserId int `json:"userId"`
TaskName string `json:"taskName"`
GameId int `json:"gid"`
TaskType int `json:"taskType"`
}
type GetTaskOut struct {