新增获取用户完成任务列表,修改领取任务
This commit is contained in:
@ -22,4 +22,6 @@ type UserTasks struct {
|
||||
CompletedAt *gtime.Time // 任务完成时间
|
||||
DeletedAt *gtime.Time // 软删除时间戳
|
||||
StoreId interface{} // 门店 id
|
||||
TaskName interface{} // 任务名称
|
||||
GameId interface{} // 游戏 id
|
||||
}
|
||||
|
||||
@ -20,4 +20,6 @@ type UserTasks struct {
|
||||
CompletedAt *gtime.Time `json:"completedAt" orm:"completed_at" description:"任务完成时间"` // 任务完成时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
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
|
||||
}
|
||||
|
||||
@ -1,6 +1,9 @@
|
||||
package model
|
||||
|
||||
import "github.com/gogf/gf/v2/frame/g"
|
||||
|
||||
type Game struct {
|
||||
g.Meta `orm:"table:games"`
|
||||
GameId int64 `json:"gameId" orm:"game_id"` // 腾讯游戏 id
|
||||
GameName string `json:"gameName" orm:"game_name"` // 游戏名称
|
||||
GameCode string `json:"gameCode" orm:"game_code"` // 游戏代号
|
||||
|
||||
@ -14,7 +14,7 @@ type Store struct {
|
||||
ContactName string `json:"contactName" orm:"contact_name" dc:"联系人姓名"`
|
||||
ContactPhone string `json:"contactPhone" orm:"contact_phone" dc:"联系人电话"`
|
||||
Status int `json:"status" orm:"status,default:1" dc:"状态:1=正常营业,2=暂停营业,3=已关闭"`
|
||||
NetbarAccount string `json:"netbarAccount" orm:"netbar_account" dc:"网吧网关账号"`
|
||||
NetbarAccount string `json:"netbarAccount" orm:"netbar_account" dc:"网吧网关账号"`
|
||||
}
|
||||
|
||||
type StoreCreateIn struct {
|
||||
|
||||
@ -12,7 +12,7 @@ type Task struct {
|
||||
DeletedAt *gtime.Time `json:"-" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
GameId int64 `json:"-" orm:"game_id" description:"游戏唯一id"` // 游戏唯一id
|
||||
StoreId int64 `json:"-" orm:"store_id" description:"门店 id"` // 门店 id
|
||||
Status int `json:"-" orm:"status" description:"1:启用 2:禁用"` // 1:启用 2:禁用
|
||||
Status int `json:"status" orm:"status" description:"1:启用 2:禁用"` //用户奖励状态,1 未完成,2 未领取,3 已领取,4-奖励限量且已抢光,5,用户限量
|
||||
QqNetbarTaskId string `json:"qqNetbarTaskId" orm:"qq_netbar_task_id" description:"QQ网吧任务ID"` // QQ网吧任务ID
|
||||
QqNetbarTaskRules string `json:"qqNetbarTaskRules" orm:"qq_netbar_task_rules" description:"任务规则"` // 任务规则
|
||||
QqNetbarTaskMemo string `json:"qqNetbarTaskMemo" orm:"qq_netbar_task_memo" description:"任务描述"` // 任务描述
|
||||
@ -110,8 +110,9 @@ type SelectorOut struct {
|
||||
}
|
||||
|
||||
type StoreData struct {
|
||||
g.Meta `orm:"table:stores"`
|
||||
Id int `json:"id" orm:"id"`
|
||||
MerchantId int `json:"merchantId" orm:"merchant_id"`
|
||||
StoreName string `json:"storeName" orm:"name"`
|
||||
g.Meta `orm:"table:stores"`
|
||||
Id int `json:"id" orm:"id"`
|
||||
MerchantId int `json:"merchantId" orm:"merchant_id"`
|
||||
StoreName string `json:"storeName" orm:"name"`
|
||||
NetbarAccount string `json:"netbarAccount" orm:"netbar_account"`
|
||||
}
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
"time"
|
||||
|
||||
"github.com/gogf/gf/v2/os/gtime"
|
||||
@ -8,6 +9,7 @@ import (
|
||||
|
||||
// User 用户信息
|
||||
type User struct {
|
||||
g.Meta `orm:"table:users"`
|
||||
Id int64 `json:"id" orm:"id,primary"` // 用户ID
|
||||
Username string `json:"username" orm:"username,not null"` // 用户名
|
||||
Nickname string `json:"nickname" orm:"nickname"` // 昵称
|
||||
|
||||
@ -7,16 +7,21 @@ import (
|
||||
|
||||
type UserTask struct {
|
||||
g.Meta `orm:"table:task"`
|
||||
Id int `orm:"column:id" json:"id"` //
|
||||
UserId int `orm:"column:user_id" json:"userId"` // 用户 id
|
||||
TaskId int `orm:"column:task_id" json:"taskId"` // 任务 id
|
||||
Status int `orm:"column:status" json:"status"` // 状态 1:待完成 2:完成
|
||||
SerialNumber string `orm:"column:serial_number" json:"serialNumber"` // 流水号
|
||||
StoreId int `orm:"column:store_id" json:"storeId"` // 门店 id
|
||||
CreatedAt *gtime.Time `orm:"column:created_at" json:"createdAt"`
|
||||
UpdatedAt *gtime.Time `orm:"column:updated_at" json:"updatedAt"`
|
||||
CompletedAT *gtime.Time `orm:"column:completed_at" json:"completedAt"`
|
||||
DeletedAt *gtime.Time `orm:"column:deleted_at" json:"deletedAt"`
|
||||
Id int64 `json:"id" orm:"id" description:"用户任务唯一标识符"` // 用户任务唯一标识符
|
||||
UserId int64 `json:"userId" orm:"user_id" description:"用户ID"` // 用户ID
|
||||
TaskId string `json:"taskId" orm:"task_id" description:"腾讯任务ID"` // 腾讯任务ID
|
||||
Status int `json:"status" orm:"status" description:"任务状态:1=进行中,2=已完成中,3=未完成"` // 任务状态:1=进行中,2=已完成中,3=未完成
|
||||
SerialNumber string `json:"serialNumber" orm:"serial_number" description:"流水号,确保用户任务唯一性"` // 流水号,确保用户任务唯一性
|
||||
CreatedAt *gtime.Time `json:"createdAt" orm:"created_at" description:"创建时间"` // 创建时间
|
||||
UpdatedAt *gtime.Time `json:"updatedAt" orm:"updated_at" description:"更新时间"` // 更新时间
|
||||
CompletedAt *gtime.Time `json:"completedAt" orm:"completed_at" description:"任务完成时间"` // 任务完成时间
|
||||
DeletedAt *gtime.Time `json:"deletedAt" orm:"deleted_at" description:"软删除时间戳"` // 软删除时间戳
|
||||
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
|
||||
User User `json:"user" orm:"with:id=user_id"`
|
||||
Game Game `json:"game" orm:"with:game_id=game_id"`
|
||||
// Store Store `json:"store" orm:"with:id=store_id"`
|
||||
}
|
||||
|
||||
// UserTaskRankingIn 任务排行榜入参
|
||||
@ -53,9 +58,11 @@ type LoginUserRankingNum struct {
|
||||
|
||||
// GetTaskIn 添加任务记录入参
|
||||
type GetTaskIn struct {
|
||||
TaskId int `json:"taskId"`
|
||||
StoreId int `json:"storeId"`
|
||||
UserId int `json:"userId"`
|
||||
TaskId int `json:"taskId"`
|
||||
StoreId int `json:"storeId"`
|
||||
UserId int `json:"userId"`
|
||||
TaskName string `json:"taskName"`
|
||||
GameId int `json:"gid"`
|
||||
}
|
||||
|
||||
type GetTaskOut struct {
|
||||
|
||||
Reference in New Issue
Block a user