正在显示
2 个修改的文件
包含
2 行增加
和
2 行删除
@@ -104,7 +104,7 @@ func (dao *DividendsOrderDao) CountDividendsOrder(queryOptions map[string]interf | @@ -104,7 +104,7 @@ func (dao *DividendsOrderDao) CountDividendsOrder(queryOptions map[string]interf | ||
104 | nextDayZeroTime := utils.GetNextDayZeroTime(currentTime) | 104 | nextDayZeroTime := utils.GetNextDayZeroTime(currentTime) |
105 | query.Where("dividends_order.created_at >= ?", todayZeroTime) | 105 | query.Where("dividends_order.created_at >= ?", todayZeroTime) |
106 | query.Where("dividends_order.created_at < ?", nextDayZeroTime) | 106 | query.Where("dividends_order.created_at < ?", nextDayZeroTime) |
107 | - if count, err := query.AllWithDeleted().SelectAndCount(); err != nil { | 107 | + if count, err := query.AllWithDeleted().Count(); err != nil { |
108 | return 0, err | 108 | return 0, err |
109 | } else { | 109 | } else { |
110 | return count, nil | 110 | return count, nil |
@@ -91,7 +91,7 @@ func (dao *DividendsReturnedOrderDao) CountDividendsReturnedOrder(queryOptions m | @@ -91,7 +91,7 @@ func (dao *DividendsReturnedOrderDao) CountDividendsReturnedOrder(queryOptions m | ||
91 | nextDayZeroTime := utils.GetNextDayZeroTime(currentTime) | 91 | nextDayZeroTime := utils.GetNextDayZeroTime(currentTime) |
92 | query.Where("dividends_returned_order.created_at >= ?", todayZeroTime) | 92 | query.Where("dividends_returned_order.created_at >= ?", todayZeroTime) |
93 | query.Where("dividends_returned_order.created_at < ?", nextDayZeroTime) | 93 | query.Where("dividends_returned_order.created_at < ?", nextDayZeroTime) |
94 | - if count, err := query.AllWithDeleted().SelectAndCount(); err != nil { | 94 | + if count, err := query.AllWithDeleted().Count(); err != nil { |
95 | return 0, err | 95 | return 0, err |
96 | } else { | 96 | } else { |
97 | return count, nil | 97 | return count, nil |
-
请 注册 或 登录 后发表评论