update: 月份查询改为时间倒序
This commit is contained in:
parent
735e322942
commit
cb72b18513
|
|
@ -19,8 +19,11 @@ type YearMonth struct {
|
||||||
|
|
||||||
func MonthsList(c *gin.Context) {
|
func MonthsList(c *gin.Context) {
|
||||||
ledgerConfig := script.GetLedgerConfigFromContext(c)
|
ledgerConfig := script.GetLedgerConfigFromContext(c)
|
||||||
|
// 添加排序
|
||||||
|
queryParams := script.GetQueryParams(c)
|
||||||
|
queryParams.OrderBy = "year, month desc"
|
||||||
yearMonthList := make([]YearMonth, 0)
|
yearMonthList := make([]YearMonth, 0)
|
||||||
err := script.BQLQueryList(ledgerConfig, nil, &yearMonthList)
|
err := script.BQLQueryList(ledgerConfig, &queryParams, &yearMonthList)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
InternalError(c, err.Error())
|
InternalError(c, err.Error())
|
||||||
return
|
return
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue