Explorar o código

feat:推送结果预览

wangchuanjin hai 1 ano
pai
achega
a46332e88a
Modificáronse 1 ficheiros con 9 adicións e 6 borrados
  1. 9 6
      src/jfw/modules/bigmember/src/util/view.go

+ 9 - 6
src/jfw/modules/bigmember/src/util/view.go

@@ -3,13 +3,14 @@ package util
 import (
 	"encoding/json"
 	"fmt"
-	"github.com/gogf/gf/v2/util/gconv"
 	"jy/src/jfw/modules/bigmember/src/config"
 	"log"
 	"strconv"
 	"strings"
 	"time"
 
+	"github.com/gogf/gf/v2/util/gconv"
+
 	qutil "app.yhyue.com/moapp/jybase/common"
 	elastic "app.yhyue.com/moapp/jybase/es"
 	"app.yhyue.com/moapp/jybase/go-xweb/httpsession"
@@ -129,7 +130,7 @@ func GetSqlObjFromId(_id, item string, index int) *ViewCondition {
 		Subtype:    qutil.ObjArrToStringArr(a_infotype),
 		Area:       getStringArrFromDbResult(o_area, 1),
 		City:       getStringArrFromDbResult(o_area, 2),
-		SelectType: strconv.Itoa(qutil.IntAll(o_member_jy["i_matchway"])),
+		SelectType: gconv.SliceStr(o_member_jy["i_matchmode"]),
 		District:   getStringArrFromDistrict(o_district),
 	}
 }
@@ -208,10 +209,12 @@ func GetMemberViewSql(userId string, scd *ViewCondition) string {
 	boolsNum := 0 //should
 	if len(scd.Keyword) > 0 {
 		boolsNum = 1
-		if scd.SelectType == "" || scd.SelectType == "2" {
-			scd.SelectType = "detail\", \"title"
-		} else {
-			scd.SelectType = "title"
+		stype := strings.Join(scd.SelectType, "\",\"")
+		if strings.Contains(stype, "projectname/purchasing") {
+			stype = strings.Replace(stype, "projectname/purchasing", "projectname,\",\"purchasing", -1)
+		}
+		if stype == "" {
+			stype = "title"
 		}
 		multi_match = fmt.Sprintf(multi_match, "%s", "\""+scd.SelectType+"\"")
 		repeat := map[string]bool{}