package couponusers import ( "CouponBackendGo/internal/dao" "CouponBackendGo/internal/service" "context" "errors" "github.com/gogf/gf/v2/frame/g" ) type sCouponUsers struct{} func init() { service.RegisterCouponUsers(&sCouponUsers{}) } // 添加用户选择武器记录 func (s *sCouponUsers) AddRecord(ctx context.Context, jwcode int, id int, name string) (err error) { _, err = dao.CouponUsers.Ctx(ctx).Data(g.Map{ "record": name, }).Where("jwcode = ? and coupon_id = ?", jwcode, id).Update() if err != nil { return errors.New("添加武器记录失败") } return }