|
@@ -119,54 +119,13 @@ func (m *Front) PcAjaxReq() {
|
|
|
//高级筛选 仅vip用户可查询
|
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
|
var buyerclass string = "" //采购单位类别
|
|
|
- var selectTypeArr []string //筛选查询内容
|
|
|
- if jy.GetVipState(public.Mysql, public.MQFW, userId).IsPayedUser() {
|
|
|
+
|
|
|
+ vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
+ isPayedUser := vipStatus.IsPayedUser()
|
|
|
+ queryItems := vipStatus.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
|
|
|
+ if isPayedUser {
|
|
|
buyerclass = m.GetString("buyerclass")
|
|
|
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)
|
|
@@ -195,7 +154,7 @@ func (m *Front) PcAjaxReq() {
|
|
|
if len(s_word) > 0 || len(industry) > 0 {
|
|
|
if reqType == "filter" {
|
|
|
if status == 1 {
|
|
|
- count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, selectTypeArr, field)
|
|
|
+ count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, bidsearch.SearchPageSize_PC, true, queryItems, field)
|
|
|
}
|
|
|
} else if reqType == "bidSearch" {
|
|
|
//全文检索限制
|
|
@@ -210,7 +169,7 @@ func (m *Front) PcAjaxReq() {
|
|
|
if limitFlag {
|
|
|
if start == 0 {
|
|
|
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, selectTypeArr, field)
|
|
|
+ count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, 0, limit_count, true, queryItems, field)
|
|
|
if totalPage > int64(public.Lst.TotalPage) {
|
|
|
totalPage = int64(public.Lst.TotalPage)
|
|
|
}
|
|
@@ -219,7 +178,7 @@ func (m *Front) PcAjaxReq() {
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
|
- count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, selectTypeArr, field)
|
|
|
+ count, totalPage, list = bidsearch.GetPcBidSearchData(s_word, area, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, start, bidsearch.SearchPageSize_PC, true, queryItems, field)
|
|
|
}
|
|
|
listSize := 0
|
|
|
if list != nil {
|
|
@@ -482,53 +441,13 @@ func (m *Front) WxsearchlistPaging() {
|
|
|
//高级筛选 仅vip用户可查询
|
|
|
var hasBuyerTel, hasWinnerTel string = "", "" //是否有采购单位电话、是否有中标单位电话 y:有 n:没有
|
|
|
var buyerclass string = "" //采购单位类别
|
|
|
- var selectTypeArr []string
|
|
|
- if jy.GetVipState(public.Mysql, public.MQFW, userId).IsPayedUser() { //超级订阅、大会员、商机管理
|
|
|
+
|
|
|
+ vipStatus := jy.GetVipState(public.Mysql, public.MQFW, userId)
|
|
|
+ isPayedUser := vipStatus.IsPayedUser()
|
|
|
+ queryItems := vipStatus.GetQueryItems(selectType, util.Int64All(config.Sysconfig["bidSearchOldUserLimit"]))
|
|
|
+ if isPayedUser {
|
|
|
buyerclass = m.GetString("buyerclass")
|
|
|
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")
|
|
|
- }
|
|
|
}
|
|
|
|
|
|
//全文检索限制
|
|
@@ -543,10 +462,10 @@ func (m *Front) WxsearchlistPaging() {
|
|
|
s_word := ""
|
|
|
if limitFlag {
|
|
|
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, selectTypeArr, 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, queryItems, filed)
|
|
|
}
|
|
|
} else {
|
|
|
- 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)
|
|
|
+ list, b_word, a_word, s_word = bidsearch.GetWxsearchlistData(searchvalue, scope, publishtime, subtype, industry, minprice, maxprice, "", buyerclass, hasBuyerTel, hasWinnerTel, pageNum, bidsearch.SearchPageSize_WX, queryItems, filed)
|
|
|
}
|
|
|
listSize := 0
|
|
|
if list != nil {
|