|
@@ -49,6 +49,7 @@ func (this *HistoryData) HistoryTask(history_id string) {
|
|
noticeFilter := qu.IntAll(c["isDup"]) //公告是否去重
|
|
noticeFilter := qu.IntAll(c["isDup"]) //公告是否去重
|
|
isFilter := qu.IntAll(c["i_projectdup"]) //是否根据项目id去重
|
|
isFilter := qu.IntAll(c["i_projectdup"]) //是否根据项目id去重
|
|
dataTable := qu.IntAll(c["i_datatable"]) //数据存储位置
|
|
dataTable := qu.IntAll(c["i_datatable"]) //数据存储位置
|
|
|
|
+ i_pushtype := qu.IntAll(c["i_pushtype"]) //邮箱或者存表
|
|
|
|
|
|
isfile := false
|
|
isfile := false
|
|
isHenanMobile := false
|
|
isHenanMobile := false
|
|
@@ -119,9 +120,9 @@ func (this *HistoryData) HistoryTask(history_id string) {
|
|
if xlsxCount > 0 {
|
|
if xlsxCount > 0 {
|
|
go UpdateJyqyfwDatacount(appId, xlsxCount)
|
|
go UpdateJyqyfwDatacount(appId, xlsxCount)
|
|
}
|
|
}
|
|
-
|
|
|
|
- } else if dataTable == 0 {
|
|
|
|
- //发邮件
|
|
|
|
|
|
+ }
|
|
|
|
+ //发邮件
|
|
|
|
+ if i_pushtype == 0 {
|
|
go func() {
|
|
go func() {
|
|
time.Sleep(3 * time.Second)
|
|
time.Sleep(3 * time.Second)
|
|
log.Println("xlsxArr", len(xlsxArr))
|
|
log.Println("xlsxArr", len(xlsxArr))
|
|
@@ -130,17 +131,31 @@ func (this *HistoryData) HistoryTask(history_id string) {
|
|
log.Println("excel数据量错误")
|
|
log.Println("excel数据量错误")
|
|
}
|
|
}
|
|
GetXlsxs(xlsxArr, customer_name, email, history_id, isfile, isHenanMobile)
|
|
GetXlsxs(xlsxArr, customer_name, email, history_id, isfile, isHenanMobile)
|
|
-
|
|
|
|
- //xlsxArr = []map[string]interface{}{}
|
|
|
|
- //xlsxCount = 0
|
|
|
|
|
|
+ go UpdateHistoryState(2, history_id, xlsxCount)
|
|
|
|
+ xlsxArr = []map[string]interface{}{}
|
|
|
|
+ xlsxCount = 0
|
|
}()
|
|
}()
|
|
projectIdMap = sync.Map{}
|
|
projectIdMap = sync.Map{}
|
|
|
|
+ } else {
|
|
|
|
+ go UpdateHistoryState(2, history_id, xlsxCount)
|
|
|
|
+ xlsxArr = []map[string]interface{}{}
|
|
|
|
+ xlsxCount = 0
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /*if dataTable == 2 {
|
|
|
|
+ //使用pc商机管理的企业,数据存入mysql表,扣除数据量
|
|
|
|
+ if xlsxCount > 0 {
|
|
|
|
+ go UpdateJyqyfwDatacount(appId, xlsxCount)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ } else if dataTable == 0 {
|
|
|
|
+
|
|
} else if dataTable == 1 {
|
|
} else if dataTable == 1 {
|
|
log.Println("数据存入usermail appid:"+appId, "数据量:", xlsxCount)
|
|
log.Println("数据存入usermail appid:"+appId, "数据量:", xlsxCount)
|
|
}
|
|
}
|
|
go UpdateHistoryState(2, history_id, xlsxCount)
|
|
go UpdateHistoryState(2, history_id, xlsxCount)
|
|
xlsxArr = []map[string]interface{}{}
|
|
xlsxArr = []map[string]interface{}{}
|
|
- xlsxCount = 0
|
|
|
|
|
|
+ xlsxCount = 0*/
|
|
} else {
|
|
} else {
|
|
log.Println("初始化客户信息失败")
|
|
log.Println("初始化客户信息失败")
|
|
}
|
|
}
|