Browse Source

增加OID

liwei 3 days ago
parent
commit
50104474c6
1 changed files with 3 additions and 1 deletions
  1. 3 1
      internal/logic/chat/add_friend_by_phone_logic.go

+ 3 - 1
internal/logic/chat/add_friend_by_phone_logic.go

@@ -63,6 +63,7 @@ func (l *AddFriendByPhoneLogic) getWxIdListByOid(Oid uint64, Type uint64) ([]str
 type AddFriendByPhoneInfo struct {
 	Type        int    `json:"type"`
 	WeChatId    string `json:"wechat_id"`
+	Oid         int64  `json:"oid"`
 	Phone       string `json:"phone"`
 	Message     string `json:"message"`
 	CallbackURL string `json:"callback_url"`
@@ -80,7 +81,7 @@ func (l *AddFriendByPhoneLogic) rebuildAddFriendByPhoneInfos(req *types.AddFrien
 	infos := []AddFriendByPhoneInfo{}
 	for idx, phone := range req.Phones {
 		info := AddFriendByPhoneInfo{Type: req.Type, WeChatId: req.WeChatIds[idx],
-			Phone: phone, Message: req.Message, CallbackURL: req.CallbackURL}
+			Phone: phone, Message: req.Message, CallbackURL: req.CallbackURL, Oid: int64(Oid)}
 		infos = append(infos, info)
 	}
 	return infos, nil
@@ -182,6 +183,7 @@ func (l *AddFriendByPhoneLogic) AppendWechaFriendAddInfo(addInfo *AddFriendByPho
 		SetNotNilFindContent(&addInfo.Phone).
 		SetNotNilMessage(&addInfo.Message).
 		SetIsCanAdd(isCanAdd).
+		SetNotNilOrganizationID(&addInfo.Oid).
 		Save(l.ctx)
 
 	id := int64(0)