门店评分

This commit is contained in:
Rosy-zhudan
2019-09-05 08:37:23 +08:00
parent 2afa452d78
commit 4eaccdc917
7 changed files with 297 additions and 63 deletions

View File

@@ -6,18 +6,8 @@ import (
"git.rosy.net.cn/jx-callback/business/model"
)
func InsertStoreScore(storeID int, scores map[string]int) error {
storeScore := &model.StoreScore{CreatedAt: time.Now(), StoreID: storeID}
storeScore.StoreOpenTime = scores["storeOpenTime"]
storeScore.SaleSkuCount = scores["saleSkuCount"]
storeScore.AveragePickupTime = scores["averagePickupTime"]
storeScore.BadReviewOrder = scores["badReviewOrder"]
storeScore.UnfinishOrder = scores["unfinishOrder"]
storeScore.LackStockOrder = scores["lackStockOrder"]
storeScore.PromotionSku = scores["promotionSku"]
storeScore.FullVendor = scores["fullVendor"]
storeScore.StoreRange = scores["storeRange"]
storeScore.SaleSkuPrice = scores["saleSkuPrice"]
// func InsertStoreScore(storeID int, scores map[string]int) error {
func InsertStoreScore(storeScore *model.StoreScore) error {
storeScore.CreatedAt = time.Now()
return CreateEntity(nil, storeScore)
}