|
@@ -633,18 +633,19 @@ func refundAuto() {
|
|
nowTime := time.Now().Format(date.Date_Full_Layout)
|
|
nowTime := time.Now().Format(date.Date_Full_Layout)
|
|
TiDb.SelectByBath(100, func(l *[]map[string]interface{}) bool {
|
|
TiDb.SelectByBath(100, func(l *[]map[string]interface{}) bool {
|
|
for _, v := range *l {
|
|
for _, v := range *l {
|
|
- saleId, cluename, company_nature, company_verification, uid := int64(0), "", 0, 0, ""
|
|
|
|
|
|
+ saleId, cluename, company_nature, company_verification, uid, phone := int64(0), "", 0, 0, "", ""
|
|
clueId := common.Int64All(v["clue_id"])
|
|
clueId := common.Int64All(v["clue_id"])
|
|
name := common.ObjToString(v["name"])
|
|
name := common.ObjToString(v["name"])
|
|
kcposition_id := common.Int64All(v["position_id"])
|
|
kcposition_id := common.Int64All(v["position_id"])
|
|
isRenewalProtection := common.IntAll(v["is_renewal_protection"])
|
|
isRenewalProtection := common.IntAll(v["is_renewal_protection"])
|
|
- clueData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, "company_nature,company_verification,cluename,userid,position_id,uid", "")
|
|
|
|
|
|
+ clueData := TiDb.FindOne("dwd_f_crm_clue_info", map[string]interface{}{"id": clueId}, "phone,company_nature,company_verification,cluename,userid,position_id,uid", "")
|
|
if clueData != nil && len(*clueData) > 0 {
|
|
if clueData != nil && len(*clueData) > 0 {
|
|
saleId = common.Int64All((*clueData)["position_id"])
|
|
saleId = common.Int64All((*clueData)["position_id"])
|
|
cluename = common.ObjToString((*clueData)["cluename"])
|
|
cluename = common.ObjToString((*clueData)["cluename"])
|
|
company_nature = common.IntAll((*clueData)["company_nature"])
|
|
company_nature = common.IntAll((*clueData)["company_nature"])
|
|
company_verification = common.IntAll((*clueData)["company_verification"])
|
|
company_verification = common.IntAll((*clueData)["company_verification"])
|
|
uid = common.ObjToString((*clueData)["uid"])
|
|
uid = common.ObjToString((*clueData)["uid"])
|
|
|
|
+ phone = common.ObjToString((*clueData)["phone"])
|
|
}
|
|
}
|
|
isFull := FindUpperLimit(gconv.String(saleId), "", false)
|
|
isFull := FindUpperLimit(gconv.String(saleId), "", false)
|
|
query1 := fmt.Sprintf(`select id from dwd_f_userbase_order_info where (product_type = "企业商机管理" or product_type = "大会员") and vip_endtime > "%s" and order_status = 1 and pay_money > 0 and uid = "%s"`, nowTime, uid)
|
|
query1 := fmt.Sprintf(`select id from dwd_f_userbase_order_info where (product_type = "企业商机管理" or product_type = "大会员") and vip_endtime > "%s" and order_status = 1 and pay_money > 0 and uid = "%s"`, nowTime, uid)
|
|
@@ -831,7 +832,17 @@ func refundAuto() {
|
|
"operator_id": -1,
|
|
"operator_id": -1,
|
|
})
|
|
})
|
|
//发送邮件
|
|
//发送邮件
|
|
- HandOverFail(saleId, cluename)
|
|
|
|
|
|
+ mailContent := ""
|
|
|
|
+ if cluename != "" {
|
|
|
|
+ if phone != "" {
|
|
|
|
+ mailContent = fmt.Sprintf("%s(%s)", cluename, phone)
|
|
|
|
+ } else {
|
|
|
|
+ mailContent = cluename
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ mailContent = phone
|
|
|
|
+ }
|
|
|
|
+ HandOverFail(saleId, mailContent)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|