获取待拣货商品
This commit is contained in:
@@ -49,8 +49,9 @@ type StoresOrderSaleInfo struct {
|
||||
|
||||
type OrderSkusAccept struct {
|
||||
model.SkuAndName
|
||||
SumWeight int `json:"sumWeight"`
|
||||
SumCount int `json:"sumCount"`
|
||||
SumWeight int `json:"sumWeight"`
|
||||
SumCount int `json:"sumCount"`
|
||||
Img string `json:"img"`
|
||||
}
|
||||
|
||||
func (c *OrderManager) GetStoreOrderCountInfo(ctx *jxcontext.Context, storeID, lastHours int, isIncludeFake bool) (countInfo []*model.GoodsOrderCountInfo, err error) {
|
||||
@@ -1148,7 +1149,7 @@ func (c *OrderManager) RefreshOrderFinancial(ctx *jxcontext.Context, fromTime, t
|
||||
func GetOrdersAccept(ctx *jxcontext.Context, storeID int) (result []*OrderSkusAccept, err error) {
|
||||
db := dao.GetDB()
|
||||
sql := `
|
||||
SELECT SUM(a.count) sum_count, SUM(a.weight*a.count) sum_weight, c.*, d.name, d.unit, d.prefix
|
||||
SELECT SUM(a.count) sum_count, SUM(a.weight*a.count) sum_weight, c.*, d.name, d.unit, d.prefix, d.img
|
||||
FROM order_sku a
|
||||
JOIN goods_order b ON b.vendor_order_id = a.vendor_order_id AND b.vendor_id = a.vendor_id
|
||||
JOIN sku c ON c.id = a.sku_id
|
||||
@@ -1157,6 +1158,7 @@ func GetOrdersAccept(ctx *jxcontext.Context, storeID int) (result []*OrderSkusAc
|
||||
AND b.status = ?
|
||||
AND b.order_created_at <= NOW() AND b.order_created_at >= ?
|
||||
GROUP BY 3
|
||||
ORDER BY sum_weight DESC
|
||||
`
|
||||
sqlParams := []interface{}{
|
||||
storeID,
|
||||
|
||||
Reference in New Issue
Block a user