Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
27 lines
812 B
Go
27 lines
812 B
Go
package srv_cointrans
|
|
|
|
import (
|
|
"time"
|
|
"videoweb/pub/models/cointransmod"
|
|
"videoweb/pub/pubdef"
|
|
)
|
|
|
|
type CoinTransReq struct {
|
|
pubdef.Page
|
|
UserId *int64 `json:"userId"` // 用户ID
|
|
FlowDir *cointransmod.FlowDir `json:"flowDir"` // 收支方向:1收入 -1支出
|
|
TranType *cointransmod.TranType `json:"tranType"` // 交易类型
|
|
StartTime *string `json:"startTime"` // 开始时间 2006-01-02 15:04:05
|
|
EndTime *string `json:"endTime"` // 结束时间 2006-01-02 15:04:05
|
|
}
|
|
|
|
type CoinTransResp struct {
|
|
Total int64 `json:"total"`
|
|
List cointransmod.CoinTransList `json:"list"`
|
|
}
|
|
|
|
func parseTime(s string) (time.Time, bool) {
|
|
t, err := time.ParseInLocation("2006-01-02 15:04:05", s, time.Local)
|
|
return t, err == nil
|
|
}
|