调整绑定手机号
This commit is contained in:
@ -3,6 +3,7 @@ package task
|
|||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
|
"github.com/gogf/gf/v2/os/glog"
|
||||||
"server/internal/model"
|
"server/internal/model"
|
||||||
"server/internal/service"
|
"server/internal/service"
|
||||||
|
|
||||||
@ -11,6 +12,8 @@ import (
|
|||||||
|
|
||||||
func (c *ControllerV1) GetTaskList(ctx context.Context, req *v1.GetTaskListReq) (res *v1.GetTaskListRes, err error) {
|
func (c *ControllerV1) GetTaskList(ctx context.Context, req *v1.GetTaskListReq) (res *v1.GetTaskListRes, err error) {
|
||||||
|
|
||||||
|
glog.Info(ctx, req)
|
||||||
|
|
||||||
userId := g.RequestFromCtx(ctx).GetCtxVar("id").Int64()
|
userId := g.RequestFromCtx(ctx).GetCtxVar("id").Int64()
|
||||||
list, err := service.Task().GetTaskList(ctx, &model.GetTaskListV2In{
|
list, err := service.Task().GetTaskList(ctx, &model.GetTaskListV2In{
|
||||||
Gid: req.Gid,
|
Gid: req.Gid,
|
||||||
@ -26,6 +29,8 @@ func (c *ControllerV1) GetTaskList(ctx context.Context, req *v1.GetTaskListReq)
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glog.Info(ctx, list)
|
||||||
return &v1.GetTaskListRes{
|
return &v1.GetTaskListRes{
|
||||||
List: list,
|
List: list,
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
@ -32,6 +32,9 @@ type RewardCallbackColumns struct {
|
|||||||
CustomInfo string // 透传字段 (json串)
|
CustomInfo string // 透传字段 (json串)
|
||||||
AppId string // 业务 id(标识业务方,由游戏人生提供)
|
AppId string // 业务 id(标识业务方,由游戏人生提供)
|
||||||
InnerOrderId string // 系统内部订单ID
|
InnerOrderId string // 系统内部订单ID
|
||||||
|
CreatedAt string //
|
||||||
|
UpdatedAt string //
|
||||||
|
DeletedAt string //
|
||||||
}
|
}
|
||||||
|
|
||||||
// rewardCallbackColumns holds the columns for the table reward_callback.
|
// rewardCallbackColumns holds the columns for the table reward_callback.
|
||||||
@ -47,6 +50,9 @@ var rewardCallbackColumns = RewardCallbackColumns{
|
|||||||
CustomInfo: "custom_info",
|
CustomInfo: "custom_info",
|
||||||
AppId: "app_id",
|
AppId: "app_id",
|
||||||
InnerOrderId: "inner_order_id",
|
InnerOrderId: "inner_order_id",
|
||||||
|
CreatedAt: "created_at",
|
||||||
|
UpdatedAt: "updated_at",
|
||||||
|
DeletedAt: "deleted_at",
|
||||||
}
|
}
|
||||||
|
|
||||||
// NewRewardCallbackDao creates and returns a new DAO object for table data access.
|
// NewRewardCallbackDao creates and returns a new DAO object for table data access.
|
||||||
|
|||||||
@ -35,7 +35,7 @@ type UserTasksColumns struct {
|
|||||||
GameId string // 游戏 id
|
GameId string // 游戏 id
|
||||||
TaskType string // 1: 每日任务 3: 周期任务
|
TaskType string // 1: 每日任务 3: 周期任务
|
||||||
UserTimes string // 用户完成次数
|
UserTimes string // 用户完成次数
|
||||||
BindType string // 当前账号类型
|
BindType string // 1:qq 2:wx
|
||||||
}
|
}
|
||||||
|
|
||||||
// userTasksColumns holds the columns for the table user_tasks.
|
// userTasksColumns holds the columns for the table user_tasks.
|
||||||
|
|||||||
@ -296,6 +296,9 @@ func (s *sUser) BindPhone(ctx context.Context, in *model.UserBindPhoneIn) (out *
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, ecode.Fail.Sub("绑定手机号失败")
|
return nil, ecode.Fail.Sub("绑定手机号失败")
|
||||||
}
|
}
|
||||||
|
if _, err := g.Redis().Del(ctx, fmt.Sprintf(consts.UserBindPhoneKey, in.Phone)); err != nil {
|
||||||
|
return nil, ecode.Fail.Sub("删除验证码失败")
|
||||||
|
}
|
||||||
return &model.UserBindPhoneOut{
|
return &model.UserBindPhoneOut{
|
||||||
Success: true,
|
Success: true,
|
||||||
}, nil
|
}, nil
|
||||||
|
|||||||
@ -6,6 +6,7 @@ package do
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/gogf/gf/v2/frame/g"
|
"github.com/gogf/gf/v2/frame/g"
|
||||||
|
"github.com/gogf/gf/v2/os/gtime"
|
||||||
)
|
)
|
||||||
|
|
||||||
// RewardCallback is the golang structure of table reward_callback for DAO operations like Where/Data.
|
// RewardCallback is the golang structure of table reward_callback for DAO operations like Where/Data.
|
||||||
@ -22,4 +23,7 @@ type RewardCallback struct {
|
|||||||
CustomInfo interface{} // 透传字段 (json串)
|
CustomInfo interface{} // 透传字段 (json串)
|
||||||
AppId interface{} // 业务 id(标识业务方,由游戏人生提供)
|
AppId interface{} // 业务 id(标识业务方,由游戏人生提供)
|
||||||
InnerOrderId interface{} // 系统内部订单ID
|
InnerOrderId interface{} // 系统内部订单ID
|
||||||
|
CreatedAt *gtime.Time //
|
||||||
|
UpdatedAt *gtime.Time //
|
||||||
|
DeletedAt *gtime.Time //
|
||||||
}
|
}
|
||||||
|
|||||||
@ -26,5 +26,5 @@ type UserTasks struct {
|
|||||||
GameId interface{} // 游戏 id
|
GameId interface{} // 游戏 id
|
||||||
TaskType interface{} // 1: 每日任务 3: 周期任务
|
TaskType interface{} // 1: 每日任务 3: 周期任务
|
||||||
UserTimes interface{} // 用户完成次数
|
UserTimes interface{} // 用户完成次数
|
||||||
BindType interface{} // 当前账号类型
|
BindType interface{} // 1:qq 2:wx
|
||||||
}
|
}
|
||||||
|
|||||||
@ -4,6 +4,10 @@
|
|||||||
|
|
||||||
package entity
|
package entity
|
||||||
|
|
||||||
|
import (
|
||||||
|
"github.com/gogf/gf/v2/os/gtime"
|
||||||
|
)
|
||||||
|
|
||||||
// RewardCallback is the golang structure for table reward_callback.
|
// RewardCallback is the golang structure for table reward_callback.
|
||||||
type RewardCallback struct {
|
type RewardCallback struct {
|
||||||
Id int64 `json:"id" orm:"id" description:""` //
|
Id int64 `json:"id" orm:"id" description:""` //
|
||||||
@ -17,4 +21,7 @@ type RewardCallback struct {
|
|||||||
CustomInfo string `json:"customInfo" orm:"custom_info" description:"透传字段 (json串)"` // 透传字段 (json串)
|
CustomInfo string `json:"customInfo" orm:"custom_info" description:"透传字段 (json串)"` // 透传字段 (json串)
|
||||||
AppId string `json:"appId" orm:"app_id" description:"业务 id(标识业务方,由游戏人生提供)"` // 业务 id(标识业务方,由游戏人生提供)
|
AppId string `json:"appId" orm:"app_id" description:"业务 id(标识业务方,由游戏人生提供)"` // 业务 id(标识业务方,由游戏人生提供)
|
||||||
InnerOrderId string `json:"innerOrderId" orm:"inner_order_id" description:"系统内部订单ID"` // 系统内部订单ID
|
InnerOrderId string `json:"innerOrderId" orm:"inner_order_id" description:"系统内部订单ID"` // 系统内部订单ID
|
||||||
|
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:""` //
|
||||||
}
|
}
|
||||||
|
|||||||
@ -24,5 +24,5 @@ type UserTasks struct {
|
|||||||
GameId int64 `json:"gameId" orm:"game_id" description:"游戏 id"` // 游戏 id
|
GameId int64 `json:"gameId" orm:"game_id" description:"游戏 id"` // 游戏 id
|
||||||
TaskType int64 `json:"taskType" orm:"task_type" description:"1: 每日任务 3: 周期任务"` // 1: 每日任务 3: 周期任务
|
TaskType int64 `json:"taskType" orm:"task_type" description:"1: 每日任务 3: 周期任务"` // 1: 每日任务 3: 周期任务
|
||||||
UserTimes int64 `json:"userTimes" orm:"user_times" description:"用户完成次数"` // 用户完成次数
|
UserTimes int64 `json:"userTimes" orm:"user_times" description:"用户完成次数"` // 用户完成次数
|
||||||
BindType int `json:"bindType" orm:"bind_type" description:"当前账号类型"` // 当前账号类型
|
BindType int `json:"bindType" orm:"bind_type" description:"1:qq 2:wx"` // 1:qq 2:wx
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user