Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
search_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
269b9a70
authored
Jul 03, 2020
by
mushishixian
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
fix
parent
6e52de3a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
21 deletions
service/bom_service.go
service/common_ly_service.go
test/test.go
service/bom_service.go
View file @
269b9a70
...
@@ -101,7 +101,7 @@ func Recommend(req *common.RecommendRequest) (rsp *common.BomResponse) {
...
@@ -101,7 +101,7 @@ func Recommend(req *common.RecommendRequest) (rsp *common.BomResponse) {
goodsIdList
=
append
(
goodsIdList
,
goodsId
)
goodsIdList
=
append
(
goodsIdList
,
goodsId
)
}
}
goodsIdListStr
=
strings
.
Join
(
goodsIdList
,
","
)
goodsIdListStr
=
strings
.
Join
(
goodsIdList
,
","
)
goodsList
,
err
:=
GetGoodsInfoByApi
(
goodsIdListStr
,
1
)
goodsList
,
err
:=
GetGoodsInfoByApi
(
goodsIdListStr
,
1
)
response
.
Data
=
goodsList
response
.
Data
=
goodsList
response
.
Flag
=
req
.
Flag
response
.
Flag
=
req
.
Flag
return
&
response
return
&
response
...
...
service/common_ly_service.go
View file @
269b9a70
package
service
package
service
import
(
import
(
<<<<<<<
Updated
upstream
"fmt"
"fmt"
"github.com/syyongx/php2go"
"github.com/syyongx/php2go"
_
"github.com/tidwall/gjson"
_
"github.com/tidwall/gjson"
"search_server/model"
"search_server/model"
"search_server/pkg/config"
"search_server/pkg/config"
"strings"
"strings"
=======
_
"github.com/tidwall/gjson"
"search_server/model"
>>>>>>>
Stashed
changes
)
)
//关键词搜索过期时间
//关键词搜索过期时间
...
@@ -39,6 +44,7 @@ func getSkuByGoodsSn(goods_list map[string]*model.LyClearGoodsList, supplier_inf
...
@@ -39,6 +44,7 @@ func getSkuByGoodsSn(goods_list map[string]*model.LyClearGoodsList, supplier_inf
//
//
//fmt.Println(productList)
//fmt.Println(productList)
//return productList
//return productList
<<<<<<<
Updated
upstream
originGoods
:=
make
(
map
[
string
]
interface
{},
0
)
originGoods
:=
make
(
map
[
string
]
interface
{},
0
)
sku_uique_judge
:=
config
.
Get
(
"redis_all.SKU_UNIQUE_JUDGE"
)
.
String
()
sku_uique_judge
:=
config
.
Get
(
"redis_all.SKU_UNIQUE_JUDGE"
)
.
String
()
...
@@ -61,6 +67,9 @@ func getSkuByGoodsSn(goods_list map[string]*model.LyClearGoodsList, supplier_inf
...
@@ -61,6 +67,9 @@ func getSkuByGoodsSn(goods_list map[string]*model.LyClearGoodsList, supplier_inf
fmt
.
Println
(
originGoods
)
fmt
.
Println
(
originGoods
)
return
originGoods
return
originGoods
=======
return
nil
>>>>>>>
Stashed
changes
}
}
/*
/*
...
...
test/test.go
View file @
269b9a70
...
@@ -3,7 +3,6 @@ package main
...
@@ -3,7 +3,6 @@ package main
import
(
import
(
"flag"
"flag"
"fmt"
"fmt"
"github.com/tidwall/gjson"
"search_server/boot"
"search_server/boot"
"search_server/pkg/mysql"
"search_server/pkg/mysql"
)
)
...
@@ -24,23 +23,4 @@ func main() {
...
@@ -24,23 +23,4 @@ func main() {
//mysql.Connection()("bom").Table("bin").Find(&result)
//mysql.Connection()("bom").Table("bin").Find(&result)
fmt
.
Println
(
result
)
fmt
.
Println
(
result
)
//fmt.Println(model.GetExcludeBrandIds(1))
//fmt.Println(model.GetExcludeBrandIds(1))
<<<<<<<
Updated
upstream
=======
fmt
.
Println
(
config
.
GetSectionValues
(
"supplier_all"
))
fmt
.
Println
(
config
.
Cfg
.
Section
(
"supplier_all"
)
.
Key
(
"1"
))
fmt
.
Println
(
gjson
.
Get
(
`{"is_new",-1}`
,
"is_new"
)
.
Bool
())
>>>>>>>
Stashed
changes
//client := client.
//c := course.NewCourseService("go.micro.api.jtthink.course", client)
//course_rsp, _ := c.ListForTop(context.TODO(), &course.ListRequest{Size: 10})
//fmt.Println(course_rsp.Result)
type
Result2
struct
{
BusinessName
string
`json:"business_name"`
}
var
result2
[]
Result2
mysql
.
Connection
(
"mysql"
)
.
Raw
(
"SELECT * FROM lie_business"
)
.
Scan
(
&
result2
)
//mysql.GetDB("bom").Table("bin").Find(&result)
fmt
.
Println
(
result2
)
}
}
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