|
@@ -296,12 +296,12 @@ func (s *Short) Article(stype, id string) error {
|
|
|
newCanRead := false
|
|
|
//判断此用户是否有打开的权限
|
|
|
newUserId := s.GetSession("base_user_id")
|
|
|
- pushData := public.BaseService.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
|
|
|
+ pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
|
|
|
//访问次数加1
|
|
|
if pushData == nil {
|
|
|
newCanRead = false
|
|
|
} else {
|
|
|
- public.BaseService.UpdateOrDeleteBySql("UPDATE leadproject_push SET visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
|
|
|
+ public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
|
|
|
newCanRead = true
|
|
|
}
|
|
|
if newCanRead || canRead {
|
|
@@ -417,12 +417,12 @@ func (s *Short) Article(stype, id string) error {
|
|
|
canRead := false
|
|
|
//判断此用户是否有打开的权限
|
|
|
newUserId := s.GetSession("base_user_id")
|
|
|
- pushData := public.BaseService.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
|
|
|
+ pushData := public.BaseMysql.FindOne("leadproject_push", map[string]interface{}{"user_id": newUserId, "info_id": sid}, "id", "")
|
|
|
//访问次数加1
|
|
|
if pushData == nil {
|
|
|
canRead = false
|
|
|
} else {
|
|
|
- public.BaseService.UpdateOrDeleteBySql("UPDATE leadproject_push SET visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
|
|
|
+ public.BaseMysql.UpdateOrDeleteBySql("UPDATE leadproject_push SET visit_count=visit_count+1 ,lastvisit_time=? WHERE id = ?", time.Now().Format("2006-01-02 15:04:05"), (*pushData)["id"])
|
|
|
canRead = true
|
|
|
}
|
|
|
if canRead || node {
|