rdluck 4 years ago
parent
commit
fb75b855ad

+ 0 - 13
models/user.go

@@ -41,9 +41,6 @@ type LoginReq struct {
 
 func PcBindMobile(unionId, mobile string, userId, loginType int) (wxUserId int, err error) {
 	//loginType  登录方式:1:手机,2:邮箱
-
-	utils.FileLog.Info("绑定参数:%s %s %d %d", unionId, mobile, userId, loginType)
-
 	sql := ``
 	if loginType == 1 {
 		sql = `SELECT * FROM wx_user WHERE mobile = ? `
@@ -59,7 +56,6 @@ func PcBindMobile(unionId, mobile string, userId, loginType int) (wxUserId int,
 	}
 
 	if user == nil || (err != nil && err.Error() == utils.ErrNoRow()) {
-		utils.FileLog.Info("用户不存在,根据union_id绑定")
 		msql := ``
 		if loginType == 1 {
 			msql = "UPDATE wx_user SET mobile = ?,bind_account = ? WHERE union_id = ? "
@@ -69,7 +65,6 @@ func PcBindMobile(unionId, mobile string, userId, loginType int) (wxUserId int,
 		_, err = o.Raw(msql, mobile, mobile, unionId).Exec()
 		wxUserId = userId
 	} else {
-		utils.FileLog.Info("用户存在,user.UnionId:%s", user.UnionId)
 		if user.UnionId == "" {
 			sql = `SELECT * FROM wx_user WHERE union_id = ? `
 			userInfo := new(WxUser)
@@ -78,19 +73,12 @@ func PcBindMobile(unionId, mobile string, userId, loginType int) (wxUserId int,
 			if err != nil {
 				return
 			}
-
-			utils.FileLog.Info("user.RegisterTime %s", user.RegisterTime.Format(utils.FormatDateTime))
-			utils.FileLog.Info("userInfo.RegisterTime %s", userInfo.RegisterTime.Format(utils.FormatDateTime))
-
 			var maxRegisterTime time.Time
 			if user.RegisterTime.Before(userInfo.RegisterTime) {
 				maxRegisterTime = user.RegisterTime
-				utils.FileLog.Info("after")
 			} else {
 				maxRegisterTime = userInfo.RegisterTime
-				utils.FileLog.Info("not after")
 			}
-			utils.FileLog.Info("maxRegisterTime %s", maxRegisterTime.Format(utils.FormatDateTime))
 			wxUserId = user.UserId
 			dsql := ` DELETE FROM wx_user WHERE union_id = ? `
 			_, err = o.Raw(dsql, unionId).Exec()
@@ -117,7 +105,6 @@ func PcBindMobile(unionId, mobile string, userId, loginType int) (wxUserId int,
 			}
 			msql := ` UPDATE wx_user SET union_id=?,province=?,city=?,country=?,headimgurl=?,unionid=?,sex=?  WHERE user_id = ?  `
 			_, err = o.Raw(msql, unionId, userInfo.Province, userInfo.City, userInfo.Country, userInfo.Headimgurl, unionId, userInfo.Sex, user.UserId).Exec()
-			utils.FileLog.Info("用户存在,bind:%s,%d,%s", unionId, wxUserId)
 			wxUserId = userId
 		}
 	}

+ 4 - 4
models/user_record.go

@@ -54,9 +54,9 @@ func BindUserRecordByOpenid(userId int, openId, bindAccount string) (err error)
 }
 
 //修改用户微信信息
-func ModifyUserRecordInfo(openId, nickName, headimgUrl, city, province, country string, sex, userId int) (err error) {
+func ModifyUserRecordInfo(openId, nickName, headimgUrl, city, province, country, sessionKey string, sex, userId int) (err error) {
 	o := orm.NewOrm()
-	sql := `UPDATE user_record SET nick_name=?,headimgurl=?,sex=?,city=?,province=?,country=? WHERE user_id=? and open_id=? `
-	_, err = o.Raw(sql, nickName, headimgUrl, sex, city, province, country, userId, openId).Exec()
+	sql := `UPDATE user_record SET nick_name=?,headimgurl=?,sex=?,city=?,province=?,country=?,session_key=? WHERE user_id=? and open_id=? `
+	_, err = o.Raw(sql, nickName, headimgUrl, sex, city, province, country, sessionKey, userId, openId).Exec()
 	return
-}
+}

+ 0 - 3
models/wechat.go

@@ -25,7 +25,6 @@ func GetWxAccessToken() (accessTokenStr string, err error) {
 	wxToken := new(WxToken)
 	err = o.Raw(sql).QueryRow(&wxToken)
 	if err != nil && err.Error() != utils.ErrNoRow() {
-		utils.FileLog.Info("Get wxToken Err:", err.Error())
 		return
 	}
 	//Token不存在
@@ -68,7 +67,6 @@ func GetWxToken() (item *WxAccessToken, err error) {
 	getUrl := "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=" + utils.WxPublicAppId + "&secret=" + utils.WxPublicAppSecret
 	result, err := http.Get(getUrl)
 	if err != nil {
-		utils.FileLog.Info("GetWxToken Err:", err.Error())
 		return
 	}
 	err = json.Unmarshal(result, &item)
@@ -77,7 +75,6 @@ func GetWxToken() (item *WxAccessToken, err error) {
 		return
 	}
 	if item.Errmsg != "" {
-		utils.FileLog.Info("GetWxToken fail result:%s", string(result))
 	}
 	return
 }

+ 0 - 2
services/article.go

@@ -4,7 +4,6 @@ import (
 	"fmt"
 	"github.com/PuerkitoBio/goquery"
 	"hongze/hongze_cygx/models"
-	"hongze/hongze_cygx/utils"
 	"html"
 	"strings"
 )
@@ -36,7 +35,6 @@ func GetReportContentSub(content string) (contentSub string, err error) {
 
 func GetReportContentTextSub(content string) (contentSub string, err error) {
 	content = html.UnescapeString(content)
-	utils.FileLog.Info("%s", content)
 	doc, err := goquery.NewDocumentFromReader(strings.NewReader(content))
 	//if err != nil {
 	//	fmt.Println("create doc err:", err.Error())

+ 0 - 4
services/baidu.go

@@ -5,7 +5,6 @@ import (
 	"encoding/json"
 	"errors"
 	"fmt"
-	"hongze/hongze_cygx/utils"
 	"net/url"
 	"rdluck_tools/http"
 )
@@ -96,7 +95,6 @@ func GetBusinessCard(imgUrl string) (item *BdBussinessCard, err error) {
 	cardBody, err := http.Post(bussinessCardUrl, param.Encode())
 	fmt.Println("body:",string(cardBody))
 	//fmt.Println(string(cardBody))
-	utils.FileLog.Info("cardBody:%s" + string(cardBody))
 	if err != nil {
 		fmt.Println("err:", err.Error())
 		return
@@ -195,7 +193,6 @@ func GetBusinessCardByAccurate(imgUrl string) (item *CardAccurate, err error) {
 	param := url.Values{}
 	param.Set("image", imageBase64)
 	cardBody, err := http.Post(bussinessCardUrl, param.Encode())
-	utils.FileLog.Info("GetBusinessCardByAccurate:%s" + string(cardBody))
 	if err != nil {
 		fmt.Println("err:", err.Error())
 		return
@@ -224,7 +221,6 @@ func GetBdGeneralBasic(imgUrl string) (item *CardAccurate, err error) {
 	param := url.Values{}
 	param.Set("image", imageBase64)
 	cardBody, err := http.Post(bussinessCardUrl, param.Encode())
-	utils.FileLog.Info("GetBusinessCardByAccurate:%s" + string(cardBody))
 	if err != nil {
 		fmt.Println("err:", err.Error())
 		return

+ 0 - 1
services/elastic.go

@@ -328,7 +328,6 @@ func EsMatchFunctionScoreQuery(indexName, keyWord string, startSize, pageSize in
 	request := client.Search(indexName).Highlight(highlight).From(startSize).Size(pageSize).Query(boolquery)
 	searchByMatch, err := request.Do(context.Background())
 	searchJson, err := json.Marshal(searchByMatch)
-	utils.FileLog.Info("%s", string(searchJson))
 	if searchByMatch != nil {
 		if searchByMatch.Hits != nil {
 			for _, v := range searchByMatch.Hits.Hits {

+ 0 - 110
services/elasticsearch.go

@@ -463,7 +463,6 @@ func SearchByKeyWordQuery(keyWord string) (result []*models.SearchItem, err erro
 	if searchByMatch.Hits != nil {
 		for _, v := range searchByMatch.Hits.Hits {
 			articleJson, _ := v.Source.MarshalJSON()
-			utils.FileLog.Info("%s", string(articleJson))
 			fmt.Println(string(articleJson))
 		}
 	}
@@ -505,9 +504,6 @@ func SearchByKeyWord(keyWord string) (result []*models.SearchItem, err error) {
 	//.Analyzer("ik_smart")
 	//.Analyzer("ik_smart")
 	//boolquery.Must(elastic.NewMatchQuery("Title", keyWord), elastic.NewMatchQuery("BodyText", keyWord))
-	mapping := client.GetMapping()
-	mapJson, err := json.Marshal(mapping)
-	utils.FileLog.Info("%s", string(mapJson))
 	boolquery := elastic.NewBoolQuery()
 
 	keyLen := len(keyWordArr)
@@ -644,110 +640,4 @@ func AddMap() {
 		return
 	}
 	fmt.Println(resp)
-	//mappping := make(map[string]interface{})
-	//mappping[esMappingIndex] = bodyJson
-	//putResult,err:=client.PutMapping().Index(esIndex).BodyJson(mappping).Do(context.Background())
-	//mapping,err := client.GetMapping().Index(esIndex).Do(context.Background())
-	//fmt.Println(mapping)
-	//mapJson, err := json.Marshal(mapping)
-	//utils.FileLog.Info("%s", string(mapJson))
-	//fmt.Println(esMappingIndex)
-	//
-	//fmt.Println(err)
-	//fmt.Println(putResult)
-}
-
-func Search(keyWord string) (result []*models.SearchItem, err error) {
-	fmt.Println("keyWord:", keyWord)
-	pageSize := 20
-	keyWordArr, err := GetIndustryMapNameSlice(keyWord)
-	keyWordArr = RemoveDuplicatesAndEmpty(keyWordArr)
-
-	fmt.Println(keyWordArr)
-	fmt.Println(" keyWordArr ")
-
-	if err != nil {
-		go utils.SendEmail(utils.APPNAME+" "+utils.RunMode+"异常提醒:", "GetIndustryMapNameSlice:"+err.Error(), utils.EmailSendToUsers)
-	}
-	errorlog := log.New(os.Stdout, "APP", log.LstdFlags)
-	file := "./rdlucklog/eslog.log"
-	logFile, _ := os.OpenFile(file, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0766)
-
-	client, err := elastic.NewClient(
-		elastic.SetURL(ES_URL),
-		elastic.SetBasicAuth(ES_USERNAME, ES_PASSWORD),
-		elastic.SetTraceLog(log.New(logFile, "ES-TRACE: ", 0)),
-		elastic.SetSniff(false), elastic.SetErrorLog(errorlog))
-
-	//var esIndex = "cygx_article"
-	var esIndex = "article_two"
-	searchMap := make(map[int]int)
-
-	boolquery := elastic.NewBoolQuery()
-
-	keyLen := len(keyWordArr)
-	n := float64(keyLen)
-	matchArr := make([]elastic.Query, 0)
-	for _, v := range keyWordArr {
-		if v != "" {
-			matchq1 := elastic.NewMatchQuery("Title", v).Boost(n).Analyzer("ik_smart")
-			matchq2 := elastic.NewMatchQuery("BodyText", v).Boost(n).Analyzer("ik_smart")
-			matchArr = append(matchArr, matchq1)
-			matchArr = append(matchArr, matchq2)
-		}
-		n--
-	}
-	//matchArr=append(matchArr,matchq1)
-	//matchArr=append(matchArr,matchq2)
-	boolquery.Should().Must(matchArr...)
-	//boolquery.Must(elastic.NewMatchQuery("BodyText", keyWord).Boost(1).Analyzer("ik_smart"))
-
-	highlight := elastic.NewHighlight()
-	highlight = highlight.Fields(elastic.NewHighlighterField("Title"), elastic.NewHighlighterField("BodyText"))
-	highlight = highlight.PreTags("<font color='red'>").PostTags("</font>")
-	//request := client.Search(esIndex).Highlight(highlight).Size(pageSize).Query(queryString)
-	request := client.Search(esIndex).Highlight(highlight).Size(pageSize).Query(boolquery)
-	searchByMatch, err := request.Do(context.Background())
-	fmt.Println(searchByMatch, err)
-	//searchByMatch, err := client.Search(esIndex).Highlight(highlight).Size(pageSize).Do(context.Background())
-	if err != nil {
-		return result, err
-	}
-
-	jsonResult,err:=json.Marshal(searchByMatch.Hits.Hits)
-	utils.FileLog.Info("%s",string(jsonResult))
-	return
-	if searchByMatch.Hits != nil {
-		for _, v := range searchByMatch.Hits.Hits {
-			articleJson, err := v.Source.MarshalJSON()
-			fmt.Println(string(articleJson))
-			utils.FileLog.Info("%s",string(articleJson))
-			if err != nil {
-				return nil, err
-			}
-			article := new(models.CygxArticle)
-			err = json.Unmarshal(articleJson, &article)
-			if err != nil {
-				return nil, err
-			}
-			if _, ok := searchMap[article.ArticleId]; !ok {
-				searchItem := new(models.SearchItem)
-				searchItem.ArticleId, _ = strconv.Atoi(v.Id)
-				searchItem.Body = v.Highlight["BodyText"]
-				var title string
-				if len(v.Highlight["Title"]) > 0 {
-					title = v.Highlight["Title"][0]
-				} else {
-					title = article.Title
-				}
-				searchItem.Title = title
-				searchItem.PublishDate = article.PublishDate
-				result = append(result, searchItem)
-				searchMap[article.ArticleId] = article.ArticleId
-			}
-		}
-	}
-	body, err := json.Marshal(searchMap)
-	utils.FileLog.Info("%s", string(body))
-	return
 }

+ 0 - 7
services/go-elasticsearch.go

@@ -7,8 +7,6 @@ import (
 	"fmt"
 	"github.com/elastic/go-elasticsearch/v7"
 	"hongze/hongze_cygx/models"
-	"hongze/hongze_cygx/utils"
-	"io/ioutil"
 )
 
 /*
@@ -54,9 +52,6 @@ func EsV7Search(indexName, keyWord string) (result []*models.SearchItem, err err
 			},
 		},
 	}
-	queryJson,err:=json.Marshal(query)
-	utils.FileLog.Info("%s",string(queryJson))
-
 	if err := json.NewEncoder(&buf).Encode(query); err != nil {
 		fmt.Println(err, "Error encoding query")
 	}
@@ -71,8 +66,6 @@ func EsV7Search(indexName, keyWord string) (result []*models.SearchItem, err err
 		fmt.Println("search err:", err)
 	}
 	defer res.Body.Close()
-	body, err := ioutil.ReadAll(res.Body)
-	utils.FileLog.Info("%s", string(body))
 	//boolQuery := elastic.NewBoolQuery()
 	//
 	//matchArr := make([]elastic.Query, 0)

+ 0 - 1
services/tactics.go

@@ -119,7 +119,6 @@ func SyncTacticsList() (err error) {
 //body 解析
 func BodyAnalysis(body string) (expertNumStr, expertContentStr, interviewDateStr string) {
 	body = html.UnescapeString(body)
-	utils.FileLog.Info("%s", body)
 	doc, err := goquery.NewDocumentFromReader(strings.NewReader(body))
 	if err != nil {
 		fmt.Println("create doc err:", err.Error())

+ 8 - 10
services/user.go

@@ -16,7 +16,7 @@ var ERR_USER_NOT_BIND = errors.New("用户没有绑定")
 func GetWxUserItemByOpenId(openid string) (item *models.WxUserItem, err error) {
 	//通过openid获取用户关联信息
 	userRecord, userRecordErr := models.GetUserRecordByOpenId(openid)
-	fmt.Println("userRecordErr",userRecordErr)
+	fmt.Println("userRecordErr", userRecordErr)
 	if userRecordErr != nil {
 		if userRecordErr.Error() == utils.ErrNoRow() {
 			err = ERR_NO_USER_RECORD
@@ -44,7 +44,7 @@ func GetWxUserItemByOpenId(openid string) (item *models.WxUserItem, err error) {
 
 	//获取用户信息
 	item, wxUserErr := models.GetWxUserItemByUserId(userRecord.UserId)
-	fmt.Println("wxUserErr",wxUserErr)
+	fmt.Println("wxUserErr", wxUserErr)
 	if wxUserErr != nil {
 		err = wxUserErr
 		return
@@ -115,7 +115,7 @@ func formatWxUserAndUserRecord(wxUser *models.WxUserItem, userRecord *models.Use
 	//wxUser.RealName = userRecord.RealName
 	//wxUser.BindAccount = userRecord.BindAccount
 	wxUser.Headimgurl = userRecord.Headimgurl
-	wxUser.SessionKey=userRecord.SessionKey
+	wxUser.SessionKey = userRecord.SessionKey
 }
 
 //通过用户 用户记录  和  来源平台  格式化返回 用户数据
@@ -142,7 +142,7 @@ func formatWxUser(wxUser *models.WxUserItem, platform int) {
 	//wxUser.RealName = userRecord.RealName
 	//wxUser.BindAccount = userRecord.BindAccount
 	wxUser.Headimgurl = userRecord.Headimgurl
-	wxUser.SessionKey=userRecord.SessionKey
+	wxUser.SessionKey = userRecord.SessionKey
 	return
 }
 
@@ -229,7 +229,7 @@ func WxLogin(code, openId, unionId string, wxUserInfo *WxUserInfo) (token string
 	firstLogin = 1
 	fmt.Println("GetWxUserItemByOpenId ", openId)
 	wxUser, wxUserErr := GetWxUserItemByOpenId(openId)
-	fmt.Println("wxUserErr",wxUserErr)
+	fmt.Println("wxUserErr", wxUserErr)
 	if wxUserErr == ERR_NO_USER_RECORD { //没有用户openid记录
 		_, recordErr := AddUserRecord(openId, unionId, wxUserInfo.Nickname, "", wxUserInfo.Province, wxUserInfo.City, wxUserInfo.Country, wxUserInfo.Headimgurl, wxUserInfo.SessionKey, utils.WxPlatform, wxUserInfo.Sex, 0)
 		err = recordErr
@@ -241,16 +241,14 @@ func WxLogin(code, openId, unionId string, wxUserInfo *WxUserInfo) (token string
 		err = wxUserErr
 		return
 	}
-	fmt.Println("line 239 ", openId)
+	if wxUserInfo != nil && wxUserInfo.Nickname != "" {
+		go models.ModifyUserRecordInfo(openId, wxUserInfo.Nickname, wxUserInfo.Headimgurl, wxUserInfo.City, wxUserInfo.Province, wxUserInfo.Country, wxUserInfo.SessionKey, wxUserInfo.Sex, userId)
+	}
 	//如果已经登录注册绑定的情况下
 	if wxUser != nil && wxUserErr == nil {
 		//获取用户权限
 		firstLogin = wxUser.FirstLogin
 		userId = wxUser.UserId
-		if wxUserInfo != nil && wxUserInfo.Nickname != "" {
-			go models.ModifyUserRecordInfo(openId, wxUserInfo.Nickname, wxUserInfo.Headimgurl, wxUserInfo.City, wxUserInfo.Province, wxUserInfo.Country, wxUserInfo.Sex, userId)
-		}
-
 		{
 			codeLog := new(models.WxUserCode)
 			codeLog.WxCode = code

+ 0 - 3
services/wechat.go

@@ -33,7 +33,6 @@ func WxGetUserOpenIdByCode(code string) (item *WxAccessToken, err error) {
 	if err != nil {
 		return nil, err
 	}
-	utils.FileLog.Info("WxGetUserOpenIdByCode:%s", string(result))
 	err = json.Unmarshal(result, &item)
 	return
 }
@@ -87,8 +86,6 @@ func WxGetUserInfo(openId, accessToken string) (item *WxUserInfo, err error) {
 		return
 	}
 	fmt.Println("result:", string(result))
-	utils.FileLog.Info("WxGetUserInfo:%s openId:%s,accessToken:%s ", string(result), openId, accessToken)
-	utils.FileLog.Info("WxGetUserInfo Result:%s ", string(result))
 	err = json.Unmarshal(result, &item)
 	return
 }

+ 0 - 15
services/wechat_send_msg.go

@@ -17,13 +17,11 @@ func SendInterviewApplyTemplateMsg(realName, companyName, mobile, articleTitle,
 	defer func() {
 		if err != nil {
 			go utils.SendEmail("发送模版消息失败"+time.Now().Format("2006-01-02 15:04:05"), msg+";Err:"+err.Error(), utils.EmailSendToUsers)
-			utils.FileLog.Info("发送模版消息失败,Err:%s,%s", err.Error(), msg)
 		}
 		if msg != "" {
 			utils.FileLog.Info("发送模版消息失败,msg:%s", msg)
 		}
 	}()
-	utils.FileLog.Info("%s", "services SendMsg")
 
 	accessToken, err := models.GetWxAccessToken()
 	if err != nil {
@@ -56,7 +54,6 @@ func SendInterviewApplyTemplateMsg(realName, companyName, mobile, articleTitle,
 	sendMap["data"] = sendData
 	sendTemplateMsg(sendUrl, openId, sendMap)
 	fmt.Println("send end")
-	utils.FileLog.Info("send end")
 	return
 }
 
@@ -66,14 +63,11 @@ func SendInterviewApplyCancelTemplateMsg(realName, companyName, mobile, articleT
 	defer func() {
 		if err != nil {
 			go utils.SendEmail("发送模版消息失败"+time.Now().Format("2006-01-02 15:04:05"), msg+";Err:"+err.Error(), utils.EmailSendToUsers)
-			utils.FileLog.Info("发送模版消息失败,Err:%s,%s", err.Error(), msg)
 		}
 		if msg != "" {
 			utils.FileLog.Info("发送模版消息失败,msg:%s", msg)
 		}
 	}()
-	utils.FileLog.Info("%s", "services SendMsg")
-
 	accessToken, err := models.GetWxAccessToken()
 	if err != nil {
 		msg = "GetWxAccessToken Err:" + err.Error()
@@ -101,7 +95,6 @@ func SendInterviewApplyCancelTemplateMsg(realName, companyName, mobile, articleT
 	sendMap["data"] = sendData
 	sendTemplateMsg(sendUrl, openId, sendMap)
 	fmt.Println("send end")
-	utils.FileLog.Info("send end")
 	return
 }
 
@@ -111,14 +104,11 @@ func SendPermissionApplyTemplateMsg(realName, companyName, mobile, openId,applyM
 	defer func() {
 		if err != nil {
 			go utils.SendEmail("发送模版消息失败"+time.Now().Format("2006-01-02 15:04:05"), msg+";Err:"+err.Error(), utils.EmailSendToUsers)
-			utils.FileLog.Info("发送模版消息失败,Err:%s,%s", err.Error(), msg)
 		}
 		if msg != "" {
 			utils.FileLog.Info("发送模版消息失败,msg:%s", msg)
 		}
 	}()
-	utils.FileLog.Info("%s", "services SendMsg")
-
 	accessToken, err := models.GetWxAccessToken()
 	if err != nil {
 		msg = "GetWxAccessToken Err:" + err.Error()
@@ -150,7 +140,6 @@ func SendPermissionApplyTemplateMsg(realName, companyName, mobile, openId,applyM
 	sendMap["data"] = sendData
 	sendTemplateMsg(sendUrl, openId, sendMap)
 	fmt.Println("send end")
-	utils.FileLog.Info("send end")
 	return
 }
 
@@ -159,19 +148,16 @@ func sendTemplateMsg(sendUrl, openId string, sendMap map[string]interface{}) (er
 	data, err := json.Marshal(sendMap)
 	if err != nil {
 		fmt.Println("SendTemplateMsgOne Marshal Err:", err.Error())
-		utils.FileLog.Info("SendTemplateMsgOne Marshal Err:%s", err.Error())
 		return err
 	}
 	err = toSendTemplateMsg(sendUrl, data)
 	if err != nil {
 		fmt.Println("send err:", err.Error())
-		utils.FileLog.Info("ToSendTemplateMsg Err:%s", err.Error())
 	}
 	return
 }
 
 func toSendTemplateMsg(sendUrl string, data []byte) (err error) {
-	utils.FileLog.Info("Send:%s", string(data))
 	client := http.Client{}
 	resp, err := client.Post(sendUrl, "application/json", bytes.NewBuffer(data))
 	if err != nil {
@@ -180,7 +166,6 @@ func toSendTemplateMsg(sendUrl string, data []byte) (err error) {
 	defer resp.Body.Close()
 
 	body, _ := ioutil.ReadAll(resp.Body)
-	utils.FileLog.Info("SendResult:%s", string(body))
 	var templateResponse SendTemplateResponse
 	err = json.Unmarshal(body, &templateResponse)
 	if err != nil {

+ 1 - 3
utils/logs.go

@@ -1,8 +1,6 @@
 package utils
 
-import (
-	"github.com/astaxie/beego/logs"
-)
+import "github.com/astaxie/beego/logs"
 
 var FileLog *logs.BeeLogger