|
@@ -3,6 +3,7 @@ package portrait
|
|
|
import (
|
|
|
"errors"
|
|
|
"fmt"
|
|
|
+ "jy/src/jfw/modules/bigmember/src/config"
|
|
|
"jy/src/jfw/modules/bigmember/src/db"
|
|
|
"jy/src/jfw/modules/bigmember/src/entity"
|
|
|
"jy/src/jfw/modules/bigmember/src/util"
|
|
@@ -40,12 +41,15 @@ type SubVipPortrait struct {
|
|
|
//SubVipEntDetail 超级订阅升级版查询基本信息
|
|
|
func (this *SubVipPortrait) SubVipEntDetail() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
entId := util.DecodeId(this.GetString("entId"))
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entDetail", entId, true)
|
|
|
+ cepm, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entDetail", entId, true, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -64,12 +68,15 @@ func (this *SubVipPortrait) SubVipEntDetail() {
|
|
|
//SubVipWinnerNewMsg 超级订阅升级版查看最新中标动态
|
|
|
func (this *SubVipPortrait) SubVipWinnerNewMsg() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
entId := util.DecodeId(this.GetString("entId"))
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true)
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -111,12 +118,15 @@ func (this *SubVipPortrait) SubVipWinnerNewMsg() {
|
|
|
//WinnerNewMsgExport 超级订阅升级版查看最新中标动态数据导出
|
|
|
func (this *SubVipPortrait) WinnerNewMsgExport() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
entId := util.DecodeId(this.GetString("entId"))
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true)
|
|
|
+ cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -162,12 +172,15 @@ func (this *SubVipPortrait) WinnerNewMsgExport() {
|
|
|
//SubVipNewMsgSelects 获取画像可筛选项
|
|
|
func (this *SubVipPortrait) SubVipNewMsgSelects() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
entId := util.DecodeId(this.GetString("entId"))
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- _, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true)
|
|
|
+ _, _, err, _ := entity.CreateSubVipPortraitManager(userId, "entNewMsg", entId, true, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -183,12 +196,15 @@ func (this *SubVipPortrait) SubVipNewMsgSelects() {
|
|
|
//SubVipPortrait 超级订阅升级版查看企业画像
|
|
|
func (this *SubVipPortrait) SubVipPortrait() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
entId := util.DecodeId(this.GetString("entId"))
|
|
|
if entId == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entPortrait", entId, true)
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "entPortrait", entId, true, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -216,8 +232,12 @@ func (this *SubVipPortrait) SubVipPortrait() {
|
|
|
//PortraitUsage 超级订阅升级版画像浏览量查询
|
|
|
func (this *SubVipPortrait) PortraitUsage() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entId := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
- bigMsg := jy.GetBigVipUserBaseMsg(userId, db.Mysql, db.Mgo)
|
|
|
+ bigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile)
|
|
|
+
|
|
|
if bigMsg.VipStatus <= 0 && bigMsg.Vip_BuySet.Upgrade != 1 {
|
|
|
return nil, fmt.Errorf("非法请求")
|
|
|
}
|
|
@@ -249,6 +269,9 @@ func (this *SubVipPortrait) PortraitUsage() {
|
|
|
//PortraitRecord 超级订阅升级版画像查看记录
|
|
|
func (this *SubVipPortrait) PortraitRecord() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entId := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
year, _ := this.GetInteger("year")
|
|
|
month, _ := this.GetInteger("month")
|
|
@@ -261,7 +284,7 @@ func (this *SubVipPortrait) PortraitRecord() {
|
|
|
if pageSize < 1 || pageSize > 50 {
|
|
|
pageSize = 50
|
|
|
}
|
|
|
- bigMsg := jy.GetBigVipUserBaseMsg(userId, db.Mysql, db.Mgo)
|
|
|
+ bigMsg := jy.GetBigVipUserBaseMsg("10000", userId, baseUserId, accountId, entId, config.EtcConfig.Host, config.EtcConfig.KeyFile)
|
|
|
if bigMsg.VipStatus <= 0 && bigMsg.Vip_BuySet.Upgrade != 1 {
|
|
|
return nil, fmt.Errorf("非法请求")
|
|
|
}
|
|
@@ -305,12 +328,15 @@ func (this *SubVipPortrait) PortraitRecord() {
|
|
|
//BuyerSelects 超级订阅筛选画像
|
|
|
func (this *SubVipPortrait) BuyerSelects() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
buyer := this.GetString("buyer")
|
|
|
if buyer == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- _, _, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false)
|
|
|
+ _, _, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -326,6 +352,9 @@ func (this *SubVipPortrait) BuyerSelects() {
|
|
|
//BuyerNewMsg 超级订阅采购单位画像动态
|
|
|
func (this *SubVipPortrait) BuyerNewMsg() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
buyer := this.GetString("buyer")
|
|
|
if buyer == "" {
|
|
@@ -333,7 +362,7 @@ func (this *SubVipPortrait) BuyerNewMsg() {
|
|
|
}
|
|
|
pageNum, _ := this.GetInteger("pageNum")
|
|
|
pageSize, _ := this.GetInteger("pageSize")
|
|
|
- cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false)
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -369,12 +398,15 @@ func (this *SubVipPortrait) BuyerNewMsg() {
|
|
|
//BuyerNewMsgExport 超级订阅采购单位画像动态数据导出
|
|
|
func (this *SubVipPortrait) BuyerNewMsgExport() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
buyer := this.GetString("buyer")
|
|
|
if buyer == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false)
|
|
|
+ cepm, power, err, free := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyer, false, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -416,12 +448,15 @@ func (this *SubVipPortrait) BuyerNewMsgExport() {
|
|
|
//BuyerContacts 超级订阅采购单位联系人
|
|
|
func (this *SubVipPortrait) BuyerContacts() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
buyerName := this.GetString("buyer")
|
|
|
if buyerName == "" {
|
|
|
return nil, fmt.Errorf("企业参数异常")
|
|
|
}
|
|
|
- cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false)
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
|
@@ -445,12 +480,15 @@ func (this *SubVipPortrait) BuyerContacts() {
|
|
|
//BuyerPortrait 超级订阅采购单位画像-数据
|
|
|
func (this *SubVipPortrait) BuyerPortrait() {
|
|
|
userId := qutil.ObjToString(this.GetSession("userId"))
|
|
|
+ baseUserId := qutil.Int64All(this.GetSession("base_user_id"))
|
|
|
+ entid := qutil.Int64All(this.GetSession("entId"))
|
|
|
+ accountId := qutil.Int64All(this.GetSession("accountId"))
|
|
|
rData, errMsg := func() (interface{}, error) {
|
|
|
buyerName := this.GetString("buyer")
|
|
|
if buyerName == "" {
|
|
|
return nil, fmt.Errorf("参数异常")
|
|
|
}
|
|
|
- cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false)
|
|
|
+ cepm, power, err, _ := entity.CreateSubVipPortraitManager(userId, "buyerPortrait", buyerName, false, baseUserId, accountId, entid)
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|