|
@@ -32,7 +32,7 @@ import (
|
|
|
)
|
|
|
|
|
|
// GetLatestClassReport 已购列表最新报告
|
|
|
-func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*purchase.PurchaseListItem, err error) {
|
|
|
+func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*purchase.PurchaseListItem, err error) {
|
|
|
var errMsg string
|
|
|
defer func() {
|
|
|
if sysErr := recover(); sysErr != nil {
|
|
@@ -52,10 +52,14 @@ func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*p
|
|
|
}
|
|
|
classifyFirstIconMap := make(map[int]string)
|
|
|
classifySecondNameMap := make(map[string]int)
|
|
|
- for _, v := range classifys{
|
|
|
+ classifyFirstIdMap := make(map[int]bool)
|
|
|
+ classifySecondIdMap := make(map[int]bool)
|
|
|
+ for _, v := range classifys {
|
|
|
if v.ParentId == 0 {
|
|
|
+ classifyFirstIdMap[v.Id] = true
|
|
|
classifyFirstIconMap[v.Id] = v.YbIconUrl
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
+ classifySecondIdMap[v.Id] = true
|
|
|
classifySecondNameMap[v.ClassifyName] = v.Id
|
|
|
}
|
|
|
}
|
|
@@ -139,7 +143,7 @@ func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*p
|
|
|
temp.ClassifyIdSecond = v.ClassifyIdSecond
|
|
|
temp.ClassifyNameSecond = v.ClassifyNameSecond
|
|
|
temp.Time = v.PublishTime
|
|
|
- if temp.ClassifyNameFirst == "大事点评" || temp.ClassifyNameFirst == "会议纪要" || temp.ClassifyNameFirst == "年报合集"{
|
|
|
+ if temp.ClassifyNameFirst == "大事点评" || temp.ClassifyNameFirst == "会议纪要" || temp.ClassifyNameFirst == "年报合集" {
|
|
|
if otherLatestItem.Time.Format(utils.FormatDateTime) > v.PublishTime.Format(utils.FormatDateTime) {
|
|
|
continue
|
|
|
}
|
|
@@ -150,6 +154,12 @@ func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*p
|
|
|
}
|
|
|
}
|
|
|
for _, v := range reports {
|
|
|
+ if v.ClassifyNameFirst != "晨报" && v.ClassifyNameFirst != "周报" {
|
|
|
+ // 报告的分类不存在
|
|
|
+ if !classifyFirstIdMap[v.ClassifyIdFirst] || !classifyIdSecondMap[v.ClassifyIdSecond] {
|
|
|
+ continue
|
|
|
+ }
|
|
|
+ }
|
|
|
temp := new(purchase.PurchaseListItem)
|
|
|
temp.ReportId = v.Id
|
|
|
temp.ClassifyIdFirst = v.ClassifyIdFirst
|
|
@@ -163,14 +173,14 @@ func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*p
|
|
|
if imgUrl, ok := classifyFirstIconMap[temp.ClassifyIdFirst]; ok {
|
|
|
temp.ImgUrl = imgUrl
|
|
|
}
|
|
|
- if temp.ClassifyNameFirst == "晨报" || temp.ClassifyNameFirst == "周报" { //晨报或者周报,查询最新的章节信息
|
|
|
+ if temp.ClassifyNameFirst == "晨报" || temp.ClassifyNameFirst == "周报" { //晨报或者周报,查询最新的章节信息
|
|
|
temp.Content = fmt.Sprintf("【第%d期|FICC】%s", temp.Stage, temp.Title)
|
|
|
- }else if temp.ClassifyNameFirst == "大事点评" || temp.ClassifyNameFirst == "会议纪要" || temp.ClassifyNameFirst == "年报合集"{
|
|
|
+ } else if temp.ClassifyNameFirst == "大事点评" || temp.ClassifyNameFirst == "会议纪要" || temp.ClassifyNameFirst == "年报合集" {
|
|
|
continue
|
|
|
- }else{
|
|
|
- if temp.ClassifyNameFirst != temp.ClassifyNameSecond { //包含二级分类
|
|
|
+ } else {
|
|
|
+ if temp.ClassifyNameFirst != temp.ClassifyNameSecond { //包含二级分类
|
|
|
temp.Content = fmt.Sprintf("【第%d期|FICC| %s】%s", temp.Stage, temp.ClassifyNameSecond, temp.ClassifyNameFirst)
|
|
|
- } else { //无二级分类
|
|
|
+ } else { //无二级分类
|
|
|
temp.Content = fmt.Sprintf("【第%d期|FICC】%s", temp.Stage, temp.ClassifyNameFirst)
|
|
|
}
|
|
|
}
|
|
@@ -184,10 +194,8 @@ func GetLatestClassReport(permissionIds []int, userId uint64) (purchaseList []*p
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
-
|
|
|
// GetPurchaseDetail 已购详情页面
|
|
|
-func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int, pageIndex, pageSize int) (ret *purchase.DetailResp, err error) {
|
|
|
+func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int, pageIndex, pageSize int) (ret *purchase.DetailResp, err error) {
|
|
|
var errMsg string
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -209,7 +217,6 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
classifyNameFirst := classifyInfo.ClassifyName
|
|
|
offset := (pageIndex - 1) * pageSize
|
|
|
var total int64
|
|
@@ -229,9 +236,9 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
err = errors.New("查询报告总数出错")
|
|
|
return
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else {
|
|
|
if classifyNameFirst == "周报" {
|
|
|
- newTypeIds, tErr := GetWeekTypeIdsByPermissionIds(permissionIds,[]int{})
|
|
|
+ newTypeIds, tErr := GetWeekTypeIdsByPermissionIds(permissionIds, []int{})
|
|
|
if tErr != nil {
|
|
|
return
|
|
|
}
|
|
@@ -247,7 +254,7 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
err = errors.New("查询报告总数出错")
|
|
|
return
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
//获取有权限的二级分类
|
|
|
var classifyNameSeconds []string
|
|
|
chartPermissions, tErr := chart_permission_search_key_word_mapping.GetChartPermissionByFrom("rddp")
|
|
@@ -261,10 +268,10 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
for _, myPerId := range permissionIds {
|
|
|
if v.ChartPermissionId == myPerId {
|
|
|
if classifyNameFirst == "大事点评" || classifyNameFirst == "会议纪要" || classifyNameFirst == "年报合集" {
|
|
|
- if v.KeyWord == "大事点评" || v.KeyWord == "会议纪要" || v.KeyWord == "年报合集" { //筛选出用户有权限的二级分类ID
|
|
|
+ if v.KeyWord == "大事点评" || v.KeyWord == "会议纪要" || v.KeyWord == "年报合集" { //筛选出用户有权限的二级分类ID
|
|
|
classifyNameSeconds = append(classifyNameSeconds, v.KeyWord)
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
classifyNameSeconds = append(classifyNameSeconds, v.KeyWord)
|
|
|
}
|
|
|
break
|
|
@@ -275,7 +282,7 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
//获取所有二级分类的id
|
|
|
if classifyNameFirst == "大事点评" || classifyNameFirst == "会议纪要" || classifyNameFirst == "年报合集" {
|
|
|
classifyIdSeconds, tErr = classify.GetOtherIdsByClassifyNames(classifyNameSeconds)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
classifyIdSeconds, tErr = classify.GetIdsByClassifyNameAndParentId(classifyNameSeconds, classifyIdFirst)
|
|
|
}
|
|
|
|
|
@@ -314,11 +321,11 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
temp.ClassifyNameSecond = v.ClassifyNameSecond
|
|
|
temp.Stage = v.Stage
|
|
|
temp.ImgUrl = classifyInfo.YbBgUrl
|
|
|
- if temp.ClassifyNameFirst == "晨报" || temp.ClassifyNameFirst == "周报" { //晨报或者周报,查询最新的章节信息
|
|
|
+ if temp.ClassifyNameFirst == "晨报" || temp.ClassifyNameFirst == "周报" { //晨报或者周报,查询最新的章节信息
|
|
|
temp.Content = fmt.Sprintf("【第%d期|FICC】%s", temp.Stage, temp.Title)
|
|
|
temp.TopName = temp.Title
|
|
|
- }else{
|
|
|
- if temp.ClassifyNameFirst != temp.ClassifyNameSecond { //包含二级分类
|
|
|
+ } else {
|
|
|
+ if temp.ClassifyNameFirst != temp.ClassifyNameSecond { //包含二级分类
|
|
|
temp.Content = fmt.Sprintf("【第%d期|FICC| %s】%s", temp.Stage, temp.ClassifyNameSecond, temp.ClassifyNameFirst)
|
|
|
temp.TopName = temp.ClassifyNameSecond
|
|
|
} else {
|
|
@@ -342,7 +349,6 @@ func GetPurchaseDetail(permissionIds []int, userId uint64, classifyIdFirst int,
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-
|
|
|
// 获取报告详情
|
|
|
func GetReportDetail(userinfo user.UserInfo, reportId int) (reportDetail response.ReportDetail, err error) {
|
|
|
var errMsg string
|
|
@@ -387,11 +393,11 @@ func GetReportDetail(userinfo user.UserInfo, reportId int) (reportDetail respons
|
|
|
var authOk bool
|
|
|
var permissionCheckInfo response.PermissionCheckInfo
|
|
|
var vaildWeekTypeIds []int
|
|
|
- if reportInfo.ClassifyNameFirst == "晨报"{
|
|
|
+ if reportInfo.ClassifyNameFirst == "晨报" {
|
|
|
authOk, permissionCheckInfo, err = CheckDayReportPermission(userinfo, productAuthOk)
|
|
|
- }else if reportInfo.ClassifyNameFirst == "周报"{
|
|
|
+ } else if reportInfo.ClassifyNameFirst == "周报" {
|
|
|
authOk, permissionCheckInfo, vaildWeekTypeIds, err = CheckWeekReportPermission(userinfo, productAuthOk)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
authOk, permissionCheckInfo, err = CheckReportPermission(userinfo, reportId, productAuthOk)
|
|
|
}
|
|
|
if err != nil {
|
|
@@ -409,16 +415,16 @@ func GetReportDetail(userinfo user.UserInfo, reportId int) (reportDetail respons
|
|
|
reportItem.ContentSub = html.UnescapeString(reportInfo.ContentSub)
|
|
|
reportItem.Frequency = reportInfo.Frequency
|
|
|
reportItem.VideoName = reportInfo.VideoName
|
|
|
- if reportInfo.VideoName == "" && reportInfo.VideoUrl != "" {
|
|
|
+ if reportInfo.VideoName == "" && reportInfo.VideoUrl != "" {
|
|
|
reportItem.VideoName = reportInfo.Title
|
|
|
}
|
|
|
reportItem.VideoPlaySeconds = reportInfo.VideoPlaySeconds
|
|
|
reportItem.Author = reportInfo.Author
|
|
|
var reportTypeList []*response.ReportChapterListItem
|
|
|
|
|
|
- if (reportInfo.ClassifyNameFirst == "晨报" || reportInfo.ClassifyNameFirst == "周报") {
|
|
|
+ if reportInfo.ClassifyNameFirst == "晨报" || reportInfo.ClassifyNameFirst == "周报" {
|
|
|
//(晨报和周报的banner图)
|
|
|
- if reportInfo.ClassifyNameFirst == "晨报" {
|
|
|
+ if reportInfo.ClassifyNameFirst == "晨报" {
|
|
|
reportItem.BannerUrl = utils.ALIYUN_YBIMG_HOST + "report_banner_day.jpg"
|
|
|
} else {
|
|
|
reportItem.BannerUrl = utils.ALIYUN_YBIMG_HOST + "report_banner_week.jpg"
|
|
@@ -431,7 +437,7 @@ func GetReportDetail(userinfo user.UserInfo, reportId int) (reportDetail respons
|
|
|
}
|
|
|
}
|
|
|
//如果有权限则展示content
|
|
|
- if authOk {
|
|
|
+ if authOk {
|
|
|
task.Task(AddViewRecord, userinfo, reportInfo.Id, reportInfo.ClassifyNameFirst, 0)
|
|
|
reportItem.Content = html.UnescapeString(reportInfo.Content)
|
|
|
reportItem.VideoUrl = reportInfo.VideoUrl
|
|
@@ -454,7 +460,7 @@ func CheckReportPermission(userInfo user.UserInfo, reportId int, productAuthOk b
|
|
|
return
|
|
|
}
|
|
|
}
|
|
|
- authOk, permissionCheckInfo,_, err = company.GetCheckPermission(userInfo.CompanyID, int(userInfo.UserID), permissionIds)
|
|
|
+ authOk, permissionCheckInfo, _, err = company.GetCheckPermission(userInfo.CompanyID, int(userInfo.UserID), permissionIds)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -503,9 +509,9 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
permissionImageMap := make(map[string]string)
|
|
|
chartPermissionImageMap := make(map[int]string)
|
|
|
var classifyIdSeconds []int
|
|
|
- var reportImgUrl string
|
|
|
+ var reportImgUrl string
|
|
|
|
|
|
- chartPermissionList, err := chart_permission.GetFiccListExceptTacticByProductId()
|
|
|
+ chartPermissionList, err := chart_permission.GetFiccListExceptTacticByProductId()
|
|
|
if err != nil {
|
|
|
errMsg = err.Error()
|
|
|
err = errors.New("分类查询出错")
|
|
@@ -540,16 +546,16 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
return
|
|
|
}
|
|
|
permissionMap[classifyInfo.ClassifyName] = permissionIds
|
|
|
- if len(permissionIds) > 0{
|
|
|
+ if len(permissionIds) > 0 {
|
|
|
for _, v := range permissionIds {
|
|
|
reportImgUrl = chartPermissionImageMap[v]
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- }else{
|
|
|
- if classifyParent.ClassifyName == "晨报" || classifyParent.ClassifyName == "周报"{
|
|
|
- reportImgUrl = chartPermissionImageMap[1]
|
|
|
- classifyIdSeconds = append(classifyIdSeconds,0)
|
|
|
+ } else {
|
|
|
+ if classifyParent.ClassifyName == "晨报" || classifyParent.ClassifyName == "周报" {
|
|
|
+ reportImgUrl = chartPermissionImageMap[1]
|
|
|
+ classifyIdSeconds = append(classifyIdSeconds, 0)
|
|
|
}
|
|
|
|
|
|
chartPermissions, tErr := chart_permission_search_key_word_mapping.GetChartPermissionByFrom("rddp")
|
|
@@ -589,7 +595,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
|
|
|
// 获取有效的权限id列表
|
|
|
var validPermissionIdList []int
|
|
|
- if productAuthOk {
|
|
|
+ if productAuthOk {
|
|
|
validPermissionIdList, err = company.GetValidPermissionIdListByCompany2ProductId(user.CompanyID, 1)
|
|
|
if err != nil && err != utils.ErrNoRow {
|
|
|
errMsg = err.Error()
|
|
@@ -601,7 +607,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
if len(validPermissionIdList) > 0 {
|
|
|
for classifyName, perIds := range permissionMap {
|
|
|
checkLoop:
|
|
|
- for _, checkId := range perIds{
|
|
|
+ for _, checkId := range perIds {
|
|
|
for _, validPerid := range validPermissionIdList {
|
|
|
if checkId == validPerid {
|
|
|
checkPermissionMap[classifyName] = true
|
|
@@ -628,12 +634,12 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
err = errors.New("查询报告总数出错")
|
|
|
return
|
|
|
}
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
if classifyIdSecond > 0 {
|
|
|
classifyIdSeconds = append(classifyIdSeconds, classifyIdSecond)
|
|
|
}
|
|
|
if classifyParent.ClassifyName == "晨报" || classifyParent.ClassifyName == "周报" {
|
|
|
- classifyIdSeconds = append(classifyIdSeconds,0)
|
|
|
+ classifyIdSeconds = append(classifyIdSeconds, 0)
|
|
|
}
|
|
|
searchResp, total1, tErr := elasticService.ReportListSearch(keyWord, classifyIdFirst, classifyIdSeconds, pageIndex, pageSize)
|
|
|
if tErr != nil {
|
|
@@ -733,7 +739,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
reportItem.Stage = reportInfo.Stage
|
|
|
reportItem.Abstract = reportInfo.Abstract
|
|
|
if reportInfo.Abstract != "" {
|
|
|
- reportItem.Abstract = "<div style=\"overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">" +reportInfo.Abstract+"</div>"
|
|
|
+ reportItem.Abstract = "<div style=\"overflow: hidden;white-space: nowrap;text-overflow: ellipsis;\">" + reportInfo.Abstract + "</div>"
|
|
|
}
|
|
|
reportItem.Author = reportInfo.Author
|
|
|
stageStr := reportInfo.StageStr
|
|
@@ -741,10 +747,10 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
stageStr = strconv.Itoa(reportInfo.Stage)
|
|
|
}
|
|
|
reportItem.TitleInfo = fmt.Sprintf("【第%s期|FICC|%s】", stageStr, reportItem.ClassifyNameSecond)
|
|
|
- if reportInfo.ClassifyNameFirst == "晨报" || reportInfo.ClassifyNameFirst == "周报" || classifyIdSecond > 0{
|
|
|
+ if reportInfo.ClassifyNameFirst == "晨报" || reportInfo.ClassifyNameFirst == "周报" || classifyIdSecond > 0 {
|
|
|
reportItem.ReportImgUrl = utils.ALIYUN_YBIMG_HOST + reportImgUrl
|
|
|
reportItem.TitleInfo = fmt.Sprintf("【第%s期|FICC|%s】", stageStr, reportItem.ClassifyNameFirst)
|
|
|
- } else if url,ok := permissionImageMap[reportInfo.ClassifyNameSecond]; ok {
|
|
|
+ } else if url, ok := permissionImageMap[reportInfo.ClassifyNameSecond]; ok {
|
|
|
reportItem.ReportImgUrl = utils.ALIYUN_YBIMG_HOST + url
|
|
|
}
|
|
|
|
|
@@ -754,7 +760,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
reportItem.VideoList = vList
|
|
|
}
|
|
|
reportItem.AuthOk = productAuthOk
|
|
|
- }else if classifyParent.ClassifyName == "周报" {
|
|
|
+ } else if classifyParent.ClassifyName == "周报" {
|
|
|
if wAuth, ok := weekAuthMap[reportInfo.Id]; ok {
|
|
|
reportItem.AuthOk = wAuth
|
|
|
if wAuth {
|
|
@@ -764,8 +770,8 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- }else if authOk,ok := checkPermissionMap[reportInfo.ClassifyNameSecond]; ok && authOk {
|
|
|
- if reportInfo.VideoUrl != "" {
|
|
|
+ } else if authOk, ok := checkPermissionMap[reportInfo.ClassifyNameSecond]; ok && authOk {
|
|
|
+ if reportInfo.VideoUrl != "" {
|
|
|
videoTemp := new(response.VideoListItem)
|
|
|
videoTemp.VideoUrl = reportInfo.VideoUrl
|
|
|
videoTemp.VideoName = reportInfo.VideoName
|
|
@@ -789,7 +795,7 @@ func GetReportList(user user.UserInfo, keyWord string, classifyIdFirst, classify
|
|
|
}
|
|
|
|
|
|
// GetCollectReportList 首页展示报告汇总列表
|
|
|
-func GetCollectReportList(user user.UserInfo, chartPermissionId, pageIndex, pageSize int) (ret *response.ReportCollectResp, err error) {
|
|
|
+func GetCollectReportList(user user.UserInfo, chartPermissionId, pageIndex, pageSize int) (ret *response.ReportCollectResp, err error) {
|
|
|
var errMsg string
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -876,7 +882,7 @@ func GetCollectReportList(user user.UserInfo, chartPermissionId, pageIndex, page
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func SearchReport(user user.UserInfo, keyWord string, pageIndex, pageSize int)(ret *response.ReportSearchResp, err error) {
|
|
|
+func SearchReport(user user.UserInfo, keyWord string, pageIndex, pageSize int) (ret *response.ReportSearchResp, err error) {
|
|
|
var errMsg string
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
@@ -892,10 +898,10 @@ func SearchReport(user user.UserInfo, keyWord string, pageIndex, pageSize int)(r
|
|
|
}
|
|
|
var classifyIdFirsts []int
|
|
|
classifyIdSeconds := []int{0}
|
|
|
- for _, v := range classifys{
|
|
|
+ for _, v := range classifys {
|
|
|
if v.ParentId == 0 {
|
|
|
classifyIdFirsts = append(classifyIdFirsts, v.Id)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
classifyIdSeconds = append(classifyIdSeconds, v.Id)
|
|
|
}
|
|
|
}
|
|
@@ -995,7 +1001,7 @@ func GetTickerData(user user.UserInfo, reportChapterId int) (ret *response.Ticke
|
|
|
var dataList []*response.TickerDataItem
|
|
|
if chapter.TypeId == 17 {
|
|
|
dataList, err = daily_base_column.GetDataByBaseColumnTickers17(tickerNames)
|
|
|
- }else{
|
|
|
+ } else {
|
|
|
dataList, err = daily_base_column.GetDataByBaseColumnTickers(tickerNames)
|
|
|
}
|
|
|
|
|
@@ -1016,8 +1022,8 @@ func GetTickerData(user user.UserInfo, reportChapterId int) (ret *response.Ticke
|
|
|
temp.BaseColumnName = v.BaseColumnName
|
|
|
temp.Ticker = v.Ticker
|
|
|
temp.Date = v.Date
|
|
|
- temp.TickerValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f",v.TickerValue), 2)
|
|
|
- temp.LastValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f",v.LastValue), 2)
|
|
|
+ temp.TickerValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", v.TickerValue), 2)
|
|
|
+ temp.LastValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", v.LastValue), 2)
|
|
|
temp.MmValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", v.MmValue), 2)
|
|
|
temp.DdValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", v.DdValue), 2)
|
|
|
temp.WwValue, _ = strconv.ParseFloat(fmt.Sprintf("%.2f", v.WwValue), 2)
|
|
@@ -1045,7 +1051,7 @@ func GetReportContentSub(content string, scapeFlag bool) (contentSub string) {
|
|
|
content = html.UnescapeString(content)
|
|
|
content = utils.TrimHtml(content) //只展示纯文本
|
|
|
}
|
|
|
- contentSub = "<div style=\"-webkit-line-clamp: 3;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;text-overflow: ellipsis;\">"+content+"</div>"
|
|
|
+ contentSub = "<div style=\"-webkit-line-clamp: 3;-webkit-box-orient: vertical;display: -webkit-box;overflow: hidden;text-overflow: ellipsis;\">" + content + "</div>"
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -1082,4 +1088,4 @@ func addAliasToKeyword(keyword string) string {
|
|
|
}
|
|
|
keyword = strings.Join(keywordArr, ",")
|
|
|
return keyword
|
|
|
-}
|
|
|
+}
|