|
@@ -13,7 +13,6 @@ import (
|
|
|
"fmt"
|
|
|
"jy/src/jfw/config"
|
|
|
"math/rand"
|
|
|
- "sort"
|
|
|
"strings"
|
|
|
"sync"
|
|
|
"time"
|
|
@@ -26,8 +25,8 @@ var (
|
|
|
|
|
|
type ClaimProject struct {
|
|
|
*xweb.Action
|
|
|
- nzjSearch xweb.Mapper `xweb:"/project/nzj/search"` //拟在建工作桌面外列表页
|
|
|
- nzjDetails xweb.Mapper `xweb:"/project/nzj/details"` //拟在建工作桌面外详情页
|
|
|
+ nzjSearch xweb.Mapper `xweb:"/front/project/nzj/search"` //拟在建工作桌面外列表页
|
|
|
+ nzjDetails xweb.Mapper `xweb:"/front/project/nzj/details"` //拟在建工作桌面外详情页
|
|
|
analyzeWord xweb.Mapper `xweb:"/homePage/analyzeWord"` //首页定制化分析报告词收集
|
|
|
analysisRegional xweb.Mapper `xweb:"/homePage/analysisRegional"` //首页区域分析
|
|
|
specification xweb.Mapper `xweb:"/front/bootstrap/specification"` //工作台引导说明
|
|
@@ -67,18 +66,22 @@ func (l *ClaimProject) AnalyzeWord() {
|
|
|
}
|
|
|
|
|
|
func (l *ClaimProject) NzjSearch() {
|
|
|
- //userId, _ := l.GetSession("user_id").(string)
|
|
|
- infoMap := map[string]interface{}{}
|
|
|
- body := xweb.FilterXSS(string(l.Body()))
|
|
|
- json.Unmarshal([]byte(body), &infoMap)
|
|
|
- count, list := getNzjList(infoMap)
|
|
|
+ pageNum, _ := l.GetInt("pageNum")
|
|
|
+ pageSize, _ := l.GetInt("pageSize")
|
|
|
+ count, list := getNzjList(map[string]interface{}{
|
|
|
+ "keyWord": l.GetString("keyWord"),
|
|
|
+ "area": l.GetString("area"),
|
|
|
+ "category": l.GetString("category"),
|
|
|
+ "project_stage": l.GetString("project_stage"),
|
|
|
+ "ownerclass": l.GetString("ownerclass"),
|
|
|
+ "pageNum": pageNum,
|
|
|
+ "pageSize": pageSize,
|
|
|
+ })
|
|
|
l.ServeJson(map[string]interface{}{
|
|
|
"error_code": 0,
|
|
|
"error_msg": nil,
|
|
|
- "data": map[string]interface{}{
|
|
|
- "list": list,
|
|
|
- "count": count,
|
|
|
- },
|
|
|
+ "list": list,
|
|
|
+ "count": count,
|
|
|
})
|
|
|
}
|
|
|
|
|
@@ -99,9 +102,11 @@ type RemovalKey struct {
|
|
|
}
|
|
|
|
|
|
type ProjectConnection struct {
|
|
|
- endName string
|
|
|
- address string
|
|
|
- data []map[string]interface{}
|
|
|
+ endName string
|
|
|
+ address string
|
|
|
+ identityType string
|
|
|
+ endId string
|
|
|
+ data interface{}
|
|
|
}
|
|
|
|
|
|
func getDetail(pid string, equity int) map[string]interface{} {
|
|
@@ -113,8 +118,8 @@ func getDetail(pid string, equity int) map[string]interface{} {
|
|
|
//基本信息
|
|
|
dataDetail := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT
|
|
|
a.projectname,
|
|
|
- a.lasttime,
|
|
|
- a.firsttime,
|
|
|
+ DATE_FORMAT(a.lasttime, '%s') AS lasttime,
|
|
|
+ DATE_FORMAT(a.firsttime, '%s') AS firsttime,
|
|
|
a.proposed_number,
|
|
|
CONCAT('进展', a.follow_num) AS follow,
|
|
|
b.name AS project_stage,
|
|
@@ -129,7 +134,6 @@ func getDetail(pid string, equity int) map[string]interface{} {
|
|
|
a.construction_area,
|
|
|
a.floor_area,
|
|
|
a.project_scale,
|
|
|
- a.createtime,
|
|
|
a.projectaddr
|
|
|
FROM
|
|
|
Jianyu_subjectdb.dwd_f_nzj_baseinfo a
|
|
@@ -139,7 +143,7 @@ FROM
|
|
|
LEFT JOIN Jianyu_subjectdb.d_nzj_ownerclass_code e on a.ownerclass_code = e.code
|
|
|
LEFT JOIN Jianyu_subjectdb.d_topsubtype_code f on a.industry_code = f.code
|
|
|
WHERE
|
|
|
- proposed_id = '%s'`, pid))
|
|
|
+ proposed_id = '%s'`, "%Y-%m-%d", "%Y-%m-%d", pid))
|
|
|
if dataDetail != nil && len(*dataDetail) > 0 {
|
|
|
detail = (*dataDetail)[0]
|
|
|
//拼接项目概况
|
|
@@ -152,16 +156,18 @@ WHERE
|
|
|
if detail["owner"] != nil && detail["owner"] != "" {
|
|
|
detail["owner"] = codeContent
|
|
|
}
|
|
|
+ // 拟在建项目是指尚在规划、报批、立项、环评、设计等阶段的项目,一般由发改委和各部委提供,且项目规模和投资额都较大。剑鱼标讯一般会在项目正式招标前3-12个月就通知付费客户,让客户有足够的时间和空间和业主联系,做好前期准备工作。
|
|
|
detail["project_scale"] = config.Seoconfig["nzjConstructionContent"]
|
|
|
}
|
|
|
//项目进展
|
|
|
- follRecord := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT a.publishtime,CONCAT('进展', a.follow_num) AS follow,CONCAT(a.title,'-',b.name) as remark,a.jybxhref FROM Jianyu_subjectdb.dwd_f_nzj_follw_record a
|
|
|
-LEFT JOIN Jianyu_subjectdb.d_nzj_project_stage_code b on a.project_stage_code = b.code WHERE proposed_id = '%s'
|
|
|
-ORDER BY publishtime DESC `, pid))
|
|
|
+ follRecord := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT DATE_FORMAT(a.publishtime, '%s') as publishtime,CONCAT('进展', a.follow_num) AS follow,b.name as project_stage,a.title,a.jybxhref FROM Jianyu_subjectdb.dwd_f_nzj_follw_record a
|
|
|
+LEFT JOIN Jianyu_subjectdb.d_nzj_project_stage_code b on a.project_stage_code = b.code WHERE a.proposed_id = '%s'
|
|
|
+ORDER BY a.publishtime DESC `, "%Y-%m-%d", pid))
|
|
|
if follRecord != nil && len(*follRecord) > 0 {
|
|
|
if equity < 3 {
|
|
|
+ // 进展备注是剑鱼标讯通过一定渠道获得的项目进度计划,帮您提前把握商机!开通大会员即可享受此权益。
|
|
|
for _, v := range *follRecord {
|
|
|
- v["remark"] = config.Seoconfig["nzjProgressRemark"]
|
|
|
+ v["title"] = config.Seoconfig["nzjProgressRemark"]
|
|
|
delete(v, "jybxhref")
|
|
|
}
|
|
|
}
|
|
@@ -169,84 +175,112 @@ ORDER BY publishtime DESC `, pid))
|
|
|
}
|
|
|
|
|
|
//获取企业主题id
|
|
|
- entId := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT name_id,name,address FROM Jianyu_subjectdb.dwd_f_nzj_ent WHERE proposed_id = '%s' ORDER BY identity_type DESC , createtime ASC`, pid))
|
|
|
+ entId := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT name_id,name,address,identity_type FROM Jianyu_subjectdb.dwd_f_nzj_ent WHERE proposed_id = '%s' GROUP BY name_id ORDER BY identity_type DESC , createtime ASC`, pid))
|
|
|
if entId != nil && len(*entId) > 0 {
|
|
|
pool := make(chan bool, 10)
|
|
|
wait := &sync.WaitGroup{}
|
|
|
- var lock sync.Mutex
|
|
|
- var contact []ProjectConnection
|
|
|
- for _, nameMap := range *entId {
|
|
|
+ var (
|
|
|
+ lock sync.Mutex
|
|
|
+ contact = make([]ProjectConnection, len(*entId))
|
|
|
+ )
|
|
|
+ for k, nameMap := range *entId {
|
|
|
pool <- true
|
|
|
wait.Add(1)
|
|
|
- go func(nameId map[string]interface{}) {
|
|
|
+ go func(nameMaps map[string]interface{}, ks int) {
|
|
|
defer func() {
|
|
|
wait.Done()
|
|
|
<-pool
|
|
|
}()
|
|
|
- connection := make(map[RemovalKey]map[string]interface{})
|
|
|
- var data []map[string]interface{}
|
|
|
+ nameId := common.InterfaceToStr(nameMaps["name_id"])
|
|
|
person := ProjectConnection{
|
|
|
- endName: common.InterfaceToStr(nameId["name"]),
|
|
|
- address: common.InterfaceToStr(nameId["address"]),
|
|
|
+ endName: common.InterfaceToStr(nameMaps["name"]),
|
|
|
+ address: common.InterfaceToStr(nameMaps["address"]),
|
|
|
+ identityType: common.InterfaceToStr(nameMaps["identity_type"]),
|
|
|
}
|
|
|
- nzjContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_contact WHERE name_id ='%s' ORDER BY createtime DESC `, nameId))
|
|
|
- if nzjContact != nil && len(*nzjContact) > 0 {
|
|
|
- for _, v := range *nzjContact {
|
|
|
- v["lasttime"] = v["createtime"]
|
|
|
- var key RemovalKey
|
|
|
- key.person = common.InterfaceToStr(v["contact_name"])
|
|
|
- key.phone = common.InterfaceToStr(v["contact_tel"])
|
|
|
- connection[key] = v
|
|
|
- }
|
|
|
+
|
|
|
+ company := public.BaseMysql.FindOne("dws_f_ent_baseinfo", map[string]interface{}{"name_id": nameId, "name": person.endName}, "company_id", "")
|
|
|
+ if company != nil {
|
|
|
+ person.endId = encrypt.EncodeArticleId2ByCheck(common.InterfaceToStr((*company)["company_id"]))
|
|
|
}
|
|
|
- if equity > 3 {
|
|
|
- //企业联系人
|
|
|
- entContact := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dws_f_ent_contact WHERE name_id ='%s'`, nameId))
|
|
|
- if entContact != nil && len(*entContact) > 0 {
|
|
|
- for _, v := range *entContact {
|
|
|
- v["lasttime"] = v["createtime"]
|
|
|
- if common.InterfaceToStr(v["createtime"]) < common.InterfaceToStr(v["updatetime"]) {
|
|
|
- v["lasttime"] = v["updatetime"]
|
|
|
- }
|
|
|
- var key RemovalKey
|
|
|
- key.person = common.InterfaceToStr(v["contact_name"])
|
|
|
- key.phone = common.InterfaceToStr(v["contact_tel"])
|
|
|
- connection[key] = v
|
|
|
- }
|
|
|
- }
|
|
|
- for _, m := range connection {
|
|
|
- data = append(data, m)
|
|
|
- }
|
|
|
- //私有联系人用户
|
|
|
- userContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_user_contact_record WHERE name_id = '%s' `, nameId))
|
|
|
- if userContact != nil && len(*userContact) > 0 {
|
|
|
- for _, m := range *userContact {
|
|
|
- data = append(data, m)
|
|
|
- }
|
|
|
+ data := make(map[string]interface{})
|
|
|
+ if equity != 3 {
|
|
|
+ dataArr := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT contact_name, contact_tel, 1 AS source_type, createtime AS lasttime FROM Jianyu_subjectdb.dwd_f_nzj_contact WHERE name_id = '%s' and contact_name != "" and contact_tel != "" lasttime DESC `, nameId))
|
|
|
+ if dataArr != nil {
|
|
|
+ data = (*dataArr)[0]
|
|
|
}
|
|
|
-
|
|
|
} else {
|
|
|
- person.endName = codeContent
|
|
|
- for _, m := range connection {
|
|
|
- data = append(data, m)
|
|
|
+ dataArr := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM (( SELECT contact_name, contact_tel, 1 AS source_type, createtime AS lasttime FROM Jianyu_subjectdb.dwd_f_nzj_contact WHERE name_id = '%s' and contact_name != "" and contact_tel != "" ORDER BY lasttime DESC LIMIT 1) UNION ALL
|
|
|
+ ( SELECT contact_name, contact_tel, source_type, CASE WHEN updatetime IS NOT NULL THEN updatetime ELSE createtime END AS lasttime FROM dws_f_ent_contact WHERE name_id = '%s' and contact_name != "" and contact_tel != "" ORDER BY source_type ASC,lasttime DESC LIMIT 1) UNION ALL
|
|
|
+( SELECT person AS contact_name, phone AS contact_tel, 0 AS source_type, lasttime FROM Jianyu_subjectdb.dwd_f_user_contact_record WHERE name_id = '%s' and person != "" and phone != "" ORDER BY lasttime DESC LIMIT 1)) a
|
|
|
+ORDER BY
|
|
|
+ a.source_type ASC,
|
|
|
+ a.lasttime DESC
|
|
|
+ LIMIT 1`, nameId, nameId, nameId))
|
|
|
+ if dataArr != nil {
|
|
|
+ data = (*dataArr)[0]
|
|
|
}
|
|
|
}
|
|
|
- // 自定义排序函数
|
|
|
- sort.Slice(data, func(i, j int) bool {
|
|
|
- sourceTypeA := data[i]["source_type"].(string)
|
|
|
- sourceTypeB := data[j]["source_type"].(string)
|
|
|
- if sourceTypeA == sourceTypeB {
|
|
|
- lastTimeA := data[i]["lasttime"].(int)
|
|
|
- lastTimeB := data[j]["lasttime"].(int)
|
|
|
- return lastTimeA > lastTimeB // 降序排序
|
|
|
- }
|
|
|
- return sourceTypeA < sourceTypeB // 升序排序
|
|
|
- })
|
|
|
+ /*connection := make(map[RemovalKey]map[string]interface{})
|
|
|
+ nzjContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_contact WHERE name_id ='%s' ORDER BY createtime DESC `, nameId))
|
|
|
+ if nzjContact != nil && len(*nzjContact) > 0 {
|
|
|
+ for _, v := range *nzjContact {
|
|
|
+ v["lasttime"] = v["createtime"]
|
|
|
+ var key RemovalKey
|
|
|
+ key.person = common.InterfaceToStr(v["contact_name"])
|
|
|
+ key.phone = common.InterfaceToStr(v["contact_tel"])
|
|
|
+ v["source_type"] = 1
|
|
|
+ connection[key] = v
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if equity > 3 {
|
|
|
+ //企业联系人
|
|
|
+ entContact := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dws_f_ent_contact WHERE name_id ='%s'`, nameId))
|
|
|
+ if entContact != nil && len(*entContact) > 0 {
|
|
|
+ for _, v := range *entContact {
|
|
|
+ v["lasttime"] = v["createtime"]
|
|
|
+ if common.InterfaceToStr(v["createtime"]) < common.InterfaceToStr(v["updatetime"]) {
|
|
|
+ v["lasttime"] = v["updatetime"]
|
|
|
+ }
|
|
|
+ var key RemovalKey
|
|
|
+ key.person = common.InterfaceToStr(v["contact_name"])
|
|
|
+ key.phone = common.InterfaceToStr(v["contact_tel"])
|
|
|
+ connection[key] = v
|
|
|
+ }
|
|
|
+ }
|
|
|
+ for _, m := range connection {
|
|
|
+ data = append(data, m)
|
|
|
+ }
|
|
|
+ //私有联系人用户
|
|
|
+ userContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_user_contact_record WHERE name_id = '%s' `, nameId))
|
|
|
+ if userContact != nil && len(*userContact) > 0 {
|
|
|
+ for _, m := range *userContact {
|
|
|
+ m["source_type"] = 0
|
|
|
+ data = append(data, m)
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ } else {
|
|
|
+ person.endName = codeContent
|
|
|
+ for _, m := range connection {
|
|
|
+ data = append(data, m)
|
|
|
+ }
|
|
|
+ }
|
|
|
+ // 自定义排序函数
|
|
|
+ sort.Slice(data, func(i, j int) bool {
|
|
|
+ sourceTypeA := data[i]["source_type"].(string)
|
|
|
+ sourceTypeB := data[j]["source_type"].(string)
|
|
|
+ if sourceTypeA == sourceTypeB {
|
|
|
+ lastTimeA := data[i]["lasttime"].(int)
|
|
|
+ lastTimeB := data[j]["lasttime"].(int)
|
|
|
+ return lastTimeA > lastTimeB // 降序排序
|
|
|
+ }
|
|
|
+ return sourceTypeA < sourceTypeB // 升序排序
|
|
|
+ })*/
|
|
|
person.data = data
|
|
|
lock.Lock()
|
|
|
- contact = append(contact, person)
|
|
|
+ contact[ks] = person
|
|
|
lock.Unlock()
|
|
|
- }(nameMap)
|
|
|
+ }(nameMap, k)
|
|
|
}
|
|
|
wait.Wait()
|
|
|
detail["contact"] = contact
|
|
@@ -281,16 +315,30 @@ func getNzjList(infoMap map[string]interface{}) (count int64, list *[]map[string
|
|
|
count = common.Int64All(config.Sysconfig["nzjLimit"])
|
|
|
}
|
|
|
}
|
|
|
- list = elastic.Get(proposed, proposed, fmt.Sprintf(`{"query": {"bool": {"must": [%s]}},"_source":["projectname","area_city","lasttime","project_stage","ownerclass","proposed_id","category","project_stage"],"sort":[{"lasttime":{"order":"desc"}}],"from":%d,"size":%d`, strings.Join(musts, ","), (pageNum-1)*pageSize, pageSize))
|
|
|
+ list = elastic.Get(proposed, proposed, fmt.Sprintf(`{"query": {"bool": {"must": [%s]}},"_source":["projectname","area","area_city","lasttime","project_stage","ownerclass","proposed_id","category","project_stage"],"sort":[{"lasttime":{"order":"desc"}}],"from":%d,"size":%d`, strings.Join(musts, ","), (pageNum-1)*pageSize, pageSize))
|
|
|
+ if list != nil && len(*list) > 0 {
|
|
|
+ for _, v := range *list {
|
|
|
+ v["lasttime"] = MillisecondsToStr(common.Int64All(v["lasttime"]))
|
|
|
+ if v["area_city"] == nil || v["area_city"] == "" {
|
|
|
+ v["area_city"] = v["area"]
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
return
|
|
|
}
|
|
|
|
|
|
+func MillisecondsToStr(ms int64) string {
|
|
|
+ seconds := ms / 1000
|
|
|
+ nanoseconds := (ms % 1000) * 1000000
|
|
|
+ return time.Unix(seconds, nanoseconds).Format("2006-01-02")
|
|
|
+}
|
|
|
+
|
|
|
func esQuery(infoMap map[string]interface{}) []string {
|
|
|
var (
|
|
|
terms []string
|
|
|
)
|
|
|
|
|
|
- if infoMap["area"] != nil || infoMap["area"] != "" {
|
|
|
+ if infoMap["area"] != nil && infoMap["area"] != "" {
|
|
|
area := common.InterfaceToStr(infoMap["area"])
|
|
|
var areas []string
|
|
|
for _, v := range strings.Split(area, ",") {
|
|
@@ -303,7 +351,7 @@ func esQuery(infoMap map[string]interface{}) []string {
|
|
|
}`, strings.Join(areas, ",")))
|
|
|
|
|
|
}
|
|
|
- if infoMap["category"] != nil || infoMap["category"] != "" {
|
|
|
+ if infoMap["category"] != nil && infoMap["category"] != "" {
|
|
|
category := common.InterfaceToStr(infoMap["category"])
|
|
|
var categorys []string
|
|
|
for _, v := range strings.Split(category, ",") {
|
|
@@ -315,7 +363,7 @@ func esQuery(infoMap map[string]interface{}) []string {
|
|
|
}
|
|
|
}`, strings.Join(categorys, ",")))
|
|
|
}
|
|
|
- if infoMap["project_stage"] != nil || infoMap["project_stage"] != "" {
|
|
|
+ if infoMap["project_stage"] != nil && infoMap["project_stage"] != "" {
|
|
|
projectStage := common.InterfaceToStr(infoMap["project_stage"])
|
|
|
var projectStages []string
|
|
|
for _, v := range strings.Split(projectStage, ",") {
|
|
@@ -328,7 +376,7 @@ func esQuery(infoMap map[string]interface{}) []string {
|
|
|
}`, strings.Join(projectStages, ",")))
|
|
|
|
|
|
}
|
|
|
- if infoMap["ownerclass"] != nil || infoMap["ownerclass"] != "" {
|
|
|
+ if infoMap["ownerclass"] != nil && infoMap["ownerclass"] != "" {
|
|
|
ownerclass := common.InterfaceToStr(infoMap["ownerclass"])
|
|
|
var ownerclasss []string
|
|
|
for _, v := range strings.Split(ownerclass, ",") {
|
|
@@ -341,7 +389,7 @@ func esQuery(infoMap map[string]interface{}) []string {
|
|
|
}`, strings.Join(ownerclasss, ",")))
|
|
|
}
|
|
|
|
|
|
- if infoMap["keyWord"] != nil || infoMap["keyWord"] != "" {
|
|
|
+ if infoMap["keyWord"] != nil && infoMap["keyWord"] != "" {
|
|
|
keyWord := common.InterfaceToStr(infoMap["keyWord"])
|
|
|
keyWords := strings.Split(keyWord, " ")
|
|
|
var words []string
|
|
@@ -359,18 +407,40 @@ func esQuery(infoMap map[string]interface{}) []string {
|
|
|
}
|
|
|
|
|
|
func nzjEmptySearch(pageNum, pageSize int) (int64, *[]map[string]interface{}) {
|
|
|
- var ds []map[string]interface{}
|
|
|
+ var (
|
|
|
+ ds []map[string]interface{}
|
|
|
+ count int64
|
|
|
+ )
|
|
|
data, _ := redis.Get("newother", nzjRedisKey).([]interface{})
|
|
|
if len(data) > 0 {
|
|
|
+ count = int64(len(data))
|
|
|
ds = common.ObjArrToMapArr(data)[(pageNum-1)*pageSize : pageNum*pageSize]
|
|
|
} else {
|
|
|
- dataArr := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_baseinfo ORDER BY lasttime DESC LIMIT %v`, config.Sysconfig["nzjLimit"]))
|
|
|
+ dataArr := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT
|
|
|
+ a.proposed_id,
|
|
|
+ a.projectname,
|
|
|
+ DATE_FORMAT(a.lasttime, '%s') AS lasttime,
|
|
|
+ b.NAME AS project_stage,
|
|
|
+ COALESCE(c.NAME, f.NAME) AS area_city,
|
|
|
+ d.NAME AS category,
|
|
|
+ e.NAME AS ownerclass,
|
|
|
+ a.total_investment
|
|
|
+FROM
|
|
|
+ Jianyu_subjectdb.dwd_f_nzj_baseinfo a
|
|
|
+ LEFT JOIN Jianyu_subjectdb.d_nzj_project_stage_code b ON a.project_stage_code = b.CODE
|
|
|
+ LEFT JOIN Jianyu_subjectdb.d_nzj_category_code d ON a.category_code = d.CODE
|
|
|
+ LEFT JOIN Jianyu_subjectdb.d_area_code c ON a.city_code = c.CODE
|
|
|
+ LEFT JOIN Jianyu_subjectdb.d_area_code f ON a.area_code = f.CODE
|
|
|
+ LEFT JOIN Jianyu_subjectdb.d_nzj_ownerclass_code e ON a.ownerclass_code = e.CODE
|
|
|
+ ORDER BY a.lasttime DESC
|
|
|
+ LIMIT %d`, "%Y-%m-%d", common.IntAll(config.Sysconfig["nzjLimit"])))
|
|
|
if dataArr != nil && len(*dataArr) > 0 {
|
|
|
+ count = int64(len(data))
|
|
|
redis.Put("newother", nzjRedisKey, *dataArr, 3600*24)
|
|
|
ds = (*dataArr)[(pageNum-1)*pageSize : pageNum*pageSize]
|
|
|
}
|
|
|
}
|
|
|
- return common.Int64All(len(ds)), &ds
|
|
|
+ return count, &ds
|
|
|
|
|
|
}
|
|
|
|