Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
wang
/
golang-open-platform
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
cd95975b
authored
Feb 24, 2021
by
wang
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
增加 supplier_name 字段
parent
4421a2d8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
6 deletions
doc/redis_config_generate.go
service/service_sku.go
doc/redis_config_generate.go
View file @
cd95975b
...
...
@@ -56,7 +56,7 @@ func generate() {
//白名单配置
func
whiteIp
()
{
redisKey
:=
openWhiteList
whiteList
:=
[]
string
{
/*
whiteList:=[]string{
"127.0.0.1",
"127.0.0.2",
"192.168.2.72",
...
...
@@ -64,8 +64,27 @@ func whiteIp() {
"192.168.2.241",
"192.168.1.1",
"192.168.2.129",
}*/
//线上配置
whiteList
:=
[]
string
{
"127.0.0.1"
,
"::1"
,
"119.123.78.115"
,
"172.18.137.41"
,
"172.18.137.42"
,
"192.168.2.129"
,
"19.123.78.115"
,
"222.92.21.99"
,
"::1"
,
}
/*whiteList:=[]string{
"172.18.137.41",
"::1",
}*/
fmt
.
Println
(
"白名单配置:"
+
redisKey
)
redisStringSet
(
redisKey
,
whiteList
)
}
...
...
@@ -76,7 +95,7 @@ func businessList() {
businessList
:=
[]
string
{
jdToken
,
//京东
baiduToken
,
//百度
//
baiduToken,//百度
}
fmt
.
Println
(
"商家列表:key:"
+
redisKey
)
redisStringSet
(
redisKey
,
businessList
)
...
...
@@ -126,8 +145,8 @@ func redisHashSet(key string,values map[string]interface{}) {
b
,
_
=
json
.
Marshal
(
string
(
b
))
hsetStr
:=
"Hset "
+
key
+
" "
+
string
(
hashk
)
+
" "
+
string
(
b
)
fmt
.
Println
(
hsetStr
)
fmt
.
Println
(
"对应计时的min key
\n
flowUse_"
+
hashk
+
"_min"
)
fmt
.
Println
(
"对应计时的day key
\n
flowUse_"
+
hashk
+
"_day"
)
//
fmt.Println("对应计时的min key\nflowUse_"+hashk+"_min")
//
fmt.Println("对应计时的day key\nflowUse_"+hashk+"_day")
}
}
...
...
service/service_sku.go
View file @
cd95975b
...
...
@@ -54,7 +54,7 @@ func (this *SkuService)GetSkuListByClass(req *model.QuerySkuCreq) (rsp *model.Qu
return
rsp
,
e
.
NewApiError
(
"service error"
,
open
.
REMOTESKUINFO
)
}
field
:=
[]
string
{
"goods_id"
,
"spu_id"
,
"brand_id"
,
"brand_name"
,
"goods_name"
,
"stock"
,
"moq"
,
"mpq"
,
"class_id1"
,
"class_id2"
,
"class_id1_name"
,
"class_id2_name"
,
"attrs"
,
"ladder_price"
,}
"class_id1"
,
"class_id2"
,
"class_id1_name"
,
"class_id2_name"
,
"attrs"
,
"ladder_price"
,
"supplier_name"
,
}
//field:=[]string{"spu_id","attrs","supplier_name","goods_images","hk_delivery_time"}
rsp
.
SkuData
=
model
.
SkuFilter
(
*
remoteData
,
field
)
...
...
@@ -77,7 +77,7 @@ func (this *SkuService) GetSkuListFull(req * model.QuerySkuReq)(rsp *model.Query
// "class_id1_name": "处理器及微控制器",
// "class_id2_name": "ADI(亚德诺)",
field
:=
[]
string
{
"goods_id"
,
"spu_id"
,
"brand_id"
,
"brand_name"
,
"goods_name"
,
"stock"
,
"moq"
,
"mpq"
,
"class_id1"
,
"class_id2"
,
"class_id1_name"
,
"class_id2_name"
,
"attrs"
,
"ladder_price"
,}
"class_id1"
,
"class_id2"
,
"class_id1_name"
,
"class_id2_name"
,
"attrs"
,
"ladder_price"
,
"supplier_name"
}
rsp
.
SkuData
=
model
.
SkuFilter
(
*
remoteData
,
field
)
return
}
...
...
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