门店红线/黄线统计-写入数据库

This commit is contained in:
Rosy-zhudan
2019-09-29 18:32:55 +08:00
parent 55548ced11
commit 1ef5d248e8
9 changed files with 291 additions and 38 deletions

View File

@@ -2,6 +2,72 @@ package model
import "time"
const (
FieldPickTimeDaDa = "PickTimeDaDa"
FieldBadComment = "BadComment"
FieldAbsentGoods = "AbsentGoods"
FieldPickTimeDaDaOneWeek = "PickTimeDaDaOneWeek"
FieldBadCommentOneWeek = "BadCommentOneWeek"
FieldAbsentGoodsOneWeek = "AbsentGoodsOneWeek"
FieldStandardFinishTimeSelfDelivery = "StandardFinishTimeSelfDelivery"
FieldStandardPickUpTimeDaDa = "StandardPickUpTimeDaDa"
FieldNoOrderInMonth = "NoOrderInMonth"
FieldRiskOrderCount = "RiskOrderCount"
)
type StoreAlert struct {
ID int `orm:"column(id)" json:"id"`
CreatedTime time.Time `orm:"auto_now_add;type(datetime)" json:"createdTime"`
AlertDate time.Time `orm:"auto_now_add;type(datetime)" json:"alertDate"`
StoreID int `orm:"column(store_id)" json:"storeID"`
PickTimeDaDa int `orm:"column(pick_time_order_dada)" json:"pickTimeDaDa"`
BadComment int `orm:"column(bad_comment)" json:"badComment"`
AbsentGoods int `orm:"column(absent_goods)" json:"absentGoods"`
PickTimeDaDaOneWeek int `orm:"column(pick_time_dada_oneweek)" json:"pickTimeDaDaOneWeek"`
BadCommentOneWeek int `orm:"column(bad_comment_oneweek)" json:"badCommentOneWeek"`
AbsentGoodsOneWeek int `orm:"column(absent_goods_oneweek)" json:"absentGoodsOneWeek"`
StandardFinishTimeSelfDelivery int `orm:"column(standard_finish_time_selfdelivery)" json:"standardFinishTimeSelfDelivery"`
StandardPickUpTimeDaDa int `orm:"column(standard_pickup_time_dada)" json:"standardPickUpTimeDaDa"`
NoOrderInMonth int `json:"noOrderInMonth"`
RiskOrderCount int `json:"riskOrderCount"`
}
type StoreAlertEx struct {
StoreAlert
StoreName string `json:"storeName"`
}
type StoreAlertProperty struct {
Value string `json:"value"`
Color string `json:"color"`
}
type StoreAlertAdvanced struct {
ID int `json:"id"`
CreatedTime time.Time `json:"createdTime"`
AlertDate time.Time `json:"alertDate"`
StoreID int `json:"storeID"`
PickTimeDaDa StoreAlertProperty
BadComment StoreAlertProperty
AbsentGoods StoreAlertProperty
PickTimeDaDaOneWeek StoreAlertProperty
BadCommentOneWeek StoreAlertProperty
AbsentGoodsOneWeek StoreAlertProperty
StandardFinishTimeSelfDelivery StoreAlertProperty
StandardPickUpTimeDaDa StoreAlertProperty
NoOrderInMonth StoreAlertProperty
RiskOrderCount StoreAlertProperty
}
type StoreAlertData struct {
StoreAlertList []*StoreAlertEx `json:"storeAlertList"`
TotalCount int `json:"totalCount"`
}
type StoreOrderTime struct {
StoreID int `orm:"column(store_id)"`
OrderCreateTime time.Time `orm:"column(order_created_at)"`
@@ -16,6 +82,6 @@ type StoreOrderStatus struct {
}
type StoreOrder struct {
StoreID int `orm:"column(store_id)"`
VendorOrderID string `orm:"column(vendor_order_id)"`
}
StoreID int `orm:"column(store_id)"`
VendorOrderID string `orm:"column(vendor_order_id)"`
}