获取还未弹窗的优惠卷
This commit is contained in:
parent
50c28a6ab2
commit
055e7d0509
@ -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)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user