mirror of http://gitlab.batiao8.com/yic/film.git
token2
This commit is contained in:
parent
7fbfe986b1
commit
060a6667bb
|
@ -1,22 +1,20 @@
|
|||
[server]
|
||||
address = "0.0.0.0:9263"
|
||||
#0:PAINC 1:FATAL 2:ERROR 3:WARNING 4:INFO 5:DEBUG 6:TRACE
|
||||
log_level = 4
|
||||
log_level = 5
|
||||
|
||||
|
||||
[mysql]
|
||||
host = "100.118.29.74"
|
||||
port = 3307
|
||||
host = "14.22.116.197"
|
||||
port = 9305
|
||||
user = "film"
|
||||
pass = "7VCfJx7H8MymUm"
|
||||
db = "film"
|
||||
|
||||
|
||||
[weixin]
|
||||
qiye_appid = "ww288920bd3e8c92b2"
|
||||
qiye_secret = "3aqE6LAEKLiGtYBtX7TZm0uY_YD52w3R20AQirSICXY"
|
||||
qiye_agent = "1000013"
|
||||
receiver = ["jiangyong", "zhangping"]
|
||||
|
||||
[film]
|
||||
haha_token = "d6847dfbd7b79bc18709e0311fd7813b"
|
||||
dadi_token = "321566:7b84a0b1-832a-4492-a96a-23002d6c8715"
|
|
@ -14,6 +14,7 @@ import (
|
|||
"io"
|
||||
"net/http"
|
||||
"net/url"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
|
@ -75,8 +76,8 @@ func (s *SyncOrder) run() {
|
|||
return
|
||||
}
|
||||
var arrs []interface{}
|
||||
if err := json.Unmarshal([]byte(originText), &arrs); err != nil {
|
||||
log.Errorf("json.Unmarsha error :%s", err.Error())
|
||||
if err := json.Unmarshal([]byte(strings.Trim(originText, "\r\n\t ")), &arrs); err != nil {
|
||||
log.Errorf("json.Unmarshal error :%s", err.Error())
|
||||
return
|
||||
}
|
||||
for _, d := range arrs {
|
||||
|
@ -124,7 +125,7 @@ func (s *SyncOrder) run() {
|
|||
default:
|
||||
log.Errorf("new order chan is full!")
|
||||
}
|
||||
|
||||
log.Infof("add order :%s", order.OrderNo)
|
||||
} else {
|
||||
model.UpdateOrder(order)
|
||||
select {
|
||||
|
@ -132,8 +133,10 @@ func (s *SyncOrder) run() {
|
|||
default:
|
||||
log.Errorf("update order chan is full!")
|
||||
}
|
||||
log.Infof("update order :%s", order.OrderNo)
|
||||
}
|
||||
}
|
||||
log.Infof("update/add order total:%d", len(arrs))
|
||||
}
|
||||
|
||||
func (s *SyncOrder) httpPost(requestUrl string) ([]byte, error) {
|
||||
|
|
Loading…
Reference in New Issue