Commit 7a61dce4ddcddb38fc0143478239e6d78bf32254

Authored by 王言钊
1 parent 839a7bc1

新增直播申请短信通知功能1

src/main/java/com/cnlive/shenhe/job/LiveApplyJob.java
@@ -138,14 +138,14 @@ public class LiveApplyJob { @@ -138,14 +138,14 @@ public class LiveApplyJob {
138 if (result == null) { 138 if (result == null) {
139 noticeState = CommonConst.NOTICE_FAIL; 139 noticeState = CommonConst.NOTICE_FAIL;
140 noticeMsg = noticeMsg + "\n" + dateTime + " 邮件服务器调用失败,result为空"; 140 noticeMsg = noticeMsg + "\n" + dateTime + " 邮件服务器调用失败,result为空";
141 - i++; 141 + i += 1;
142 break; 142 break;
143 } 143 }
144 Integer code = result.getInteger("errorCode"); 144 Integer code = result.getInteger("errorCode");
145 if (code != 0) { 145 if (code != 0) {
146 noticeState = CommonConst.NOTICE_FAIL; 146 noticeState = CommonConst.NOTICE_FAIL;
147 noticeMsg = noticeMsg + "\n" + dateTime + " 邮件服务器调用失败,result返回消息为:" + result.getString("errorMessage"); 147 noticeMsg = noticeMsg + "\n" + dateTime + " 邮件服务器调用失败,result返回消息为:" + result.getString("errorMessage");
148 - i++; 148 + i += 1;
149 break; 149 break;
150 } else { 150 } else {
151 noticeState = CommonConst.NOTICE_SUCCESS; 151 noticeState = CommonConst.NOTICE_SUCCESS;
@@ -155,7 +155,7 @@ public class LiveApplyJob { @@ -155,7 +155,7 @@ public class LiveApplyJob {
155 logger.info("异常结果为:{}", e.getMessage()); 155 logger.info("异常结果为:{}", e.getMessage());
156 noticeState = CommonConst.NOTICE_FAIL; 156 noticeState = CommonConst.NOTICE_FAIL;
157 noticeMsg = noticeMsg + "\n" + dateTime + " 邮件服务器调用失败,服务器报错了"; 157 noticeMsg = noticeMsg + "\n" + dateTime + " 邮件服务器调用失败,服务器报错了";
158 - i++; 158 + i += 1;
159 break; 159 break;
160 } 160 }
161 String taskId = "003_01"; 161 String taskId = "003_01";
@@ -163,12 +163,11 @@ public class LiveApplyJob { @@ -163,12 +163,11 @@ public class LiveApplyJob {
163 Map<String, String> mobileparams = new HashMap<>(16); 163 Map<String, String> mobileparams = new HashMap<>(16);
164 mobileparams.put("appId", appId); 164 mobileparams.put("appId", appId);
165 mobileparams.put("mobile", liveApply.getMobile()); 165 mobileparams.put("mobile", liveApply.getMobile());
166 - mobileparams.put("title", title);  
167 mobileparams.put("content", content); 166 mobileparams.put("content", content);
168 mobileparams.put("taskId", taskId); 167 mobileparams.put("taskId", taskId);
169 mobileparams.put("signatureId", signatureId); 168 mobileparams.put("signatureId", signatureId);
170 httpUtil.setParamMap(mobileparams); 169 httpUtil.setParamMap(mobileparams);
171 - if (i >10) { 170 + if (i > 10) {
172 Map<String, String> post = httpUtil.post(mobile_send_URL); 171 Map<String, String> post = httpUtil.post(mobile_send_URL);
173 logger.info("当前发送短信用户为:" + liveApply.getMobile() + ",发送短信的直播申请审核云id为:" + liveApply.getId() + "结果为:" + post.get("result")); 172 logger.info("当前发送短信用户为:" + liveApply.getMobile() + ",发送短信的直播申请审核云id为:" + liveApply.getId() + "结果为:" + post.get("result"));
174 noticeState = CommonConst.NOTICE_SUCCESS; 173 noticeState = CommonConst.NOTICE_SUCCESS;