Commit 3b7af208 by huangchengyi

1.0

parent d84018c0
Showing with 2 additions and 1 deletions
......@@ -9,6 +9,7 @@ import (
"github.com/tidwall/gjson"
"search_server/model"
"search_server/pkg/common"
"strings"
"time"
)
......@@ -72,7 +73,7 @@ func OutLinkSource(ctx *gin.Context,goodsName *string) *orderedmap.OrderedMap {
skuIdRes = `{"page":1,"size":20,"pages":2,"total":26,"results":[{"sku":"LM358P-1503747557","mpn":"LM358P","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDIP8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":8,"alternateRiskScore":3,"supplyChainScore":9},{"sku":"LM358PT-1456421550","mpn":"LM358PT","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"STMICROELECTRONICS","manufacturerId":"e-4591","description":"Low-power dual op-amps with low input bias current","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":10,"alternateRiskScore":5,"supplyChainScore":10},{"sku":"LM358PW-1503747554","mpn":"LM358PW","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":7,"alternateRiskScore":5,"supplyChainScore":9},{"sku":"LM358PWR-1512811931","mpn":"LM358PWR","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":8,"alternateRiskScore":5,"supplyChainScore":9},{"sku":"LM358PSR-1512811930","mpn":"LM358PSR","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":9,"alternateRiskScore":3,"supplyChainScore":10},{"sku":"LM358PE4-2094441957","mpn":"LM358PE4","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDIP8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":8,"alternateRiskScore":3,"supplyChainScore":9},{"sku":"LM358PE3-1047246090","mpn":"LM358PE3","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDIP8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":8,"alternateRiskScore":3,"supplyChainScore":9},{"sku":"LM358PWRG3-1047246091","mpn":"LM358PWRG3","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":6,"alternateRiskScore":5,"supplyChainScore":8},{"sku":"LM358PWRG4-JF-8096269880","mpn":"LM358PWRG4-JF","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":6,"alternateRiskScore":5,"supplyChainScore":8},{"sku":"LM358PWRG4-2055588833","mpn":"LM358PWRG4","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":true,"marketAvailabilityScore":6,"alternateRiskScore":5,"supplyChainScore":8},{"sku":"LM358P3-100023793","mpn":"LM358P3","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDIP8","status":"Discontinued","euRohsCompliant":false,"chinaRohsCompliant":false,"reachCompliant":false,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":0,"supplyChainScore":0},{"sku":"LM358-P08-T-1019521684","mpn":"LM358-P08-T","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"UNISONIC TECHNOLOGIES CO.,LTD","manufacturerId":"e-5061","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active-Unconfirmed","euRohsCompliant":false,"chinaRohsCompliant":null,"reachCompliant":true,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":3,"supplyChainScore":0},{"sku":"LM358PP3-100023792","mpn":"LM358P/P3","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDIP8","status":"Discontinued","euRohsCompliant":false,"chinaRohsCompliant":false,"reachCompliant":false,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":0,"supplyChainScore":0},{"sku":"LM358PSLE-1503188880","mpn":"LM358PSLE","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDSO8","status":"Discontinued","euRohsCompliant":null,"chinaRohsCompliant":null,"reachCompliant":null,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":3,"supplyChainScore":0},{"sku":"LM358P-1438416486","mpn":"LM358P","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"STMICROELECTRONICS","manufacturerId":"e-4591","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDSO8","status":"Discontinued","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":5,"supplyChainScore":0},{"sku":"LM358-P08-R-1019521683","mpn":"LM358-P08-R","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"UNISONIC TECHNOLOGIES CO.,LTD","manufacturerId":"e-5061","description":"Operational Amplifier, 2 Func, 7000uV Offset-Max, BIPolar, PDSO8","status":"Active-Unconfirmed","euRohsCompliant":false,"chinaRohsCompliant":null,"reachCompliant":true,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":3,"supplyChainScore":0},{"sku":"LM358PWR-2118477716","mpn":"LM358PWR","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"ROHM CO., LTD.","manufacturerId":"e-4024","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDSO8","status":"Discontinued","euRohsCompliant":true,"chinaRohsCompliant":null,"reachCompliant":true,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":5,"supplyChainScore":0},{"sku":"LM358PT-2118477715","mpn":"LM358PT","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"ROHM CO., LTD.","manufacturerId":"e-4024","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDSO8","status":"Discontinued","euRohsCompliant":true,"chinaRohsCompliant":null,"reachCompliant":true,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":5,"supplyChainScore":0},{"sku":"LM358PWG4-2143868845","mpn":"LM358PWG4","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDSO8","status":"Discontinued","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":true,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":5,"supplyChainScore":0},{"sku":"LM358PSRG4-2065293414","mpn":"LM358PSRG4","categories":[{"name":"Semiconductors"},{"name":"Amplifiers"},{"name":"Operational Amplifiers"},{"name":"OPERATIONAL AMPLIFIER"}],"manufacturer":"Texas Instruments Incorporated","manufacturerId":"e-4832","description":"Operational Amplifier, 2 Func, 9000uV Offset-Max, BIPolar, PDSO8","status":"Discontinued","euRohsCompliant":true,"chinaRohsCompliant":true,"reachCompliant":null,"hasOffers":false,"marketAvailabilityScore":0,"alternateRiskScore":3,"supplyChainScore":0}],"facets":{"manufacturers":[{"value":"e-4832","label":"Texas Instruments Incorporated","count":18},{"value":"e-4024","label":"ROHM CO., LTD.","count":4},{"value":"e-4591","label":"STMICROELECTRONICS","count":2},{"value":"e-5061","label":"UNISONIC TECHNOLOGIES CO.,LTD","count":2}],"rohsCompliance":[{"value":"true","label":"true","count":20},{"value":"false","label":"false","count":6}],"statuses":[{"value":"Discontinued","label":"Discontinued","count":13},{"value":"Active","label":"Active","count":10},{"value":"Active-Unconfirmed","label":"Active-Unconfirmed","count":3}]},"_links":{"schema":{"href":"/api/schemas/part-search.json"}}}`;
} else {
skuIdRes = GetSourceGineData(ctx,fmt.Sprintf(SourceSkuIdUrl,*goodsName)) //查询得到所有的sku->goods_sn
skuIdRes = GetSourceGineData(ctx,fmt.Sprintf(SourceSkuIdUrl,strings.ToUpper(*goodsName))) //查询得到所有的sku->goods_sn
}
common.PrintDebugHtml(ctx,"原始数据:" + skuIdRes)
if skuIdRes == "" {
......
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