完善用户资料发放优惠卷

This commit is contained in:
2024-09-02 13:59:13 +08:00
parent 94d25b4ec4
commit 7285da9a79
4 changed files with 74 additions and 20 deletions
+10
View File
@@ -7,6 +7,7 @@ import (
"hepa-calc-api/api/model"
"hepa-calc-api/api/requests"
"hepa-calc-api/api/responses"
"hepa-calc-api/api/service"
"hepa-calc-api/extend/app"
"hepa-calc-api/global"
"hepa-calc-api/utils"
@@ -218,6 +219,15 @@ func (r *UserCase) PutUserCase(c *gin.Context) {
}
}
// 发放用户完善资料优惠卷
couponService := service.CouponService{}
res := couponService.GrantFillUserInfoCoupon(tx, userId)
if res != true {
tx.Rollback()
responses.FailWithMessage("操作失败", c)
return
}
// app数据
appData.PatientUuid = user.AppIden
_, err = app.UpdateUserCase(appData)