This commit is contained in:
jiangyong27 2023-04-09 12:21:11 +08:00
parent 957622016a
commit 23ed28e14c
5 changed files with 28 additions and 1 deletions

View File

@ -13,7 +13,7 @@ var (
type Order struct {
Id int64
OrderId string
OrderNo string
StartTime string
StartDate string
TotalPrice int64

View File

@ -56,3 +56,25 @@ func (p *Processor) BidPrice(id int64, price int64) error {
return nil
}
func (p *Processor) QueryBidding() error {
reqUrl := "https://hahapiao.cn/api/Synchro/getOrderList"
header := map[string]interface{}{
"token": p.token,
}
body, err := httputil.HttpPostForm(reqUrl, header, nil)
if err != nil {
log.Error("httpPost error : %s", err.Error())
return err
}
data, err := p.checkError(body)
if err != nil {
return err
}
cast.ToSlice(data)
return nil
}

5
worker/haha/haha_type.go Normal file
View File

@ -0,0 +1,5 @@
package haha
type BidOrder struct {
OrderId int64
}