|
@@ -77,7 +77,7 @@ func GetReportContentTextSubNew(content string) (contentSub string, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetReportContentTextSubByarticle(content, abstract string, articleId int) (contentSub string, err error) {
|
|
|
var lenabstract int
|
|
|
|
|
@@ -104,7 +104,7 @@ func GetReportContentTextSubByarticle(content, abstract string, articleId int) (
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetArticleAll() {
|
|
|
var err error
|
|
|
defer func() {
|
|
@@ -123,7 +123,7 @@ func GetArticleAll() {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func FixArticleContent(articleId int) {
|
|
|
item, err := models.GetArticleDetailById(articleId)
|
|
|
if err != nil {
|
|
@@ -320,7 +320,7 @@ func FixArticleImgUrl(body string) (contentSub string, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func FixArticleFirstCount(body string) (contentSub string, err error) {
|
|
|
|
|
|
doc, err := goquery.NewDocumentFromReader(strings.NewReader(body))
|
|
@@ -370,7 +370,7 @@ func SynchronizationArtclehistory() {
|
|
|
fmt.Println("同步结束")
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func StatisticalReport() {
|
|
|
var isSummaryNumAll, isClassNum, pvNumAll, uvNumAll int
|
|
|
list, err := models.GetChartPermissionActivity()
|
|
@@ -555,7 +555,7 @@ func PushViewRecordNewRedisData(reportViewRecord *ReportViewRecord, companyId in
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetCeLueArticlePv(cont context.Context) (err error) {
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -684,7 +684,7 @@ func init122() {
|
|
|
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -800,6 +800,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
item.FieldName = articleResult.Field.Name
|
|
|
item.TypeName = articleResult.Type.Name
|
|
|
item.UpdateDate = articleResult.UpdateDate
|
|
|
+ item.CeLueFieldId = articleResult.Field.Id
|
|
|
list = append(list, item)
|
|
|
itemAuthor.ArticleId = articleResult.ArticleId
|
|
|
itemAuthor.Name = articleResult.Author.Name
|
|
@@ -985,6 +986,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
updateParams["Annotation"] = v.Annotation
|
|
|
updateParams["TypeName"] = v.TypeName
|
|
|
updateParams["ModifyTimeByCl"] = v.UpdateDate
|
|
|
+ updateParams["CeLueFieldId"] = v.CeLueFieldId
|
|
|
whereParam := map[string]interface{}{"article_id": v.ArticleId}
|
|
|
err = models.UpdateByExpr(models.CygxArticle{}, whereParam, updateParams)
|
|
|
if err != nil {
|
|
@@ -1027,6 +1029,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
item.Annotation = v.Annotation
|
|
|
item.TypeName = v.TypeName
|
|
|
item.ModifyTimeByCl = v.UpdateDate
|
|
|
+ item.CeLueFieldId = v.CeLueFieldId
|
|
|
newId, err := models.AddCygxArticles(item)
|
|
|
if err != nil {
|
|
|
fmt.Println("AddCygxArticle Err:", err.Error())
|
|
@@ -1161,7 +1164,7 @@ func HandleArticleListByApi(artcleId int) (err error) {
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
|
|
|
|
|
|
cacheKey := fmt.Sprint(utils.CACHE_KEY_ARTICLE_ID_TEMPLATE, ":ArticleId", articleId)
|
|
@@ -1591,7 +1594,7 @@ func DoArticleOnenIdWxTemplateMsg(articleId int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetSpecialArticleDetailUserPower(user *models.WxUserItem, articleInfo *models.ArticleDetail) (havePower bool, err error) {
|
|
|
permissionStr, e := GetCompanyPermissionUpgrade(user.CompanyId)
|
|
|
if e != nil {
|
|
@@ -1621,7 +1624,7 @@ func GetSpecialArticleDetailUserPower(user *models.WxUserItem, articleInfo *mode
|
|
|
|
|
|
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func GetArticNewLabelWhithActivity3Month() (labelMap map[int]bool, err error) {
|
|
|
var condition string
|
|
|
var pars []interface{}
|
|
@@ -1670,7 +1673,7 @@ func GetArticNewLabelWhithActivity3Month() (labelMap map[int]bool, err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func HandleArticleCategoryImg(list []*models.HomeArticle) (items []*models.HomeArticle, err error) {
|
|
|
|
|
|
detailResearch, e := models.GetConfigByCode("category_research_img_url")
|
|
@@ -1808,7 +1811,7 @@ func HandleArticleCategoryImg(list []*models.HomeArticle) (items []*models.HomeA
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func ArticleAnnotation(item *models.HomeArticle) (annotation string) {
|
|
|
if item.ArticleId >= utils.SummaryArticleId {
|
|
|
item.Annotation = YxArticleAnnotation(item)
|
|
@@ -1881,7 +1884,7 @@ func ArticleAnnotation(item *models.HomeArticle) (annotation string) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
func YxArticleAnnotation(article *models.HomeArticle) (annotation string) {
|
|
|
|
|
|
if strings.Count(article.Body, "<hr") == 0 {
|