Merge branch 'yongxu-dev' into devlop
# Conflicts: # soul-admin/src/api/ckb.ts # soul-admin/src/pages/content/PersonAddEditModal.tsx # soul-api/internal/model/person.go # 开发文档/1、需求/以界面定需求.md # 开发文档/1、需求/需求汇总.md
This commit is contained in:
@@ -690,6 +690,10 @@ func MiniprogramPayNotify(c *gin.Context) {
|
||||
}
|
||||
expireDate := activateVIP(db, beneficiaryUserID, 365, vipActivatedAt)
|
||||
fmt.Printf("[VIP] 设置方式=支付设置, userId=%s, orderSn=%s, 过期日=%s, activatedAt=%s\n", beneficiaryUserID, orderSn, expireDate.Format("2006-01-02"), vipActivatedAt.Format("2006-01-02 15:04:05"))
|
||||
// 超级个体/会员开通后:确保链接人与事存在同名 @人(最佳努力)
|
||||
if err := ensurePersonForUser(db, beneficiaryUserID); err != nil {
|
||||
fmt.Printf("[VIP] ensurePersonForUser 失败: userId=%s, orderSn=%s, err=%v\n", beneficiaryUserID, orderSn, err)
|
||||
}
|
||||
} else if attach.ProductType == "match" {
|
||||
fmt.Printf("[PayNotify] 用户购买匹配次数: %s,订单 %s\n", beneficiaryUserID, orderSn)
|
||||
} else if attach.ProductType == "balance_recharge" {
|
||||
@@ -1117,6 +1121,10 @@ func activateOrderBenefits(db *gorm.DB, order *model.Order, payTime time.Time) {
|
||||
db.Model(&model.User{}).Where("id = ?", userID).Update("has_full_book", true)
|
||||
case "vip":
|
||||
activateVIP(db, userID, 365, payTime)
|
||||
// 超级个体/会员开通后:确保链接人与事存在同名 @人(最佳努力,不阻断权益)
|
||||
if err := ensurePersonForUser(db, userID); err != nil {
|
||||
fmt.Printf("[VIP] ensurePersonForUser 失败: userId=%s, err=%v\n", userID, err)
|
||||
}
|
||||
case "balance_recharge":
|
||||
ConfirmBalanceRechargeByOrder(db, order)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user