完善用户资料发放优惠卷
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user