Эх сурвалжийг харах

Merge branch 'dev/v4.8.36_rjj' of qmx/jy into feature/v4.8.36

renjiaojiao 2 жил өмнө
parent
commit
b47092cccf

+ 1 - 0
src/jfw/front/pcIndex.go

@@ -126,6 +126,7 @@ func (m *PcIndex) NewSordfish(flag string) error {
 			m.T["hotBuyers"] = HotBuyerList(entIsNew)
 			m.T["hasLogin"] = util.ObjToString(m.GetSession("userId")) != ""
 			m.T["includedInfo"] = GetIncludedInfo()
+			m.T["hotWinner"] = GetWinnerInfo()
 			m.T["newbids"] = NewIndexbids(m.Session(), m.Request)
 			m.T["hotkey"] = hotKeyArr
 			return m.Render("/pc/index.html", &m.T)

+ 20 - 16
src/jfw/modules/publicapply/src/enterpriseSearch/entity/entQuery.go

@@ -70,7 +70,7 @@ var (
 	}
 )
 
-//Check 校验查询参数是否合法
+// Check 校验查询参数是否合法
 func (es *EnterpriseSearch) Check() (*EnterpriseSearch, error) {
 	if es.PageSize == 0 { //默认十条
 		es.PageSize = 10
@@ -118,7 +118,7 @@ func (es *EnterpriseSearch) Check() (*EnterpriseSearch, error) {
 	return es, nil
 }
 
-//判断是否是空查询
+// 判断是否是空查询
 func (es *EnterpriseSearch) isEmptySearch() bool {
 	if es.Match == "" &&
 		es.EntArea == "" &&
@@ -135,9 +135,9 @@ func (es *EnterpriseSearch) isEmptySearch() bool {
 	return false
 }
 
-//GetQuerySql 获取检索语句
-//return  company_name、company_status、legal_person、capital、company_address、id、company_shortname
-//返回字段 企业名称、企业状态、法人、注册资本、地址、企业id、企业简称
+// GetQuerySql 获取检索语句
+// return  company_name、company_status、legal_person、capital、company_address、id、company_shortname
+// 返回字段 企业名称、企业状态、法人、注册资本、地址、企业id、企业简称
 func (es *EnterpriseSearch) GetQuerySql() (string, string) {
 	musts := make([]string, 0, 0)
 	//仅展示公司类型小于等于22的 company_type_int  22
@@ -251,7 +251,7 @@ func (es *EnterpriseSearch) GetQuerySql() (string, string) {
 	return fmt.Sprintf(entQueryCount, strings.Join(musts, ","), ""), fmt.Sprintf(entQuery, strings.Join(musts, ","), "")
 }
 
-//DoQuery 根据EnterpriseSearch参数进行企业相关查询
+// DoQuery 根据EnterpriseSearch参数进行企业相关查询
 func (es *EnterpriseSearch) DoQuery() (list *[]map[string]interface{}, total int64, err error) {
 	if es.isEmptySearch() { //是否是空查询,返回默认企业
 		list = GetEntIndexShow()
@@ -262,13 +262,17 @@ func (es *EnterpriseSearch) DoQuery() (list *[]map[string]interface{}, total int
 	start, limit := es.PageNum*es.PageSize, es.PageSize
 	total = -1
 
-	if !es.IsVip {
-		start, limit = 0, freeSearchNum
-	} else if start == 0 {
-		total = elastic.Count(index, itype, countSql)
-		if total == 0 {
-			return
-		}
+	/*if !es.IsVip {
+	  	start, limit = 0, freeSearchNum
+	  } else if start == 0 {
+	  	total = elastic.Count(index, itype, countSql)
+	  	if total == 0 {
+	  		return
+	  	}
+	  }*/
+	total = elastic.Count(index, itype, countSql)
+	if total == 0 {
+		return
 	}
 	sql = sql[:len(sql)-1] + fmt.Sprintf(`,"from":%d,"size":%d}`, start, limit)
 	list = elastic.Get(index, itype, sql)
@@ -281,7 +285,7 @@ func (es *EnterpriseSearch) DoQuery() (list *[]map[string]interface{}, total int
 	return
 }
 
-////格式化字段,加密id
+// //格式化字段,加密id
 func formatData(list *[]map[string]interface{}) *[]map[string]interface{} {
 	if list != nil {
 		for index, _ := range *list {
@@ -303,7 +307,7 @@ func formatData(list *[]map[string]interface{}) *[]map[string]interface{} {
 	return list
 }
 
-//暂不处理前端处理
+// 暂不处理前端处理
 func getCompanyShortName(entName string) string {
 	if entName == "" {
 		return ""
@@ -330,7 +334,7 @@ func GetEntIndexShow() (list *[]map[string]interface{}) {
 	return
 }
 
-//formatEstablishTime 格式化成立时间
+// formatEstablishTime 格式化成立时间
 // Year range
 // [start]y-[end]y
 // Timestamp range

+ 6 - 0
src/web/templates/pc/index.html

@@ -173,6 +173,7 @@
             <span class="info-type"><i class="iconfont icon-danweileixing"></i>按信息类型</span>
             <span class="hot-bidding"><i class="iconfont icon-remenzhaobiao"></i>热门招标</span>
             <span class="hot-subject"><i class="iconfont icon-biaodewu"></i>热门标的物</span>
+            <span class="hot-winner"><i class="iconfont icon-shiyongtuijian"></i>热门中标企业</span>
             <span class="hot-buyer"><i class="iconfont icon-caigoudanwei"></i>热门采购单位</span>
             <span class="recommend"><i class="iconfont icon-shiyongtuijian"></i>实用内容推荐</span>
           </div>
@@ -248,6 +249,11 @@
               <a href="{{$v.url}}" target="_blank">{{$v.name}}</a>
               {{end}}
             </div>
+            <div class="hot-winner-content simple-show">
+              {{range $i,$v := .T.hotWinner}}
+              <a href="{{$v.url}}" target="_blank">{{$v.name}}</a>
+              {{end}}
+            </div>
             <div class="recommend-content line-show">
               <ul class="clearfix">
                 {{range $k,$v := .T.recommend}}