fix: fix circular import

This commit is contained in:
JustSong
2022-11-22 15:23:12 +08:00
parent d0c2c27071
commit e911c3fb7c
4 changed files with 14 additions and 15 deletions
+5
View File
@@ -29,6 +29,11 @@ func (i *WeChatCorpAccountTokenStoreItem) Key() string {
return i.CorpId + i.AgentId + i.CorpSecret
}
func (i *WeChatCorpAccountTokenStoreItem) IsShared() bool {
return model.DB.Where("wechat_corp_account_id = ? and wechat_corp_account_secret = ? and wechat_corp_account_agent_id = ?",
i.CorpId, i.CorpSecret, i.AgentId).Find(&model.User{}).RowsAffected != 1
}
func (i *WeChatCorpAccountTokenStoreItem) Token() string {
return i.AccessToken
}