Procházet zdrojové kódy

fix:群发增加ctype字段

jimmyyem před 19 hodinami
rodič
revize
135a277331

+ 4 - 1
desc/wechat/batch_msg.api

@@ -50,7 +50,7 @@ type (
 		// 标签列表
 		Type  *int32 `json:"type,optional"`
 
-		// 内容类型:1-微信 2-whatsapp
+		// 内容类型:1-微信 2-whatsapp 3-企微
 		Ctype *uint64 `json:"ctype,optional"`
 		Cc *string `json:"cc,optional"`
 		Phone *string `json:"phone,optional"`
@@ -93,6 +93,9 @@ type (
 
 		// 群发类型
 		Type *int32 `json:"type"`
+
+		// 内容类型:1-个微 3-企微
+		Ctype *uint64 `json:"ctype,optional"`
     }
 
     // BatchMsg information response | BatchMsg信息返回体

+ 1 - 1
desc/wechat/contact.api

@@ -40,7 +40,7 @@ type (
         // 联系人类型:1好友,2群组,3公众号,4企业微信联系人
         Type  *int `json:"type,optional"`
 
-		// 内容类型:1-个微 2-企微
+		// 内容类型:1-个微 3-企微
 		Ctype *uint64 `json:"ctype,optional"`
     }
 

+ 3 - 2
desc/wechat/wx.api

@@ -130,7 +130,7 @@ type (
         // 回调地址 
         Callback  *string `json:"callback,optional"`
 
-		// 账号类型 1-个微 2-企微
+		// 账号类型 1-个微 3-企微
 		Ctype *uint64 `json:"ctype,optional"`
     }
 
@@ -139,7 +139,7 @@ type (
         // 租户id
         OrganizationId  *uint64 `json:"organizationId,optional"`
 
-		// 账号类型 1-个微 2-企微
+		// 账号类型 1-个微 3-企微
 		Ctype *uint64 `json:"ctype,optional"`
     }
 
@@ -160,6 +160,7 @@ type (
         // 微信昵称
         Nickname  *string `json:"nickname,optional"`
 
+		// 内容类型:1-个微 3-企微
 		Ctype *uint64 `json:"ctype,optional"`
     }
 

+ 1 - 1
internal/logic/batch_msg/create_batch_msg_logic.go

@@ -191,7 +191,7 @@ func (l *CreateBatchMsgLogic) CreateBatchMsg(req *types.BatchMsgInfo) (*types.Ba
 		SetNillableSendTime(sendTime).
 		SetNotNilType(req.Type).
 		SetNotNilOrganizationID(&organizationId).
-		SetCtype(1).
+		SetNotNilCtype(req.Ctype).
 		Save(l.ctx)
 
 	if err != nil {

+ 6 - 1
internal/logic/batch_msg/get_batch_msg_list_logic.go

@@ -35,7 +35,12 @@ func (l *GetBatchMsgListLogic) GetBatchMsgList(req *types.BatchMsgListReq) (*typ
 	var predicates []predicate.BatchMsg
 	predicates = append(predicates, batchmsg.Type(*req.Type))
 	predicates = append(predicates, batchmsg.OrganizationIDEQ(organizationId))
-	predicates = append(predicates, batchmsg.Ctype(1))
+
+	var ctype uint64 = 1
+	if req.Ctype != nil {
+		ctype = *req.Ctype
+	}
+	predicates = append(predicates, batchmsg.Ctype(ctype))
 	if req.BatchNo != nil {
 		predicates = append(predicates, batchmsg.BatchNoContains(*req.BatchNo))
 	}

+ 8 - 5
internal/types/types.go

@@ -388,7 +388,7 @@ type WxListReq struct {
 	ProcessId *string `json:"processId,optional"`
 	// 回调地址
 	Callback *string `json:"callback,optional"`
-	// 账号类型 1-个微 2-企微
+	// 账号类型 1-个微 3-企微
 	Ctype *uint64 `json:"ctype,optional"`
 }
 
@@ -397,7 +397,7 @@ type WxListReq struct {
 type WxSelectListReq struct {
 	// 租户id
 	OrganizationId *uint64 `json:"organizationId,optional"`
-	// 账号类型 1-个微 2-企微
+	// 账号类型 1-个微 3-企微
 	Ctype *uint64 `json:"ctype,optional"`
 }
 
@@ -416,7 +416,8 @@ type WxSelectListInfo struct {
 	Wxid *string `json:"wxid,optional"`
 	// 微信昵称
 	Nickname *string `json:"nickname,optional"`
-	Ctype    *uint64 `json:"ctype,optional"`
+	// 内容类型:1-个微 3-企微
+	Ctype *uint64 `json:"ctype,optional"`
 }
 
 // Wx information response | Wx信息返回体
@@ -1001,7 +1002,7 @@ type ContactListReq struct {
 	Nickname *string `json:"nickname,optional"`
 	// 联系人类型:1好友,2群组,3公众号,4企业微信联系人
 	Type *int `json:"type,optional"`
-	// 内容类型:1-个微 2-企微
+	// 内容类型:1-个微 3-企微
 	Ctype *uint64 `json:"ctype,optional"`
 }
 
@@ -1927,7 +1928,7 @@ type BatchMsgInfo struct {
 	GroupLabels []uint64 `json:"groupLabels,optional"`
 	// 标签列表
 	Type *int32 `json:"type,optional"`
-	// 内容类型:1-微信 2-whatsapp
+	// 内容类型:1-微信 2-whatsapp 3-企微
 	Ctype        *uint64 `json:"ctype,optional"`
 	Cc           *string `json:"cc,optional"`
 	Phone        *string `json:"phone,optional"`
@@ -1966,6 +1967,8 @@ type BatchMsgListReq struct {
 	TaskName *string `json:"taskName,optional"`
 	// 群发类型
 	Type *int32 `json:"type"`
+	// 内容类型:1-个微 3-企微
+	Ctype *uint64 `json:"ctype,optional"`
 }
 
 // BatchMsg information response | BatchMsg信息返回体