Browse Source

临时提交

boweniac 3 months ago
parent
commit
d6b6087f2c

+ 0 - 3
ent/schema/label_relationship.go

@@ -1,8 +1,6 @@
 package schema
 
 import (
-	"wechat-api/ent/schema/localmixin"
-
 	"entgo.io/ent"
 	"entgo.io/ent/dialect/entsql"
 	"entgo.io/ent/schema"
@@ -34,7 +32,6 @@ func (LabelRelationship) Mixin() []ent.Mixin {
 	return []ent.Mixin{
 		mixins.IDMixin{},
 		mixins.StatusMixin{},
-		localmixin.SoftDeleteMixin{},
 	}
 }
 

+ 3 - 3
internal/logic/Wxhook/get_friends_and_groups_logic.go

@@ -55,13 +55,13 @@ type GetWechatFriendListResp struct {
 }
 
 func (l *GetFriendsAndGroupsLogic) GetFriendsAndGroups(req *types.IDReq) (resp *types.BaseMsgResp, err error) {
-	organizationId := l.ctx.Value("organizationId").(uint64)
+	//organizationId := l.ctx.Value("organizationId").(uint64)
 	wxInfo, err := l.svcCtx.DB.Wx.Get(l.ctx, req.Id)
-	if err != nil {
+	if err != nil || wxInfo == nil {
 		l.Error("查询微信信息失败", err)
 		return
 	}
-
+	organizationId := wxInfo.OrganizationID
 	if wxInfo.ServerID > 0 {
 		//云托管版本
 		serverInfo, err := l.svcCtx.DB.Server.Get(l.ctx, wxInfo.ServerID)