chore: stabilize lint and verify builds

This commit is contained in:
2026-02-06 11:51:32 +08:00
parent edede17880
commit 1782f64417
114 changed files with 3032 additions and 1345 deletions

View File

@@ -55,14 +55,15 @@ type Creator struct{}
// @Bind user local key(__ctx_user)
// @Bind id path
// @Bind form body
func (c *Creator) GrantCoupon(ctx fiber.Ctx, user *models.User, id int64, form *dto.CouponGrantForm) (string, error) {
func (c *Creator) GrantCoupon(ctx fiber.Ctx, _ *models.User, id int64, form *dto.CouponGrantForm) (string, error) {
tenantID := getTenantID(ctx)
if form == nil {
return "", errorx.ErrInvalidParameter.WithMsg("参数无效")
}
_, err := services.Coupon.Grant(ctx, tenantID, id, form.UserIDs)
if err != nil {
return "", err
return "", errorx.ErrOperationFailed.WithCause(err)
}
return "Granted", nil
}