|
@@ -137,15 +137,18 @@ func (this *ArticleController) Detail() {
|
|
|
//var detailNew *models.AddStopTimeNewRep
|
|
|
//detailNew, _ = models.GetNewArticleHistoryRecord(uid, articleId)
|
|
|
//if detailNew == nil || detailNew.StopTime != 0 {
|
|
|
- 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
|