|
@@ -834,15 +834,16 @@ func (this *ReportController) Fllow() {
|
|
|
if countUser == 0 {
|
|
|
resp.GoFollow = true
|
|
|
}
|
|
|
+ item := new(models.CygxIndustryFllow)
|
|
|
+ item.IndustrialManagementId = industrialManagementId
|
|
|
+ item.UserId = uid
|
|
|
+ item.Email = user.Email
|
|
|
+ item.Mobile = user.Mobile
|
|
|
+ item.RealName = user.RealName
|
|
|
+ item.Source = utils.REGISTER_PLATFORM
|
|
|
+ item.CompanyId = user.CompanyId
|
|
|
+ item.CompanyName = user.CompanyName
|
|
|
if count == 0 {
|
|
|
- item := new(models.CygxIndustryFllow)
|
|
|
- item.IndustrialManagementId = industrialManagementId
|
|
|
- item.UserId = uid
|
|
|
- item.Email = user.Email
|
|
|
- item.Mobile = user.Mobile
|
|
|
- item.RealName = user.RealName
|
|
|
- item.CompanyId = user.CompanyId
|
|
|
- item.CompanyName = user.CompanyName
|
|
|
item.Type = 1
|
|
|
item.CreateTime = time.Now()
|
|
|
item.ModifyTime = time.Now()
|
|
@@ -854,6 +855,7 @@ func (this *ReportController) Fllow() {
|
|
|
}
|
|
|
resp.Status = 1
|
|
|
} else {
|
|
|
+ item.Type = 2
|
|
|
err = models.RemoveCygxIndustryFllow(uid, industrialManagementId)
|
|
|
if err != nil {
|
|
|
br.Msg = "操作失败"
|
|
@@ -864,6 +866,7 @@ func (this *ReportController) Fllow() {
|
|
|
|
|
|
go services.IndustryFllowWithTrack(industrialManagementId, count, uid) //处理是否关注全部赛道字段
|
|
|
go services.IndustryFllowUserLabelLogAdd(industrialManagementId, count, uid) //处理用户标签
|
|
|
+ go services.AddCygxIndustryFllowLog(item) //添加操作日志记录
|
|
|
br.Msg = "操作成功"
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|