获取还未弹窗的优惠卷

This commit is contained in:
wucongxing8150 2024-09-02 14:21:08 +08:00
parent 50c28a6ab2
commit 055e7d0509

View File

@ -83,6 +83,20 @@ func (b *UserCoupon) GetUserCouponUnnotified(c *gin.Context) {
return
}
// 开始事务
tx := global.Db.Begin()
defer func() {
if r := recover(); r != nil {
tx.Rollback()
}
}()
maps = make(map[string]interface{})
maps["is_windows"] = 1
_ = userCouponDao.EditUserCouponById(tx, userCoupon.UserCouponId, maps)
tx.Commit()
// 处理返回值
g := dto.GetUserCouponDto(userCoupon)