|
@@ -119,11 +119,56 @@ func (m *Front) PcAjaxReq() {
|
|
//高级筛选 仅vip用户可查询
|
|
//高级筛选 仅vip用户可查询
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
var buyerclass string = "" //采购单位类别
|
|
var buyerclass string = "" //采购单位类别
|
|
-
|
|
|
|
|
|
+ var selectTypeArr []string //筛选查询内容
|
|
if jy.GetVipState(public.Mysql, public.MQFW, userId).IsPayedUser() {
|
|
if jy.GetVipState(public.Mysql, public.MQFW, userId).IsPayedUser() {
|
|
buyerclass = m.GetString("buyerclass")
|
|
buyerclass = m.GetString("buyerclass")
|
|
hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
|
|
hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
|
|
|
|
+
|
|
|
|
+ switch selectType {
|
|
|
|
+ case "content":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "detail")
|
|
|
|
+ break
|
|
|
|
+ case "buyer":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "mbuyer")
|
|
|
|
+ break
|
|
|
|
+ case "winner":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "mwinner")
|
|
|
|
+ break
|
|
|
|
+ case "agency":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "magency")
|
|
|
|
+ break
|
|
|
|
+ case "file":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "filetext")
|
|
|
|
+ break
|
|
|
|
+ case "all":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "title", "detail", "mbuyer", "mwinner", "magency", "filetext")
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if selectType == "winner" || selectType == "all" {
|
|
|
|
+ isOldUser := func() bool { //查询是否是老用户
|
|
|
|
+ user, _ := public.MQFW.FindById("user", userId, `{"l_registedate":1}`)
|
|
|
|
+ if user == nil || len(*user) == 0 {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ registerData, ok := (*user)["l_registedate"].(int64)
|
|
|
|
+ if ok && registerData < 9999 {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+ }()
|
|
|
|
+ if selectType == "all" {
|
|
|
|
+ if isOldUser {
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "title", "detail", "mwinner")
|
|
|
|
+ }
|
|
|
|
+ } else if isOldUser { //查询中标企业且是老用户
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "mwinner")
|
|
|
|
+ }
|
|
|
|
+ } else if selectType == "content" {
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "detail")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
+
|
|
m.SetSession("selectType", selectType)
|
|
m.SetSession("selectType", selectType)
|
|
//只有前20条 有全字段,
|
|
//只有前20条 有全字段,
|
|
if subtype != "拟建" && currentPage != 1 {
|
|
if subtype != "拟建" && currentPage != 1 {
|
|
@@ -150,7 +195,7 @@ func (m *Front) PcAjaxReq() {
|
|
if len(s_word) > 0 || len(industry) > 0 {
|
|
if len(s_word) > 0 || len(industry) > 0 {
|
|
if reqType == "filter" {
|
|
if reqType == "filter" {
|
|
if status == 1 {
|
|
if status == 1 {
|
|
- count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, selectType, field)
|
|
|
|
|
|
+ count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, selectTypeArr, field)
|
|
}
|
|
}
|
|
} else if reqType == "bidSearch" {
|
|
} else if reqType == "bidSearch" {
|
|
//全文检索限制
|
|
//全文检索限制
|
|
@@ -165,7 +210,7 @@ func (m *Front) PcAjaxReq() {
|
|
if limitFlag {
|
|
if limitFlag {
|
|
if start == 0 {
|
|
if start == 0 {
|
|
limit_count := public.Lst.TotalPage * bidsearch.SearchPageSize_PC
|
|
limit_count := public.Lst.TotalPage * bidsearch.SearchPageSize_PC
|
|
- count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, limit_count, true, selectType, field)
|
|
|
|
|
|
+ count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, limit_count, true, selectTypeArr, field)
|
|
if totalPage > int64(public.Lst.TotalPage) {
|
|
if totalPage > int64(public.Lst.TotalPage) {
|
|
totalPage = int64(public.Lst.TotalPage)
|
|
totalPage = int64(public.Lst.TotalPage)
|
|
}
|
|
}
|
|
@@ -174,7 +219,7 @@ func (m *Front) PcAjaxReq() {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, selectType, field)
|
|
|
|
|
|
+ count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, selectTypeArr, field)
|
|
}
|
|
}
|
|
listSize := 0
|
|
listSize := 0
|
|
if list != nil {
|
|
if list != nil {
|
|
@@ -437,10 +482,53 @@ func (m *Front) WxsearchlistPaging() {
|
|
//高级筛选 仅vip用户可查询
|
|
//高级筛选 仅vip用户可查询
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
var buyerclass string = "" //采购单位类别
|
|
var buyerclass string = "" //采购单位类别
|
|
-
|
|
|
|
|
|
+ var selectTypeArr []string
|
|
if jy.GetVipState(public.Mysql, public.MQFW, userId).IsPayedUser() { //超级订阅、大会员、商机管理
|
|
if jy.GetVipState(public.Mysql, public.MQFW, userId).IsPayedUser() { //超级订阅、大会员、商机管理
|
|
buyerclass = m.GetString("buyerclass")
|
|
buyerclass = m.GetString("buyerclass")
|
|
hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
|
|
hasBuyerTel, hasWinnerTel = m.GetString("buyertel"), m.GetString("winnertel")
|
|
|
|
+ switch selectType {
|
|
|
|
+ case "content":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "detail")
|
|
|
|
+ break
|
|
|
|
+ case "buyer":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "mbuyer")
|
|
|
|
+ break
|
|
|
|
+ case "winner":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "mwinner")
|
|
|
|
+ break
|
|
|
|
+ case "agency":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "magency")
|
|
|
|
+ break
|
|
|
|
+ case "file":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "filetext")
|
|
|
|
+ break
|
|
|
|
+ case "all":
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "title", "detail", "mbuyer", "mwinner", "magency", "filetext")
|
|
|
|
+ break
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ if selectType == "winner" || selectType == "all" {
|
|
|
|
+ isOldUser := func() bool { //查询是否是老用户
|
|
|
|
+ user, _ := public.MQFW.FindById("user", userId, `{"l_registedate":1}`)
|
|
|
|
+ if user == nil || len(*user) == 0 {
|
|
|
|
+ return false
|
|
|
|
+ }
|
|
|
|
+ registerData, ok := (*user)["l_registedate"].(int64)
|
|
|
|
+ if ok && registerData < 9999 {
|
|
|
|
+ return true
|
|
|
|
+ }
|
|
|
|
+ return false
|
|
|
|
+ }()
|
|
|
|
+ if selectType == "all" {
|
|
|
|
+ if isOldUser {
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "title", "detail", "mwinner")
|
|
|
|
+ }
|
|
|
|
+ } else if isOldUser { //查询中标企业且是老用户
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "mwinner")
|
|
|
|
+ }
|
|
|
|
+ } else if selectType == "content" {
|
|
|
|
+ selectTypeArr = append(selectTypeArr, "detail")
|
|
|
|
+ }
|
|
}
|
|
}
|
|
|
|
|
|
//全文检索限制
|
|
//全文检索限制
|
|
@@ -455,10 +543,10 @@ func (m *Front) WxsearchlistPaging() {
|
|
s_word := ""
|
|
s_word := ""
|
|
if limitFlag {
|
|
if limitFlag {
|
|
if pageNum == 1 {
|
|
if pageNum == 1 {
|
|
- list, b_word, a_word, s_word = bidsearch.GetWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, public.Lst.TotalPage*bidsearch.SearchPageSize_WX, selectType, filed)
|
|
|
|
|
|
+ list, b_word, a_word, s_word = bidsearch.GetWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, public.Lst.TotalPage*bidsearch.SearchPageSize_WX, selectTypeArr, filed)
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- list, b_word, a_word, s_word = bidsearch.GetWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_WX, selectType, filed)
|
|
|
|
|
|
+ list, b_word, a_word, s_word = bidsearch.GetWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_WX, selectTypeArr, filed)
|
|
}
|
|
}
|
|
listSize := 0
|
|
listSize := 0
|
|
if list != nil {
|
|
if list != nil {
|