فهرست منبع

fix:无权益画像修改

duxin 1 سال پیش
والد
کامیت
3d95e1e811

+ 7 - 5
src/jfw/modules/bigmember/src/entity/portrait_screen.go

@@ -415,9 +415,10 @@ func (pwp *PortraitProjectScreen) FreePortraitNews(mustQueryArr []string, isWinn
 	var dataArr []map[string]interface{}
 	if rBytes, err := redis.GetBytes("other", redisKey); err == nil && len(*rBytes) != 0 {
 		_ = json.Unmarshal(*rBytes, &redisData)
-		dataArr, _ = redisData["data"].([]map[string]interface{})
-		total, _ = redisData["total"].(int64)
-		updateTime, _ = redisData["updateTime"].(int64)
+		rData, _ := redisData["data"].([]interface{})
+		dataArr = qutil.ObjArrToMapArr(rData)
+		total = qutil.Int64All(redisData["total"])
+		updateTime = qutil.Int64All(redisData["updateTime"])
 	} else {
 		var fields string
 		updateTime = time.Now().Unix()
@@ -426,9 +427,10 @@ func (pwp *PortraitProjectScreen) FreePortraitNews(mustQueryArr []string, isWinn
 		} else {
 			fields = `"bidstatus","_id","title","subtype","projectname","publishtime","area","bidamount","budget","bidopentime","s_winner","entidlist"`
 		}
-		listQuery := fmt.Sprintf(NewMustSearch, strings.Join(mustQueryArr, ","), fmt.Sprintf(`,"_source":[%s],"sort":{%s},"from":0,"size":%d`, fields, `"publishtime":"desc","id":"desc"`, config.Config.PortraitCount))
-		total = elastic.Count(biddingIndex, biddingIndex, listQuery)
+		mustQueryArrStr := strings.Join(mustQueryArr, ",")
+		total = elastic.Count(biddingIndex, biddingIndex, fmt.Sprintf(NewMustSearch, mustQueryArrStr, ""))
 		if total > 0 {
+			listQuery := fmt.Sprintf(NewMustSearch, mustQueryArrStr, fmt.Sprintf(`,"_source":[%s],"sort":{%s},"from":0,"size":%d`, fields, `"publishtime":"desc","id":"desc"`, config.Config.PortraitCount))
 			list := elastic.Get(biddingIndex, biddingIndex, listQuery)
 			if list != nil && len(*list) > 0 {
 				dataArr = *list

+ 0 - 3
src/jfw/modules/bigmember/src/service/portrait/subvipPortraitAction.go

@@ -335,9 +335,6 @@ func (this *SubVipPortrait) BuyerNewMsg() {
 		if buyer == "" {
 			return nil, fmt.Errorf("参数异常")
 		}
-		if userId == "" {
-			return nil, fmt.Errorf("未登录")
-		}
 		pageNum, _ := this.GetInteger("pageNum")
 		pageSize, _ := this.GetInteger("pageSize")
 		cepm, power, err, _ := entity.CreateSubVipPortraitManagerForOpen(userId, "buyerPortrait", buyer, false, this.Session())