拆分后台财务 Repository 文件职责

This commit is contained in:
yml2213
2026-06-10 15:08:19 +08:00
parent b8b7221df8
commit 5ecb1e1469
6 changed files with 402 additions and 376 deletions
@@ -0,0 +1,32 @@
package adminfinance
import (
"time"
"hfb_sys/backend/internal/timeutil"
)
func refundBizTypes() []string {
return []string{
"cancel_refund",
"admin_close_refund",
"admin_refund",
"checkout_refund",
"deposit_refund",
"rent_refund",
"arbitration_refund",
}
}
func dayStart(value time.Time) time.Time {
loc := timeutil.ShanghaiLocation()
local := value.In(loc)
return time.Date(local.Year(), local.Month(), local.Day(), 0, 0, 0, 0, loc)
}
func absCent(value int64) int64 {
if value < 0 {
return -value
}
return value
}