Commit 61058135 by huangchengyi

1.0

parent 66b5a684
The file could not be displayed because it is too large.
package main
import (
"github.com/micro/go-micro/v2"
)
func main() {
cService:=micro.NewService(
micro.Name("go.micro.grpc.search"))
cService.Init()
}
\ No newline at end of file
package main1
import (
"encoding/json"
"flag"
"fmt"
"go_sku_server/boot"
"go_sku_server/service/query"
"os"
"github.com/tidwall/gjson"
)
func main() {
//MouserService := service.NewMouserServiceImpl()
//MouserGetData(MouserService)
var path string
flag.StringVar(&path, "config", "conf", "配置文件")
flag.Parse()
if err := boot.Boot(path); err != nil {
panic(err)
}
//lock_key := "searchapi_668777";
////flag := gredis.Set(lock_key,php2go.Time()+2)
//flag,_ := gredis.Setnx(lock_key,2222)
//
//fmt.Println(flag)
//os.Exit(1)
//redisConn := gredis.Conn("search_r")
//defer redisConn.Close()
//attrName, err := gredis.String(redisConn.Do("GET", "hcy1"))
//
//fmt.Println(err)
//fmt.Println(attrName)
//os.Exit(1)
//ss := "LM358"
//mouserRes := service.OutLink(&ss,"-1")
//for k, mouseItem := range mouserRes {
// fmt.Println(k)
// fmt.Println(mouseItem.PriceTemp)
// os.Exit(1)
//}
//fmt.Errorf()
println(query.GetExactGoodsQuery("nninin"))
jsonstr := `{"goods_id":1156147221172418504,"goods_sn":"","spu_id":"2156147221162468806","update_time":1561472211,"goods_status":3,"goods_name":"RC0603FR-07100KL","goods_type":2,"supplier_id":17,"encoded":"10059","batch_sn":"1148","moq":27961,"mpq":1,"stock":1765,"hk_delivery_time":"","cn_delivery_time":"4\u4e2a\u5de5\u4f5c\u65e5","goods_details":"","ladder_price":[{"purchases":2765,"price_cn":0.01072951425,"price_us":0},{"purchases":45654,"price_cn":0.343434,"price_us":6666}],"goods_images":"","canal":"L0000110","cp_time":0}`
m, ok := gjson.Parse(jsonstr).Value().(map[string]interface{})
if !ok {
fmt.Println(ok)
os.Exit(1)
}
goods_id := gjson.Get(jsonstr, "goods_id").String()
ladder := gjson.Get(jsonstr, "ladder_price").Array()
temp1 := []map[string]float64{}
for _, value := range ladder {
b := value.Map()
temp1 = append(temp1, map[string]float64{
"purchases": b["purchases"].Float(),
"price_cn": b["price_cn"].Float(),
"price_us": b["price_us"].Float(),
})
}
//fmt.Println(ladder)
//
m["goods_id"] = goods_id
m["ladder_price"] = temp1
dd, _ := json.Marshal(m)
fmt.Println(string(dd))
//lines := []string{
// `{"index":{"_index":"hcy1","_type":"goods","_id":"s1"} }`,
// `{"name":"john doe","age":25 }`,
// `{"index":{"_index":"hcy1","_type":"goods","_id":"s2"} }`,
// `{"name":"mary smith","age":32 }`,
//}
//param := strings.Join(lines, "\n")+"\n"
//
//result,err := es.BulkES(param)
//println(result,err)
//var skuEsUpdataList []string
//
//param := map[string]interface{}{
// "goods_status":1,
// "status":1,
// "encoded": "{'ddd'}",
//}
//
//paramjson,_ := json.Marshal(param)
//
//skuEsUpdataList = append(skuEsUpdataList,string(paramjson))
//skuEsUpdataList = append(skuEsUpdataList,string(paramjson))
//
//
//println(strings.Join(skuEsUpdataList,"\n"))
os.Exit(1)
}
//xml := strings.NewReader(resp)
//json, err := xj.Convert(xml)
//if err != nil {
// panic("That's embarrassing...")
//}
//
//json_str := json.String();
////ss := gjson.Get(json_str,"hello").String()
//
//fmt.Println(json_str)
;总配置信息
[web]
port = 9000
mode = debug
cors_domain = http://bom.liexin.com
[message]
api_domain = http://api.ichunt.com/msg/sendMessageByAuto
api_md5_str = fh6y5t4rr351d2c3bryi
;钉钉配置信息
[DINGDING]
SEARCH_API_MONITOR = 6d0fa85e01a02c39347d011ae973fd21b76c6c7ce582d3ea470c6b65a318848d
;存放数据库连接信息
[gorm]
mode = debug
[spu]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.235
database = liexin_spu
table_prefix =lie_
type = mysql
......@@ -12,7 +13,7 @@ type = mysql
[liexin_data]
user_name = spu
password = spu
host = 192.168.1.234
host = 192.168.1.235
database = liexin_data
table_prefix =lie_
type = mysql
......
;存放mongodb连接信息
[mongo]
host = 192.168.1.237:27017
username = "ichunt"
password = "huntmon6699"
database = ichunt
maxPoolSize=100
\ No newline at end of file
;存放rabmq连接信息
[rabmq]
url = amqp://guest:guest@192.168.2.232:5672/
;存放本系统所有的队列名称
[rabmq_all]
; bom任务id
MQ_BOM_ITEMS_LIST=bom_items_list
; bom更新数据队列
MQ_BOM_SKU_LIST=bom_sku_list
;联营数据更新-推送入队列-》go后台任务消费(斌哥脚本)
SEARCH_SKU_UPDATE_LIST=search_sku_update_list
;联营数据新增-推送入队列-》go后台任务消费(斌哥脚本)
SEARCH_SKU_LIST=search_sku_list
; bom任务id
ZIYING_MQ_BOM_ITEMS_LIST=ziying_bom_items_list
; bom更新数据队列
ZIYING_MQ_BOM_SKU_LIST=ziying_bom_sku_list
\ No newline at end of file
;redis连接信息
[default_redis_read]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 2000
max_active = 3000
idle_timeout = 20
[default_redis_write]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 2000
max_active = 3000
idle_timeout = 20
[api_redis]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 2000
idle_timeout = 20
\ No newline at end of file
;存放redis所有键
[redis_all]
\ No newline at end of file
;总配置信息
[web]
port = 9000
mode = debug
cors_domain = http://bom.liexin.com
[message]
api_domain = http://api.ichunt.com/msg/sendMessageByAuto
api_md5_str = fh6y5t4rr351d2c3bryi
;钉钉配置信息
[DINGDING]
SEARCH_API_MONITOR = 6d0fa85e01a02c39347d011ae973fd21b76c6c7ce582d3ea470c6b65a318848d
[web]
port = 9000
mode = debug
cors_domain = http://bom.liexin.com
[message]
api_domain = http://api.ichunt.com/msg/sendMessageByAuto
api_md5_str = fh6y5t4rr351d2c3bryi
[goods]
api_url = http://192.168.2.232:60004
sz_api_url = http://192.168.2.232:60004
[es]
url = http://192.168.2.232:9200
urls = http://192.168.2.232:9200,http://192.168.2.232:9200
index_name = future,rochester,tme,verical,element14,digikey,chip1stop,aipco,arrow,alliedelec,avnet,mouser,zhuanmai,peigenesis,powell,rs,buerklin,liexin_ziying
search_supplier = future,rochester,tme,verical,element14,digikey,chip1stop,aipco,arrow,alliedelec,avnet,mouser,peigenesis,powell,rs,buerklin,zhuanmai
hk_delivery_type_supplier = future,rochester,tme,verical,element14,digikey,chip1stop,aipco,arrow,alliedelec,avnet,mouser,peigenesis,powell,rs,buerklin
attr_index = goods_map
[database]
user_name = root
password = root
host = 192.168.2.239
database = test
table_prefix =
type = mysql
[mongo]
host = 192.168.1.237:27017
username = "ichunt"
password = "huntmon6699"
database = ichunt
maxPoolSize=100
[ZIYING_CACHE]
is_no_ziying_cache=true
#是否是测试环境
[IS_SZ]
is_sz = true
#自营mongodb缓存表 正式线ziying_class_aggs
[AGG_TABLE]
agg_table = sz_ziying_class_aggs
#自营mongodb缓存表 正式线 ziying_first_lists
[FIRSTLISTS_TABLE]
firstLists_table = sz_ziying_first_lists
\ No newline at end of file
;存放数据库连接信息
[gorm]
mode = debug
[spu]
user_name = spu
password = spu
host = 192.168.1.235
database = liexin_spu
table_prefix =lie_
type = mysql
[liexin_data]
user_name = spu
password = spu
host = 192.168.1.235
database = liexin_data
table_prefix =lie_
type = mysql
#线上地址
#SupDbUser:Supssy2@@!!@$#yxy@172.18.137.21:3306/liexin_supp
[supp]
user_name = liexin_ass
password = `liexin_ass#zsyM`
host = 192.168.2.232
database = liexin_ass
table_prefix =lie_
type = mysql
[cms]
user_name = ichuntcms
password = `ichuntcms#zsyM`
host = 192.168.2.232
database = ichuntcms
table_prefix =
type = mysql
[DINGDING]
SEARCH_API_MONITOR = 6d0fa85e01a02c39347d011ae973fd21b76c6c7ce582d3ea470c6b65a318848d
\ No newline at end of file
;存放mongodb连接信息
[mongo]
host = 192.168.1.237:27017
username = "ichunt"
password = "huntmon6699"
database = ichunt
maxPoolSize=100
\ No newline at end of file
;存放rabmq连接信息
[rabmq]
url = amqp://guest:guest@192.168.2.232:5672/
;存放本系统所有的队列名称
[rabmq_all]
; bom任务id
MQ_BOM_ITEMS_LIST=bom_items_list
;redis连接信息
[default_redis_read]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 3000
idle_timeout = 20
[default_redis_write]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 3000
idle_timeout = 20
;存放redis所有键
[redis_all]
\ No newline at end of file
;存放本系统所有的redis键值对和解析
[redis_all]
;供应商redis的首key
SUPPLIER_REDIS_PRE=SUPPLIER_REDIS_INFO_
;需要展示的供应商列表
SUPPLIER_REDIS_LIST_PRE=SUPPLIER_REDIS_LIST_INFO_
;新增sku时判读sku是否存在
SKU_UNIQUE_JUDGE=sku_unique_judge
;新增sku时判读sku是否存在
SPU_UNIQUE_JUDGE=spu_unique_judge
;品牌信息判断,根据md5后的品牌名称获取id
BRAND_NAME_ALL=brand_name_all
;所有联营sku缓存
SKU=sku
;所有联营spu缓存
SPU=spu
;品牌id,获取品牌名称
BRAND=brand
;供应商品牌信息判断,存在多对一的情况,根据md5后的品牌名称获取标准品牌id
SUPPLIER_BRAND_ALL=supplier_brand_all
;统计调用外联接口的次数的key的前缀 后面接mouser、verical、arrow、master
SEARCH_API_TOTAL_PRE=search_api_total_
;统计调用外联接口失败的次数的key的前缀 后面接mouser、verical、arrow、master
SEARCH_API_ERORR_PRE=search_api_overtime_
;曝光时间记录哈希集合
SEARCH_SHOW_SKU_TIME=search_show_sku_time
;获取关税信息,根据goods_name,brand_name获取
TAX_CUSTOMS_INFO=tax_customs_info
;存放联营外链原始映射
SKU_RAW_MAP=sku_raw_map
;digikey秘钥
digikey_access_token=digikey_access_token
;查属性id获取属性名称 ,表 lie_class_attr eg: hget("class_attr_by_id",101) = "容差"
class_attr_by_id = class_attr_by_id
;查属名称性获取属性id ,对应表 lie_class_attr eg: hget("class_attr_by_val", "容差") = 101
class_attr_by_val=class_attr_by_val
;查 参数值id 获取 参数值,表lie_class_attr_value eg: hget("class_attr_value_by_id",65) = "1.8W"
class_attr_value_by_id=class_attr_value_by_id
;查 参数值 获取 参数id,表lie_class_attr_value eg: hget("class_attr_value_by_val", "1.8W") = 65
class_attr_value_by_val=class_attr_value_by_val
[redis_ziyin]
AGG_TABLE=sz_ziying_class_aggs
FIRST_LISTS_TABLE=ziying_first_lists
ZIYING_CLASS_KEY=ziying_class_string
TAX_CUSTOMS_INFO=tax_customs_info
;存放联营所有sku
SKU=sku
;存放联营所有spu
SPU=SPU
;存放digikey 型号映射
SKU_RAW_MAP=sku_raw_map
POOL_ALIKE_GOODS=pool_alike_goods
[blacklist_type]
1 = invoice
2 = special_invoice
3 = user_id
4 = mobile
5 = email
\ No newline at end of file
;总配置信息
[web]
port = 9000
mode = debug
cors_domain = http://bom.liexin.com
[message]
api_domain = http://api.ichunt.com/msg/sendMessageByAuto
api_md5_str = fh6y5t4rr351d2c3bryi
;钉钉配置信息
[DINGDING]
SEARCH_API_MONITOR = 6d0fa85e01a02c39347d011ae973fd21b76c6c7ce582d3ea470c6b65a318848d
[web]
port = 10001
mode = release
cors_domain = https://bom.ichunt.com
domain = ichunt.com
[message]
api_domain = http://api.ichunt.com/msg/sendMessageByAuto
api_md5_str = fh6y5t4rr351d2c3bryi
[goods]
api_url = http://47.106.60.211:60004
sz_api_url = http://47.106.60.211:60004
[es]
url = http://172.18.137.29:9211
urls = http://172.18.137.29:9211,http://172.18.137.30:9211
index_name = future,rochester,tme,verical,element14,digikey,chip1stop,aipco,arrow,alliedelec,avnet,mouser,zhuanmai,peigenesis,powell,rs,buerklin,liexin_ziying
search_supplier = future,rochester,tme,verical,element14,digikey,chip1stop,aipco,arrow,alliedelec,avnet,mouser,peigenesis,powell,rs,buerklin,zhuanmai
hk_delivery_type_supplier = future,rochester,tme,verical,element14,digikey,chip1stop,aipco,arrow,alliedelec,avnet,mouser,peigenesis,powell,rs,buerklin
attr_index = goods_map
[redis]
write_host = 172.18.137.38:6379
read_host = 172.18.137.39:6379
write_password = icDb29mLy2s
read_password = icDb29mLy2s
max_idle = 10
max_active = 10
idle_timeout = 20
[mongo]
host = 172.18.137.23:27017
username = "ichunt"
password = "huntmon66499"
database = ichunt
maxPoolSize=100
[ZIYING_CACHE]
is_no_ziying_cache=true
#是否是测试环境
[IS_SZ]
is_sz = false
#自营mongodb缓存表 正式线ziying_class_aggs
[AGG_TABLE]
agg_table = ziying_class_aggs
#自营mongodb缓存表 正式线 ziying_first_lists
[FIRSTLISTS_TABLE]
firstLists_table = ziying_first_lists
\ No newline at end of file
;存放数据库连接信息
[gorm]
mode = debug
[spu]
user_name = spu
password = spu
host = 192.168.1.235
database = liexin_spu
table_prefix =lie_
type = mysql
[liexin_data]
user_name = spu
password = spu
host = 192.168.1.235
database = liexin_data
table_prefix =lie_
type = mysql
#线上地址
#SupDbUser:Supssy2@@!!@$#yxy@172.18.137.21:3306/liexin_supp
[supp]
user_name = liexin_ass
password = `liexin_ass#zsyM`
host = 192.168.2.232
database = liexin_ass
table_prefix =lie_
type = mysql
[cms]
user_name = ichuntcms
password = `ichuntcms#zsyM`
host = 192.168.2.232
database = ichuntcms
table_prefix =
type = mysql
[gorm]
mode = debug
#线上地址
#mysql://LxiCSpu:Mysx3Tyzlo00oxlmlly@172.18.137.29:3306
[spu]
user_name = LxiCSpu
password = Mysx3Tyzlo00oxlmlly
host = 172.18.137.29
database = liexin_spu
table_prefix =lie_
type = mysql
#线上地址
#SupDbUser:Supssy2@@!!@$#yxy@172.18.137.21:3306/liexin_supp
[supp]
user_name = SupDbUser
password = `Supssy2@@!!@$#yxy`
host = 172.18.137.21
database = liexin_supp
table_prefix =lie_
type = mysql
#线上地址
#mysql://dtuserread:dAtaL#ym2902m2lLX2y33@172.18.137.22:3306/icdata#utf8
[cms]
user_name = dtuser
password = `dAtaL#ym2902m2lLX2y33`
host = appdb-master.ichunt.db
database = icdata
table_prefix =
type = mysql
[DINGDING]
SEARCH_API_MONITOR = cd1661d0ce733a8ff0b603b532b317aae9de6dbaf39186b0352f272e47a860e8
\ No newline at end of file
;存放mongodb连接信息
[mongo]
host = 192.168.1.237:27017
username = "ichunt"
password = "huntmon6699"
database = ichunt
maxPoolSize=100
\ No newline at end of file
;存放rabmq连接信息
[rabmq]
url = amqp://guest:guest@192.168.2.232:5672/
;存放本系统所有的队列名称
[rabmq_all]
; bom任务id
MQ_BOM_ITEMS_LIST=bom_items_list
[rabmq]
url = amqp://huntweb:xMtMi29zTm@119.23.79.136:5672/
;存放本系统所有的队列名称
[rabmq_all]
; bom任务id
MQ_BOM_ITEMS_LIST=bom_items_list
; bom更新数据队列
MQ_BOM_SKU_LIST=bom_sku_list
;联营数据更新-推送入队列-》go后台任务消费(斌哥脚本)
SEARCH_SKU_UPDATE_LIST=search_sku_update_list
;联营数据新增-推送入队列-》go后台任务消费(斌哥脚本)
SEARCH_SKU_LIST=search_sku_list
; bom任务id
ZIYING_MQ_BOM_ITEMS_LIST=ziying_bom_items_list
; bom更新数据队列
ZIYING_MQ_BOM_SKU_LIST=ziying_bom_sku_list
\ No newline at end of file
;redis连接信息
[default_redis_read]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 3000
idle_timeout = 20
[default_redis_write]
host = 192.168.1.235:6379
password = icDb29mLy2s
max_idle = 5000
max_active = 3000
idle_timeout = 20
;存放redis所有键
[redis_all]
\ No newline at end of file
[default_redis_read]
host = 172.18.137.39:6379
password = icDb29mLy2s
max_idle = 50
max_active = 100
idle_timeout = 20
[default_redis_write]
host = 172.18.137.38:6379
password = icDb29mLy2s
max_idle = 50
max_active = 100
idle_timeout = 20
[api_redis_read]
host = 172.18.137.38:6379
password = icDb29mLy2s
max_idle = 50
max_active = 100
idle_timeout = 20
[api_redis_write]
host = 172.18.137.39:6379
password = icDb29mLy2s
max_idle = 50
max_active = 100
idle_timeout = 20
;存放本系统所有的redis键值对和解析
[redis_all]
;供应商redis的首key
SUPPLIER_REDIS_PRE=SUPPLIER_REDIS_INFO_
;需要展示的供应商列表
SUPPLIER_REDIS_LIST_PRE=SUPPLIER_REDIS_LIST_INFO_
;新增sku时判读sku是否存在
SKU_UNIQUE_JUDGE=sku_unique_judge
;新增sku时判读sku是否存在
SPU_UNIQUE_JUDGE=sku_unique_judge
;品牌信息判断,根据md5后的品牌名称获取id
BRAND_NAME_ALL=brand_name_all
;品牌id,获取品牌名称
BRAND=brand
;供应商品牌信息判断,存在多对一的情况,根据md5后的品牌名称获取标准品牌id
SUPPLIER_BRAND_ALL=supplier_brand_all
;统计调用外联接口的次数的key的前缀 后面接mouser、verical、arrow、master
SEARCH_API_TOTAL_PRE=search_api_total_
;统计调用外联接口失败的次数的key的前缀 后面接mouser、verical、arrow、master
SEARCH_API_ERORR_PRE=search_api_overtime_
;曝光时间记录哈希集合
SEARCH_SHOW_SKU_TIME=search_show_sku_time
;获取关税信息,根据goods_name,brand_name获取
TAX_CUSTOMS_INFO=tax_customs_info
;存放联营外链原始映射
SKU_RAW_MAP=sku_raw_map
[redis_ziyin]
AGG_TABLE=sz_ziying_class_aggs
FIRST_LISTS_TABLE=ziying_first_lists
ZIYING_CLASS_KEY=ziying_class_string
TAX_CUSTOMS_INFO=tax_customs_info
;存放联营所有sku
SKU=sku
;存放联营所有spu
SPU=SPU
;存放digikey 型号映射
SKU_RAW_MAP=sku_raw_map
POOL_ALIKE_GOODS=pool_alike_goods
[SUPPLIER_ALL]
1 = future
2 = powerandsignal
3 = rochester
4 = tme
5 = verical
6 = element14
7 = digikey
8 = chip1stop
9 = aipco
10 = arrow
11 = bisco
12 = alliedelec
13 = avnet
14 = mouser
15 = company
16 = liexin_lianying1
17 = zhuanmai
18 = liexin_ti
19 = peigenesis
20 = powell
21 = rs
22 = liexin_sell
100 = ziying
101 = liexin_jingdiao
1672 = master
1673 = rutronik
1675 = corestaff
1676 = buerklin
1677 = microchip
1678 = heilind
1680 = wpg
1681 = jameco
1679 = ti
1684 = distrelec
1685 = tlc
1686 = adi
#搜索结果页合并供应商
[SEARCH_SUPPLIER_MERGE]
1 = future
3 = rochester
6 = element14
#7 = digikey
8 = chip1stop
9 = aipco
12 = alliedelec
13 = avnet
19 = peigenesis
20 = powell
21 = rs
1675 = corestaff
1677 = microchip
1678 = heilind
1680 = wpg
1681 = jameco
1679 = ti
1684 = distrelec
1685 = tlc
1686 = adi
#相似物料供应商
[ALIKE_SUPPLIER]
1 = ti
[common]
MOUSER_API = 'http://footstone.liexin.net/webapi/handle_mouser'
[BRAND]
IS_NOT_TI = 0
TI_LY_BRAND_IDS = 23,45069,7754,17484,43215,13421,5220,7636,44534,43556,44543,9429,758,9470,10430,10653,10707,11227,11276,11819,12608,12965,12997,13327,13675,13680,13752
TI_ZY_BRAND_IDS = 23
[supplier]
# 供应商redis的首key
SUPPLIER_REDIS_PRE = SUPPLIER_REDIS_INFO_
[ZIYING_BRAND_REPLACE]
FH = FH(风华)
BL = BL(上海贝岭)
TE = TE(泰科)
FM = FM(富满)
CJ = CJ(长电)
ST = ST(意法)
SK = SK(时科)
ON = ON(安森美)
TM = TM(天微)
TP = TP(拓微)
TI = TI(德州仪器)
MD = MD(明达)
EG = EG(屹晶微)
HF = HF(宏发)
DY = DY(迪一)
MK = MK(米客方德)
国民 = Nationz(国民技术)
中芯 = SMIC(中芯国际)
富士 = Fuji Electric(富士电机)
国星 = Nationstar(国星光电)
贝岭 = BL(上海贝岭)
[ZIYING_CONFIG]
Index = liexin_ziying
[SEARCH_KEYWORD_MAPPING]
`^(.* )?([\d\.]+)(欧|欧姆|R|r)( .*)?$` = ${1}${2}Ω${4}
`^(.* )?([\d\.]+)(U|u|μ)(.?)( .*)?$` = ${1}${2}Μ${4}${5}
`COG` = C0G
`NPO` = NP0
`华科|华新科技|华新科` = 华新
[mathExactGoodsName]
0=M7
1=M1
2=M4
3=M2
4=A7
5=F7
6=X2
7=G4
8=X4
9=m7
10=m1
11=m4
12=m2
13=a7
14=f7
15=x2
16=g4
17=x4
;自营以某些单位进行搜索时,进行特殊处理
[ZIYING_MEASURE]
0=kΩ
1=uf
2=v
3=kg
4=MHz
5=pf
6=pin
7=ppm
8=kw
[OFFICIAL_WEBSITE]
1 = https://www.futureelectronics.cn/search/?text=liexin
2 = http://www.powerandsignal.com/Products/Search?searchBox=liexin
3 = https://www.rocelec.com/search?q=liexin
4 = https://www.tme.eu/zh/katalog/#search=liexin
5 = https://www.verical.com/s/liexin/
6 = https://cn.element14.com/search?st=liexin
7 = https://www.digikey.com/products/en?keywords=liexin
8 = https://www.chip1stop.com/CHN/zh/view/searchResult/SearchResultTop?keyword=liexin
9 = http://www.aipco.com/search.php?pn=liexin
10 = https://www.arrow.com/en/products/search?cat=&q=liexin
11 = https://www.biscoind.com?SEARCHTEXT=liexin
12 = https://www.alliedelec.com/view/search?keyword=liexin
13 = https://www.avnet.com/shop/apac/search/liexin
14 = https://www.mouser.com/Search/Refine?Keyword=liexin
15 =
16 =
18 =
19 = https://www.peigenesis.cn/cn/shop/f/liexin.html
20 = https://www.powell.com/e2wItemQuickSearch.aspx?searchText=liexin
21 = https://uk.rs-online.com/web/c/semiconductors/amplifiers-comparators/op-amps/?searchTerm=liexin
22 =
1672 = https://www.masterelectronics.com/parts.aspx?text=liexin
1673 = https://www.rutronik24.com/search-result/qs:liexin
1675 = https://www.zaikostore.com/zaikostore/stockList?productName_forFind=liexin
1676 = https://www.buerklin.com/en/search?text=liexin
1677 = https://www.microchipdirect.com/product/search/all/liexin
1678 = https://estore.heilindasia.com/search.asp?p=liexin
1680 = http://shop.wpgam.com/WPGAStore/index.php?route=product/search&filter_description=true&filter_name=liexin
[AUTH]
SUPER_AUTH_KEY = fh6y5t4rr351d2c3bryi
SEARCH_TOKEN_EXPIRE_TIME = 30
[UNIT_SUPPLIER_LOG_CODE]
333333 = arrow
444444 = master
555555 = mouser
666666 = verical
777777 = tme
888888 = buerklin
999999 = zhuanmai
[SEARCH_API_LOG]
SEARCH_API_ERROR_PRE = search_api_overtime_
package middleware
import (
"github.com/gin-contrib/cors"
"github.com/gin-gonic/gin"
"go_sku_server/pkg/config"
"time"
)
func Cors() gin.HandlerFunc {
corsDomain := config.Get("web.cors_domain").Strings(",")
corsDomain = append(corsDomain, "https://bom.ichunt.com")
corsDomain = append(corsDomain, "https://bom.ichunt.com")
return cors.New(cors.Config{
AllowOrigins: corsDomain,
AllowMethods: []string{"POST", "GET", "PUT", "DELETE"},
AllowCredentials: true,
MaxAge: 12 * time.Hour,
})
}
......@@ -11,8 +11,7 @@ var (
func SetUp(path string) (err error) {
//引入多个文件
Cfg, err = ini.LooseLoad(path+"/config.ini", path+"/search.ini", path+"/redis_key.ini", path+"/rabmq_key.ini", path+"/database.ini",
path+"/redis_config.ini", path+"/message.ini")
Cfg, err = ini.LooseLoad(path+"/config.ini", path+"/database.ini", path+"/redis.ini", path+"/rabmq.ini", path+"/mongo.ini")
return
}
......
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