|
@@ -2,6 +2,7 @@ package main
|
|
|
|
|
|
import (
|
|
|
"fmt"
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
|
"log"
|
|
|
"regexp"
|
|
|
"strings"
|
|
@@ -111,11 +112,15 @@ func FormatTag(data map[string]interface{}, count int) {
|
|
|
search_wordss = strings.Join(search_words_arr, ",")
|
|
|
}
|
|
|
//订单购买的服务
|
|
|
- //orderData := TiDb.Find("dwd_f_userbase_order_info", map[string]interface{}{"userid": userId, "order_status": 1, "delete_status": 0}, "", "", -1, -1)
|
|
|
- orderData := TiDb.SelectBySql("select * from dwd_f_userbase_order_info where userid=? and order_status=1 and delete_status=0 and payable_money > 0", userId)
|
|
|
+ orderData := TiDb.Find("dwd_f_userbase_order_info", map[string]interface{}{"userid": userId, "order_status": 1, "delete_status": 0}, "", "", -1, -1)
|
|
|
+ //orderData := TiDb.SelectBySql("select * from dwd_f_userbase_order_info where userid=? and order_status=1 and delete_status=0 and payable_money > 0", userId)
|
|
|
if orderData != nil && len(*orderData) > 0 {
|
|
|
product_type_arr, product_type_arrs := []string{}, []string{}
|
|
|
for _, v := range *orderData {
|
|
|
+ payable_money := gconv.Int64(v["payable_money"])
|
|
|
+ if payable_money <= 0 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
product_type := common.ObjToString(v["product_type"])
|
|
|
if product_type != "" {
|
|
|
product_type_arr = append(product_type_arr, product_type)
|
|
@@ -242,7 +247,7 @@ func tagAddSync() {
|
|
|
}
|
|
|
}
|
|
|
log.Println("注册日期定时任务结束")
|
|
|
- orderData := TiDb.SelectBySql(`select product_type,autoUpdate,uid from dwd_f_userbase_order_info where order_status = 1 and payable_money > 0 and autoUpdate >= "` + cfg.LastOrderTime + `" order by autoUpdate desc`)
|
|
|
+ orderData := TiDb.SelectBySql(`select product_type,autoUpdate,uid from dwd_f_userbase_order_info where order_status = 1 and autoUpdate >= "` + cfg.LastOrderTime + `" order by autoUpdate desc`)
|
|
|
if orderData != nil && len(*orderData) > 0 {
|
|
|
for k, order := range *orderData {
|
|
|
nowTime := time.Now().Format("2006-01-02 15:04:05")
|
|
@@ -257,10 +262,14 @@ func tagAddSync() {
|
|
|
cfg.LastOrderTime = autoUpdate
|
|
|
}
|
|
|
//orderDatas := TiDb.Find("dwd_f_userbase_order_info", map[string]interface{}{"uid": uId, "order_status": 1, "delete_status": 0}, "", "", -1, -1)
|
|
|
- orderDatas := TiDb.SelectBySql("select * from dwd_f_userbase_order_info where uid=? and order_status=1 and delete_status=0 and payable_money > 0", uId)
|
|
|
+ orderDatas := TiDb.SelectBySql("select * from dwd_f_userbase_order_info where uid=? and order_status=1 and delete_status=0 0", uId)
|
|
|
if orderDatas != nil && len(*orderDatas) > 0 {
|
|
|
product_type_arr, product_type_arrs := []string{}, []string{}
|
|
|
for _, v := range *orderDatas {
|
|
|
+ payable_money := gconv.Int64(v["payable_money"])
|
|
|
+ if payable_money <= 0 {
|
|
|
+ continue
|
|
|
+ }
|
|
|
product_type := common.ObjToString(v["product_type"])
|
|
|
log.Println("product_type ", product_type)
|
|
|
if product_type != "" {
|