Browse Source

Merge branch 'master' of http://8.136.199.33:3000/hongze/hongze_cygx into debug

xingzai 10 months ago
parent
commit
2c00b14770
3 changed files with 14 additions and 12 deletions
  1. 3 2
      services/activity.go
  2. 3 2
      services/activity_task.go
  3. 8 8
      services/sms.go

+ 3 - 2
services/activity.go

@@ -93,8 +93,9 @@ func SendActivityBeginMsgMeeting(cont context.Context) (err error) {
 	//func SendActivityBeginMsgMeeting() (err error) {
 	defer func() {
 		if err != nil {
-			go utils.SendAlarmMsg("15分钟会议消息提醒失败", 2)
-			fmt.Println("发送失败,Err:", err.Error())
+			//go utils.SendAlarmMsg("15分钟会议消息提醒失败", 2)
+			go utils.SendAlarmMsg(fmt.Sprint("15分钟会议消息提醒失败 SendActivityBeginMsgMeeting Err:", err.Error()), 2)
+			//fmt.Println("发送失败,Err:", err.Error())
 		}
 	}()
 	var condition string

+ 3 - 2
services/activity_task.go

@@ -74,8 +74,9 @@ func PushVmpRobotMeeting(cont context.Context) (err error) {
 	//func PushVmpRobotMeeting() (err error) {
 	defer func() {
 		if err != nil {
-			go utils.SendAlarmMsg("15分钟会议消息提醒失败", 2)
-			fmt.Println("发送失败,Err:", err.Error())
+			//go utils.SendAlarmMsg("15分钟会议消息提醒失败err :"+err.Error(), 2)
+			go utils.SendAlarmMsg(fmt.Sprint("研选活动会前15分钟推送给上海那边的机器人失败 PushVmpRobotMeeting Err:", err.Error()), 2)
+			//fmt.Println("发送失败,Err:", err.Error())
 		}
 	}()
 

+ 8 - 8
services/sms.go

@@ -21,16 +21,16 @@ func SendSmsCode(mobile, vcode string) bool {
 	var netReturn map[string]interface{}
 	err = json.Unmarshal(result, &netReturn)
 	if err != nil {
-		go utils.SendAlarmMsg("短信验证码发送失败", 1)
-		go utils.SendEmail("短信验证码发送失败", "err:"+err.Error()+" result"+string(result), utils.EmailSendToUsers)
+		go utils.SendAlarmMsg("短信验证码发送失败err:"+err.Error()+" result"+string(result)+"mobile:"+mobile, 1)
+		//go utils.SendEmail("短信验证码发送失败", "err:"+err.Error()+" result"+string(result), utils.EmailSendToUsers)
 		flag = false
 	}
 	if netReturn["error_code"].(float64) == 0 {
 		fmt.Printf("接口返回result字段是:\r\n%v", netReturn["result"])
 		flag = true
 	} else {
-		go utils.SendAlarmMsg("短信验证码发送失败", 1)
-		go utils.SendEmail("短信验证码发送失败", " result"+string(result), utils.EmailSendToUsers)
+		go utils.SendAlarmMsg("短信验证码发送失败err:"+err.Error()+" result"+string(result)+"mobile:"+mobile, 1)
+		//go utils.SendEmail("短信验证码发送失败", " result"+string(result), utils.EmailSendToUsers)
 		flag = false
 	}
 	return flag
@@ -74,16 +74,16 @@ func SendSmsCodeGj(mobile, vcode, areaNum string) bool {
 	var netReturn map[string]interface{}
 	err = json.Unmarshal(result, &netReturn)
 	if err != nil {
-		go utils.SendAlarmMsg("短信验证码发送失败", 1)
-		go utils.SendEmail("短信验证码发送失败", "err:"+err.Error()+" result"+string(result), utils.EmailSendToUsers)
+		go utils.SendAlarmMsg("国际短信验证码发送失败err:"+err.Error()+" result"+string(result)+"mobile:"+mobile, 1)
+		//go utils.SendEmail("短信验证码发送失败", "err:"+err.Error()+" result"+string(result), utils.EmailSendToUsers)
 		flag = false
 	}
 	if netReturn["error_code"].(float64) == 0 {
 		fmt.Printf("接口返回result字段是:\r\n%v", netReturn["result"])
 		flag = true
 	} else {
-		go utils.SendAlarmMsg("短信验证码发送失败", 1)
-		go utils.SendEmail("短信验证码发送失败", " result"+string(result), utils.EmailSendToUsers)
+		go utils.SendAlarmMsg("国际短信验证码发送失败err:"+err.Error()+" result"+string(result)+"mobile:"+mobile, 1)
+		//go utils.SendEmail("短信验证码发送失败", " result"+string(result), utils.EmailSendToUsers)
 		flag = false
 	}
 	return flag