|
@@ -219,9 +219,10 @@ func GetLzProductList() (err error) {
|
|
|
}
|
|
|
|
|
|
func GetLzProductDetail() (err error) {
|
|
|
- utils.FileLog.Info("start GetLzProductDetail")
|
|
|
+ utils.LzFileLog.Info("start GetLzProductDetail")
|
|
|
defer func() {
|
|
|
if err != nil {
|
|
|
+ utils.LzFileLog.Info("Err:"+err.Error())
|
|
|
fmt.Println("Err:" + err.Error())
|
|
|
}
|
|
|
}()
|
|
@@ -248,6 +249,7 @@ func GetLzProductDetail() (err error) {
|
|
|
}
|
|
|
|
|
|
fmt.Println("page:", i, totalPage)
|
|
|
+ utils.LzFileLog.Info("Page:%s",strconv.Itoa(i))
|
|
|
timestamp := fmt.Sprintf("%d", time.Now().Unix())
|
|
|
token := utils.MD5(username + timestamp + utils.MD5(password))
|
|
|
|
|
@@ -264,15 +266,14 @@ func GetLzProductDetail() (err error) {
|
|
|
utils.LzFileLog.Info("GetLzProductDetail Param: %s", param.Encode())
|
|
|
body, err := http.Post(postUrl, param.Encode())
|
|
|
if err != nil {
|
|
|
- fmt.Println("err:", err.Error())
|
|
|
+ utils.LzFileLog.Info("Post Err:%s",err.Error())
|
|
|
return err
|
|
|
}
|
|
|
- fmt.Println(string(body))
|
|
|
utils.LzFileLog.Info("GetLzProductDetail Result: %s",string(body))
|
|
|
resp := new(models.LzProductInfoDetailResp)
|
|
|
err = json.Unmarshal(body, &resp)
|
|
|
if err != nil {
|
|
|
- fmt.Println("Unmarshal Err:" + err.Error())
|
|
|
+ utils.LzFileLog.Info("Unmarshal Err:%s",err.Error())
|
|
|
return err
|
|
|
}
|
|
|
if resp.Code != "1" {
|