Commit 7fc8b747 by mushishixian

优化性能

parent e18ca191
Showing with 12 additions and 0 deletions
......@@ -23,3 +23,11 @@ var StockInfoSupplierMap = map[int64]string{
21: "rs",
1672: "master",
}
var StockInfoSupplierIds = []int64{
6,
7,
// 14,
21,
1672,
}
......@@ -7,6 +7,7 @@ import (
"go_sku_server/pkg/vars"
"time"
"github.com/syyongx/php2go"
"gopkg.in/mgo.v2"
"gopkg.in/mgo.v2/bson"
)
......@@ -16,6 +17,9 @@ type StockInfoService struct {
}
func (ss *LyService) getStockInfo(supplierId, oldGoodsId int64) interface{} {
if !php2go.InArray(supplierId, vars.StockInfoSupplierIds) {
return nil
}
var stockInfo model.StockInfo
//去mongodb获取在途库存信息
mongodb := mongo.Conn("default")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment