12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- package statisticsrv
- import (
- "Cold_Logistic/internal/server/infra/models"
- "gogs.baozhida.cn/Cold_Logistic_libs/pkg/contrib/core"
- "time"
- )
- type OrderNumTimeStatReqVO struct {
- StatType models.TimeStatType `json:"statType"` // 年,月,天
- TimeStart models.MyTime `json:"timeStart"`
- TimeEnd models.MyTime `json:"timeEnd"`
- OrderStatus int `json:"orderStatus"`
- }
- func (r *OrderNumTimeStatReqVO) Init() {
- if r.StatType == "" {
- r.StatType = models.TimeStatDay
- }
- if r.TimeStart.IsZero() {
- r.TimeStart = models.NewMyTime(time.Now()).GetYearFirstDay()
- }
- if r.TimeEnd.IsZero() {
- r.TimeEnd = models.NewMyTime(time.Now())
- }
- //if r.TimeEnd.Sub(r.TimeStart.Time).Hours() > float64(12 *24 *time.Hour) {
- // r.StatType = models.TimeStatYear
- //}
- }
- type OrderNumTimeStatRespVO struct {
- Key string
- OrderCount int64
- }
- type OrderNumUserStatReqVO struct {
- Page core.Page `json:"page"`
- Search struct {
- StatType models.TimeStatType
- TimeStart models.MyTime `json:"timeStart"`
- TimeEnd models.MyTime `json:"timeEnd"`
- OrderStatus int `json:"orderStatus"`
- }
- }
|