Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
黄成意
/
go_sku_server
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
7fc8b747
authored
Aug 04, 2022
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
优化性能
parent
e18ca191
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
0 deletions
pkg/vars/sku.go
service/service_stock_info.go
pkg/vars/sku.go
View file @
7fc8b747
...
...
@@ -23,3 +23,11 @@ var StockInfoSupplierMap = map[int64]string{
21
:
"rs"
,
1672
:
"master"
,
}
var
StockInfoSupplierIds
=
[]
int64
{
6
,
7
,
// 14,
21
,
1672
,
}
service/service_stock_info.go
View file @
7fc8b747
...
...
@@ -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"
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment