|
@@ -137,11 +137,12 @@ func GetByReportId(reportId int) (item *Report, err error) {
|
|
|
func GetFiccRreportToCygxArticle(condition string, pars []interface{}) (items []*Report, err error) {
|
|
|
o := orm.NewOrmUsingDB("rddp")
|
|
|
sql := ` SELECT * FROM report WHERE state = 2 AND is_public_publish = 1
|
|
|
- AND classify_name_first IN ('宏观报告','晨会纪要','调研纪要','数据点评')
|
|
|
- AND classify_name_second IN ('大类资产周报','晨会纪要','黑色调研','宏观G2观察','人民币汇率双周报','房地产市场跟踪','黄金月报','铜行业数据点评','原油基本面推演','原油船期数据跟踪','EIA原油库存点评')
|
|
|
+ AND classify_name_first IN ('宏观报告','晨会纪要','调研纪要','数据点评','从宏观看商品')
|
|
|
+ AND classify_name_second IN ('大类资产周报','晨会纪要','黑色调研','宏观G2观察','人民币汇率双周报','房地产市场跟踪','黄金月报','铜行业数据点评','原油基本面推演','原油船期数据跟踪','EIA原油库存点评','从宏观看商品')
|
|
|
AND IF ( classify_name_first = '宏观报告' , classify_name_second IN ('大类资产周报','宏观G2观察''人民币汇率双周报''房地产市场跟踪''黄金月报') ,1=1 )
|
|
|
AND IF ( classify_name_first = '晨会纪要' , classify_name_second = '晨会纪要' ,1=1 )
|
|
|
AND IF ( classify_name_first = '调研纪要' , classify_name_second = '黑色调研' ,1=1 )
|
|
|
+ AND IF ( classify_name_first = '从宏观看商品' , classify_name_second = '从宏观看商品' ,1=1 )
|
|
|
AND IF ( classify_name_first = '数据点评' , classify_name_second IN ('铜行业数据点评','原油基本面推演','原油船期数据跟踪','EIA原油库存点评') ,1=1 ) ` + condition + ` ORDER BY modify_time DESC `
|
|
|
_, err = o.Raw(sql, pars).QueryRows(&items)
|
|
|
return
|