fix: fix token store not correctly registered (#30)

This commit is contained in:
JustSong
2022-12-15 11:31:27 +08:00
parent 9f956d15a0
commit 648baceb1d
5 changed files with 56 additions and 5 deletions
+4
View File
@@ -34,6 +34,10 @@ func (i *WeChatCorpAccountTokenStoreItem) IsShared() bool {
i.CorpId, i.AgentSecret, i.AgentId).Find(&model.User{}).RowsAffected != 1
}
func (i *WeChatCorpAccountTokenStoreItem) IsFilled() bool {
return i.CorpId != "" && i.AgentSecret != "" && i.AgentId != ""
}
func (i *WeChatCorpAccountTokenStoreItem) Token() string {
return i.AccessToken
}