|
@@ -651,15 +651,17 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
return
|
|
|
}
|
|
|
resp := new(models.CygxIndustryFllowResp)
|
|
|
+ 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()
|
|
@@ -672,6 +674,7 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
resp.Status = 1
|
|
|
br.Msg = "关注成功"
|
|
|
} else {
|
|
|
+ item.Type = 2
|
|
|
err = models.RemoveCygxIndustryFllow(uid, industrialManagementId)
|
|
|
if err != nil {
|
|
|
br.Msg = "操作失败"
|
|
@@ -684,6 +687,7 @@ func (this *ReportController) IndustrialFllow() {
|
|
|
//处理是否关注全部赛道字段
|
|
|
go services.IndustryFllowWithTrack(industrialManagementId, count, uid)
|
|
|
go services.IndustryFllowUserLabelLogAdd(industrialManagementId, count, uid) //处理用户标签
|
|
|
+ go services.AddCygxIndustryFllowLog(item) //添加操作日志记录
|
|
|
br.Ret = 200
|
|
|
br.Success = true
|
|
|
br.Data = resp
|