|
@@ -661,9 +661,16 @@ func refundAuto() {
|
|
|
if isRenewalProtection == 1 {
|
|
|
vip_endtime := common.ObjToString(vv["vip_endtime"])
|
|
|
vip_endtimes, _ := time.ParseInLocation(date.Date_Full_Layout, vip_endtime, time.Local)
|
|
|
+ //查询申请保护时间
|
|
|
+ renewalTime := time.Time{}
|
|
|
+ timeData := TiDb.SelectBySql(`select max(createtime) as createtime from dwd_f_crm_clue_change_record where clue_id = ? `, clueId)
|
|
|
+ if timeData != nil && len(*timeData) > 0 {
|
|
|
+ renewalTime, _ = time.ParseInLocation(date.Date_Full_Layout, gconv.String((*timeData)[0]["createtime"]), time.Local)
|
|
|
+ }
|
|
|
+ renewalInt := renewalTime.Unix()
|
|
|
+ log.Println("申请保护期时间", clueId, renewalInt)
|
|
|
//查看服务到期时间
|
|
|
- historyTimes, _ := time.ParseInLocation(date.Date_Full_Layout, nowTime, time.Local)
|
|
|
- if vip_endtimes.Unix() <= historyTimes.Unix() {
|
|
|
+ if renewalInt != 0 && renewalInt < db.CustomerTime {
|
|
|
//三个月
|
|
|
if time.Now().Unix()-vip_endtimes.Unix() < 3*30*86400 {
|
|
|
isOk = true
|