jimmyyem 1 месяц назад
Родитель
Сommit
c99682304a

+ 1 - 0
desc/wechat/batch_msg.api

@@ -141,6 +141,7 @@ type (
 		Phone *string `json:"phone"`
 		To *string `json:"to"`
 		Text *string `json:"text"`
+		Lang *string `json:"lang"`
 	}
 )
 

+ 2 - 0
desc/wechat/label_relationship.api

@@ -84,6 +84,8 @@ type (
 		Cbirtharea *string `json:"cbirtharea,optional"`
 		CidcardNo *string `json:"cidcardNo,optional"`
 		Ctitle *string `json:"ctitle,optional"`
+		Cc *string `json:"c,optional"`
+		Phone *string `json:"phone,optional"`
     }
     // The response data of label information | Label信息
     LabelInfo {

+ 3 - 3
internal/logic/batch_msg/send_batch_msg_text_logic.go

@@ -26,16 +26,16 @@ func NewSendBatchMsgTextLogic(ctx context.Context, svcCtx *svc.ServiceContext) *
 func (l *SendBatchMsgTextLogic) SendBatchMsgText(req *types.SendMsgReq) (*types.BaseMsgResp, error) {
 	resp := types.BaseMsgResp{}
 
-	//TODO 这里是发送文本消息
 	result, err := aliyun.SendChatappMessage(
-		"message", "text", "", "zh_CN",
+		"message", "text", "", *req.Lang,
 		*req.Phone, *req.To, *req.Text)
+	l.Logger.Infof("send chatapp message result=%v\n", result)
 
 	if err != nil {
 		resp.Code = 1
 		resp.Msg = err.Error()
 	} else {
-		resp.Msg = *result.Body.Message
+		resp.Msg = *result.Body.Code
 	}
 
 	return &resp, nil

+ 2 - 1
internal/types/types.go

@@ -806,7 +806,7 @@ type ContactInfo struct {
 	Cbirtharea    *string `json:"cbirtharea,optional"`
 	CidcardNo     *string `json:"cidcardNo,optional"`
 	Ctitle        *string `json:"ctitle,optional"`
-	Cc            *string `json:"cc,optional"`
+	Cc            *string `json:"c,optional"`
 	Phone         *string `json:"phone,optional"`
 }
 
@@ -2015,6 +2015,7 @@ type SendMsgReq struct {
 	Phone *string `json:"phone"`
 	To    *string `json:"to"`
 	Text  *string `json:"text"`
+	Lang  *string `json:"lang"`
 }
 
 // The data of msg information | Msg信息