|
@@ -376,7 +376,7 @@ func CNode(userId string) bool {
|
|
},
|
|
},
|
|
})
|
|
})
|
|
data := make(map[string]interface{})
|
|
data := make(map[string]interface{})
|
|
- if rdataOne != nil && ok {
|
|
|
|
|
|
+ if rdataOne != nil && ok && len(*rdataOne) > 0 {
|
|
data = *rdataOne
|
|
data = *rdataOne
|
|
}
|
|
}
|
|
|
|
|
|
@@ -438,14 +438,14 @@ func CNode(userId string) bool {
|
|
|
|
|
|
//查看公告详情次数限制
|
|
//查看公告详情次数限制
|
|
func SeeDetailLimit(obj map[string]interface{}, userId, sid string) bool {
|
|
func SeeDetailLimit(obj map[string]interface{}, userId, sid string) bool {
|
|
- //检验是否留资
|
|
|
|
- if CNode(userId) {
|
|
|
|
- return true
|
|
|
|
- }
|
|
|
|
watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
|
|
watchKey := fmt.Sprintf("article_count_%d_%s_%d_%s", time.Now().Year(), time.Now().Month(), time.Now().Day(), userId)
|
|
if strings.Contains(obj["subtype"].(string), "拟建") || strings.Contains(obj["subtype"].(string), "采购意向") {
|
|
if strings.Contains(obj["subtype"].(string), "拟建") || strings.Contains(obj["subtype"].(string), "采购意向") {
|
|
return false
|
|
return false
|
|
} else {
|
|
} else {
|
|
|
|
+ //检验是否留资
|
|
|
|
+ if CNode(userId) {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
if seeRes := redis.Get("other", watchKey); seeRes != nil && seeRes != "" {
|
|
if seeRes := redis.Get("other", watchKey); seeRes != nil && seeRes != "" {
|
|
if resVal, _ := seeRes.(string); resVal != "" {
|
|
if resVal, _ := seeRes.(string); resVal != "" {
|
|
sidss := strings.Split(resVal, "_")
|
|
sidss := strings.Split(resVal, "_")
|