来源:hgdjnet-server 9bfbafe10d417deea959bd53117bc88a10e60a83 项目身份 HKDJ / JHA-216,独立官网仓库,Jenkins 守卫键 hkdjnet 测试目录 /server/hkdj_net,App/Web API 30331/30332 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
27 lines
826 B
Go
27 lines
826 B
Go
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
|
|
}
|