This commit is contained in:
suyl
2021-08-23 10:56:38 +08:00
parent 099166f543
commit b853363a58
2 changed files with 27 additions and 16 deletions

View File

@@ -388,13 +388,23 @@ func (c *OrderManager) GetOrders(ctx *jxcontext.Context, isIncludeFake bool, fro
} }
} }
} }
//if isJxIncomeArea { count := &struct {
// var order2 *model.GoodsOrderExt Count int
// if order.JxIncome >= begin && order.JxIncome <= end { }{}
// order2 = order sql2 := `
// return []*model.GoodsOrderExt{order2}, err SELECT COUNT(*) count
// } FROM goods_order WHERE IF(store_id = 0, jx_store_id ,store_id) = ?
//} `
storeID := 0
if order.StoreID == 0 {
storeID = order.JxStoreID
} else {
storeID = order.StoreID
}
sqlParams2 := []interface{}{storeID}
if err = dao.GetRow(db, &count, sql2, sqlParams2); err == nil {
order.StoreDayOrderCount = count.Count
}
return retVal, err return retVal, err
}, orders) }, orders)
tasksch.HandleTask(task, nil, true).Run() tasksch.HandleTask(task, nil, true).Run()

View File

@@ -41,15 +41,16 @@ type GoodsOrderExt struct {
VendorPayPercentage int `json:"vendorPayPercentage"` VendorPayPercentage int `json:"vendorPayPercentage"`
OldPayPercentage int `json:"oldPayPercentage"` OldPayPercentage int `json:"oldPayPercentage"`
SkuInfo string `json:"skuInfo,omitempty"` SkuInfo string `json:"skuInfo,omitempty"`
SkuInfo2 string `json:"skuInfo2,omitempty"` SkuInfo2 string `json:"skuInfo2,omitempty"`
ShortSkuInfo `json:"-"` ShortSkuInfo `json:"-"`
SkuList []*ShortSkuInfo `json:"skuList,omitempty"` SkuList []*ShortSkuInfo `json:"skuList,omitempty"`
Count int `json:"count"` Count int `json:"count"`
ShopSumPrice int64 `json:"shopSumPrice"` ShopSumPrice int64 `json:"shopSumPrice"`
AvgPrice int64 `json:"avgPrice"` AvgPrice int64 `json:"avgPrice"`
BadCommentCount int `json:"badCommentCount"` BadCommentCount int `json:"badCommentCount"`
JxIncome int64 `json:"jxIncome"` //预计收益 JxIncome int64 `json:"jxIncome"` //预计收益
StoreDayOrderCount int `json:"storeDayOrderCount"` //门店当天单量
FloatLng float64 `json:"floatLng"` FloatLng float64 `json:"floatLng"`
FloatLat float64 `json:"floatLat"` FloatLat float64 `json:"floatLat"`