فهرست منبع

更新语句修改

jianghan 5 ماه پیش
والد
کامیت
31adab16c7
3فایلهای تغییر یافته به همراه7 افزوده شده و 3 حذف شده
  1. 1 1
      telemarketingEtl/entity/Voiced.go
  2. 4 0
      telemarketingEtl/entity/dwd_f_userbase_event_info.go
  3. 2 2
      telemarketingEtl/main.go

+ 1 - 1
telemarketingEtl/entity/Voiced.go

@@ -135,7 +135,7 @@ func getRecord() {
 	)
 	if firstLoad {
 		// 当日首次执行	1、全部归0 outbound_count
-		config.JianyuSubjectdb.ExecBySql("UPDATE dwd_f_crm_attribute_label SET outbound_count = 0")
+		config.JianyuSubjectdb.ExecBySql("UPDATE dwd_f_crm_attribute_label SET outbound_count = 0 WHERE DATE(createTime) BETWEEN DATE(NOW() - INTERVAL 7 DAY) AND DATE(NOW())")
 		sql = "SELECT createTime, CallNo, CalledNo FROM voice_record WHERE DATE(createTime) BETWEEN DATE(NOW() - INTERVAL 7 DAY) AND DATE(NOW()) ORDER BY createTime ASC"
 		countSql = "SELECT COUNT(id) FROM voice_record WHERE DATE(createTime) BETWEEN DATE(NOW() - INTERVAL 7 DAY) AND DATE(NOW())"
 	} else {

+ 4 - 0
telemarketingEtl/entity/dwd_f_userbase_event_info.go

@@ -179,6 +179,7 @@ func EventInfoAdd(start, end int64) {
 						if len(uarr) > 0 {
 							biddingId := uarr[0]
 							//获取标讯标题
+							log.Println("biddingId:", biddingId)
 							bdata, ok := config.MgoBid.FindById("bidding", biddingId, `{"title":1}`)
 							if ok && bdata != nil && len(*bdata) > 0 {
 								name = gconv.String((*bdata)["title"])
@@ -420,6 +421,9 @@ func AppClient(urls string) string {
 // return title href
 func GetInfoByBid(bid string) (string, string) {
 	title, href := "", ""
+	if bid == "" {
+		return "", ""
+	}
 	res, _ := config.MgoBid.FindById("bidding", bid, `{"title":1,"href":1}`)
 
 	if res == nil || len(*res) == 0 {

+ 2 - 2
telemarketingEtl/main.go

@@ -15,8 +15,8 @@ func main() {
 	//t3.Run()
 	//t4 := &timetask.TaskVipExpire{}
 	//t4.Run()
-	t5 := &timetask.TaskJyDetail{}
-	t5.Run()
+	//t5 := &timetask.TaskJyDetail{}
+	//t5.Run()
 
 	//t := &timetask.TaskVisitInfo{}
 	//t.Run()