作者 陈志颖

refactor:优化订单导入

... ... @@ -104,7 +104,7 @@ func (dao *DividendsOrderDao) CountDividendsOrder(queryOptions map[string]interf
nextDayZeroTime := utils.GetNextDayZeroTime(currentTime)
query.Where("dividends_order.created_at >= ?", todayZeroTime)
query.Where("dividends_order.created_at < ?", nextDayZeroTime)
if count, err := query.AllWithDeleted().SelectAndCount(); err != nil {
if count, err := query.AllWithDeleted().Count(); err != nil {
return 0, err
} else {
return count, nil
... ...
... ... @@ -91,7 +91,7 @@ func (dao *DividendsReturnedOrderDao) CountDividendsReturnedOrder(queryOptions m
nextDayZeroTime := utils.GetNextDayZeroTime(currentTime)
query.Where("dividends_returned_order.created_at >= ?", todayZeroTime)
query.Where("dividends_returned_order.created_at < ?", nextDayZeroTime)
if count, err := query.AllWithDeleted().SelectAndCount(); err != nil {
if count, err := query.AllWithDeleted().Count(); err != nil {
return 0, err
} else {
return count, nil
... ...