|
@@ -204,16 +204,18 @@ func (this *TacticsController) Detail() {
|
|
|
}
|
|
|
if strings.Contains(companyPermission, articlePermissionPermissionName) {
|
|
|
hasPermission = 1
|
|
|
- historyRecord := new(models.CygxArticleHistoryRecord)
|
|
|
- historyRecord.UserId = uid
|
|
|
- historyRecord.ArticleId = articleId
|
|
|
- historyRecord.CreateTime = time.Now()
|
|
|
- historyRecord.Mobile = user.Mobile
|
|
|
- historyRecord.Email = user.Email
|
|
|
- historyRecord.CompanyId = user.CompanyId
|
|
|
- historyRecord.CompanyName = user.CompanyName
|
|
|
- go models.AddCygxArticleHistoryRecord(historyRecord)
|
|
|
-
|
|
|
+ recordCount, _ := models.GetNoAddStoptimeArticleCount(uid, articleId)
|
|
|
+ if recordCount < 1 {
|
|
|
+ historyRecord := new(models.CygxArticleHistoryRecord)
|
|
|
+ historyRecord.UserId = uid
|
|
|
+ historyRecord.ArticleId = articleId
|
|
|
+ historyRecord.CreateTime = time.Now()
|
|
|
+ historyRecord.Mobile = user.Mobile
|
|
|
+ historyRecord.Email = user.Email
|
|
|
+ historyRecord.CompanyId = user.CompanyId
|
|
|
+ historyRecord.CompanyName = user.CompanyName
|
|
|
+ go models.AddCygxArticleHistoryRecord(historyRecord)
|
|
|
+ }
|
|
|
} else { //无该行业权限
|
|
|
hasPermission = 3
|
|
|
}
|