添加自定义标签

parent c73d8f29
Showing with 23 additions and 14 deletions
......@@ -5,7 +5,7 @@ ShowSQL = false
[spu]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_spu
table_prefix =lie_
type = mysql
......@@ -13,7 +13,7 @@ type = mysql
[liexin_data]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_data
table_prefix =lie_
type = mysql
......@@ -39,7 +39,7 @@ type = mysql
[sku0]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_0
table_prefix =lie_
type = mysql
......@@ -47,7 +47,7 @@ type = mysql
[sku_0]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_0
table_prefix =lie_
type = mysql
......@@ -55,7 +55,7 @@ type = mysql
[sku_1]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_1
table_prefix =lie_
type = mysql
......@@ -63,7 +63,7 @@ type = mysql
[sku_2]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_2
table_prefix =lie_
type = mysql
......@@ -71,7 +71,7 @@ type = mysql
[sku_3]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_3
table_prefix =lie_
type = mysql
......@@ -79,7 +79,7 @@ type = mysql
[sku_4]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_4
table_prefix =lie_
type = mysql
......@@ -87,7 +87,7 @@ type = mysql
[sku_5]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_5
table_prefix =lie_
type = mysql
......@@ -95,7 +95,7 @@ type = mysql
[sku_6]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_6
table_prefix =lie_
type = mysql
......@@ -103,7 +103,7 @@ type = mysql
[sku_7]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_7
table_prefix =lie_
type = mysql
......@@ -111,7 +111,7 @@ type = mysql
[sku_8]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_8
table_prefix =lie_
type = mysql
......@@ -119,7 +119,7 @@ type = mysql
[sku_9]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.238
database = liexin_sku_9
table_prefix =lie_
type = mysql
......
......@@ -18,7 +18,7 @@ type TagsService struct {
const TagZiyingSku = 4
//获取Spu的属性
func (ts *TagsService) GetTags(skuId string,self_supplier_type int64) (goodsTags model.GoodsTag) {
func (ts *TagsService) GetTags(skuId string, self_supplier_type int64) (goodsTags model.GoodsTag) {
redisCon := gredis.Conn("default_r")
defer redisCon.Close()
goodsTagsStr, _ := redis.String(redisCon.Do("HGET", "goods_tag", skuId))
......@@ -39,6 +39,15 @@ func (ts *TagsService) GetTags(skuId string,self_supplier_type int64) (goodsTags
tagNames = append(tagNames, tagName)
tags = append(tags, int(tagResult.Int()))
}
//todo hcy 2023.1.10 增加额外商品标签
customerTag := gjson.Get(goodsTagsStr, "customer_tag").String()
if customerTag != "" {
customerTagArr := php2go.Explode(" ", php2go.Trim(customerTag))
for _, cname := range customerTagArr {
tagNames = append(tagNames, cname)
}
}
}
//如果是自营商品Id,就写死当天发货标签
if len(skuId) < 10 && self_supplier_type == 1 {
......
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