|
@@ -112,8 +112,8 @@ func CreatePortraitManagerForContacts(session *httpsession.Session, entType int6
|
|
|
return &Portrait{uid, session}, nil
|
|
|
}
|
|
|
|
|
|
-//CreateSubVipPortraitManager 超级订阅权限校验
|
|
|
-//int -1无权限 1免费权限 2超级订阅次数&采购单位流量包 3使用体验
|
|
|
+// CreateSubVipPortraitManager 超级订阅权限校验
|
|
|
+// int -1无权限 1免费权限 2超级订阅次数&采购单位流量包 3使用体验
|
|
|
func CreateSubVipPortraitManager(userid string, pageFlag, searchValue string, isWinner bool, session *httpsession.Session) (*Portrait, int, error, bool) {
|
|
|
if userid == "" {
|
|
|
return nil, -1, errors.New("未登录"), true
|
|
@@ -218,7 +218,7 @@ func paseDateToint64(dateStr string) (timeStamp int64) {
|
|
|
|
|
|
//画像接口===============================================================================
|
|
|
|
|
|
-//GetEntIdByName 获取企业id
|
|
|
+// GetEntIdByName 获取企业id
|
|
|
func (this *Portrait) GetEntIdByName(entName string) (string, error) {
|
|
|
if entName == "" {
|
|
|
return "", errors.New("企业名称异常")
|
|
@@ -230,7 +230,7 @@ func (this *Portrait) GetEntIdByName(entName string) (string, error) {
|
|
|
return entId, nil
|
|
|
}
|
|
|
|
|
|
-//GetWinnerContactsMsg 企业画像-获取历史项目联系方式
|
|
|
+// GetWinnerContactsMsg 企业画像-获取历史项目联系方式
|
|
|
func (this *Portrait) GetWinnerContactsMsg(entId string) ([]map[string]interface{}, error) {
|
|
|
if entId == "" {
|
|
|
return nil, errors.New("企业名称异常")
|
|
@@ -238,11 +238,12 @@ func (this *Portrait) GetWinnerContactsMsg(entId string) ([]map[string]interface
|
|
|
return GetProjectContactsMsg("", entId), nil
|
|
|
}
|
|
|
|
|
|
-//GetWinnerNewMsg 企业画像-查询最新项目动态
|
|
|
-//增加 match 搜索词
|
|
|
-// matchType 搜索范围
|
|
|
-// area 项目地区
|
|
|
-// pushTime 发布时间
|
|
|
+// GetWinnerNewMsg 企业画像-查询最新项目动态
|
|
|
+// 增加 match 搜索词
|
|
|
+//
|
|
|
+// matchType 搜索范围
|
|
|
+// area 项目地区
|
|
|
+// pushTime 发布时间
|
|
|
func (this *Portrait) GetWinnerNewMsg(pwp *PortraitProjectScreen) ([]map[string]interface{}, int64, error) {
|
|
|
return pwp.GetWinnerList()
|
|
|
}
|
|
@@ -261,7 +262,7 @@ type dataExportKeywords struct {
|
|
|
Keyword string `json:"keyword"` //关键词
|
|
|
}
|
|
|
|
|
|
-//SaveExportRecord 保存数据到出记录
|
|
|
+// SaveExportRecord 保存数据到出记录
|
|
|
func (this *Portrait) SaveExportRecord(pwp *PortraitProjectScreen, ids []string, ent, flag string) (string, error) {
|
|
|
var keyWords []dataExportKeywords
|
|
|
for _, k := range pwp.Screen.KeyWordArr {
|
|
@@ -292,16 +293,15 @@ func (this *Portrait) SaveExportRecord(pwp *PortraitProjectScreen, ids []string,
|
|
|
return "", fmt.Errorf("选择导出异常")
|
|
|
}
|
|
|
|
|
|
-//GetWinnerNewCount 企业画像-查询最新项目数量(前端用于展示是否加载更多)
|
|
|
+// GetWinnerNewCount 企业画像-查询最新项目数量(前端用于展示是否加载更多)
|
|
|
func (this *Portrait) GetWinnerNewCount(entId string) int64 {
|
|
|
if entId == "" {
|
|
|
return -1
|
|
|
}
|
|
|
- count := GetWinnerNewProjectCount(entId)
|
|
|
- return count
|
|
|
+ return GetNewBiddingCount(entId, "")
|
|
|
}
|
|
|
|
|
|
-//WinnerPortraitData 企业画像-查询
|
|
|
+// WinnerPortraitData 企业画像-查询
|
|
|
func (this *Portrait) WinnerPortraitData(screen *PortraitScreen) (map[string]interface{}, error) {
|
|
|
if screen.Ent == "" {
|
|
|
return nil, errors.New("企业名称异常")
|
|
@@ -329,7 +329,7 @@ func (this *Portrait) WinnerPortraitData(screen *PortraitScreen) (map[string]int
|
|
|
return resMap, nil
|
|
|
}
|
|
|
|
|
|
-//WinnerMiniPortraitData 三级页引流
|
|
|
+// WinnerMiniPortraitData 三级页引流
|
|
|
func (this *Portrait) WinnerMiniPortraitData(entId string) (map[string]interface{}, error) {
|
|
|
if entId == "" {
|
|
|
return nil, errors.New("企业名称异常")
|
|
@@ -342,7 +342,7 @@ func (this *Portrait) WinnerMiniPortraitData(entId string) (map[string]interface
|
|
|
return miniReturnMap, nil
|
|
|
}
|
|
|
|
|
|
-//GetBuyerContactsMsg 采购单位联系人
|
|
|
+// GetBuyerContactsMsg 采购单位联系人
|
|
|
func (this *Portrait) GetBuyerContactsMsg(buyerName string) ([]map[string]interface{}, error) {
|
|
|
if buyerName == "" {
|
|
|
return nil, errors.New("企业名称异常")
|
|
@@ -350,20 +350,19 @@ func (this *Portrait) GetBuyerContactsMsg(buyerName string) ([]map[string]interf
|
|
|
return GetProjectContactsMsg(buyerName, ""), nil
|
|
|
}
|
|
|
|
|
|
-//GetBuyerNewCount 采购单位画像-查询最新项目数量(前端用于展示是否加载更多)
|
|
|
+// GetBuyerNewCount 采购单位画像-查询最新项目数量(前端用于展示是否加载更多)
|
|
|
func (this *Portrait) GetBuyerNewCount(buyer string) int64 {
|
|
|
if buyer == "" {
|
|
|
return -1
|
|
|
}
|
|
|
- count := GetBuyerNewProjectCount(buyer)
|
|
|
- return count
|
|
|
+ return GetNewBiddingCount("", buyer)
|
|
|
}
|
|
|
|
|
|
-//BuyerPortraitData 采购单位画像-查询
|
|
|
-//flag 分段请求标识 a年度统计和节支率等 b重点合作企业 c合作企业注册资本、地区、年份分布
|
|
|
-//a段数据=timeRange、city、province、buyerclass、bidamount_count、fail_count、project_count、winner_count、otherProvincesWinnerCount、yearData、monthData、moneyRange、bidtypeData、rate、top12、topAgencyData
|
|
|
-//b段数据=topShow
|
|
|
-//c段数据=withCapitalData、withAreaData、withEstablishData
|
|
|
+// BuyerPortraitData 采购单位画像-查询
|
|
|
+// flag 分段请求标识 a年度统计和节支率等 b重点合作企业 c合作企业注册资本、地区、年份分布
|
|
|
+// a段数据=timeRange、city、province、buyerclass、bidamount_count、fail_count、project_count、winner_count、otherProvincesWinnerCount、yearData、monthData、moneyRange、bidtypeData、rate、top12、topAgencyData
|
|
|
+// b段数据=topShow
|
|
|
+// c段数据=withCapitalData、withAreaData、withEstablishData
|
|
|
func (this *Portrait) BuyerPortraitData(screen *PortraitScreen, flag string) (map[string]interface{}, error) {
|
|
|
if screen.Ent == "" {
|
|
|
return nil, errors.New("企业名称异常")
|
|
@@ -402,7 +401,7 @@ func (this *Portrait) BuyerPortraitData(screen *PortraitScreen, flag string) (ma
|
|
|
return buyerPortraitData, nil
|
|
|
}
|
|
|
|
|
|
-//BuyerMiniPortraitData 采购单位引流接口
|
|
|
+// BuyerMiniPortraitData 采购单位引流接口
|
|
|
func (this *Portrait) BuyerMiniPortraitData(buyer string) (map[string]interface{}, error) {
|
|
|
if buyer == "" {
|
|
|
return nil, errors.New("企业名称异常")
|