diff --git a/business/jxcallback/orderman/order.go b/business/jxcallback/orderman/order.go index 4b1a51fc0..d97e1a2fa 100644 --- a/business/jxcallback/orderman/order.go +++ b/business/jxcallback/orderman/order.go @@ -1169,15 +1169,18 @@ func result2Orders(ctx *jxcontext.Context, result *jdshopapi.AllOrdersResult) (o } func setJdsOrderSeq(order *model.GoodsOrder) (err error) { - var count int + type tCount struct { + Count int `json:"count"` + } + var count = &tCount{} sql := ` - SELECT count(*) FROM goods_order WHERE store_id = ? AND order_create_at >= ? AND order_create_at <= ? AND vendor_id = ? + SELECT count(*) count FROM goods_order WHERE store_id = ? AND order_create_at >= ? AND order_create_at <= ? AND vendor_id = ? ` sqlParams := []interface{}{ order.StoreID, utils.Time2Date(time.Now()), utils.Time2Date(time.Now().AddDate(0, 0, 1)), order.VendorID, } err = dao.GetRow(dao.GetDB(), &count, sql, sqlParams) - order.OrderSeq = count + 1 + order.OrderSeq = count.Count + 1 return err }