|
@@ -51,6 +51,7 @@ func (this *MobileReportController) TradeList() {
|
|
|
var list []*models.TradeReportMapping
|
|
|
var err error
|
|
|
mapCategory := make(map[int]int)
|
|
|
+ mapCategoryFollowType := make(map[int]int)
|
|
|
if ChartPermissionId == utils.CE_LUE_ID || ChartPermissionId == utils.GU_SHOU_ID {
|
|
|
listTrade, errTrade := models.GetReportMappingStrategyHomeAllByCygx(user.UserId, ChartPermissionId)
|
|
|
|
|
@@ -99,6 +100,7 @@ func (this *MobileReportController) TradeList() {
|
|
|
}
|
|
|
for _, v := range categoryList {
|
|
|
mapCategory[v.IdCygx] = v.IdCygx
|
|
|
+ mapCategoryFollowType[v.IdCygx] = v.FollowType
|
|
|
}
|
|
|
}
|
|
|
} else {
|
|
@@ -153,6 +155,7 @@ func (this *MobileReportController) TradeList() {
|
|
|
if mapCategory[v.CategoryId] > 0 {
|
|
|
list[k].IsFollow = true
|
|
|
}
|
|
|
+ list[k].FollowType = mapCategoryFollowType[v.CategoryId]
|
|
|
list[k].ListArticle = make([]*models.HomeArticle, 0)
|
|
|
}
|
|
|
}
|
|
@@ -660,6 +663,7 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
return
|
|
|
}
|
|
|
industrialManagementId := req.IndustrialManagementId
|
|
|
+ followType := req.FollowType
|
|
|
var condition string
|
|
|
countIndustrial, err := models.GetIndustrialManagementCount(industrialManagementId)
|
|
|
if err != nil {
|
|
@@ -681,6 +685,7 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
resp := new(models.CygxIndustryFllowResp)
|
|
|
item := new(models.CygxIndustryFllow)
|
|
|
item.IndustrialManagementId = industrialManagementId
|
|
|
+ item.FollowType = followType
|
|
|
item.UserId = uid
|
|
|
item.Email = user.Email
|
|
|
item.Mobile = user.Mobile
|
|
@@ -702,7 +707,6 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
resp.Status = 1
|
|
|
br.Msg = "关注成功"
|
|
|
} else {
|
|
|
- item.Type = 2
|
|
|
err = models.RemoveCygxIndustryFllow(uid, industrialManagementId)
|
|
|
if err != nil {
|
|
|
br.Msg = "操作失败"
|
|
@@ -713,7 +717,7 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
br.Msg = "已取消关注"
|
|
|
}
|
|
|
//处理是否关注全部赛道字段
|
|
|
- go services.IndustryFllowWithTrack(industrialManagementId, count, uid)
|
|
|
+ //go services.IndustryFllowWithTrack(industrialManagementId, count, uid)
|
|
|
go services.IndustryFllowUserLabelLogAdd(industrialManagementId, count, uid) //处理用户标签
|
|
|
go services.AddCygxIndustryFllowLog(item) //添加操作日志记录
|
|
|
br.Ret = 200
|
|
@@ -747,6 +751,7 @@ func (this *ReportController) CategoryFllow() {
|
|
|
return
|
|
|
}
|
|
|
categoryId := req.CategoryId
|
|
|
+ followType := req.FollowType
|
|
|
var condition string
|
|
|
//countCategory, err := models.GetCategoryCount(categoryId)
|
|
|
//if err != nil {
|
|
@@ -792,6 +797,7 @@ func (this *ReportController) CategoryFllow() {
|
|
|
item.RealName = user.RealName
|
|
|
item.CompanyId = user.CompanyId
|
|
|
item.CompanyName = user.CompanyName
|
|
|
+ item.FollowType = followType
|
|
|
item.CreateTime = time.Now()
|
|
|
item.ModifyTime = time.Now()
|
|
|
_, err = models.AddCygxCategoryFllow(item)
|
|
@@ -2275,7 +2281,7 @@ func (this *MobileReportController) ZouqiTradeList() {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- fllowMap := services.GetXzsChooseCategoryZhouqiMapByMobile(user.Mobile)
|
|
|
+ fllowMap, fllowMapType := services.GetXzsChooseCategoryZhouqiMapByMobile(user.Mobile)
|
|
|
|
|
|
resp := new(models.TradeReportMappingResp)
|
|
|
var list []*models.TradeReportMapping
|
|
@@ -2288,6 +2294,7 @@ func (this *MobileReportController) ZouqiTradeList() {
|
|
|
item.MatchTypeName = v.MatchTypeName
|
|
|
item.UpdateTime = utils.TimeRemoveHms(v.ArticleUpdateTime)
|
|
|
item.IsFollow = fllowMap[item.CategoryId]
|
|
|
+ item.FollowType = fllowMapType[item.CategoryId]
|
|
|
item.ListArticle = make([]*models.HomeArticle, 0)
|
|
|
list = append(list, item)
|
|
|
}
|
|
@@ -2457,6 +2464,7 @@ func (this *ReportController) CategoryZhouqiFllow() {
|
|
|
return
|
|
|
}
|
|
|
categoryId := req.CategoryId
|
|
|
+ followType := req.FollowType
|
|
|
count, err := models.GetCountCategoryFllowZhouqi(categoryId, user.Mobile)
|
|
|
if err != nil {
|
|
|
br.Msg = "获取数据失败!"
|
|
@@ -2473,6 +2481,7 @@ func (this *ReportController) CategoryZhouqiFllow() {
|
|
|
item.RealName = user.RealName
|
|
|
item.CompanyId = user.CompanyId
|
|
|
item.CompanyName = user.CompanyName
|
|
|
+ item.FollowType = followType
|
|
|
item.CreateTime = time.Now()
|
|
|
item.ModifyTime = time.Now()
|
|
|
_, err = models.AddCygxCategoryFllowZhouqi(item)
|