Commit 3808dcb6 by 朱继来

temp1

parent 6d5c2e0d
......@@ -2,3 +2,21 @@
2020-01-02 16:04:10.465 INFO (main.go:main.(*RecvPro).Consumer:25) 1111111111111111111
2020-01-02 16:04:10.476 INFO (main.go:main.(*RecvPro).Consumer:25) 1111111111111111111
2020-01-02 16:04:10.487 INFO (main.go:main.(*RecvPro).Consumer:25) 1111111111111111111
2020-01-02 17:05:03.912 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:06:26.517 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:06:53.815 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:07:43.332 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:11:39.605 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:13:21.195 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:38:14.077 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:38:14.181 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:38:14.259 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:38:14.339 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:39:05.827 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:43:53.785 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:45:37.499 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:46:04.934 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:47:01.123 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:47:01.267 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:47:01.384 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
2020-01-02 17:47:01.535 INFO (main.go:main.(*RecvPro).Consumer:24) {"data":[{"orderNum":"ZTY-SZ201912240009","goods":"GRM033R71A822KA01D","purchasingPrice":"0.005900","unitPrice":"0.005900","brand":"ICCNEXERGY","nums":"10000","currency":"\u4eba\u6c11\u5e01","totalPrice":"59.00","remarks":"xxx","material":"4VSqC0NYQzi8gWpBuK630IiIKlg=","purchasing":"\u6731\u7ee7\u6765","projectId":1,"deliveryTime":"v001","send_email":"zjl@ichunt.com"}],"toUser":["zjl@ichunt.com"],"ccUser":["zgj@ichunt.com","zjl@ichunt.com"],"combined":"259.00","order_amount":"259.00","date":"2020-01-02","kefu_remark":"","id":"\u5f20\u5a77\u7389"}
......@@ -7,8 +7,14 @@ import (
"net/http"
"encoding/json"
"strings"
"io/ioutil"
)
type JosnResp struct {
err_code string `json:"err_code"`
msg string `json:"msg"`
}
func SendPurchaseEmail(data string) (err error) {
crm_url := util.Configs.Crm_domain.SendMailUrl // CRM发送邮件接口
......@@ -22,12 +28,25 @@ func SendPurchaseEmail(data string) (err error) {
req.Header.Set("Content-Type", "application/json")
resp, err := client.Do(req)
fmt.Println(resp.Body)
defer resp.Body.Close()
if err != nil {
fmt.Println(err.Error())
}
defer resp.Body.Close()
body, _ := ioutil.ReadAll(resp.Body)
fmt.Println(string(body))
res := &JosnResp{}
err1 := json.Unmarshal(body, res)
if err1 !=nil{
fmt.Println(err1)
}
fmt.Println(res)
return
}
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