|
|
|
@ -202,10 +202,14 @@ func ConfirmOrderTradeSuc(orderInfo *order.Information, clientIP ...string) erro
|
|
|
|
|
if e := tx.First(&s1, "id = ?", orderInfo.SharerID).Error; e != nil {
|
|
|
|
|
return e
|
|
|
|
|
}
|
|
|
|
|
level := 0
|
|
|
|
|
if userInfo.LoginApp {
|
|
|
|
|
level = 1
|
|
|
|
|
}
|
|
|
|
|
if s1.Level == 2 && userInfo.ParentID == 0 {
|
|
|
|
|
// upgrade 修改了升级逻辑
|
|
|
|
|
if e := tx.Model(&userInfo).Updates(user.Information{
|
|
|
|
|
Level: 0,
|
|
|
|
|
Level: level,
|
|
|
|
|
ParentID: s1.ID,
|
|
|
|
|
UpgradeTime1: formatime.NewSecondNow(),
|
|
|
|
|
RootID: s1.RootID,
|
|
|
|
|