|
@@ -4,15 +4,16 @@ import "rdluck_tools/orm"
|
|
|
|
|
|
type ReportMapping struct {
|
|
|
CategoryId int `description:"分类ID"`
|
|
|
- SubCategoryName string `description:"权限名称"`
|
|
|
+ SubCategoryName string `description:"主题"`
|
|
|
+ MathTypeName string `description:"分类名称"`
|
|
|
IsRed bool `description:"是否标红"`
|
|
|
}
|
|
|
|
|
|
type ReportMappingHome struct {
|
|
|
CategoryId int `description:"分类ID"`
|
|
|
- SubCategoryName string `description:"权限名称"`
|
|
|
+ SubCategoryName string `description:"主题名称"`
|
|
|
+ MatchTypeName string `description:"匹配类型"`
|
|
|
IsRed bool `description:"是否标红"`
|
|
|
- Readnum int `description:"阅读数量"`
|
|
|
}
|
|
|
|
|
|
type TradeReportMapping struct {
|
|
@@ -44,10 +45,10 @@ func GetReportMappingStrategyAll() (items []*ReportMapping, err error) {
|
|
|
}
|
|
|
|
|
|
//获取策略下面的所有分类
|
|
|
-func GetReportMappingStrategyHomeAll(uid int) (items []*ReportMappingHome, err error) {
|
|
|
+func GetReportMappingStrategyHomeAll() (items []*ReportMappingHome, err error) {
|
|
|
o := orm.NewOrm()
|
|
|
sql := `SELECT
|
|
|
- re.category_id,re.sub_category_name, ( SELECT COUNT( 1 ) FROM cygx_article_history_record AS rec WHERE rec.user_id = ? AND rec.article_id = art.article_id ) AS readnum
|
|
|
+ re.category_id,re.sub_category_name,re.match_type_name
|
|
|
FROM
|
|
|
cygx_report_mapping AS re
|
|
|
INNER JOIN cygx_article AS art ON art.category_id = re.category_id
|
|
@@ -58,7 +59,7 @@ GROUP BY
|
|
|
re.match_type_name
|
|
|
ORDER BY
|
|
|
sort DESC , art.publish_date DESC`
|
|
|
- _, err = o.Raw(sql, uid).QueryRows(&items)
|
|
|
+ _, err = o.Raw(sql).QueryRows(&items)
|
|
|
return
|
|
|
}
|
|
|
|
|
@@ -82,7 +83,7 @@ func GetTradeAll(uid, ChartPermissionId int) (items []*TradeReportMapping, err e
|
|
|
|
|
|
type IndustrialToArticleCategoryRep struct {
|
|
|
CategoryId int `description:"分类ID"`
|
|
|
- MatchTypeName string `description:"权限名称"`
|
|
|
+ MatchTypeName string `description:"匹配类型"`
|
|
|
IsRed bool `description:"是否标红"`
|
|
|
}
|
|
|
|