|
@@ -303,7 +303,7 @@ func GetRecommendBidZone(typ int, pageSize int) (list []map[string]interface{},
|
|
|
|
|
|
// GetStrategyList 招投标攻略
|
|
// GetStrategyList 招投标攻略
|
|
func GetStrategyList() (strategyList []map[string]interface{}) {
|
|
func GetStrategyList() (strategyList []map[string]interface{}) {
|
|
- if l, ok := redis.Get("newother", "pcIndexStrategyList").([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
|
|
|
+ if l, ok := redis.Get(RedisNameNew, "pcIndexStrategyList").([]interface{}); ok && l != nil && len(l) > 0 {
|
|
strategyList = common.ObjArrToMapArr(l)
|
|
strategyList = common.ObjArrToMapArr(l)
|
|
} else {
|
|
} else {
|
|
for _, item := range jySchool.GuidelineColumn().SeedData {
|
|
for _, item := range jySchool.GuidelineColumn().SeedData {
|
|
@@ -333,7 +333,7 @@ func GetIndexProjectList(typ, pageSize int) (data []map[string]interface{}, type
|
|
types = "省级项目"
|
|
types = "省级项目"
|
|
}
|
|
}
|
|
redidKey := fmt.Sprintf("pcIndexProjectZone_%d", typ)
|
|
redidKey := fmt.Sprintf("pcIndexProjectZone_%d", typ)
|
|
- redisArr, _ := redis.Get("newother", redidKey).([]interface{})
|
|
|
|
|
|
+ redisArr, _ := redis.Get(RedisNameNew, redidKey).([]interface{})
|
|
if len(redisArr) > 0 {
|
|
if len(redisArr) > 0 {
|
|
data = common.ObjArrToMapArr(redisArr)
|
|
data = common.ObjArrToMapArr(redisArr)
|
|
return
|
|
return
|
|
@@ -347,30 +347,31 @@ func GetIndexProjectList(typ, pageSize int) (data []map[string]interface{}, type
|
|
v["publish_time"] = time.Unix(common.Int64All(v["publish_time"]), 0).Format("2006-01-02")
|
|
v["publish_time"] = time.Unix(common.Int64All(v["publish_time"]), 0).Format("2006-01-02")
|
|
data = append(data, v)
|
|
data = append(data, v)
|
|
}
|
|
}
|
|
|
|
+ redis.Put(RedisNameNew, redidKey, data, 24*3600)
|
|
return data, types
|
|
return data, types
|
|
}
|
|
}
|
|
|
|
|
|
// 优秀供应商
|
|
// 优秀供应商
|
|
func GetBidInfoPublishEnt() (res [][]map[string]interface{}) {
|
|
func GetBidInfoPublishEnt() (res [][]map[string]interface{}) {
|
|
- if l, ok := redis.Get("newother", "pcIndexBidInfoGoodPublishEnt").([]interface{}); ok && l != nil && len(l) > 0 {
|
|
|
|
|
|
+ if l, ok := redis.Get(RedisNameNew, "pcIndexBidInfoGoodPublishEnt").([]interface{}); ok && l != nil && len(l) > 0 {
|
|
for _, v := range l {
|
|
for _, v := range l {
|
|
res = append(res, common.ObjArrToMapArr(v.([]interface{})))
|
|
res = append(res, common.ObjArrToMapArr(v.([]interface{})))
|
|
}
|
|
}
|
|
|
|
|
|
} else {
|
|
} else {
|
|
- data := public.Mysql.Find("entniche_info", map[string]interface{}{"auth_status": 1}, "id,name", "auth_time DESC", -1, -1)
|
|
|
|
|
|
+ data := public.Mysql.Query("SELECT id,name FROM `entniche_info` WHERE auth_status = 1 ORDER BY auth_startTime DESC")
|
|
if data != nil && len(*data) > 0 {
|
|
if data != nil && len(*data) > 0 {
|
|
entData := []map[string]interface{}{}
|
|
entData := []map[string]interface{}{}
|
|
- if len(*data) > 60 {
|
|
|
|
- r := rand.Intn(len(*data) - 60)
|
|
|
|
- entData = (*data)[r : r+60]
|
|
|
|
|
|
+ if len(*data) > 150 {
|
|
|
|
+ r := rand.Intn(len(*data) - 150)
|
|
|
|
+ entData = (*data)[r : r+150]
|
|
} else {
|
|
} else {
|
|
entData = *data
|
|
entData = *data
|
|
}
|
|
}
|
|
if len(entData) > 0 {
|
|
if len(entData) > 0 {
|
|
once := []map[string]interface{}{}
|
|
once := []map[string]interface{}{}
|
|
for _, val := range entData {
|
|
for _, val := range entData {
|
|
- if len(once) <= 15 {
|
|
|
|
|
|
+ if len(once) <= 14 {
|
|
once = append(once, val)
|
|
once = append(once, val)
|
|
} else {
|
|
} else {
|
|
res = append(res, once)
|
|
res = append(res, once)
|
|
@@ -382,7 +383,7 @@ func GetBidInfoPublishEnt() (res [][]map[string]interface{}) {
|
|
res = append(res, once)
|
|
res = append(res, once)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- redis.Put("newother", "pcIndexBidInfoGoodPublishEnt", res, 3600*24*7)
|
|
|
|
|
|
+ redis.Put(RedisNameNew, "pcIndexBidInfoGoodPublishEnt", res, 24*3600)
|
|
}
|
|
}
|
|
}
|
|
}
|
|
return res
|
|
return res
|
|
@@ -399,6 +400,6 @@ func GetImportBidding() []*hotKeyWord {
|
|
}
|
|
}
|
|
randomNumber := rand.Intn(len(subjectMatter) - 30)
|
|
randomNumber := rand.Intn(len(subjectMatter) - 30)
|
|
res := subjectMatter[randomNumber : randomNumber+30]
|
|
res := subjectMatter[randomNumber : randomNumber+30]
|
|
- redis.Put(RedisNameNew, "pcIndexImportBidding", res, 3600*6)
|
|
|
|
|
|
+ redis.Put(RedisNameNew, "pcIndexImportBidding", res, 24*3600)
|
|
return res
|
|
return res
|
|
}
|
|
}
|