|
@@ -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)
|