You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
44 lines
892 B
Go
44 lines
892 B
Go
![]()
3 weeks ago
|
package article
|
||
|
|
||
|
import (
|
||
|
"cls-server/internal/domain/article"
|
||
|
"cls-server/pkg/logger"
|
||
|
)
|
||
|
|
||
|
type ArticleService struct {
|
||
|
repo article.ArticleRepository
|
||
|
log logger.Logger
|
||
|
}
|
||
|
|
||
|
func NewArticleService(repo article.ArticleRepository,
|
||
|
log logger.New) *ArticleService {
|
||
|
return &ArticleService{repo,
|
||
|
log("cls:service:article")}
|
||
|
}
|
||
|
|
||
|
var class_type = map[uint64]string{
|
||
|
20014: "狙击龙虎榜",
|
||
|
20015: "盘中宝",
|
||
|
20021: "风口研报",
|
||
|
20022: "公告全知道",
|
||
|
20023: "研选",
|
||
|
20025: "财联社早知道",
|
||
|
20026: "电报解读",
|
||
|
20087: "金牌纪要库",
|
||
|
}
|
||
|
|
||
|
var class_type_reverse = map[string]uint64{
|
||
|
"狙击龙虎榜": 20014,
|
||
|
"盘中宝": 20015,
|
||
|
"风口研报": 20021,
|
||
|
"公告全知道": 20022,
|
||
|
"研选": 20023,
|
||
|
"财联社早知道": 20025,
|
||
|
"电报解读": 20026,
|
||
|
"金牌纪要库": 20087,
|
||
|
}
|
||
|
|
||
|
func GetClassNameById(id uint64) string {
|
||
|
return class_type[id]
|
||
|
}
|