Browse Source

增加模版消息发送日志

xiexiaoyuan 2 years ago
parent
commit
c37ad192e9
2 changed files with 2 additions and 0 deletions
  1. 1 0
      models/user_template_record.go
  2. 1 0
      services/wechat_send_msg.go

+ 1 - 0
models/user_template_record.go

@@ -16,6 +16,7 @@ type UserTemplateRecord struct {
 	SendStatus int
 	SendType   int
 	UniqueCode string
+	WxAppId    string
 }
 
 //添加banner

+ 1 - 0
services/wechat_send_msg.go

@@ -218,6 +218,7 @@ func toSendTemplateMsg(wxAppId string, data []byte, resource string, sendType in
 		}
 		tr.UniqueCode = uniqueCode
 		tr.SendType = sendType
+		tr.WxAppId = wxAppId
 		go func() {
 			err = models.AddUserTemplateRecord(tr)
 			if err != nil {