Compare commits
No commits in common. "319d8e02f6295ef94a9a949d2251740a5e7b9272" and "227ed703ae06a7e530804b459d1dcdd30908fe0b" have entirely different histories.
319d8e02f6
...
227ed703ae
@ -233,9 +233,9 @@ func (s *SplitAccountDeductionLogService) GetSplitAccountDeductionLogSummary(req
|
|||||||
FROM split_account_deduction_log
|
FROM split_account_deduction_log
|
||||||
WHERE created_by = ?
|
WHERE created_by = ?
|
||||||
GROUP BY business_no
|
GROUP BY business_no
|
||||||
ORDER BY MIN(created_at) DESC
|
ORDER BY business_no DESC
|
||||||
LIMIT ? OFFSET ?`
|
LIMIT ? OFFSET ?`
|
||||||
fmt.Printf("[SQL] summary-data: WHERE created_by = '%s' GROUP BY business_no ORDER BY MIN(created_at) DESC LIMIT %d OFFSET %d\n", createdBy, req.PageSize, offset)
|
fmt.Printf("[SQL] summary-data: WHERE created_by = '%s' GROUP BY business_no ORDER BY business_no DESC LIMIT %d OFFSET %d\n", createdBy, req.PageSize, offset)
|
||||||
if err := databaseConn.Raw(dataSQL, createdBy, req.PageSize, offset).Scan(&results).Error; err != nil {
|
if err := databaseConn.Raw(dataSQL, createdBy, req.PageSize, offset).Scan(&results).Error; err != nil {
|
||||||
return nil, utils.NewError("查询分账扣钱日志汇总失败")
|
return nil, utils.NewError("查询分账扣钱日志汇总失败")
|
||||||
}
|
}
|
||||||
@ -245,9 +245,9 @@ func (s *SplitAccountDeductionLogService) GetSplitAccountDeductionLogSummary(req
|
|||||||
MIN(created_at) AS created_at, MIN(updated_at) AS updated_at
|
MIN(created_at) AS created_at, MIN(updated_at) AS updated_at
|
||||||
FROM split_account_deduction_log
|
FROM split_account_deduction_log
|
||||||
GROUP BY business_no
|
GROUP BY business_no
|
||||||
ORDER BY MIN(created_at) DESC
|
ORDER BY business_no DESC
|
||||||
LIMIT ? OFFSET ?`
|
LIMIT ? OFFSET ?`
|
||||||
fmt.Printf("[SQL] summary-data: GROUP BY business_no ORDER BY MIN(created_at) DESC LIMIT %d OFFSET %d\n", req.PageSize, offset)
|
fmt.Printf("[SQL] summary-data: GROUP BY business_no ORDER BY business_no DESC LIMIT %d OFFSET %d\n", req.PageSize, offset)
|
||||||
if err := databaseConn.Raw(dataSQL, req.PageSize, offset).Scan(&results).Error; err != nil {
|
if err := databaseConn.Raw(dataSQL, req.PageSize, offset).Scan(&results).Error; err != nil {
|
||||||
return nil, utils.NewError("查询分账扣钱日志汇总失败")
|
return nil, utils.NewError("查询分账扣钱日志汇总失败")
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user