wcj 5 năm trước cách đây
mục cha
commit
ee4a69f98a

+ 2 - 0
src/jfw/modules/pushsubscribe/src/push/job/projectjob.go

@@ -120,6 +120,8 @@ func (p *ProjectPushJob) Execute() {
 									"area":       util.ObjToString(plm["area"]),
 									"city":       util.ObjToString(plm["city"]),
 									"_id":        infoId,
+									"toptype":    util.ObjToString(plm["toptype"]),
+									"subtype":    util.ObjToString(plm["subtype"]),
 									"buyerclass": util.ObjToString(plm["buyerclass"]),
 								},
 							})

+ 11 - 1
src/jfw/modules/pushsubscribe/src/push/util/util.go

@@ -154,7 +154,7 @@ func SaveToPushsubscribe(isVipUser, isProjectInfo bool, userId string, matchInfo
 	}
 	unix := time.Now().Unix()
 	length := len(*matchInfos)
-	fields := []string{"userid", "infoid", "date", "matchkeys", "area", "city", "buyerclass", "type", "isvip"}
+	fields := []string{"userid", "infoid", "date", "matchkeys", "area", "city", "buyerclass", "type", "isvip", "toptype", "subtype"}
 	var savecount int64
 	batchSize := 0
 	values := []interface{}{}
@@ -191,6 +191,16 @@ func SaveToPushsubscribe(isVipUser, isProjectInfo bool, userId string, matchInfo
 		} else {
 			values = append(values, nil)
 		}
+		if toptype := util.ObjToString((*matchInfo.Info)["toptype"]); toptype != "" {
+			values = append(values, toptype)
+		} else {
+			values = append(values, nil)
+		}
+		if subtype := util.ObjToString((*matchInfo.Info)["subtype"]); subtype != "" {
+			values = append(values, subtype)
+		} else {
+			values = append(values, nil)
+		}
 		batchSize++
 		if i == 0 || batchSize == BigBulkSize {
 			savecount += Mysql.InsertBatch("pushsubscribe", fields, values)