软质押任务修改
This commit is contained in:
@@ -37,12 +37,15 @@ type (
|
||||
}
|
||||
|
||||
NhPromoteBind struct {
|
||||
Id uint `db:"id"`
|
||||
ShareUid uint `db:"share_uid"` // 分享者uid
|
||||
InvitedUid uint `db:"invited_uid"` // 受邀者uid
|
||||
CreateTime uint `db:"create_time"` // 创建时间
|
||||
IsPushUser int8 `db:"is_push_user"` // 是否已推送用户信息
|
||||
IsPushRole int8 `db:"is_push_role"` // 是否已推送绑定游戏账号
|
||||
Id uint `db:"id"`
|
||||
ShareUid uint `db:"share_uid"` // 分享者uid
|
||||
InvitedUid uint `db:"invited_uid"` // 受邀者uid
|
||||
CreateTime uint `db:"create_time"` // 创建时间
|
||||
IsPushUser int8 `db:"is_push_user"` // 是否已推送用户信息
|
||||
IsPushRole int8 `db:"is_push_role"` // 是否已推送绑定游戏账号
|
||||
IsCreateRole int8 `db:"is_create_role"` // 是否已创建角色,0=否,1=已创建
|
||||
IsBindWallet int8 `db:"is_bind_wallet"` // 是否已绑定钱包,0=否,1=已绑定
|
||||
IsOpenSeason int8 `db:"is_open_season"` // 是否已开启赛季,0=否,1=已开启
|
||||
}
|
||||
)
|
||||
|
||||
@@ -88,14 +91,14 @@ func (m *defaultNhPromoteBindModel) FindOneByInvitedUid(ctx context.Context, inv
|
||||
}
|
||||
|
||||
func (m *defaultNhPromoteBindModel) Insert(ctx context.Context, data *NhPromoteBind) (sql.Result, error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?)", m.table, nhPromoteBindRowsExpectAutoSet)
|
||||
ret, err := m.conn.ExecCtx(ctx, query, data.ShareUid, data.InvitedUid, data.IsPushUser, data.IsPushRole)
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?, ?, ?, ?, ?)", m.table, nhPromoteBindRowsExpectAutoSet)
|
||||
ret, err := m.conn.ExecCtx(ctx, query, data.ShareUid, data.InvitedUid, data.IsPushUser, data.IsPushRole, data.IsCreateRole, data.IsBindWallet, data.IsOpenSeason)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultNhPromoteBindModel) Update(ctx context.Context, newData *NhPromoteBind) error {
|
||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, nhPromoteBindRowsWithPlaceHolder)
|
||||
_, err := m.conn.ExecCtx(ctx, query, newData.ShareUid, newData.InvitedUid, newData.IsPushUser, newData.IsPushRole, newData.Id)
|
||||
_, err := m.conn.ExecCtx(ctx, query, newData.ShareUid, newData.InvitedUid, newData.IsPushUser, newData.IsPushRole, newData.IsCreateRole, newData.IsBindWallet, newData.IsOpenSeason, newData.Id)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user