|
@@ -1068,7 +1068,7 @@ func refundAuto() {
|
|
|
}
|
|
|
return true
|
|
|
}, `select ent_id,clue_id,position_id,name,is_renewal_protection,company_name from dwd_f_csm_customer_info where is_transfer = 0`)
|
|
|
- //}, `select ent_id,clue_id,position_id,name,is_renewal_protection,company_name from dwd_f_csm_customer_info where clue_id =1892234`)
|
|
|
+ //}, `select ent_id,clue_id,position_id,name,is_renewal_protection,company_name from dwd_f_csm_customer_info where clue_id =527993`)
|
|
|
|
|
|
//移交电销提醒
|
|
|
for i, v := range mailData {
|
|
@@ -2048,14 +2048,18 @@ func getOrderData(sql string) (map[string]map[string]interface{}, string) {
|
|
|
if productInt64 == 0 {
|
|
|
continue
|
|
|
}
|
|
|
+ t1, _ := time.Parse(time.DateTime, lastEndTime)
|
|
|
+ t2, _ := time.Parse(time.DateTime, vip_endtime)
|
|
|
+ //判断服务周期
|
|
|
+ if t2.Unix() > t1.Unix() {
|
|
|
+ lastEndTime = vip_endtime
|
|
|
+ }
|
|
|
if _, exists := orderMap[orderCode]; exists {
|
|
|
- //判断服务周期
|
|
|
data := orderMap[orderCode]
|
|
|
//商品类型获取
|
|
|
oldDifference := gconv.Int(data["difference"])
|
|
|
- if oldDifference >= difference {
|
|
|
+ if difference >= oldDifference {
|
|
|
//需要更换
|
|
|
- lastEndTime = vip_endtime
|
|
|
v["difference"] = difference
|
|
|
v["product"] = productInt64
|
|
|
v["service_endtime"] = vip_endtime
|
|
@@ -2064,7 +2068,6 @@ func getOrderData(sql string) (map[string]map[string]interface{}, string) {
|
|
|
orderMap[orderCode] = v
|
|
|
}
|
|
|
} else {
|
|
|
- lastEndTime = vip_endtime
|
|
|
v["difference"] = difference
|
|
|
v["product"] = productInt64
|
|
|
v["product_type"] = product_type
|