|
@@ -473,9 +473,9 @@ func OpenUserService(tx *sql.Tx, orderCode string, orderInfo map[string]interfac
|
|
|
updateOrder["user_id"] = userId
|
|
|
} else {
|
|
|
//用户原服务结束日期
|
|
|
- vipEndTime := time.Unix(cm.Int64All(userData["l_vip_endtime"]), 0).In(time.Local)
|
|
|
//最近回款流水时间
|
|
|
if vipType == 1 { //超级订阅续费
|
|
|
+ vipEndTime := time.Unix(cm.Int64All(userData["l_vip_endtime"]), 0).In(time.Local)
|
|
|
var newStartTime, newEndTime time.Time
|
|
|
set := map[string]interface{}{
|
|
|
"i_vip_expire_tip": 0,
|
|
@@ -495,6 +495,8 @@ func OpenUserService(tx *sql.Tx, orderCode string, orderInfo map[string]interfac
|
|
|
bson.M{"$set": set}) {
|
|
|
return errors.New(fmt.Sprintf("%s更新结束%d日期出错", userId, vipEndTime.Unix()))
|
|
|
}
|
|
|
+ updateOrder["vip_starttime"] = newStartTime.Format(cm.Date_Full_Layout)
|
|
|
+ updateOrder["vip_endtime"] = newEndTime.Format(cm.Date_Full_Layout)
|
|
|
} else if vipType == 2 { //升级
|
|
|
//先判断审核通过日期是否再超级订阅有效期内
|
|
|
vipStatus := cm.IntAll(userData["i_vip_status"])
|
|
@@ -530,8 +532,6 @@ func OpenUserService(tx *sql.Tx, orderCode string, orderInfo map[string]interfac
|
|
|
go ClearBigVipUserPower(userId)
|
|
|
}
|
|
|
}
|
|
|
- updateOrder["vip_starttime"] = time.Now().Format(cm.Date_Full_Layout)
|
|
|
- updateOrder["vip_endtime"] = vipEndTime.Format(cm.Date_Full_Layout)
|
|
|
}
|
|
|
|
|
|
} else if productType == "大会员" {
|