完善数据上报,每日支付任务认证
This commit is contained in:
@@ -40,6 +40,7 @@ type (
|
||||
TouristAccount string `db:"tourist_account"` // 游客账号
|
||||
FormalAccount string `db:"formal_account"` // 正式账号
|
||||
CreateTime int `db:"create_time"` // 创建时间
|
||||
Uid uint `db:"uid"` // 用户ID
|
||||
}
|
||||
)
|
||||
|
||||
@@ -71,14 +72,14 @@ func (m *defaultNhTouristBindModel) FindOne(ctx context.Context, id int) (*NhTou
|
||||
}
|
||||
|
||||
func (m *defaultNhTouristBindModel) Insert(ctx context.Context, data *NhTouristBind) (sql.Result, error) {
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?)", m.table, nhTouristBindRowsExpectAutoSet)
|
||||
ret, err := m.conn.ExecCtx(ctx, query, data.TouristAccount, data.FormalAccount)
|
||||
query := fmt.Sprintf("insert into %s (%s) values (?, ?, ?)", m.table, nhTouristBindRowsExpectAutoSet)
|
||||
ret, err := m.conn.ExecCtx(ctx, query, data.TouristAccount, data.FormalAccount, data.Uid)
|
||||
return ret, err
|
||||
}
|
||||
|
||||
func (m *defaultNhTouristBindModel) Update(ctx context.Context, data *NhTouristBind) error {
|
||||
query := fmt.Sprintf("update %s set %s where `id` = ?", m.table, nhTouristBindRowsWithPlaceHolder)
|
||||
_, err := m.conn.ExecCtx(ctx, query, data.TouristAccount, data.FormalAccount, data.Id)
|
||||
_, err := m.conn.ExecCtx(ctx, query, data.TouristAccount, data.FormalAccount, data.Uid, data.Id)
|
||||
return err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user