|
@@ -101,7 +101,7 @@ func (this *SmartReportController) Add() {
|
|
|
cond := ` AND classify_id_first = ? AND classify_id_second = ? AND state = 2`
|
|
|
pars := make([]interface{}, 0)
|
|
|
pars = append(pars, req.ClassifyIdFirst, req.ClassifyIdSecond)
|
|
|
- lastReport, e := ob.GetItemByCondition(cond, pars)
|
|
|
+ lastReport, e := ob.GetItemByCondition(cond, pars, "stage DESC")
|
|
|
if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取往期研报失败, Err: " + e.Error()
|
|
@@ -1065,7 +1065,7 @@ func (this *SmartReportController) LastPublishedReport() {
|
|
|
cond := ` AND classify_id_first = ? AND classify_id_second = ? AND state = 2`
|
|
|
pars := make([]interface{}, 0)
|
|
|
pars = append(pars, firstId, secondId)
|
|
|
- item, e := ob.GetItemByCondition(cond, pars)
|
|
|
+ item, e := ob.GetItemByCondition(cond, pars, "stage DESC")
|
|
|
if e != nil && e.Error() != utils.ErrNoRow() {
|
|
|
br.Msg = "获取失败"
|
|
|
br.ErrMsg = "获取研报失败, Err: " + e.Error()
|