|
@@ -2,7 +2,6 @@ package cygx
|
|
|
|
|
|
import (
|
|
|
"encoding/json"
|
|
|
- "fmt"
|
|
|
"github.com/rdlucklib/rdluck_tools/paging"
|
|
|
"github.com/tealeg/xlsx"
|
|
|
"hongze/hz_crm_api/controllers"
|
|
@@ -236,7 +235,6 @@ func (this *YanxuanSpecialController) AuthorList() {
|
|
|
} else {
|
|
|
sortStr = " ORDER BY art.create_time DESC "
|
|
|
}
|
|
|
- fmt.Println(sortStr)
|
|
|
|
|
|
total, err := cygx.GetYanxuanSpecialAuthorCount(condition, pars)
|
|
|
if err != nil {
|
|
@@ -260,6 +258,7 @@ func (this *YanxuanSpecialController) AuthorList() {
|
|
|
//获取专栏用户最新的一篇文章信息
|
|
|
mapNewTime := cygxService.GetBestNewYanxuanSpecialByUserId(userIds)
|
|
|
for _, v := range list {
|
|
|
+ v.SpecialAuthorId = v.Id
|
|
|
v.ArticlePublishTime = mapNewTime[v.UserId]
|
|
|
}
|
|
|
resp := new(cygx.GetCygxYanxuanSpecialAuthorItemResp)
|
|
@@ -675,6 +674,21 @@ func (this *YanxuanSpecialController) ApprovalLogList() {
|
|
|
br.ErrMsg = "获取失败, Err:" + tmpErr.Error()
|
|
|
return
|
|
|
}
|
|
|
+ pars = make([]interface{}, 0)
|
|
|
+ listAuthor, tmpErr := cygx.GetYanxuanSpecialAuthorList("", pars, 0, 999)
|
|
|
+ if tmpErr != nil {
|
|
|
+ br.Msg = "获取失败"
|
|
|
+ br.ErrMsg = "获取失败, Err:" + tmpErr.Error()
|
|
|
+ return
|
|
|
+ }
|
|
|
+ mapUserId := make(map[int]int)
|
|
|
+ for _, v := range listAuthor {
|
|
|
+ mapUserId[v.UserId] = v.Id
|
|
|
+ }
|
|
|
+
|
|
|
+ for _, v := range list {
|
|
|
+ v.SpecialAuthorId = mapUserId[v.UserId]
|
|
|
+ }
|
|
|
|
|
|
resp := new(cygx.CygxYanxuanSpecialApprovalLogListResp)
|
|
|
page := paging.GetPaging(currentIndex, pageSize, total)
|