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
0f7d1c1a
authored
Nov 10, 2025
by
hcy
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
并发问题
parent
01398960
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
11 deletions
conf/dev/redis.ini
service/service_spu.go
conf/dev/redis.ini
View file @
0f7d1c1a
...
...
@@ -2,14 +2,14 @@
[default_redis_read]
host
=
redis.liexindev.me:6379
password
=
icDb29mLy2s
max_idle
=
2
000
max_idle
=
5
000
max_active
=
5000
idle_timeout
=
20
[default_redis_write]
host
=
redis.liexindev.me:6379
password
=
icDb29mLy2s
max_idle
=
2
000
max_idle
=
5
000
max_active
=
5000
idle_timeout
=
20
...
...
service/service_spu.go
View file @
0f7d1c1a
...
...
@@ -165,19 +165,21 @@ func (ss *SpuService) SetInit(redisLySkuArr, redisLySpuArr map[string]string, zy
//批量获取标签b
GoodsLabelTags
=
gredis
.
Hmget
(
"default_r"
,
"goods_label_tags"
,
[]
string
{
"0"
,
"1"
,
"2"
,
"3"
,
"4"
,
"5"
,
"6"
})
var
wg
sync
.
WaitGroup
//BatchErpTax(erpMd5Key) //批量查询品牌
var
wg
sync
.
WaitGroup
//
wg
.
Add
(
1
)
go
func
()
{
defer
wg
.
Done
()
BatchLyClassName
(
ClassIds
)
//批量查询分类
}()
wg
.
Add
(
1
)
go
func
()
{
defer
wg
.
Done
()
BatchErpTax
(
erpMd5Key
)
//批量查询品牌
}()
//
//
wg.Add(1)
//
go func() {
//
defer wg.Done()
//
BatchErpTax(erpMd5Key) //批量查询品牌
//
}()
wg
.
Add
(
1
)
go
func
()
{
...
...
@@ -231,12 +233,13 @@ func BatchErpTax(upmd5Str []string) {
AllErpTax
=
make
(
map
[
string
]
interface
{},
0
)
for
md5k
,
info
:=
range
taxArr
{
data
:=
make
(
map
[
string
]
interface
{})
AllErpTax
[
md5k
]
=
false
if
info
!=
""
{
if
gjson
.
Get
(
info
,
"tax_rate_low"
)
.
String
()
!=
""
||
gjson
.
Get
(
info
,
"supervision_con"
)
.
Int
()
>
0
{
data
[
"tariffRate"
]
=
gjson
.
Get
(
info
,
"tax_rate_low"
)
.
String
()
data
[
"types"
]
=
gjson
.
Get
(
info
,
"supervision_con"
)
.
String
()
AllErpTax
[
md5k
]
=
data
}
else
{
AllErpTax
[
md5k
]
=
false
}
}
}
}
...
...
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