|
@@ -90,12 +90,12 @@ func getDetail(pid string, equity int) map[string]interface{} {
|
|
a.createtime,
|
|
a.createtime,
|
|
a.projectaddr
|
|
a.projectaddr
|
|
FROM
|
|
FROM
|
|
- dwd_f_nzj_baseinfo a
|
|
|
|
- LEFT JOIN d_nzj_project_stage_code b on a.project_stage_code = b.code
|
|
|
|
- LEFT JOIN d_nzj_nature_code c on a.nature_code = c.code
|
|
|
|
- LEFT JOIN d_nzj_category_code d on a.category_code = d.code
|
|
|
|
- LEFT JOIN d_nzj_ownerclass_code e on a.ownerclass_code = e.code
|
|
|
|
- LEFT JOIN d_topsubtype_code f on a.industry_code = f.code
|
|
|
|
|
|
+ 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_nature_code c on a.nature_code = c.code
|
|
|
|
+ LEFT JOIN Jianyu_subjectdb.d_nzj_category_code d on a.category_code = d.code
|
|
|
|
+ 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
|
|
WHERE
|
|
proposed_id = '%s'`, pid))
|
|
proposed_id = '%s'`, pid))
|
|
if dataDetail != nil && len(*dataDetail) > 0 {
|
|
if dataDetail != nil && len(*dataDetail) > 0 {
|
|
@@ -113,8 +113,8 @@ WHERE
|
|
detail["project_scale"] = config.Seoconfig["nzjConstructionContent"]
|
|
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 dwd_f_nzj_follw_record a
|
|
|
|
-LEFT JOIN d_nzj_project_stage_code b on a.project_stage_code = b.code WHERE proposed_id = '%s'
|
|
|
|
|
|
+ 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))
|
|
ORDER BY publishtime DESC `, pid))
|
|
if follRecord != nil && len(*follRecord) > 0 {
|
|
if follRecord != nil && len(*follRecord) > 0 {
|
|
if equity < 3 {
|
|
if equity < 3 {
|
|
@@ -128,14 +128,14 @@ ORDER BY publishtime DESC `, pid))
|
|
|
|
|
|
var ids []string
|
|
var ids []string
|
|
//获取企业主题id
|
|
//获取企业主题id
|
|
- entId := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT name_id FROM 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 FROM Jianyu_subjectdb.dwd_f_nzj_ent WHERE proposed_id = '%s' ORDER BY identity_type DESC , createtime ASC`, pid))
|
|
if entId != nil && len(*entId) > 0 {
|
|
if entId != nil && len(*entId) > 0 {
|
|
for _, v := range *entId {
|
|
for _, v := range *entId {
|
|
ids = append(ids, fmt.Sprintf(`"%s"`, common.InterfaceToStr(v["name_id"])))
|
|
ids = append(ids, fmt.Sprintf(`"%s"`, common.InterfaceToStr(v["name_id"])))
|
|
}
|
|
}
|
|
connection := make(map[RemovalKey]map[string]interface{})
|
|
connection := make(map[RemovalKey]map[string]interface{})
|
|
var data []map[string]interface{}
|
|
var data []map[string]interface{}
|
|
- nzjContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dwd_f_nzj_contact WHERE name_id in (%s) ORDER BY createtime DESC `, strings.Join(ids, ",")))
|
|
|
|
|
|
+ nzjContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_contact WHERE name_id in (%s) ORDER BY createtime DESC `, strings.Join(ids, ",")))
|
|
if nzjContact != nil && len(*nzjContact) > 0 {
|
|
if nzjContact != nil && len(*nzjContact) > 0 {
|
|
for _, v := range *nzjContact {
|
|
for _, v := range *nzjContact {
|
|
v["lasttime"] = v["createtime"]
|
|
v["lasttime"] = v["createtime"]
|
|
@@ -148,7 +148,7 @@ ORDER BY publishtime DESC `, pid))
|
|
}
|
|
}
|
|
if equity > 3 {
|
|
if equity > 3 {
|
|
//企业联系人
|
|
//企业联系人
|
|
- entContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dws_f_ent_contact WHERE name_id in (%s)`, strings.Join(ids, ",")))
|
|
|
|
|
|
+ entContact := public.GlobalCommonMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dws_f_ent_contact WHERE name_id in (%s)`, strings.Join(ids, ",")))
|
|
if entContact != nil && len(*entContact) > 0 {
|
|
if entContact != nil && len(*entContact) > 0 {
|
|
for _, v := range *entContact {
|
|
for _, v := range *entContact {
|
|
v["lasttime"] = v["createtime"]
|
|
v["lasttime"] = v["createtime"]
|
|
@@ -166,7 +166,7 @@ ORDER BY publishtime DESC `, pid))
|
|
data = append(data, m)
|
|
data = append(data, m)
|
|
}
|
|
}
|
|
//私有联系人用户
|
|
//私有联系人用户
|
|
- userContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dwd_f_user_contact_record WHERE name_id in (%s) `, strings.Join(ids, ",")))
|
|
|
|
|
|
+ userContact := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_user_contact_record WHERE name_id in (%s) `, strings.Join(ids, ",")))
|
|
if userContact != nil && len(*userContact) > 0 {
|
|
if userContact != nil && len(*userContact) > 0 {
|
|
for _, m := range *userContact {
|
|
for _, m := range *userContact {
|
|
data = append(data, m)
|
|
data = append(data, m)
|
|
@@ -322,7 +322,7 @@ func nzjEmptySearch(pageNum, pageSize int) (int64, *[]map[string]interface{}) {
|
|
ds := common.ObjArrToMapArr(data)[(pageNum-1)*pageSize : pageNum*pageSize]
|
|
ds := common.ObjArrToMapArr(data)[(pageNum-1)*pageSize : pageNum*pageSize]
|
|
return common.Int64All(len(ds)), &ds
|
|
return common.Int64All(len(ds)), &ds
|
|
} //获取
|
|
} //获取
|
|
- dataArr := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM dwd_f_nzj_baseinfo ORDER BY lasttime DESC LIMIT %v`, config.Sysconfig["nzjLimit"]))
|
|
|
|
|
|
+ dataArr := public.BaseMysql.SelectBySql(fmt.Sprintf(`SELECT * FROM Jianyu_subjectdb.dwd_f_nzj_baseinfo ORDER BY lasttime DESC LIMIT %v`, config.Sysconfig["nzjLimit"]))
|
|
if dataArr != nil && len(*dataArr) > 0 {
|
|
if dataArr != nil && len(*dataArr) > 0 {
|
|
redis.Put("newother", nzjRedisKey, *dataArr, 3600*24)
|
|
redis.Put("newother", nzjRedisKey, *dataArr, 3600*24)
|
|
}
|
|
}
|