package srv_cointrans import ( "hkdj-web-server/pub/models/cointransmod" "hkdj-web-server/pub/pubdef" "time" ) 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 }